generated-configure.sh revision 1076:26ba036c46fc
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_giflib
1091with_lcms
1092with_libpng
1093with_zlib
1094with_stdc__lib
1095with_msvcr_dll
1096with_dxsdk
1097with_dxsdk_lib
1098with_dxsdk_include
1099with_num_cores
1100with_memory_size
1101with_jobs
1102with_sjavac_server_java
1103enable_sjavac
1104enable_precompiled_headers
1105enable_ccache
1106with_ccache_dir
1107'
1108      ac_precious_vars='build_alias
1109host_alias
1110target_alias
1111BASENAME
1112BASH
1113CAT
1114CHMOD
1115CMP
1116COMM
1117CP
1118CPIO
1119CUT
1120DATE
1121DIFF
1122DIRNAME
1123ECHO
1124EXPR
1125FILE
1126FIND
1127HEAD
1128LN
1129LS
1130MKDIR
1131MKTEMP
1132MV
1133NAWK
1134PRINTF
1135RM
1136SH
1137SORT
1138TAIL
1139TAR
1140TEE
1141TOUCH
1142TR
1143UNAME
1144UNIQ
1145WC
1146WHICH
1147XARGS
1148AWK
1149GREP
1150EGREP
1151FGREP
1152SED
1153CYGPATH
1154READLINK
1155DF
1156SETFILE
1157UNZIP
1158ZIP
1159LDD
1160OTOOL
1161READELF
1162HG
1163STAT
1164TIME
1165DSYMUTIL
1166XATTR
1167CODESIGN
1168PKG_CONFIG
1169JAVA
1170JAVAC
1171JAVAH
1172JAR
1173NATIVE2ASCII
1174JARSIGNER
1175CC
1176CFLAGS
1177LDFLAGS
1178LIBS
1179CPPFLAGS
1180CXX
1181CXXFLAGS
1182CCC
1183CPP
1184CXXCPP
1185AS
1186AR
1187OBJC
1188OBJCFLAGS
1189LIPO
1190STRIP
1191NM
1192GNM
1193MCS
1194OBJCOPY
1195OBJDUMP
1196BUILD_CC
1197BUILD_CXX
1198BUILD_LD
1199JTREGEXE
1200XMKMF
1201FREETYPE_CFLAGS
1202FREETYPE_LIBS
1203ALSA_CFLAGS
1204ALSA_LIBS
1205LCMS_CFLAGS
1206LCMS_LIBS
1207PNG_CFLAGS
1208PNG_LIBS
1209LIBFFI_CFLAGS
1210LIBFFI_LIBS
1211CCACHE'
1212
1213
1214# Initialize some variables set by options.
1215ac_init_help=
1216ac_init_version=false
1217ac_unrecognized_opts=
1218ac_unrecognized_sep=
1219# The variables have the same names as the options, with
1220# dashes changed to underlines.
1221cache_file=/dev/null
1222exec_prefix=NONE
1223no_create=
1224no_recursion=
1225prefix=NONE
1226program_prefix=NONE
1227program_suffix=NONE
1228program_transform_name=s,x,x,
1229silent=
1230site=
1231srcdir=
1232verbose=
1233x_includes=NONE
1234x_libraries=NONE
1235
1236# Installation directory options.
1237# These are left unexpanded so users can "make install exec_prefix=/foo"
1238# and all the variables that are supposed to be based on exec_prefix
1239# by default will actually change.
1240# Use braces instead of parens because sh, perl, etc. also accept them.
1241# (The list follows the same order as the GNU Coding Standards.)
1242bindir='${exec_prefix}/bin'
1243sbindir='${exec_prefix}/sbin'
1244libexecdir='${exec_prefix}/libexec'
1245datarootdir='${prefix}/share'
1246datadir='${datarootdir}'
1247sysconfdir='${prefix}/etc'
1248sharedstatedir='${prefix}/com'
1249localstatedir='${prefix}/var'
1250includedir='${prefix}/include'
1251oldincludedir='/usr/include'
1252docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1253infodir='${datarootdir}/info'
1254htmldir='${docdir}'
1255dvidir='${docdir}'
1256pdfdir='${docdir}'
1257psdir='${docdir}'
1258libdir='${exec_prefix}/lib'
1259localedir='${datarootdir}/locale'
1260mandir='${datarootdir}/man'
1261
1262ac_prev=
1263ac_dashdash=
1264for ac_option
1265do
1266  # If the previous option needs an argument, assign it.
1267  if test -n "$ac_prev"; then
1268    eval $ac_prev=\$ac_option
1269    ac_prev=
1270    continue
1271  fi
1272
1273  case $ac_option in
1274  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1275  *=)   ac_optarg= ;;
1276  *)    ac_optarg=yes ;;
1277  esac
1278
1279  # Accept the important Cygnus configure options, so we can diagnose typos.
1280
1281  case $ac_dashdash$ac_option in
1282  --)
1283    ac_dashdash=yes ;;
1284
1285  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1286    ac_prev=bindir ;;
1287  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1288    bindir=$ac_optarg ;;
1289
1290  -build | --build | --buil | --bui | --bu)
1291    ac_prev=build_alias ;;
1292  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1293    build_alias=$ac_optarg ;;
1294
1295  -cache-file | --cache-file | --cache-fil | --cache-fi \
1296  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1297    ac_prev=cache_file ;;
1298  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1299  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1300    cache_file=$ac_optarg ;;
1301
1302  --config-cache | -C)
1303    cache_file=config.cache ;;
1304
1305  -datadir | --datadir | --datadi | --datad)
1306    ac_prev=datadir ;;
1307  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1308    datadir=$ac_optarg ;;
1309
1310  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1311  | --dataroo | --dataro | --datar)
1312    ac_prev=datarootdir ;;
1313  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1314  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1315    datarootdir=$ac_optarg ;;
1316
1317  -disable-* | --disable-*)
1318    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1319    # Reject names that are not valid shell variable names.
1320    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1321      as_fn_error $? "invalid feature name: $ac_useropt"
1322    ac_useropt_orig=$ac_useropt
1323    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1324    case $ac_user_opts in
1325      *"
1326"enable_$ac_useropt"
1327"*) ;;
1328      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1329	 ac_unrecognized_sep=', ';;
1330    esac
1331    eval enable_$ac_useropt=no ;;
1332
1333  -docdir | --docdir | --docdi | --doc | --do)
1334    ac_prev=docdir ;;
1335  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1336    docdir=$ac_optarg ;;
1337
1338  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1339    ac_prev=dvidir ;;
1340  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1341    dvidir=$ac_optarg ;;
1342
1343  -enable-* | --enable-*)
1344    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1345    # Reject names that are not valid shell variable names.
1346    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1347      as_fn_error $? "invalid feature name: $ac_useropt"
1348    ac_useropt_orig=$ac_useropt
1349    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1350    case $ac_user_opts in
1351      *"
1352"enable_$ac_useropt"
1353"*) ;;
1354      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1355	 ac_unrecognized_sep=', ';;
1356    esac
1357    eval enable_$ac_useropt=\$ac_optarg ;;
1358
1359  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1360  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1361  | --exec | --exe | --ex)
1362    ac_prev=exec_prefix ;;
1363  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1364  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1365  | --exec=* | --exe=* | --ex=*)
1366    exec_prefix=$ac_optarg ;;
1367
1368  -gas | --gas | --ga | --g)
1369    # Obsolete; use --with-gas.
1370    with_gas=yes ;;
1371
1372  -help | --help | --hel | --he | -h)
1373    ac_init_help=long ;;
1374  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1375    ac_init_help=recursive ;;
1376  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1377    ac_init_help=short ;;
1378
1379  -host | --host | --hos | --ho)
1380    ac_prev=host_alias ;;
1381  -host=* | --host=* | --hos=* | --ho=*)
1382    host_alias=$ac_optarg ;;
1383
1384  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1385    ac_prev=htmldir ;;
1386  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1387  | --ht=*)
1388    htmldir=$ac_optarg ;;
1389
1390  -includedir | --includedir | --includedi | --included | --include \
1391  | --includ | --inclu | --incl | --inc)
1392    ac_prev=includedir ;;
1393  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1394  | --includ=* | --inclu=* | --incl=* | --inc=*)
1395    includedir=$ac_optarg ;;
1396
1397  -infodir | --infodir | --infodi | --infod | --info | --inf)
1398    ac_prev=infodir ;;
1399  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1400    infodir=$ac_optarg ;;
1401
1402  -libdir | --libdir | --libdi | --libd)
1403    ac_prev=libdir ;;
1404  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1405    libdir=$ac_optarg ;;
1406
1407  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1408  | --libexe | --libex | --libe)
1409    ac_prev=libexecdir ;;
1410  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1411  | --libexe=* | --libex=* | --libe=*)
1412    libexecdir=$ac_optarg ;;
1413
1414  -localedir | --localedir | --localedi | --localed | --locale)
1415    ac_prev=localedir ;;
1416  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1417    localedir=$ac_optarg ;;
1418
1419  -localstatedir | --localstatedir | --localstatedi | --localstated \
1420  | --localstate | --localstat | --localsta | --localst | --locals)
1421    ac_prev=localstatedir ;;
1422  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1423  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1424    localstatedir=$ac_optarg ;;
1425
1426  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1427    ac_prev=mandir ;;
1428  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1429    mandir=$ac_optarg ;;
1430
1431  -nfp | --nfp | --nf)
1432    # Obsolete; use --without-fp.
1433    with_fp=no ;;
1434
1435  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1436  | --no-cr | --no-c | -n)
1437    no_create=yes ;;
1438
1439  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1440  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1441    no_recursion=yes ;;
1442
1443  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1444  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1445  | --oldin | --oldi | --old | --ol | --o)
1446    ac_prev=oldincludedir ;;
1447  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1448  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1449  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1450    oldincludedir=$ac_optarg ;;
1451
1452  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1453    ac_prev=prefix ;;
1454  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1455    prefix=$ac_optarg ;;
1456
1457  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1458  | --program-pre | --program-pr | --program-p)
1459    ac_prev=program_prefix ;;
1460  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1461  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1462    program_prefix=$ac_optarg ;;
1463
1464  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1465  | --program-suf | --program-su | --program-s)
1466    ac_prev=program_suffix ;;
1467  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1468  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1469    program_suffix=$ac_optarg ;;
1470
1471  -program-transform-name | --program-transform-name \
1472  | --program-transform-nam | --program-transform-na \
1473  | --program-transform-n | --program-transform- \
1474  | --program-transform | --program-transfor \
1475  | --program-transfo | --program-transf \
1476  | --program-trans | --program-tran \
1477  | --progr-tra | --program-tr | --program-t)
1478    ac_prev=program_transform_name ;;
1479  -program-transform-name=* | --program-transform-name=* \
1480  | --program-transform-nam=* | --program-transform-na=* \
1481  | --program-transform-n=* | --program-transform-=* \
1482  | --program-transform=* | --program-transfor=* \
1483  | --program-transfo=* | --program-transf=* \
1484  | --program-trans=* | --program-tran=* \
1485  | --progr-tra=* | --program-tr=* | --program-t=*)
1486    program_transform_name=$ac_optarg ;;
1487
1488  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1489    ac_prev=pdfdir ;;
1490  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1491    pdfdir=$ac_optarg ;;
1492
1493  -psdir | --psdir | --psdi | --psd | --ps)
1494    ac_prev=psdir ;;
1495  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1496    psdir=$ac_optarg ;;
1497
1498  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1499  | -silent | --silent | --silen | --sile | --sil)
1500    silent=yes ;;
1501
1502  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1503    ac_prev=sbindir ;;
1504  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1505  | --sbi=* | --sb=*)
1506    sbindir=$ac_optarg ;;
1507
1508  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1509  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1510  | --sharedst | --shareds | --shared | --share | --shar \
1511  | --sha | --sh)
1512    ac_prev=sharedstatedir ;;
1513  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1514  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1515  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1516  | --sha=* | --sh=*)
1517    sharedstatedir=$ac_optarg ;;
1518
1519  -site | --site | --sit)
1520    ac_prev=site ;;
1521  -site=* | --site=* | --sit=*)
1522    site=$ac_optarg ;;
1523
1524  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1525    ac_prev=srcdir ;;
1526  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1527    srcdir=$ac_optarg ;;
1528
1529  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1530  | --syscon | --sysco | --sysc | --sys | --sy)
1531    ac_prev=sysconfdir ;;
1532  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1533  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1534    sysconfdir=$ac_optarg ;;
1535
1536  -target | --target | --targe | --targ | --tar | --ta | --t)
1537    ac_prev=target_alias ;;
1538  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1539    target_alias=$ac_optarg ;;
1540
1541  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1542    verbose=yes ;;
1543
1544  -version | --version | --versio | --versi | --vers | -V)
1545    ac_init_version=: ;;
1546
1547  -with-* | --with-*)
1548    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1549    # Reject names that are not valid shell variable names.
1550    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1551      as_fn_error $? "invalid package name: $ac_useropt"
1552    ac_useropt_orig=$ac_useropt
1553    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1554    case $ac_user_opts in
1555      *"
1556"with_$ac_useropt"
1557"*) ;;
1558      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1559	 ac_unrecognized_sep=', ';;
1560    esac
1561    eval with_$ac_useropt=\$ac_optarg ;;
1562
1563  -without-* | --without-*)
1564    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1565    # Reject names that are not valid shell variable names.
1566    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1567      as_fn_error $? "invalid package name: $ac_useropt"
1568    ac_useropt_orig=$ac_useropt
1569    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1570    case $ac_user_opts in
1571      *"
1572"with_$ac_useropt"
1573"*) ;;
1574      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1575	 ac_unrecognized_sep=', ';;
1576    esac
1577    eval with_$ac_useropt=no ;;
1578
1579  --x)
1580    # Obsolete; use --with-x.
1581    with_x=yes ;;
1582
1583  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1584  | --x-incl | --x-inc | --x-in | --x-i)
1585    ac_prev=x_includes ;;
1586  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1587  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1588    x_includes=$ac_optarg ;;
1589
1590  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1591  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1592    ac_prev=x_libraries ;;
1593  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1594  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1595    x_libraries=$ac_optarg ;;
1596
1597  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1598Try \`$0 --help' for more information"
1599    ;;
1600
1601  *=*)
1602    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1603    # Reject names that are not valid shell variable names.
1604    case $ac_envvar in #(
1605      '' | [0-9]* | *[!_$as_cr_alnum]* )
1606      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1607    esac
1608    eval $ac_envvar=\$ac_optarg
1609    export $ac_envvar ;;
1610
1611  *)
1612    # FIXME: should be removed in autoconf 3.0.
1613    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1614    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1615      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1616    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1617    ;;
1618
1619  esac
1620done
1621
1622if test -n "$ac_prev"; then
1623  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1624  as_fn_error $? "missing argument to $ac_option"
1625fi
1626
1627if test -n "$ac_unrecognized_opts"; then
1628  case $enable_option_checking in
1629    no) ;;
1630    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1631    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1632  esac
1633fi
1634
1635# Check all directory arguments for consistency.
1636for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1637		datadir sysconfdir sharedstatedir localstatedir includedir \
1638		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1639		libdir localedir mandir
1640do
1641  eval ac_val=\$$ac_var
1642  # Remove trailing slashes.
1643  case $ac_val in
1644    */ )
1645      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1646      eval $ac_var=\$ac_val;;
1647  esac
1648  # Be sure to have absolute directory names.
1649  case $ac_val in
1650    [\\/$]* | ?:[\\/]* )  continue;;
1651    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1652  esac
1653  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1654done
1655
1656# There might be people who depend on the old broken behavior: `$host'
1657# used to hold the argument of --host etc.
1658# FIXME: To remove some day.
1659build=$build_alias
1660host=$host_alias
1661target=$target_alias
1662
1663# FIXME: To remove some day.
1664if test "x$host_alias" != x; then
1665  if test "x$build_alias" = x; then
1666    cross_compiling=maybe
1667  elif test "x$build_alias" != "x$host_alias"; then
1668    cross_compiling=yes
1669  fi
1670fi
1671
1672ac_tool_prefix=
1673test -n "$host_alias" && ac_tool_prefix=$host_alias-
1674
1675test "$silent" = yes && exec 6>/dev/null
1676
1677
1678ac_pwd=`pwd` && test -n "$ac_pwd" &&
1679ac_ls_di=`ls -di .` &&
1680ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1681  as_fn_error $? "working directory cannot be determined"
1682test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1683  as_fn_error $? "pwd does not report name of working directory"
1684
1685
1686# Find the source files, if location was not specified.
1687if test -z "$srcdir"; then
1688  ac_srcdir_defaulted=yes
1689  # Try the directory containing this script, then the parent directory.
1690  ac_confdir=`$as_dirname -- "$as_myself" ||
1691$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1692	 X"$as_myself" : 'X\(//\)[^/]' \| \
1693	 X"$as_myself" : 'X\(//\)$' \| \
1694	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1695$as_echo X"$as_myself" |
1696    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1697	    s//\1/
1698	    q
1699	  }
1700	  /^X\(\/\/\)[^/].*/{
1701	    s//\1/
1702	    q
1703	  }
1704	  /^X\(\/\/\)$/{
1705	    s//\1/
1706	    q
1707	  }
1708	  /^X\(\/\).*/{
1709	    s//\1/
1710	    q
1711	  }
1712	  s/.*/./; q'`
1713  srcdir=$ac_confdir
1714  if test ! -r "$srcdir/$ac_unique_file"; then
1715    srcdir=..
1716  fi
1717else
1718  ac_srcdir_defaulted=no
1719fi
1720if test ! -r "$srcdir/$ac_unique_file"; then
1721  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1722  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1723fi
1724ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1725ac_abs_confdir=`(
1726	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1727	pwd)`
1728# When building in place, set srcdir=.
1729if test "$ac_abs_confdir" = "$ac_pwd"; then
1730  srcdir=.
1731fi
1732# Remove unnecessary trailing slashes from srcdir.
1733# Double slashes in file names in object file debugging info
1734# mess up M-x gdb in Emacs.
1735case $srcdir in
1736*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1737esac
1738for ac_var in $ac_precious_vars; do
1739  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1740  eval ac_env_${ac_var}_value=\$${ac_var}
1741  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1742  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1743done
1744
1745#
1746# Report the --help message.
1747#
1748if test "$ac_init_help" = "long"; then
1749  # Omit some internal or obsolete options to make the list less imposing.
1750  # This message is too long to be a string in the A/UX 3.1 sh.
1751  cat <<_ACEOF
1752\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1753
1754Usage: $0 [OPTION]... [VAR=VALUE]...
1755
1756To assign environment variables (e.g., CC, CFLAGS...), specify them as
1757VAR=VALUE.  See below for descriptions of some of the useful variables.
1758
1759Defaults for the options are specified in brackets.
1760
1761Configuration:
1762  -h, --help              display this help and exit
1763      --help=short        display options specific to this package
1764      --help=recursive    display the short help of all the included packages
1765  -V, --version           display version information and exit
1766  -q, --quiet, --silent   do not print \`checking ...' messages
1767      --cache-file=FILE   cache test results in FILE [disabled]
1768  -C, --config-cache      alias for \`--cache-file=config.cache'
1769  -n, --no-create         do not create output files
1770      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1771
1772Installation directories:
1773  --prefix=PREFIX         install architecture-independent files in PREFIX
1774                          [$ac_default_prefix]
1775  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1776                          [PREFIX]
1777
1778By default, \`make install' will install all the files in
1779\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1780an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1781for instance \`--prefix=\$HOME'.
1782
1783For better control, use the options below.
1784
1785Fine tuning of the installation directories:
1786  --bindir=DIR            user executables [EPREFIX/bin]
1787  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1788  --libexecdir=DIR        program executables [EPREFIX/libexec]
1789  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1790  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1791  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1792  --libdir=DIR            object code libraries [EPREFIX/lib]
1793  --includedir=DIR        C header files [PREFIX/include]
1794  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1795  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1796  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1797  --infodir=DIR           info documentation [DATAROOTDIR/info]
1798  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1799  --mandir=DIR            man documentation [DATAROOTDIR/man]
1800  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1801  --htmldir=DIR           html documentation [DOCDIR]
1802  --dvidir=DIR            dvi documentation [DOCDIR]
1803  --pdfdir=DIR            pdf documentation [DOCDIR]
1804  --psdir=DIR             ps documentation [DOCDIR]
1805_ACEOF
1806
1807  cat <<\_ACEOF
1808
1809X features:
1810  --x-includes=DIR    X include files are in DIR
1811  --x-libraries=DIR   X library files are in DIR
1812
1813System types:
1814  --build=BUILD     configure for building on BUILD [guessed]
1815  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1816  --target=TARGET   configure for building compilers for TARGET [HOST]
1817_ACEOF
1818fi
1819
1820if test -n "$ac_init_help"; then
1821  case $ac_init_help in
1822     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1823   esac
1824  cat <<\_ACEOF
1825
1826Optional Features:
1827  --disable-option-checking  ignore unrecognized --enable/--with options
1828  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1829  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1830  --enable-openjdk-only   suppress building custom source even if present
1831                          [disabled]
1832  --enable-debug          set the debug level to fastdebug (shorthand for
1833                          --with-debug-level=fastdebug) [disabled]
1834  --disable-headful       disable building headful support (graphical UI
1835                          support) [enabled]
1836  --enable-hotspot-test-in-build
1837                          run the Queens test after Hotspot build [disabled]
1838  --enable-unlimited-crypto
1839                          Enable unlimited crypto policy [disabled]
1840  --enable-rmiconnector-iiop
1841                          enable the JMX RMIConnector iiop transport
1842                          [disabled]
1843  --disable-debug-symbols disable generation of debug symbols [enabled]
1844  --disable-zip-debug-info
1845                          disable zipping of debug-info files [enabled]
1846  --disable-freetype-bundling
1847                          disable bundling of the freetype library with the
1848                          build result [enabled on Windows or when using
1849                          --with-freetype, disabled otherwise]
1850  --enable-sjavac         use sjavac to do fast incremental compiles
1851                          [disabled]
1852  --disable-precompiled-headers
1853                          disable using precompiled headers when compiling C++
1854                          [enabled]
1855  --enable-ccache         enable using ccache to speed up recompilations
1856                          [disabled]
1857
1858Optional Packages:
1859  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1860  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1861  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1862                          support it), e.g. --with-target-bits=32 [guessed]
1863  --with-custom-make-dir  Deprecated. Option is kept for backwards
1864                          compatibility and is ignored
1865  --with-jdk-variant      JDK variant to build (normal) [normal]
1866  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1867  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1868                          client, minimal1, kernel, zero, zeroshark, core)
1869                          [server]
1870  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1871                          optimized (HotSpot build only)) [release]
1872  --with-devkit           use this devkit for compilers, tools and resources
1873  --with-sys-root         alias for --with-sysroot for backwards compatability
1874  --with-sysroot          use this directory as sysroot
1875  --with-tools-dir        alias for --with-toolchain-path for backwards
1876                          compatibility
1877  --with-toolchain-path   prepend these directories when searching for
1878                          toolchain binaries (compilers etc)
1879  --with-extra-path       prepend these directories to the default path
1880  --with-sdk-name         use the platform SDK of the given name. [macosx]
1881  --with-conf-name        use this as the name of the configuration [generated
1882                          from important configuration options]
1883  --with-builddeps-conf   use this configuration file for the builddeps
1884  --with-builddeps-server download and use build dependencies from this server
1885                          url
1886  --with-builddeps-dir    store downloaded build dependencies here
1887                          [/localhome/builddeps]
1888  --with-builddeps-group  chgrp the downloaded build dependencies to this
1889                          group
1890  --with-cacerts-file     specify alternative cacerts file
1891  --with-milestone        Set milestone value for build [internal]
1892  --with-update-version   Set update version value for build [b00]
1893  --with-user-release-suffix
1894                          Add a custom string to the version string if build
1895                          number is not set.[username_builddateb00]
1896  --with-build-number     Set build number value for build [b00]
1897  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1898  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1899                          invocations of boot JDK, overriding the default
1900                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1901                          -enableassertions"
1902  --with-add-source-root  for each and every source directory, look in this
1903                          additional source root for the same directory; if it
1904                          exists and have files in it, include it in the build
1905  --with-override-source-root
1906                          for each and every source directory, look in this
1907                          override source root for the same directory; if it
1908                          exists, use that directory instead and ignore the
1909                          directory in the original source root
1910  --with-adds-and-overrides
1911                          use the subdirs 'adds' and 'overrides' in the
1912                          specified directory as add-source-root and
1913                          override-source-root
1914  --with-override-langtools
1915                          use this langtools dir for the build
1916  --with-override-corba   use this corba dir for the build
1917  --with-override-jaxp    use this jaxp dir for the build
1918  --with-override-jaxws   use this jaxws dir for the build
1919  --with-override-hotspot use this hotspot dir for the build
1920  --with-override-nashorn use this nashorn dir for the build
1921  --with-override-jdk     use this jdk dir for the build
1922  --with-import-hotspot   import hotspot binaries from this jdk image or
1923                          hotspot build dist dir instead of building from
1924                          source
1925  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1926                          to show possible values [platform dependent]
1927  --with-jtreg            Regression Test Harness [probed]
1928  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1929  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1930  --with-extra-ldflags    extra flags to be used when linking jdk
1931  --with-x                use the X Window System
1932  --with-cups             specify prefix directory for the cups package
1933                          (expecting the headers under PATH/include)
1934  --with-cups-include     specify directory for the cups include files
1935  --with-freetype         specify prefix directory for the freetype package
1936                          (expecting the libraries under PATH/lib and the
1937                          headers under PATH/include)
1938  --with-freetype-include specify directory for the freetype include files
1939  --with-freetype-lib     specify directory for the freetype library
1940  --with-alsa             specify prefix directory for the alsa package
1941                          (expecting the libraries under PATH/lib and the
1942                          headers under PATH/include)
1943  --with-alsa-include     specify directory for the alsa include files
1944  --with-alsa-lib         specify directory for the alsa library
1945  --with-giflib           use giflib from build system or OpenJDK source
1946                          (system, bundled) [bundled]
1947  --with-lcms             use lcms2 from build system or OpenJDK source
1948                          (system, bundled) [bundled]
1949  --with-libpng           use libpng from build system or OpenJDK source
1950                          (system, bundled) [bundled]
1951  --with-zlib             use zlib from build system or OpenJDK source
1952                          (system, bundled) [bundled]
1953  --with-stdc++lib=<static>,<dynamic>,<default>
1954                          force linking of the C++ runtime on Linux to either
1955                          static or dynamic, default is static with dynamic as
1956                          fallback
1957  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1958                          only) [probed]
1959  --with-dxsdk            Deprecated. Option is kept for backwards
1960                          compatibility and is ignored
1961  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1962                          compatibility and is ignored
1963  --with-dxsdk-include    Deprecated. Option is kept for backwards
1964                          compatibility and is ignored
1965  --with-num-cores        number of cores in the build system, e.g.
1966                          --with-num-cores=8 [probed]
1967  --with-memory-size      memory (in MB) available in the build system, e.g.
1968                          --with-memory-size=1024 [probed]
1969  --with-jobs             number of parallel jobs to let make run [calculated
1970                          based on cores and memory]
1971  --with-sjavac-server-java
1972                          use this java binary for running the sjavac
1973                          background server [Boot JDK java]
1974  --with-ccache-dir       where to store ccache files [~/.ccache]
1975
1976Some influential environment variables:
1977  BASENAME    Override default value for BASENAME
1978  BASH        Override default value for BASH
1979  CAT         Override default value for CAT
1980  CHMOD       Override default value for CHMOD
1981  CMP         Override default value for CMP
1982  COMM        Override default value for COMM
1983  CP          Override default value for CP
1984  CPIO        Override default value for CPIO
1985  CUT         Override default value for CUT
1986  DATE        Override default value for DATE
1987  DIFF        Override default value for DIFF
1988  DIRNAME     Override default value for DIRNAME
1989  ECHO        Override default value for ECHO
1990  EXPR        Override default value for EXPR
1991  FILE        Override default value for FILE
1992  FIND        Override default value for FIND
1993  HEAD        Override default value for HEAD
1994  LN          Override default value for LN
1995  LS          Override default value for LS
1996  MKDIR       Override default value for MKDIR
1997  MKTEMP      Override default value for MKTEMP
1998  MV          Override default value for MV
1999  NAWK        Override default value for NAWK
2000  PRINTF      Override default value for PRINTF
2001  RM          Override default value for RM
2002  SH          Override default value for SH
2003  SORT        Override default value for SORT
2004  TAIL        Override default value for TAIL
2005  TAR         Override default value for TAR
2006  TEE         Override default value for TEE
2007  TOUCH       Override default value for TOUCH
2008  TR          Override default value for TR
2009  UNAME       Override default value for UNAME
2010  UNIQ        Override default value for UNIQ
2011  WC          Override default value for WC
2012  WHICH       Override default value for WHICH
2013  XARGS       Override default value for XARGS
2014  AWK         Override default value for AWK
2015  GREP        Override default value for GREP
2016  EGREP       Override default value for EGREP
2017  FGREP       Override default value for FGREP
2018  SED         Override default value for SED
2019  CYGPATH     Override default value for CYGPATH
2020  READLINK    Override default value for READLINK
2021  DF          Override default value for DF
2022  SETFILE     Override default value for SETFILE
2023  UNZIP       Override default value for UNZIP
2024  ZIP         Override default value for ZIP
2025  LDD         Override default value for LDD
2026  OTOOL       Override default value for OTOOL
2027  READELF     Override default value for READELF
2028  HG          Override default value for HG
2029  STAT        Override default value for STAT
2030  TIME        Override default value for TIME
2031  DSYMUTIL    Override default value for DSYMUTIL
2032  XATTR       Override default value for XATTR
2033  CODESIGN    Override default value for CODESIGN
2034  PKG_CONFIG  path to pkg-config utility
2035  JAVA        Override default value for JAVA
2036  JAVAC       Override default value for JAVAC
2037  JAVAH       Override default value for JAVAH
2038  JAR         Override default value for JAR
2039  NATIVE2ASCII
2040              Override default value for NATIVE2ASCII
2041  JARSIGNER   Override default value for JARSIGNER
2042  CC          C compiler command
2043  CFLAGS      C compiler flags
2044  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2045              nonstandard directory <lib dir>
2046  LIBS        libraries to pass to the linker, e.g. -l<library>
2047  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2048              you have headers in a nonstandard directory <include dir>
2049  CXX         C++ compiler command
2050  CXXFLAGS    C++ compiler flags
2051  CPP         C preprocessor
2052  CXXCPP      C++ preprocessor
2053  AS          Override default value for AS
2054  AR          Override default value for AR
2055  OBJC        Objective C compiler command
2056  OBJCFLAGS   Objective C compiler flags
2057  LIPO        Override default value for LIPO
2058  STRIP       Override default value for STRIP
2059  NM          Override default value for NM
2060  GNM         Override default value for GNM
2061  MCS         Override default value for MCS
2062  OBJCOPY     Override default value for OBJCOPY
2063  OBJDUMP     Override default value for OBJDUMP
2064  BUILD_CC    Override default value for BUILD_CC
2065  BUILD_CXX   Override default value for BUILD_CXX
2066  BUILD_LD    Override default value for BUILD_LD
2067  JTREGEXE    Override default value for JTREGEXE
2068  XMKMF       Path to xmkmf, Makefile generator for X Window System
2069  FREETYPE_CFLAGS
2070              C compiler flags for FREETYPE, overriding pkg-config
2071  FREETYPE_LIBS
2072              linker flags for FREETYPE, overriding pkg-config
2073  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2074  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2075  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2076  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2077  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2078  PNG_LIBS    linker flags for PNG, overriding pkg-config
2079  LIBFFI_CFLAGS
2080              C compiler flags for LIBFFI, overriding pkg-config
2081  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2082  CCACHE      Override default value for CCACHE
2083
2084Use these variables to override the choices made by `configure' or to help
2085it to find libraries and programs with nonstandard names/locations.
2086
2087Report bugs to <build-dev@openjdk.java.net>.
2088OpenJDK home page: <http://openjdk.java.net>.
2089_ACEOF
2090ac_status=$?
2091fi
2092
2093if test "$ac_init_help" = "recursive"; then
2094  # If there are subdirs, report their specific --help.
2095  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2096    test -d "$ac_dir" ||
2097      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2098      continue
2099    ac_builddir=.
2100
2101case "$ac_dir" in
2102.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2103*)
2104  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2105  # A ".." for each directory in $ac_dir_suffix.
2106  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2107  case $ac_top_builddir_sub in
2108  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2109  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2110  esac ;;
2111esac
2112ac_abs_top_builddir=$ac_pwd
2113ac_abs_builddir=$ac_pwd$ac_dir_suffix
2114# for backward compatibility:
2115ac_top_builddir=$ac_top_build_prefix
2116
2117case $srcdir in
2118  .)  # We are building in place.
2119    ac_srcdir=.
2120    ac_top_srcdir=$ac_top_builddir_sub
2121    ac_abs_top_srcdir=$ac_pwd ;;
2122  [\\/]* | ?:[\\/]* )  # Absolute name.
2123    ac_srcdir=$srcdir$ac_dir_suffix;
2124    ac_top_srcdir=$srcdir
2125    ac_abs_top_srcdir=$srcdir ;;
2126  *) # Relative name.
2127    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2128    ac_top_srcdir=$ac_top_build_prefix$srcdir
2129    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2130esac
2131ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2132
2133    cd "$ac_dir" || { ac_status=$?; continue; }
2134    # Check for guested configure.
2135    if test -f "$ac_srcdir/configure.gnu"; then
2136      echo &&
2137      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2138    elif test -f "$ac_srcdir/configure"; then
2139      echo &&
2140      $SHELL "$ac_srcdir/configure" --help=recursive
2141    else
2142      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2143    fi || ac_status=$?
2144    cd "$ac_pwd" || { ac_status=$?; break; }
2145  done
2146fi
2147
2148test -n "$ac_init_help" && exit $ac_status
2149if $ac_init_version; then
2150  cat <<\_ACEOF
2151OpenJDK configure jdk9
2152generated by GNU Autoconf 2.69
2153
2154Copyright (C) 2012 Free Software Foundation, Inc.
2155This configure script is free software; the Free Software Foundation
2156gives unlimited permission to copy, distribute and modify it.
2157_ACEOF
2158  exit
2159fi
2160
2161## ------------------------ ##
2162## Autoconf initialization. ##
2163## ------------------------ ##
2164
2165# ac_fn_c_try_compile LINENO
2166# --------------------------
2167# Try to compile conftest.$ac_ext, and return whether this succeeded.
2168ac_fn_c_try_compile ()
2169{
2170  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171  rm -f conftest.$ac_objext
2172  if { { ac_try="$ac_compile"
2173case "(($ac_try" in
2174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2175  *) ac_try_echo=$ac_try;;
2176esac
2177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2178$as_echo "$ac_try_echo"; } >&5
2179  (eval "$ac_compile") 2>conftest.err
2180  ac_status=$?
2181  if test -s conftest.err; then
2182    grep -v '^ *+' conftest.err >conftest.er1
2183    cat conftest.er1 >&5
2184    mv -f conftest.er1 conftest.err
2185  fi
2186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2187  test $ac_status = 0; } && {
2188	 test -z "$ac_c_werror_flag" ||
2189	 test ! -s conftest.err
2190       } && test -s conftest.$ac_objext; then :
2191  ac_retval=0
2192else
2193  $as_echo "$as_me: failed program was:" >&5
2194sed 's/^/| /' conftest.$ac_ext >&5
2195
2196	ac_retval=1
2197fi
2198  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199  as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_try_compile
2202
2203# ac_fn_cxx_try_compile LINENO
2204# ----------------------------
2205# Try to compile conftest.$ac_ext, and return whether this succeeded.
2206ac_fn_cxx_try_compile ()
2207{
2208  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209  rm -f conftest.$ac_objext
2210  if { { ac_try="$ac_compile"
2211case "(($ac_try" in
2212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2213  *) ac_try_echo=$ac_try;;
2214esac
2215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2216$as_echo "$ac_try_echo"; } >&5
2217  (eval "$ac_compile") 2>conftest.err
2218  ac_status=$?
2219  if test -s conftest.err; then
2220    grep -v '^ *+' conftest.err >conftest.er1
2221    cat conftest.er1 >&5
2222    mv -f conftest.er1 conftest.err
2223  fi
2224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2225  test $ac_status = 0; } && {
2226	 test -z "$ac_cxx_werror_flag" ||
2227	 test ! -s conftest.err
2228       } && test -s conftest.$ac_objext; then :
2229  ac_retval=0
2230else
2231  $as_echo "$as_me: failed program was:" >&5
2232sed 's/^/| /' conftest.$ac_ext >&5
2233
2234	ac_retval=1
2235fi
2236  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2237  as_fn_set_status $ac_retval
2238
2239} # ac_fn_cxx_try_compile
2240
2241# ac_fn_c_try_cpp LINENO
2242# ----------------------
2243# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2244ac_fn_c_try_cpp ()
2245{
2246  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247  if { { ac_try="$ac_cpp conftest.$ac_ext"
2248case "(($ac_try" in
2249  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2250  *) ac_try_echo=$ac_try;;
2251esac
2252eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2253$as_echo "$ac_try_echo"; } >&5
2254  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2255  ac_status=$?
2256  if test -s conftest.err; then
2257    grep -v '^ *+' conftest.err >conftest.er1
2258    cat conftest.er1 >&5
2259    mv -f conftest.er1 conftest.err
2260  fi
2261  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2262  test $ac_status = 0; } > conftest.i && {
2263	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2264	 test ! -s conftest.err
2265       }; then :
2266  ac_retval=0
2267else
2268  $as_echo "$as_me: failed program was:" >&5
2269sed 's/^/| /' conftest.$ac_ext >&5
2270
2271    ac_retval=1
2272fi
2273  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274  as_fn_set_status $ac_retval
2275
2276} # ac_fn_c_try_cpp
2277
2278# ac_fn_cxx_try_cpp LINENO
2279# ------------------------
2280# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2281ac_fn_cxx_try_cpp ()
2282{
2283  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284  if { { ac_try="$ac_cpp conftest.$ac_ext"
2285case "(($ac_try" in
2286  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2287  *) ac_try_echo=$ac_try;;
2288esac
2289eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2290$as_echo "$ac_try_echo"; } >&5
2291  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2292  ac_status=$?
2293  if test -s conftest.err; then
2294    grep -v '^ *+' conftest.err >conftest.er1
2295    cat conftest.er1 >&5
2296    mv -f conftest.er1 conftest.err
2297  fi
2298  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2299  test $ac_status = 0; } > conftest.i && {
2300	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2301	 test ! -s conftest.err
2302       }; then :
2303  ac_retval=0
2304else
2305  $as_echo "$as_me: failed program was:" >&5
2306sed 's/^/| /' conftest.$ac_ext >&5
2307
2308    ac_retval=1
2309fi
2310  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311  as_fn_set_status $ac_retval
2312
2313} # ac_fn_cxx_try_cpp
2314
2315# ac_fn_objc_try_compile LINENO
2316# -----------------------------
2317# Try to compile conftest.$ac_ext, and return whether this succeeded.
2318ac_fn_objc_try_compile ()
2319{
2320  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321  rm -f conftest.$ac_objext
2322  if { { ac_try="$ac_compile"
2323case "(($ac_try" in
2324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2325  *) ac_try_echo=$ac_try;;
2326esac
2327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2328$as_echo "$ac_try_echo"; } >&5
2329  (eval "$ac_compile") 2>conftest.err
2330  ac_status=$?
2331  if test -s conftest.err; then
2332    grep -v '^ *+' conftest.err >conftest.er1
2333    cat conftest.er1 >&5
2334    mv -f conftest.er1 conftest.err
2335  fi
2336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2337  test $ac_status = 0; } && {
2338	 test -z "$ac_objc_werror_flag" ||
2339	 test ! -s conftest.err
2340       } && test -s conftest.$ac_objext; then :
2341  ac_retval=0
2342else
2343  $as_echo "$as_me: failed program was:" >&5
2344sed 's/^/| /' conftest.$ac_ext >&5
2345
2346	ac_retval=1
2347fi
2348  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349  as_fn_set_status $ac_retval
2350
2351} # ac_fn_objc_try_compile
2352
2353# ac_fn_c_try_link LINENO
2354# -----------------------
2355# Try to link conftest.$ac_ext, and return whether this succeeded.
2356ac_fn_c_try_link ()
2357{
2358  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2359  rm -f conftest.$ac_objext conftest$ac_exeext
2360  if { { ac_try="$ac_link"
2361case "(($ac_try" in
2362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2363  *) ac_try_echo=$ac_try;;
2364esac
2365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2366$as_echo "$ac_try_echo"; } >&5
2367  (eval "$ac_link") 2>conftest.err
2368  ac_status=$?
2369  if test -s conftest.err; then
2370    grep -v '^ *+' conftest.err >conftest.er1
2371    cat conftest.er1 >&5
2372    mv -f conftest.er1 conftest.err
2373  fi
2374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2375  test $ac_status = 0; } && {
2376	 test -z "$ac_c_werror_flag" ||
2377	 test ! -s conftest.err
2378       } && test -s conftest$ac_exeext && {
2379	 test "$cross_compiling" = yes ||
2380	 test -x conftest$ac_exeext
2381       }; then :
2382  ac_retval=0
2383else
2384  $as_echo "$as_me: failed program was:" >&5
2385sed 's/^/| /' conftest.$ac_ext >&5
2386
2387	ac_retval=1
2388fi
2389  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2390  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2391  # interfere with the next link command; also delete a directory that is
2392  # left behind by Apple's compiler.  We do this before executing the actions.
2393  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2394  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2395  as_fn_set_status $ac_retval
2396
2397} # ac_fn_c_try_link
2398
2399# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2400# ---------------------------------------------------------
2401# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2402# the include files in INCLUDES and setting the cache variable VAR
2403# accordingly.
2404ac_fn_cxx_check_header_mongrel ()
2405{
2406  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2407  if eval \${$3+:} false; then :
2408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2409$as_echo_n "checking for $2... " >&6; }
2410if eval \${$3+:} false; then :
2411  $as_echo_n "(cached) " >&6
2412fi
2413eval ac_res=\$$3
2414	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2415$as_echo "$ac_res" >&6; }
2416else
2417  # Is the header compilable?
2418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2419$as_echo_n "checking $2 usability... " >&6; }
2420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h.  */
2422$4
2423#include <$2>
2424_ACEOF
2425if ac_fn_cxx_try_compile "$LINENO"; then :
2426  ac_header_compiler=yes
2427else
2428  ac_header_compiler=no
2429fi
2430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2432$as_echo "$ac_header_compiler" >&6; }
2433
2434# Is the header present?
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2436$as_echo_n "checking $2 presence... " >&6; }
2437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439#include <$2>
2440_ACEOF
2441if ac_fn_cxx_try_cpp "$LINENO"; then :
2442  ac_header_preproc=yes
2443else
2444  ac_header_preproc=no
2445fi
2446rm -f conftest.err conftest.i conftest.$ac_ext
2447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2448$as_echo "$ac_header_preproc" >&6; }
2449
2450# So?  What about this header?
2451case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2452  yes:no: )
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2454$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2456$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2457    ;;
2458  no:yes:* )
2459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2460$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2462$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2464$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2465    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2466$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2467    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2468$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2469( $as_echo "## ----------------------------------------- ##
2470## Report this to build-dev@openjdk.java.net ##
2471## ----------------------------------------- ##"
2472     ) | sed "s/^/$as_me: WARNING:     /" >&2
2473    ;;
2474esac
2475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2476$as_echo_n "checking for $2... " >&6; }
2477if eval \${$3+:} false; then :
2478  $as_echo_n "(cached) " >&6
2479else
2480  eval "$3=\$ac_header_compiler"
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485fi
2486  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2487
2488} # ac_fn_cxx_check_header_mongrel
2489
2490# ac_fn_cxx_try_run LINENO
2491# ------------------------
2492# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2493# that executables *can* be run.
2494ac_fn_cxx_try_run ()
2495{
2496  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497  if { { ac_try="$ac_link"
2498case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_link") 2>&5
2505  ac_status=$?
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2508  { { case "(($ac_try" in
2509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510  *) ac_try_echo=$ac_try;;
2511esac
2512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2513$as_echo "$ac_try_echo"; } >&5
2514  (eval "$ac_try") 2>&5
2515  ac_status=$?
2516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2517  test $ac_status = 0; }; }; then :
2518  ac_retval=0
2519else
2520  $as_echo "$as_me: program exited with status $ac_status" >&5
2521       $as_echo "$as_me: failed program was:" >&5
2522sed 's/^/| /' conftest.$ac_ext >&5
2523
2524       ac_retval=$ac_status
2525fi
2526  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2527  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2528  as_fn_set_status $ac_retval
2529
2530} # ac_fn_cxx_try_run
2531
2532# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2533# ---------------------------------------------------------
2534# Tests whether HEADER exists and can be compiled using the include files in
2535# INCLUDES, setting the cache variable VAR accordingly.
2536ac_fn_cxx_check_header_compile ()
2537{
2538  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2540$as_echo_n "checking for $2... " >&6; }
2541if eval \${$3+:} false; then :
2542  $as_echo_n "(cached) " >&6
2543else
2544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2545/* end confdefs.h.  */
2546$4
2547#include <$2>
2548_ACEOF
2549if ac_fn_cxx_try_compile "$LINENO"; then :
2550  eval "$3=yes"
2551else
2552  eval "$3=no"
2553fi
2554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555fi
2556eval ac_res=\$$3
2557	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2558$as_echo "$ac_res" >&6; }
2559  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560
2561} # ac_fn_cxx_check_header_compile
2562
2563# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2564# ----------------------------------------------
2565# Tries to find the compile-time value of EXPR in a program that includes
2566# INCLUDES, setting VAR accordingly. Returns whether the value could be
2567# computed
2568ac_fn_cxx_compute_int ()
2569{
2570  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571  if test "$cross_compiling" = yes; then
2572    # Depending upon the size, compute the lo and hi bounds.
2573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2574/* end confdefs.h.  */
2575$4
2576int
2577main ()
2578{
2579static int test_array [1 - 2 * !(($2) >= 0)];
2580test_array [0] = 0;
2581return test_array [0];
2582
2583  ;
2584  return 0;
2585}
2586_ACEOF
2587if ac_fn_cxx_try_compile "$LINENO"; then :
2588  ac_lo=0 ac_mid=0
2589  while :; do
2590    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591/* end confdefs.h.  */
2592$4
2593int
2594main ()
2595{
2596static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2597test_array [0] = 0;
2598return test_array [0];
2599
2600  ;
2601  return 0;
2602}
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_hi=$ac_mid; break
2606else
2607  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2608			if test $ac_lo -le $ac_mid; then
2609			  ac_lo= ac_hi=
2610			  break
2611			fi
2612			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615  done
2616else
2617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620int
2621main ()
2622{
2623static int test_array [1 - 2 * !(($2) < 0)];
2624test_array [0] = 0;
2625return test_array [0];
2626
2627  ;
2628  return 0;
2629}
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_hi=-1 ac_mid=-1
2633  while :; do
2634    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2635/* end confdefs.h.  */
2636$4
2637int
2638main ()
2639{
2640static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2641test_array [0] = 0;
2642return test_array [0];
2643
2644  ;
2645  return 0;
2646}
2647_ACEOF
2648if ac_fn_cxx_try_compile "$LINENO"; then :
2649  ac_lo=$ac_mid; break
2650else
2651  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2652			if test $ac_mid -le $ac_hi; then
2653			  ac_lo= ac_hi=
2654			  break
2655			fi
2656			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2657fi
2658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2659  done
2660else
2661  ac_lo= ac_hi=
2662fi
2663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2664fi
2665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2666# Binary search between lo and hi bounds.
2667while test "x$ac_lo" != "x$ac_hi"; do
2668  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2670/* end confdefs.h.  */
2671$4
2672int
2673main ()
2674{
2675static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2676test_array [0] = 0;
2677return test_array [0];
2678
2679  ;
2680  return 0;
2681}
2682_ACEOF
2683if ac_fn_cxx_try_compile "$LINENO"; then :
2684  ac_hi=$ac_mid
2685else
2686  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2687fi
2688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689done
2690case $ac_lo in #((
2691?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2692'') ac_retval=1 ;;
2693esac
2694  else
2695    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2696/* end confdefs.h.  */
2697$4
2698static long int longval () { return $2; }
2699static unsigned long int ulongval () { return $2; }
2700#include <stdio.h>
2701#include <stdlib.h>
2702int
2703main ()
2704{
2705
2706  FILE *f = fopen ("conftest.val", "w");
2707  if (! f)
2708    return 1;
2709  if (($2) < 0)
2710    {
2711      long int i = longval ();
2712      if (i != ($2))
2713	return 1;
2714      fprintf (f, "%ld", i);
2715    }
2716  else
2717    {
2718      unsigned long int i = ulongval ();
2719      if (i != ($2))
2720	return 1;
2721      fprintf (f, "%lu", i);
2722    }
2723  /* Do not output a trailing newline, as this causes \r\n confusion
2724     on some platforms.  */
2725  return ferror (f) || fclose (f) != 0;
2726
2727  ;
2728  return 0;
2729}
2730_ACEOF
2731if ac_fn_cxx_try_run "$LINENO"; then :
2732  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2733else
2734  ac_retval=1
2735fi
2736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2737  conftest.$ac_objext conftest.beam conftest.$ac_ext
2738rm -f conftest.val
2739
2740  fi
2741  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2742  as_fn_set_status $ac_retval
2743
2744} # ac_fn_cxx_compute_int
2745
2746# ac_fn_cxx_try_link LINENO
2747# -------------------------
2748# Try to link conftest.$ac_ext, and return whether this succeeded.
2749ac_fn_cxx_try_link ()
2750{
2751  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2752  rm -f conftest.$ac_objext conftest$ac_exeext
2753  if { { ac_try="$ac_link"
2754case "(($ac_try" in
2755  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756  *) ac_try_echo=$ac_try;;
2757esac
2758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2759$as_echo "$ac_try_echo"; } >&5
2760  (eval "$ac_link") 2>conftest.err
2761  ac_status=$?
2762  if test -s conftest.err; then
2763    grep -v '^ *+' conftest.err >conftest.er1
2764    cat conftest.er1 >&5
2765    mv -f conftest.er1 conftest.err
2766  fi
2767  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2768  test $ac_status = 0; } && {
2769	 test -z "$ac_cxx_werror_flag" ||
2770	 test ! -s conftest.err
2771       } && test -s conftest$ac_exeext && {
2772	 test "$cross_compiling" = yes ||
2773	 test -x conftest$ac_exeext
2774       }; then :
2775  ac_retval=0
2776else
2777  $as_echo "$as_me: failed program was:" >&5
2778sed 's/^/| /' conftest.$ac_ext >&5
2779
2780	ac_retval=1
2781fi
2782  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2783  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2784  # interfere with the next link command; also delete a directory that is
2785  # left behind by Apple's compiler.  We do this before executing the actions.
2786  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2787  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2788  as_fn_set_status $ac_retval
2789
2790} # ac_fn_cxx_try_link
2791
2792# ac_fn_cxx_check_func LINENO FUNC VAR
2793# ------------------------------------
2794# Tests whether FUNC exists, setting the cache variable VAR accordingly
2795ac_fn_cxx_check_func ()
2796{
2797  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2799$as_echo_n "checking for $2... " >&6; }
2800if eval \${$3+:} false; then :
2801  $as_echo_n "(cached) " >&6
2802else
2803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804/* end confdefs.h.  */
2805/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2806   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2807#define $2 innocuous_$2
2808
2809/* System header to define __stub macros and hopefully few prototypes,
2810    which can conflict with char $2 (); below.
2811    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2812    <limits.h> exists even on freestanding compilers.  */
2813
2814#ifdef __STDC__
2815# include <limits.h>
2816#else
2817# include <assert.h>
2818#endif
2819
2820#undef $2
2821
2822/* Override any GCC internal prototype to avoid an error.
2823   Use char because int might match the return type of a GCC
2824   builtin and then its argument prototype would still apply.  */
2825#ifdef __cplusplus
2826extern "C"
2827#endif
2828char $2 ();
2829/* The GNU C library defines this for functions which it implements
2830    to always fail with ENOSYS.  Some functions are actually named
2831    something starting with __ and the normal name is an alias.  */
2832#if defined __stub_$2 || defined __stub___$2
2833choke me
2834#endif
2835
2836int
2837main ()
2838{
2839return $2 ();
2840  ;
2841  return 0;
2842}
2843_ACEOF
2844if ac_fn_cxx_try_link "$LINENO"; then :
2845  eval "$3=yes"
2846else
2847  eval "$3=no"
2848fi
2849rm -f core conftest.err conftest.$ac_objext \
2850    conftest$ac_exeext conftest.$ac_ext
2851fi
2852eval ac_res=\$$3
2853	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2854$as_echo "$ac_res" >&6; }
2855  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2856
2857} # ac_fn_cxx_check_func
2858
2859# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2860# -------------------------------------------------------
2861# Tests whether HEADER exists and can be compiled using the include files in
2862# INCLUDES, setting the cache variable VAR accordingly.
2863ac_fn_c_check_header_compile ()
2864{
2865  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2867$as_echo_n "checking for $2... " >&6; }
2868if eval \${$3+:} false; then :
2869  $as_echo_n "(cached) " >&6
2870else
2871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872/* end confdefs.h.  */
2873$4
2874#include <$2>
2875_ACEOF
2876if ac_fn_c_try_compile "$LINENO"; then :
2877  eval "$3=yes"
2878else
2879  eval "$3=no"
2880fi
2881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2882fi
2883eval ac_res=\$$3
2884	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2885$as_echo "$ac_res" >&6; }
2886  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2887
2888} # ac_fn_c_check_header_compile
2889cat >config.log <<_ACEOF
2890This file contains any messages produced by compilers while
2891running configure, to aid debugging if configure makes a mistake.
2892
2893It was created by OpenJDK $as_me jdk9, which was
2894generated by GNU Autoconf 2.69.  Invocation command line was
2895
2896  $ $0 $@
2897
2898_ACEOF
2899exec 5>>config.log
2900{
2901cat <<_ASUNAME
2902## --------- ##
2903## Platform. ##
2904## --------- ##
2905
2906hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2907uname -m = `(uname -m) 2>/dev/null || echo unknown`
2908uname -r = `(uname -r) 2>/dev/null || echo unknown`
2909uname -s = `(uname -s) 2>/dev/null || echo unknown`
2910uname -v = `(uname -v) 2>/dev/null || echo unknown`
2911
2912/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2913/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2914
2915/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2916/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2917/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2918/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2919/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2920/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2921/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2922
2923_ASUNAME
2924
2925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2926for as_dir in $PATH
2927do
2928  IFS=$as_save_IFS
2929  test -z "$as_dir" && as_dir=.
2930    $as_echo "PATH: $as_dir"
2931  done
2932IFS=$as_save_IFS
2933
2934} >&5
2935
2936cat >&5 <<_ACEOF
2937
2938
2939## ----------- ##
2940## Core tests. ##
2941## ----------- ##
2942
2943_ACEOF
2944
2945
2946# Keep a trace of the command line.
2947# Strip out --no-create and --no-recursion so they do not pile up.
2948# Strip out --silent because we don't want to record it for future runs.
2949# Also quote any args containing shell meta-characters.
2950# Make two passes to allow for proper duplicate-argument suppression.
2951ac_configure_args=
2952ac_configure_args0=
2953ac_configure_args1=
2954ac_must_keep_next=false
2955for ac_pass in 1 2
2956do
2957  for ac_arg
2958  do
2959    case $ac_arg in
2960    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2961    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2962    | -silent | --silent | --silen | --sile | --sil)
2963      continue ;;
2964    *\'*)
2965      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2966    esac
2967    case $ac_pass in
2968    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2969    2)
2970      as_fn_append ac_configure_args1 " '$ac_arg'"
2971      if test $ac_must_keep_next = true; then
2972	ac_must_keep_next=false # Got value, back to normal.
2973      else
2974	case $ac_arg in
2975	  *=* | --config-cache | -C | -disable-* | --disable-* \
2976	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2977	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2978	  | -with-* | --with-* | -without-* | --without-* | --x)
2979	    case "$ac_configure_args0 " in
2980	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2981	    esac
2982	    ;;
2983	  -* ) ac_must_keep_next=true ;;
2984	esac
2985      fi
2986      as_fn_append ac_configure_args " '$ac_arg'"
2987      ;;
2988    esac
2989  done
2990done
2991{ ac_configure_args0=; unset ac_configure_args0;}
2992{ ac_configure_args1=; unset ac_configure_args1;}
2993
2994# When interrupted or exit'd, cleanup temporary files, and complete
2995# config.log.  We remove comments because anyway the quotes in there
2996# would cause problems or look ugly.
2997# WARNING: Use '\'' to represent an apostrophe within the trap.
2998# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2999trap 'exit_status=$?
3000  # Save into config.log some information that might help in debugging.
3001  {
3002    echo
3003
3004    $as_echo "## ---------------- ##
3005## Cache variables. ##
3006## ---------------- ##"
3007    echo
3008    # The following way of writing the cache mishandles newlines in values,
3009(
3010  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3011    eval ac_val=\$$ac_var
3012    case $ac_val in #(
3013    *${as_nl}*)
3014      case $ac_var in #(
3015      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3016$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3017      esac
3018      case $ac_var in #(
3019      _ | IFS | as_nl) ;; #(
3020      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3021      *) { eval $ac_var=; unset $ac_var;} ;;
3022      esac ;;
3023    esac
3024  done
3025  (set) 2>&1 |
3026    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3027    *${as_nl}ac_space=\ *)
3028      sed -n \
3029	"s/'\''/'\''\\\\'\'''\''/g;
3030	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3031      ;; #(
3032    *)
3033      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3034      ;;
3035    esac |
3036    sort
3037)
3038    echo
3039
3040    $as_echo "## ----------------- ##
3041## Output variables. ##
3042## ----------------- ##"
3043    echo
3044    for ac_var in $ac_subst_vars
3045    do
3046      eval ac_val=\$$ac_var
3047      case $ac_val in
3048      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3049      esac
3050      $as_echo "$ac_var='\''$ac_val'\''"
3051    done | sort
3052    echo
3053
3054    if test -n "$ac_subst_files"; then
3055      $as_echo "## ------------------- ##
3056## File substitutions. ##
3057## ------------------- ##"
3058      echo
3059      for ac_var in $ac_subst_files
3060      do
3061	eval ac_val=\$$ac_var
3062	case $ac_val in
3063	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3064	esac
3065	$as_echo "$ac_var='\''$ac_val'\''"
3066      done | sort
3067      echo
3068    fi
3069
3070    if test -s confdefs.h; then
3071      $as_echo "## ----------- ##
3072## confdefs.h. ##
3073## ----------- ##"
3074      echo
3075      cat confdefs.h
3076      echo
3077    fi
3078    test "$ac_signal" != 0 &&
3079      $as_echo "$as_me: caught signal $ac_signal"
3080    $as_echo "$as_me: exit $exit_status"
3081  } >&5
3082  rm -f core *.core core.conftest.* &&
3083    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3084    exit $exit_status
3085' 0
3086for ac_signal in 1 2 13 15; do
3087  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3088done
3089ac_signal=0
3090
3091# confdefs.h avoids OS command line length limits that DEFS can exceed.
3092rm -f -r conftest* confdefs.h
3093
3094$as_echo "/* confdefs.h */" > confdefs.h
3095
3096# Predefined preprocessor variables.
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_NAME "$PACKAGE_NAME"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_VERSION "$PACKAGE_VERSION"
3108_ACEOF
3109
3110cat >>confdefs.h <<_ACEOF
3111#define PACKAGE_STRING "$PACKAGE_STRING"
3112_ACEOF
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3116_ACEOF
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_URL "$PACKAGE_URL"
3120_ACEOF
3121
3122
3123# Let the site file select an alternate cache file if it wants to.
3124# Prefer an explicitly selected file to automatically selected ones.
3125ac_site_file1=NONE
3126ac_site_file2=NONE
3127if test -n "$CONFIG_SITE"; then
3128  # We do not want a PATH search for config.site.
3129  case $CONFIG_SITE in #((
3130    -*)  ac_site_file1=./$CONFIG_SITE;;
3131    */*) ac_site_file1=$CONFIG_SITE;;
3132    *)   ac_site_file1=./$CONFIG_SITE;;
3133  esac
3134elif test "x$prefix" != xNONE; then
3135  ac_site_file1=$prefix/share/config.site
3136  ac_site_file2=$prefix/etc/config.site
3137else
3138  ac_site_file1=$ac_default_prefix/share/config.site
3139  ac_site_file2=$ac_default_prefix/etc/config.site
3140fi
3141for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3142do
3143  test "x$ac_site_file" = xNONE && continue
3144  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3145    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3146$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3147    sed 's/^/| /' "$ac_site_file" >&5
3148    . "$ac_site_file" \
3149      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3151as_fn_error $? "failed to load site script $ac_site_file
3152See \`config.log' for more details" "$LINENO" 5; }
3153  fi
3154done
3155
3156if test -r "$cache_file"; then
3157  # Some versions of bash will fail to source /dev/null (special files
3158  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3159  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3160    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3161$as_echo "$as_me: loading cache $cache_file" >&6;}
3162    case $cache_file in
3163      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3164      *)                      . "./$cache_file";;
3165    esac
3166  fi
3167else
3168  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3169$as_echo "$as_me: creating cache $cache_file" >&6;}
3170  >$cache_file
3171fi
3172
3173# Check that the precious variables saved in the cache have kept the same
3174# value.
3175ac_cache_corrupted=false
3176for ac_var in $ac_precious_vars; do
3177  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3178  eval ac_new_set=\$ac_env_${ac_var}_set
3179  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3180  eval ac_new_val=\$ac_env_${ac_var}_value
3181  case $ac_old_set,$ac_new_set in
3182    set,)
3183      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3184$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3185      ac_cache_corrupted=: ;;
3186    ,set)
3187      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3188$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3189      ac_cache_corrupted=: ;;
3190    ,);;
3191    *)
3192      if test "x$ac_old_val" != "x$ac_new_val"; then
3193	# differences in whitespace do not lead to failure.
3194	ac_old_val_w=`echo x $ac_old_val`
3195	ac_new_val_w=`echo x $ac_new_val`
3196	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3197	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3198$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3199	  ac_cache_corrupted=:
3200	else
3201	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3202$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3203	  eval $ac_var=\$ac_old_val
3204	fi
3205	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3206$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3207	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3208$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3209      fi;;
3210  esac
3211  # Pass precious variables to config.status.
3212  if test "$ac_new_set" = set; then
3213    case $ac_new_val in
3214    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3215    *) ac_arg=$ac_var=$ac_new_val ;;
3216    esac
3217    case " $ac_configure_args " in
3218      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3219      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3220    esac
3221  fi
3222done
3223if $ac_cache_corrupted; then
3224  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3226  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3227$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3228  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3229fi
3230## -------------------- ##
3231## Main body of script. ##
3232## -------------------- ##
3233
3234ac_ext=c
3235ac_cpp='$CPP $CPPFLAGS'
3236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239
3240
3241
3242ac_aux_dir=
3243for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3244  if test -f "$ac_dir/install-sh"; then
3245    ac_aux_dir=$ac_dir
3246    ac_install_sh="$ac_aux_dir/install-sh -c"
3247    break
3248  elif test -f "$ac_dir/install.sh"; then
3249    ac_aux_dir=$ac_dir
3250    ac_install_sh="$ac_aux_dir/install.sh -c"
3251    break
3252  elif test -f "$ac_dir/shtool"; then
3253    ac_aux_dir=$ac_dir
3254    ac_install_sh="$ac_aux_dir/shtool install -c"
3255    break
3256  fi
3257done
3258if test -z "$ac_aux_dir"; then
3259  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3260fi
3261
3262# These three variables are undocumented and unsupported,
3263# and are intended to be withdrawn in a future Autoconf release.
3264# They can cause serious problems if a builder's source tree is in a directory
3265# whose full name contains unusual characters.
3266ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3267ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3268ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3269
3270
3271# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3272
3273#
3274# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3275# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3276#
3277# This code is free software; you can redistribute it and/or modify it
3278# under the terms of the GNU General Public License version 2 only, as
3279# published by the Free Software Foundation.  Oracle designates this
3280# particular file as subject to the "Classpath" exception as provided
3281# by Oracle in the LICENSE file that accompanied this code.
3282#
3283# This code is distributed in the hope that it will be useful, but WITHOUT
3284# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3285# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3286# version 2 for more details (a copy is included in the LICENSE file that
3287# accompanied this code).
3288#
3289# You should have received a copy of the GNU General Public License version
3290# 2 along with this work; if not, write to the Free Software Foundation,
3291# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3292#
3293# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3294# or visit www.oracle.com if you need additional information or have any
3295# questions.
3296#
3297
3298#
3299# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3300#
3301# This program is free software; you can redistribute it and/or modify
3302# it under the terms of the GNU General Public License as published by
3303# the Free Software Foundation; either version 2 of the License, or
3304# (at your option) any later version.
3305#
3306# This program is distributed in the hope that it will be useful, but
3307# WITHOUT ANY WARRANTY; without even the implied warranty of
3308# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3309# General Public License for more details.
3310#
3311# You should have received a copy of the GNU General Public License
3312# along with this program; if not, write to the Free Software
3313# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3314#
3315# As a special exception to the GNU General Public License, if you
3316# distribute this file as part of a program that contains a
3317# configuration script generated by Autoconf, you may include it under
3318# the same distribution terms that you use for the rest of that program.
3319
3320# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3321# ----------------------------------
3322# PKG_PROG_PKG_CONFIG
3323
3324# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3325#
3326# Check to see whether a particular set of modules exists.  Similar
3327# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3328#
3329#
3330# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3331# this or PKG_CHECK_MODULES is called, or make sure to call
3332# PKG_CHECK_EXISTS manually
3333# --------------------------------------------------------------
3334
3335
3336
3337# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3338# ---------------------------------------------
3339# _PKG_CONFIG
3340
3341# _PKG_SHORT_ERRORS_SUPPORTED
3342# -----------------------------
3343# _PKG_SHORT_ERRORS_SUPPORTED
3344
3345
3346# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3347# [ACTION-IF-NOT-FOUND])
3348#
3349#
3350# Note that if there is a possibility the first call to
3351# PKG_CHECK_MODULES might not happen, you should be sure to include an
3352# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3353#
3354#
3355# --------------------------------------------------------------
3356# PKG_CHECK_MODULES
3357
3358
3359# Include these first...
3360#
3361# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3362# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3363#
3364# This code is free software; you can redistribute it and/or modify it
3365# under the terms of the GNU General Public License version 2 only, as
3366# published by the Free Software Foundation.  Oracle designates this
3367# particular file as subject to the "Classpath" exception as provided
3368# by Oracle in the LICENSE file that accompanied this code.
3369#
3370# This code is distributed in the hope that it will be useful, but WITHOUT
3371# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3372# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3373# version 2 for more details (a copy is included in the LICENSE file that
3374# accompanied this code).
3375#
3376# You should have received a copy of the GNU General Public License version
3377# 2 along with this work; if not, write to the Free Software Foundation,
3378# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3379#
3380# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3381# or visit www.oracle.com if you need additional information or have any
3382# questions.
3383#
3384
3385# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3386# If so, then append $1 to $2 \
3387# Also set JVM_ARG_OK to true/false depending on outcome.
3388
3389
3390# Appends a string to a path variable, only adding the : when needed.
3391
3392
3393# Prepends a string to a path variable, only adding the : when needed.
3394
3395
3396# This will make sure the given variable points to a full and proper
3397# path. This means:
3398# 1) There will be no spaces in the path. On posix platforms,
3399#    spaces in the path will result in an error. On Windows,
3400#    the path will be rewritten using short-style to be space-free.
3401# 2) The path will be absolute, and it will be in unix-style (on
3402#     cygwin).
3403# $1: The name of the variable to fix
3404
3405
3406# This will make sure the given variable points to a executable
3407# with a full and proper path. This means:
3408# 1) There will be no spaces in the path. On posix platforms,
3409#    spaces in the path will result in an error. On Windows,
3410#    the path will be rewritten using short-style to be space-free.
3411# 2) The path will be absolute, and it will be in unix-style (on
3412#     cygwin).
3413# Any arguments given to the executable is preserved.
3414# If the input variable does not have a directory specification, then
3415# it need to be in the PATH.
3416# $1: The name of the variable to fix
3417
3418
3419
3420
3421# Register a --with argument but mark it as deprecated
3422# $1: The name of the with argument to deprecate, not including --with-
3423
3424
3425# Register a --enable argument but mark it as deprecated
3426# $1: The name of the with argument to deprecate, not including --enable-
3427# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3428
3429
3430
3431
3432# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3433# $1: variable to check
3434
3435
3436# Check that there are no unprocessed overridden variables left.
3437# If so, they are an incorrect argument and we will exit with an error.
3438
3439
3440# Setup a tool for the given variable. If correctly specified by the user,
3441# use that value, otherwise search for the tool using the supplied code snippet.
3442# $1: variable to set
3443# $2: code snippet to call to look for the tool
3444
3445
3446# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3447# $1: variable to set
3448# $2: executable name (or list of names) to look for
3449
3450
3451# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3452# $1: variable to set
3453# $2: executable name (or list of names) to look for
3454
3455
3456# Like BASIC_PATH_PROGS but fails if no tool was found.
3457# $1: variable to set
3458# $2: executable name (or list of names) to look for
3459
3460
3461# Like BASIC_SETUP_TOOL but fails if no tool was found.
3462# $1: variable to set
3463# $2: autoconf macro to call to look for the special tool
3464
3465
3466# Setup the most fundamental tools that relies on not much else to set up,
3467# but is used by much of the early bootstrap code.
3468
3469
3470# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480#%%% Simple tools %%%
3481
3482# Check if we have found a usable version of make
3483# $1: the path to a potential make binary (or empty)
3484# $2: the description on how we found this
3485
3486
3487# Goes looking for a usable version of GNU make.
3488
3489
3490
3491
3492
3493
3494# Check if build directory is on local disk. If not possible to determine,
3495# we prefer to claim it's local.
3496# Argument 1: directory to test
3497# Argument 2: what to do if it is on local disk
3498# Argument 3: what to do otherwise (remote disk or failure)
3499
3500
3501# Check that source files have basic read permissions set. This might
3502# not be the case in cygwin in certain conditions.
3503
3504
3505
3506
3507#
3508# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3509# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3510#
3511# This code is free software; you can redistribute it and/or modify it
3512# under the terms of the GNU General Public License version 2 only, as
3513# published by the Free Software Foundation.  Oracle designates this
3514# particular file as subject to the "Classpath" exception as provided
3515# by Oracle in the LICENSE file that accompanied this code.
3516#
3517# This code is distributed in the hope that it will be useful, but WITHOUT
3518# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3519# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3520# version 2 for more details (a copy is included in the LICENSE file that
3521# accompanied this code).
3522#
3523# You should have received a copy of the GNU General Public License version
3524# 2 along with this work; if not, write to the Free Software Foundation,
3525# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3526#
3527# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3528# or visit www.oracle.com if you need additional information or have any
3529# questions.
3530#
3531
3532
3533
3534
3535
3536# Helper function which possibly converts a path using DOS-style short mode.
3537# If so, the updated path is stored in $new_path.
3538# $1: The path to check
3539
3540
3541# Helper function which possibly converts a path using DOS-style short mode.
3542# If so, the updated path is stored in $new_path.
3543# $1: The path to check
3544
3545
3546# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3547# and could probably be heavily simplified. However, all changes in this
3548# area tend to need lot of testing in different scenarios, and in lack of
3549# proper unit testing, cleaning this up has not been deemed worth the effort
3550# at the moment.
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3561
3562
3563
3564
3565#
3566# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3567# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3568#
3569# This code is free software; you can redistribute it and/or modify it
3570# under the terms of the GNU General Public License version 2 only, as
3571# published by the Free Software Foundation.  Oracle designates this
3572# particular file as subject to the "Classpath" exception as provided
3573# by Oracle in the LICENSE file that accompanied this code.
3574#
3575# This code is distributed in the hope that it will be useful, but WITHOUT
3576# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3577# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3578# version 2 for more details (a copy is included in the LICENSE file that
3579# accompanied this code).
3580#
3581# You should have received a copy of the GNU General Public License version
3582# 2 along with this work; if not, write to the Free Software Foundation,
3583# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3584#
3585# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3586# or visit www.oracle.com if you need additional information or have any
3587# questions.
3588#
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600# ... then the rest
3601#
3602# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3604#
3605# This code is free software; you can redistribute it and/or modify it
3606# under the terms of the GNU General Public License version 2 only, as
3607# published by the Free Software Foundation.  Oracle designates this
3608# particular file as subject to the "Classpath" exception as provided
3609# by Oracle in the LICENSE file that accompanied this code.
3610#
3611# This code is distributed in the hope that it will be useful, but WITHOUT
3612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3614# version 2 for more details (a copy is included in the LICENSE file that
3615# accompanied this code).
3616#
3617# You should have received a copy of the GNU General Public License version
3618# 2 along with this work; if not, write to the Free Software Foundation,
3619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3620#
3621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3622# or visit www.oracle.com if you need additional information or have any
3623# questions.
3624#
3625
3626########################################################################
3627# This file handles detection of the Boot JDK. The Boot JDK detection
3628# process has been developed as a response to solve a complex real-world
3629# problem. Initially, it was simple, but it has grown as platform after
3630# platform, idiosyncracy after idiosyncracy has been supported.
3631#
3632# The basic idea is this:
3633# 1) You need an acceptable *) JDK to use as a Boot JDK
3634# 2) There are several ways to locate a JDK, that are mostly platform
3635#    dependent **)
3636# 3) You can have multiple JDKs installed
3637# 4) If possible, configure should try to dig out an acceptable JDK
3638#    automatically, without having to resort to command-line options
3639#
3640# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3641#     javac) and not a JRE, etc.
3642#
3643# **) On Windows we typically use a well-known path.
3644#     On MacOSX we typically use the tool java_home.
3645#     On Linux we typically find javac in the $PATH, and then follow a
3646#     chain of symlinks that often ends up in a real JDK.
3647#
3648# This leads to the code where we check in different ways to locate a
3649# JDK, and if one is found, check if it is acceptable. If not, we print
3650# our reasons for rejecting it (useful when debugging non-working
3651# configure situations) and continue checking the next one.
3652########################################################################
3653
3654# Execute the check given as argument, and verify the result
3655# If the Boot JDK was previously found, do nothing
3656# $1 A command line (typically autoconf macro) to execute
3657
3658
3659# Test: Is bootjdk explicitely set by command line arguments?
3660
3661
3662# Test: Is bootjdk available from builddeps?
3663
3664
3665# Test: Is $JAVA_HOME set?
3666
3667
3668# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3669
3670
3671# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3672# $1: Argument to the java_home binary (optional)
3673
3674
3675# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3676
3677
3678# Look for a jdk in the given path. If there are multiple, try to select the newest.
3679# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3680# $1 = Path to directory containing jdk installations.
3681# $2 = String to append to the found JDK directory to get the proper JDK home
3682
3683
3684# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3685# environmental variable as base for where to look.
3686# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3687
3688
3689# Test: Is there a JDK installed in default, well-known locations?
3690
3691
3692# Check that a command-line tool in the Boot JDK is correct
3693# $1 = name of variable to assign
3694# $2 = name of binary
3695
3696
3697###############################################################################
3698#
3699# We need a Boot JDK to bootstrap the build.
3700#
3701
3702
3703
3704
3705
3706#
3707# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3708# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3709#
3710# This code is free software; you can redistribute it and/or modify it
3711# under the terms of the GNU General Public License version 2 only, as
3712# published by the Free Software Foundation.  Oracle designates this
3713# particular file as subject to the "Classpath" exception as provided
3714# by Oracle in the LICENSE file that accompanied this code.
3715#
3716# This code is distributed in the hope that it will be useful, but WITHOUT
3717# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3718# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3719# version 2 for more details (a copy is included in the LICENSE file that
3720# accompanied this code).
3721#
3722# You should have received a copy of the GNU General Public License version
3723# 2 along with this work; if not, write to the Free Software Foundation,
3724# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3725#
3726# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3727# or visit www.oracle.com if you need additional information or have any
3728# questions.
3729#
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750#
3751# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3752# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3753#
3754# This code is free software; you can redistribute it and/or modify it
3755# under the terms of the GNU General Public License version 2 only, as
3756# published by the Free Software Foundation.  Oracle designates this
3757# particular file as subject to the "Classpath" exception as provided
3758# by Oracle in the LICENSE file that accompanied this code.
3759#
3760# This code is distributed in the hope that it will be useful, but WITHOUT
3761# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3762# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3763# version 2 for more details (a copy is included in the LICENSE file that
3764# accompanied this code).
3765#
3766# You should have received a copy of the GNU General Public License version
3767# 2 along with this work; if not, write to the Free Software Foundation,
3768# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3769#
3770# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3771# or visit www.oracle.com if you need additional information or have any
3772# questions.
3773#
3774
3775
3776
3777
3778
3779# Documentation on common flags used for solstudio in HIGHEST.
3780#
3781# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3782#          done with care, there are some assumptions below that need to
3783#          be understood about the use of pointers, and IEEE behavior.
3784#
3785# -fns: Use non-standard floating point mode (not IEEE 754)
3786# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3787# -fsingle: Use single precision floating point with 'float'
3788# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3789#   (Source with excessing pointer casting and data access with mixed
3790#    pointer types are not recommended)
3791# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3792#   (If you expect perfect errno behavior, do not use this)
3793# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3794# -xrestrict: Pointer parameters to functions do not overlap
3795#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3796#    If you pass in multiple pointers to the same data, do not use this)
3797# -xlibmil: Inline some library routines
3798#   (If you expect perfect errno behavior, do not use this)
3799# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3800#   (If you expect perfect errno behavior, do not use this)
3801#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3802
3803    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3804    # Bug?
3805    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3806    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3807    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3808    #fi
3809
3810
3811
3812
3813
3814# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3815#                                   [RUN-IF-FALSE])
3816# ------------------------------------------------------------
3817# Check that the c and c++ compilers support an argument
3818
3819
3820# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3821#                                    [RUN-IF-FALSE])
3822# ------------------------------------------------------------
3823# Check that the linker support an argument
3824
3825
3826
3827
3828#
3829# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3830# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3831#
3832# This code is free software; you can redistribute it and/or modify it
3833# under the terms of the GNU General Public License version 2 only, as
3834# published by the Free Software Foundation.  Oracle designates this
3835# particular file as subject to the "Classpath" exception as provided
3836# by Oracle in the LICENSE file that accompanied this code.
3837#
3838# This code is distributed in the hope that it will be useful, but WITHOUT
3839# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3840# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3841# version 2 for more details (a copy is included in the LICENSE file that
3842# accompanied this code).
3843#
3844# You should have received a copy of the GNU General Public License version
3845# 2 along with this work; if not, write to the Free Software Foundation,
3846# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3847#
3848# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3849# or visit www.oracle.com if you need additional information or have any
3850# questions.
3851#
3852
3853
3854
3855
3856
3857cygwin_help() {
3858  case $1 in
3859    unzip)
3860      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3862      ;;
3863    zip)
3864      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3866      ;;
3867    make)
3868      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3869      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3870      ;;
3871    freetype)
3872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3873        HELP_MSG="To install freetype, run:
3874wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3875chmod +x /tmp/freetype-setup.exe
3876/tmp/freetype-setup.exe
3877Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3878After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3879      else
3880        HELP_MSG="You need to build a 64-bit version of freetype.
3881This is not readily available.
3882You can find source code and build instructions on
3883http://www.freetype.org/
3884If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3885      fi
3886      ;;
3887  esac
3888}
3889
3890msys_help() {
3891  PKGHANDLER_COMMAND=""
3892}
3893
3894apt_help() {
3895  case $1 in
3896    devkit)
3897      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3898    openjdk)
3899      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3900    alsa)
3901      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3902    cups)
3903      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3904    freetype)
3905      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3906    pulse)
3907      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3908    x11)
3909      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3910    ccache)
3911      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3912  esac
3913}
3914
3915yum_help() {
3916  case $1 in
3917    devkit)
3918      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3919    openjdk)
3920      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3921    alsa)
3922      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3923    cups)
3924      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3925    freetype)
3926      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3927    pulse)
3928      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3929    x11)
3930      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3931    ccache)
3932      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3933  esac
3934}
3935
3936port_help() {
3937  PKGHANDLER_COMMAND=""
3938}
3939
3940pkgutil_help() {
3941  PKGHANDLER_COMMAND=""
3942}
3943
3944pkgadd_help() {
3945  PKGHANDLER_COMMAND=""
3946}
3947
3948# This function will check if we're called from the "configure" wrapper while
3949# printing --help. If so, we will print out additional information that can
3950# only be extracted within the autoconf script, and then exit. This must be
3951# called at the very beginning in configure.ac.
3952
3953
3954
3955
3956#
3957# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3958# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3959#
3960# This code is free software; you can redistribute it and/or modify it
3961# under the terms of the GNU General Public License version 2 only, as
3962# published by the Free Software Foundation.  Oracle designates this
3963# particular file as subject to the "Classpath" exception as provided
3964# by Oracle in the LICENSE file that accompanied this code.
3965#
3966# This code is distributed in the hope that it will be useful, but WITHOUT
3967# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3968# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3969# version 2 for more details (a copy is included in the LICENSE file that
3970# accompanied this code).
3971#
3972# You should have received a copy of the GNU General Public License version
3973# 2 along with this work; if not, write to the Free Software Foundation,
3974# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3975#
3976# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3977# or visit www.oracle.com if you need additional information or have any
3978# questions.
3979#
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990###############################################################################
3991#
3992# Should we build only OpenJDK even if closed sources are present?
3993#
3994
3995
3996
3997
3998###############################################################################
3999#
4000# Setup version numbers
4001#
4002
4003
4004
4005
4006
4007
4008#
4009# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4010# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4011#
4012# This code is free software; you can redistribute it and/or modify it
4013# under the terms of the GNU General Public License version 2 only, as
4014# published by the Free Software Foundation.  Oracle designates this
4015# particular file as subject to the "Classpath" exception as provided
4016# by Oracle in the LICENSE file that accompanied this code.
4017#
4018# This code is distributed in the hope that it will be useful, but WITHOUT
4019# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4020# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4021# version 2 for more details (a copy is included in the LICENSE file that
4022# accompanied this code).
4023#
4024# You should have received a copy of the GNU General Public License version
4025# 2 along with this work; if not, write to the Free Software Foundation,
4026# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4027#
4028# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4029# or visit www.oracle.com if you need additional information or have any
4030# questions.
4031#
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051#
4052# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4053# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4054#
4055# This code is free software; you can redistribute it and/or modify it
4056# under the terms of the GNU General Public License version 2 only, as
4057# published by the Free Software Foundation.  Oracle designates this
4058# particular file as subject to the "Classpath" exception as provided
4059# by Oracle in the LICENSE file that accompanied this code.
4060#
4061# This code is distributed in the hope that it will be useful, but WITHOUT
4062# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4063# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4064# version 2 for more details (a copy is included in the LICENSE file that
4065# accompanied this code).
4066#
4067# You should have received a copy of the GNU General Public License version
4068# 2 along with this work; if not, write to the Free Software Foundation,
4069# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4070#
4071# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4072# or visit www.oracle.com if you need additional information or have any
4073# questions.
4074#
4075
4076# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4077# Converts autoconf style CPU name to OpenJDK style, into
4078# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4079
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style OS name to OpenJDK style, into
4083# VAR_OS and VAR_OS_API.
4084
4085
4086# Expects $host_os $host_cpu $build_os and $build_cpu
4087# and $with_target_bits to have been setup!
4088#
4089# Translate the standard triplet(quadruplet) definition
4090# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4091# OPENJDK_BUILD_OS, etc.
4092
4093
4094# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4095# accordingly. Must be done after setting up build and target system, but before
4096# doing anything else with these values.
4097
4098
4099# Setup the legacy variables, for controlling the old makefiles.
4100#
4101
4102
4103
4104
4105#%%% Build and target systems %%%
4106
4107
4108
4109
4110# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4111# Add -mX to various FLAGS variables.
4112
4113
4114
4115
4116
4117
4118#
4119# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4120# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4121#
4122# This code is free software; you can redistribute it and/or modify it
4123# under the terms of the GNU General Public License version 2 only, as
4124# published by the Free Software Foundation.  Oracle designates this
4125# particular file as subject to the "Classpath" exception as provided
4126# by Oracle in the LICENSE file that accompanied this code.
4127#
4128# This code is distributed in the hope that it will be useful, but WITHOUT
4129# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4130# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4131# version 2 for more details (a copy is included in the LICENSE file that
4132# accompanied this code).
4133#
4134# You should have received a copy of the GNU General Public License version
4135# 2 along with this work; if not, write to the Free Software Foundation,
4136# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4137#
4138# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4139# or visit www.oracle.com if you need additional information or have any
4140# questions.
4141#
4142
4143
4144
4145
4146
4147
4148
4149
4150#
4151# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4153#
4154# This code is free software; you can redistribute it and/or modify it
4155# under the terms of the GNU General Public License version 2 only, as
4156# published by the Free Software Foundation.  Oracle designates this
4157# particular file as subject to the "Classpath" exception as provided
4158# by Oracle in the LICENSE file that accompanied this code.
4159#
4160# This code is distributed in the hope that it will be useful, but WITHOUT
4161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4163# version 2 for more details (a copy is included in the LICENSE file that
4164# accompanied this code).
4165#
4166# You should have received a copy of the GNU General Public License version
4167# 2 along with this work; if not, write to the Free Software Foundation,
4168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4169#
4170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4171# or visit www.oracle.com if you need additional information or have any
4172# questions.
4173#
4174
4175########################################################################
4176# This file is responsible for detecting, verifying and setting up the
4177# toolchain, i.e. the compiler, linker and related utilities. It will setup
4178# proper paths to the binaries, but it will not setup any flags.
4179#
4180# The binaries used is determined by the toolchain type, which is the family of
4181# compilers and related tools that are used.
4182########################################################################
4183
4184
4185# All valid toolchains, regardless of platform (used by help.m4)
4186VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4187
4188# These toolchains are valid on different platforms
4189VALID_TOOLCHAINS_linux="gcc clang"
4190VALID_TOOLCHAINS_solaris="solstudio"
4191VALID_TOOLCHAINS_macosx="gcc clang"
4192VALID_TOOLCHAINS_aix="xlc"
4193VALID_TOOLCHAINS_windows="microsoft"
4194
4195# Toolchain descriptions
4196TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4197TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4198TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4199TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4200TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4201
4202# Setup a number of variables describing how native output files are
4203# named on this platform/toolchain.
4204
4205
4206# Determine which toolchain type to use, and make sure it is valid for this
4207# platform. Setup various information about the selected toolchain.
4208
4209
4210# Before we start detecting the toolchain executables, we might need some
4211# special setup, e.g. additional paths etc.
4212
4213
4214# Restore path, etc
4215
4216
4217# Check if a compiler is of the toolchain type we expect, and save the version
4218# information from it. If the compiler does not match the expected type,
4219# this function will abort using AC_MSG_ERROR. If it matches, the version will
4220# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4221# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4222#
4223# $1 = compiler to test (CC or CXX)
4224# $2 = human readable name of compiler (C or C++)
4225
4226
4227# Try to locate the given C or C++ compiler in the path, or otherwise.
4228#
4229# $1 = compiler to test (CC or CXX)
4230# $2 = human readable name of compiler (C or C++)
4231# $3 = list of compiler names to search for
4232
4233
4234# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4235# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4236# archiver (AR). Verify that the compilers are correct according to the
4237# toolchain type.
4238
4239
4240# Setup additional tools that is considered a part of the toolchain, but not the
4241# core part. Many of these are highly platform-specific and do not exist,
4242# and/or are not needed on all platforms.
4243
4244
4245# Setup the build tools (i.e, the compiler and linker used to build programs
4246# that should be run on the build platform, not the target platform, as a build
4247# helper). Since the non-cross-compile case uses the normal, target compilers
4248# for this, we can only do this after these have been setup.
4249
4250
4251# Setup legacy variables that are still needed as alternative ways to refer to
4252# parts of the toolchain.
4253
4254
4255# Do some additional checks on the detected tools.
4256
4257
4258# Setup the JTReg Regression Test Harness.
4259
4260
4261#
4262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264#
4265# This code is free software; you can redistribute it and/or modify it
4266# under the terms of the GNU General Public License version 2 only, as
4267# published by the Free Software Foundation.  Oracle designates this
4268# particular file as subject to the "Classpath" exception as provided
4269# by Oracle in the LICENSE file that accompanied this code.
4270#
4271# This code is distributed in the hope that it will be useful, but WITHOUT
4272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4274# version 2 for more details (a copy is included in the LICENSE file that
4275# accompanied this code).
4276#
4277# You should have received a copy of the GNU General Public License version
4278# 2 along with this work; if not, write to the Free Software Foundation,
4279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4280#
4281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4282# or visit www.oracle.com if you need additional information or have any
4283# questions.
4284#
4285
4286
4287
4288
4289
4290
4291
4292# Check if the VS env variables were setup prior to running configure.
4293# If not, then find vcvarsall.bat and run it automatically, and integrate
4294# the set env variables into the spec file.
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305# This line needs to be here, verbatim, after all includes and the dummy hook
4306# definitions. It is replaced with custom functionality when building
4307# custom sources.
4308#CUSTOM_AUTOCONF_INCLUDE
4309
4310# Do not change or remove the following line, it is needed for consistency checks:
4311DATE_WHEN_GENERATED=1403110135
4312
4313###############################################################################
4314#
4315# Initialization / Boot-strapping
4316#
4317# The bootstrapping process needs to solve the "chicken or the egg" problem,
4318# thus it jumps back and forth, each time gaining something needed later on.
4319#
4320###############################################################################
4321
4322# If we are requested to print additional help, do that and then exit.
4323# This must be the very first call.
4324
4325  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4326    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4327    $PRINTF "Which are valid to use depends on the build platform.\n"
4328    for toolchain in $VALID_TOOLCHAINS_all; do
4329      # Use indirect variable referencing
4330      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4331      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4332      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4333    done
4334
4335    # And now exit directly
4336    exit 0
4337  fi
4338
4339
4340# Basic initialization that must happen first of all in the normal process.
4341
4342  # Save the original command line. This is passed to us by the wrapper configure script.
4343
4344  DATE_WHEN_CONFIGURED=`LANG=C date`
4345
4346  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4347$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4348  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4349$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4350
4351
4352  # Start with tools that do not need have cross compilation support
4353  # and can be expected to be found in the default PATH. These tools are
4354  # used by configure. Nor are these tools expected to be found in the
4355  # devkit from the builddeps server either, since they are
4356  # needed to download the devkit.
4357
4358  # First are all the simple required tools.
4359
4360
4361
4362  # Publish this variable in the help.
4363
4364
4365  if test "x$BASENAME" = x; then
4366    # The variable is not set by user, try to locate tool using the code snippet
4367    for ac_prog in basename
4368do
4369  # Extract the first word of "$ac_prog", so it can be a program name with args.
4370set dummy $ac_prog; ac_word=$2
4371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4372$as_echo_n "checking for $ac_word... " >&6; }
4373if ${ac_cv_path_BASENAME+:} false; then :
4374  $as_echo_n "(cached) " >&6
4375else
4376  case $BASENAME in
4377  [\\/]* | ?:[\\/]*)
4378  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4379  ;;
4380  *)
4381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4382for as_dir in $PATH
4383do
4384  IFS=$as_save_IFS
4385  test -z "$as_dir" && as_dir=.
4386    for ac_exec_ext in '' $ac_executable_extensions; do
4387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4388    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4390    break 2
4391  fi
4392done
4393  done
4394IFS=$as_save_IFS
4395
4396  ;;
4397esac
4398fi
4399BASENAME=$ac_cv_path_BASENAME
4400if test -n "$BASENAME"; then
4401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4402$as_echo "$BASENAME" >&6; }
4403else
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4405$as_echo "no" >&6; }
4406fi
4407
4408
4409  test -n "$BASENAME" && break
4410done
4411
4412  else
4413    # The variable is set, but is it from the command line or the environment?
4414
4415    # Try to remove the string !BASENAME! from our list.
4416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4418      # If it failed, the variable was not from the command line. Ignore it,
4419      # but warn the user (except for BASH, which is always set by the calling BASH).
4420      if test "xBASENAME" != xBASH; then
4421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4422$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4423      fi
4424      # Try to locate tool using the code snippet
4425      for ac_prog in basename
4426do
4427  # Extract the first word of "$ac_prog", so it can be a program name with args.
4428set dummy $ac_prog; ac_word=$2
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4430$as_echo_n "checking for $ac_word... " >&6; }
4431if ${ac_cv_path_BASENAME+:} false; then :
4432  $as_echo_n "(cached) " >&6
4433else
4434  case $BASENAME in
4435  [\\/]* | ?:[\\/]*)
4436  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4437  ;;
4438  *)
4439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442  IFS=$as_save_IFS
4443  test -z "$as_dir" && as_dir=.
4444    for ac_exec_ext in '' $ac_executable_extensions; do
4445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4446    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4448    break 2
4449  fi
4450done
4451  done
4452IFS=$as_save_IFS
4453
4454  ;;
4455esac
4456fi
4457BASENAME=$ac_cv_path_BASENAME
4458if test -n "$BASENAME"; then
4459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4460$as_echo "$BASENAME" >&6; }
4461else
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4463$as_echo "no" >&6; }
4464fi
4465
4466
4467  test -n "$BASENAME" && break
4468done
4469
4470    else
4471      # If it succeeded, then it was overridden by the user. We will use it
4472      # for the tool.
4473
4474      # First remove it from the list of overridden variables, so we can test
4475      # for unknown variables in the end.
4476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4477
4478      # Check if the provided tool contains a complete path.
4479      tool_specified="$BASENAME"
4480      tool_basename="${tool_specified##*/}"
4481      if test "x$tool_basename" = "x$tool_specified"; then
4482        # A command without a complete path is provided, search $PATH.
4483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4484$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4485        # Extract the first word of "$tool_basename", so it can be a program name with args.
4486set dummy $tool_basename; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
4489if ${ac_cv_path_BASENAME+:} false; then :
4490  $as_echo_n "(cached) " >&6
4491else
4492  case $BASENAME in
4493  [\\/]* | ?:[\\/]*)
4494  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4495  ;;
4496  *)
4497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in $PATH
4499do
4500  IFS=$as_save_IFS
4501  test -z "$as_dir" && as_dir=.
4502    for ac_exec_ext in '' $ac_executable_extensions; do
4503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4504    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4506    break 2
4507  fi
4508done
4509  done
4510IFS=$as_save_IFS
4511
4512  ;;
4513esac
4514fi
4515BASENAME=$ac_cv_path_BASENAME
4516if test -n "$BASENAME"; then
4517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4518$as_echo "$BASENAME" >&6; }
4519else
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
4522fi
4523
4524
4525        if test "x$BASENAME" = x; then
4526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4527        fi
4528      else
4529        # Otherwise we believe it is a complete path. Use it as it is.
4530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4531$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4533$as_echo_n "checking for BASENAME... " >&6; }
4534        if test ! -x "$tool_specified"; then
4535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4536$as_echo "not found" >&6; }
4537          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4538        fi
4539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4540$as_echo "$tool_specified" >&6; }
4541      fi
4542    fi
4543  fi
4544
4545
4546
4547  if test "x$BASENAME" = x; then
4548    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4549  fi
4550
4551
4552
4553
4554
4555  # Publish this variable in the help.
4556
4557
4558  if test "x$BASH" = x; then
4559    # The variable is not set by user, try to locate tool using the code snippet
4560    for ac_prog in bash
4561do
4562  # Extract the first word of "$ac_prog", so it can be a program name with args.
4563set dummy $ac_prog; ac_word=$2
4564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4565$as_echo_n "checking for $ac_word... " >&6; }
4566if ${ac_cv_path_BASH+:} false; then :
4567  $as_echo_n "(cached) " >&6
4568else
4569  case $BASH in
4570  [\\/]* | ?:[\\/]*)
4571  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4572  ;;
4573  *)
4574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575for as_dir in $PATH
4576do
4577  IFS=$as_save_IFS
4578  test -z "$as_dir" && as_dir=.
4579    for ac_exec_ext in '' $ac_executable_extensions; do
4580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4581    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4583    break 2
4584  fi
4585done
4586  done
4587IFS=$as_save_IFS
4588
4589  ;;
4590esac
4591fi
4592BASH=$ac_cv_path_BASH
4593if test -n "$BASH"; then
4594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4595$as_echo "$BASH" >&6; }
4596else
4597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4598$as_echo "no" >&6; }
4599fi
4600
4601
4602  test -n "$BASH" && break
4603done
4604
4605  else
4606    # The variable is set, but is it from the command line or the environment?
4607
4608    # Try to remove the string !BASH! from our list.
4609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4611      # If it failed, the variable was not from the command line. Ignore it,
4612      # but warn the user (except for BASH, which is always set by the calling BASH).
4613      if test "xBASH" != xBASH; then
4614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4615$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4616      fi
4617      # Try to locate tool using the code snippet
4618      for ac_prog in bash
4619do
4620  # Extract the first word of "$ac_prog", so it can be a program name with args.
4621set dummy $ac_prog; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if ${ac_cv_path_BASH+:} false; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $BASH in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4639    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650BASH=$ac_cv_path_BASH
4651if test -n "$BASH"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4653$as_echo "$BASH" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660  test -n "$BASH" && break
4661done
4662
4663    else
4664      # If it succeeded, then it was overridden by the user. We will use it
4665      # for the tool.
4666
4667      # First remove it from the list of overridden variables, so we can test
4668      # for unknown variables in the end.
4669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4670
4671      # Check if the provided tool contains a complete path.
4672      tool_specified="$BASH"
4673      tool_basename="${tool_specified##*/}"
4674      if test "x$tool_basename" = "x$tool_specified"; then
4675        # A command without a complete path is provided, search $PATH.
4676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4677$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4678        # Extract the first word of "$tool_basename", so it can be a program name with args.
4679set dummy $tool_basename; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_BASH+:} false; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $BASH in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708BASH=$ac_cv_path_BASH
4709if test -n "$BASH"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4711$as_echo "$BASH" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718        if test "x$BASH" = x; then
4719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4720        fi
4721      else
4722        # Otherwise we believe it is a complete path. Use it as it is.
4723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4724$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4726$as_echo_n "checking for BASH... " >&6; }
4727        if test ! -x "$tool_specified"; then
4728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4729$as_echo "not found" >&6; }
4730          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4731        fi
4732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4733$as_echo "$tool_specified" >&6; }
4734      fi
4735    fi
4736  fi
4737
4738
4739
4740  if test "x$BASH" = x; then
4741    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4742  fi
4743
4744
4745
4746
4747
4748  # Publish this variable in the help.
4749
4750
4751  if test "x$CAT" = x; then
4752    # The variable is not set by user, try to locate tool using the code snippet
4753    for ac_prog in cat
4754do
4755  # Extract the first word of "$ac_prog", so it can be a program name with args.
4756set dummy $ac_prog; ac_word=$2
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4758$as_echo_n "checking for $ac_word... " >&6; }
4759if ${ac_cv_path_CAT+:} false; then :
4760  $as_echo_n "(cached) " >&6
4761else
4762  case $CAT in
4763  [\\/]* | ?:[\\/]*)
4764  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4765  ;;
4766  *)
4767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4768for as_dir in $PATH
4769do
4770  IFS=$as_save_IFS
4771  test -z "$as_dir" && as_dir=.
4772    for ac_exec_ext in '' $ac_executable_extensions; do
4773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4774    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4776    break 2
4777  fi
4778done
4779  done
4780IFS=$as_save_IFS
4781
4782  ;;
4783esac
4784fi
4785CAT=$ac_cv_path_CAT
4786if test -n "$CAT"; then
4787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4788$as_echo "$CAT" >&6; }
4789else
4790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791$as_echo "no" >&6; }
4792fi
4793
4794
4795  test -n "$CAT" && break
4796done
4797
4798  else
4799    # The variable is set, but is it from the command line or the environment?
4800
4801    # Try to remove the string !CAT! from our list.
4802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4804      # If it failed, the variable was not from the command line. Ignore it,
4805      # but warn the user (except for BASH, which is always set by the calling BASH).
4806      if test "xCAT" != xBASH; then
4807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4808$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4809      fi
4810      # Try to locate tool using the code snippet
4811      for ac_prog in cat
4812do
4813  # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CAT+:} false; then :
4818  $as_echo_n "(cached) " >&6
4819else
4820  case $CAT in
4821  [\\/]* | ?:[\\/]*)
4822  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4823  ;;
4824  *)
4825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in $PATH
4827do
4828  IFS=$as_save_IFS
4829  test -z "$as_dir" && as_dir=.
4830    for ac_exec_ext in '' $ac_executable_extensions; do
4831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4832    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834    break 2
4835  fi
4836done
4837  done
4838IFS=$as_save_IFS
4839
4840  ;;
4841esac
4842fi
4843CAT=$ac_cv_path_CAT
4844if test -n "$CAT"; then
4845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4846$as_echo "$CAT" >&6; }
4847else
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853  test -n "$CAT" && break
4854done
4855
4856    else
4857      # If it succeeded, then it was overridden by the user. We will use it
4858      # for the tool.
4859
4860      # First remove it from the list of overridden variables, so we can test
4861      # for unknown variables in the end.
4862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4863
4864      # Check if the provided tool contains a complete path.
4865      tool_specified="$CAT"
4866      tool_basename="${tool_specified##*/}"
4867      if test "x$tool_basename" = "x$tool_specified"; then
4868        # A command without a complete path is provided, search $PATH.
4869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4870$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4871        # Extract the first word of "$tool_basename", so it can be a program name with args.
4872set dummy $tool_basename; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if ${ac_cv_path_CAT+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878  case $CAT in
4879  [\\/]* | ?:[\\/]*)
4880  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4881  ;;
4882  *)
4883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in $PATH
4885do
4886  IFS=$as_save_IFS
4887  test -z "$as_dir" && as_dir=.
4888    for ac_exec_ext in '' $ac_executable_extensions; do
4889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4890    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892    break 2
4893  fi
4894done
4895  done
4896IFS=$as_save_IFS
4897
4898  ;;
4899esac
4900fi
4901CAT=$ac_cv_path_CAT
4902if test -n "$CAT"; then
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4904$as_echo "$CAT" >&6; }
4905else
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911        if test "x$CAT" = x; then
4912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4913        fi
4914      else
4915        # Otherwise we believe it is a complete path. Use it as it is.
4916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4917$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4919$as_echo_n "checking for CAT... " >&6; }
4920        if test ! -x "$tool_specified"; then
4921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4922$as_echo "not found" >&6; }
4923          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4924        fi
4925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4926$as_echo "$tool_specified" >&6; }
4927      fi
4928    fi
4929  fi
4930
4931
4932
4933  if test "x$CAT" = x; then
4934    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4935  fi
4936
4937
4938
4939
4940
4941  # Publish this variable in the help.
4942
4943
4944  if test "x$CHMOD" = x; then
4945    # The variable is not set by user, try to locate tool using the code snippet
4946    for ac_prog in chmod
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if ${ac_cv_path_CHMOD+:} false; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $CHMOD in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4967    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978CHMOD=$ac_cv_path_CHMOD
4979if test -n "$CHMOD"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4981$as_echo "$CHMOD" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$CHMOD" && break
4989done
4990
4991  else
4992    # The variable is set, but is it from the command line or the environment?
4993
4994    # Try to remove the string !CHMOD! from our list.
4995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4997      # If it failed, the variable was not from the command line. Ignore it,
4998      # but warn the user (except for BASH, which is always set by the calling BASH).
4999      if test "xCHMOD" != xBASH; then
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5001$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5002      fi
5003      # Try to locate tool using the code snippet
5004      for ac_prog in chmod
5005do
5006  # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_CHMOD+:} false; then :
5011  $as_echo_n "(cached) " >&6
5012else
5013  case $CHMOD in
5014  [\\/]* | ?:[\\/]*)
5015  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5016  ;;
5017  *)
5018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in $PATH
5020do
5021  IFS=$as_save_IFS
5022  test -z "$as_dir" && as_dir=.
5023    for ac_exec_ext in '' $ac_executable_extensions; do
5024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027    break 2
5028  fi
5029done
5030  done
5031IFS=$as_save_IFS
5032
5033  ;;
5034esac
5035fi
5036CHMOD=$ac_cv_path_CHMOD
5037if test -n "$CHMOD"; then
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5039$as_echo "$CHMOD" >&6; }
5040else
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045
5046  test -n "$CHMOD" && break
5047done
5048
5049    else
5050      # If it succeeded, then it was overridden by the user. We will use it
5051      # for the tool.
5052
5053      # First remove it from the list of overridden variables, so we can test
5054      # for unknown variables in the end.
5055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5056
5057      # Check if the provided tool contains a complete path.
5058      tool_specified="$CHMOD"
5059      tool_basename="${tool_specified##*/}"
5060      if test "x$tool_basename" = "x$tool_specified"; then
5061        # A command without a complete path is provided, search $PATH.
5062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5063$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5064        # Extract the first word of "$tool_basename", so it can be a program name with args.
5065set dummy $tool_basename; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_path_CHMOD+:} false; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $CHMOD in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094CHMOD=$ac_cv_path_CHMOD
5095if test -n "$CHMOD"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5097$as_echo "$CHMOD" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104        if test "x$CHMOD" = x; then
5105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5106        fi
5107      else
5108        # Otherwise we believe it is a complete path. Use it as it is.
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5110$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5112$as_echo_n "checking for CHMOD... " >&6; }
5113        if test ! -x "$tool_specified"; then
5114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5115$as_echo "not found" >&6; }
5116          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5117        fi
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5119$as_echo "$tool_specified" >&6; }
5120      fi
5121    fi
5122  fi
5123
5124
5125
5126  if test "x$CHMOD" = x; then
5127    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5128  fi
5129
5130
5131
5132
5133
5134  # Publish this variable in the help.
5135
5136
5137  if test "x$CMP" = x; then
5138    # The variable is not set by user, try to locate tool using the code snippet
5139    for ac_prog in cmp
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_CMP+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $CMP in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171CMP=$ac_cv_path_CMP
5172if test -n "$CMP"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5174$as_echo "$CMP" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$CMP" && break
5182done
5183
5184  else
5185    # The variable is set, but is it from the command line or the environment?
5186
5187    # Try to remove the string !CMP! from our list.
5188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5190      # If it failed, the variable was not from the command line. Ignore it,
5191      # but warn the user (except for BASH, which is always set by the calling BASH).
5192      if test "xCMP" != xBASH; then
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5194$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5195      fi
5196      # Try to locate tool using the code snippet
5197      for ac_prog in cmp
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_CMP+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $CMP in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229CMP=$ac_cv_path_CMP
5230if test -n "$CMP"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5232$as_echo "$CMP" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$CMP" && break
5240done
5241
5242    else
5243      # If it succeeded, then it was overridden by the user. We will use it
5244      # for the tool.
5245
5246      # First remove it from the list of overridden variables, so we can test
5247      # for unknown variables in the end.
5248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5249
5250      # Check if the provided tool contains a complete path.
5251      tool_specified="$CMP"
5252      tool_basename="${tool_specified##*/}"
5253      if test "x$tool_basename" = "x$tool_specified"; then
5254        # A command without a complete path is provided, search $PATH.
5255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5256$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5257        # Extract the first word of "$tool_basename", so it can be a program name with args.
5258set dummy $tool_basename; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_CMP+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $CMP in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287CMP=$ac_cv_path_CMP
5288if test -n "$CMP"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5290$as_echo "$CMP" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297        if test "x$CMP" = x; then
5298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5299        fi
5300      else
5301        # Otherwise we believe it is a complete path. Use it as it is.
5302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5303$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5305$as_echo_n "checking for CMP... " >&6; }
5306        if test ! -x "$tool_specified"; then
5307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5308$as_echo "not found" >&6; }
5309          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5310        fi
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5312$as_echo "$tool_specified" >&6; }
5313      fi
5314    fi
5315  fi
5316
5317
5318
5319  if test "x$CMP" = x; then
5320    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5321  fi
5322
5323
5324
5325
5326
5327  # Publish this variable in the help.
5328
5329
5330  if test "x$COMM" = x; then
5331    # The variable is not set by user, try to locate tool using the code snippet
5332    for ac_prog in comm
5333do
5334  # Extract the first word of "$ac_prog", so it can be a program name with args.
5335set dummy $ac_prog; ac_word=$2
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337$as_echo_n "checking for $ac_word... " >&6; }
5338if ${ac_cv_path_COMM+:} false; then :
5339  $as_echo_n "(cached) " >&6
5340else
5341  case $COMM in
5342  [\\/]* | ?:[\\/]*)
5343  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5344  ;;
5345  *)
5346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5347for as_dir in $PATH
5348do
5349  IFS=$as_save_IFS
5350  test -z "$as_dir" && as_dir=.
5351    for ac_exec_ext in '' $ac_executable_extensions; do
5352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5353    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5355    break 2
5356  fi
5357done
5358  done
5359IFS=$as_save_IFS
5360
5361  ;;
5362esac
5363fi
5364COMM=$ac_cv_path_COMM
5365if test -n "$COMM"; then
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5367$as_echo "$COMM" >&6; }
5368else
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
5371fi
5372
5373
5374  test -n "$COMM" && break
5375done
5376
5377  else
5378    # The variable is set, but is it from the command line or the environment?
5379
5380    # Try to remove the string !COMM! from our list.
5381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5383      # If it failed, the variable was not from the command line. Ignore it,
5384      # but warn the user (except for BASH, which is always set by the calling BASH).
5385      if test "xCOMM" != xBASH; then
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5387$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5388      fi
5389      # Try to locate tool using the code snippet
5390      for ac_prog in comm
5391do
5392  # Extract the first word of "$ac_prog", so it can be a program name with args.
5393set dummy $ac_prog; ac_word=$2
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395$as_echo_n "checking for $ac_word... " >&6; }
5396if ${ac_cv_path_COMM+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  case $COMM in
5400  [\\/]* | ?:[\\/]*)
5401  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5402  ;;
5403  *)
5404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407  IFS=$as_save_IFS
5408  test -z "$as_dir" && as_dir=.
5409    for ac_exec_ext in '' $ac_executable_extensions; do
5410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413    break 2
5414  fi
5415done
5416  done
5417IFS=$as_save_IFS
5418
5419  ;;
5420esac
5421fi
5422COMM=$ac_cv_path_COMM
5423if test -n "$COMM"; then
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5425$as_echo "$COMM" >&6; }
5426else
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
5430
5431
5432  test -n "$COMM" && break
5433done
5434
5435    else
5436      # If it succeeded, then it was overridden by the user. We will use it
5437      # for the tool.
5438
5439      # First remove it from the list of overridden variables, so we can test
5440      # for unknown variables in the end.
5441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5442
5443      # Check if the provided tool contains a complete path.
5444      tool_specified="$COMM"
5445      tool_basename="${tool_specified##*/}"
5446      if test "x$tool_basename" = "x$tool_specified"; then
5447        # A command without a complete path is provided, search $PATH.
5448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5449$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5450        # Extract the first word of "$tool_basename", so it can be a program name with args.
5451set dummy $tool_basename; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_COMM+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $COMM in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480COMM=$ac_cv_path_COMM
5481if test -n "$COMM"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5483$as_echo "$COMM" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490        if test "x$COMM" = x; then
5491          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5492        fi
5493      else
5494        # Otherwise we believe it is a complete path. Use it as it is.
5495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5496$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5498$as_echo_n "checking for COMM... " >&6; }
5499        if test ! -x "$tool_specified"; then
5500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5501$as_echo "not found" >&6; }
5502          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5503        fi
5504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5505$as_echo "$tool_specified" >&6; }
5506      fi
5507    fi
5508  fi
5509
5510
5511
5512  if test "x$COMM" = x; then
5513    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5514  fi
5515
5516
5517
5518
5519
5520  # Publish this variable in the help.
5521
5522
5523  if test "x$CP" = x; then
5524    # The variable is not set by user, try to locate tool using the code snippet
5525    for ac_prog in cp
5526do
5527  # Extract the first word of "$ac_prog", so it can be a program name with args.
5528set dummy $ac_prog; ac_word=$2
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530$as_echo_n "checking for $ac_word... " >&6; }
5531if ${ac_cv_path_CP+:} false; then :
5532  $as_echo_n "(cached) " >&6
5533else
5534  case $CP in
5535  [\\/]* | ?:[\\/]*)
5536  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5537  ;;
5538  *)
5539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5540for as_dir in $PATH
5541do
5542  IFS=$as_save_IFS
5543  test -z "$as_dir" && as_dir=.
5544    for ac_exec_ext in '' $ac_executable_extensions; do
5545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5546    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5548    break 2
5549  fi
5550done
5551  done
5552IFS=$as_save_IFS
5553
5554  ;;
5555esac
5556fi
5557CP=$ac_cv_path_CP
5558if test -n "$CP"; then
5559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5560$as_echo "$CP" >&6; }
5561else
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
5564fi
5565
5566
5567  test -n "$CP" && break
5568done
5569
5570  else
5571    # The variable is set, but is it from the command line or the environment?
5572
5573    # Try to remove the string !CP! from our list.
5574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5576      # If it failed, the variable was not from the command line. Ignore it,
5577      # but warn the user (except for BASH, which is always set by the calling BASH).
5578      if test "xCP" != xBASH; then
5579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5580$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5581      fi
5582      # Try to locate tool using the code snippet
5583      for ac_prog in cp
5584do
5585  # Extract the first word of "$ac_prog", so it can be a program name with args.
5586set dummy $ac_prog; ac_word=$2
5587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
5589if ${ac_cv_path_CP+:} false; then :
5590  $as_echo_n "(cached) " >&6
5591else
5592  case $CP in
5593  [\\/]* | ?:[\\/]*)
5594  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5595  ;;
5596  *)
5597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5598for as_dir in $PATH
5599do
5600  IFS=$as_save_IFS
5601  test -z "$as_dir" && as_dir=.
5602    for ac_exec_ext in '' $ac_executable_extensions; do
5603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5604    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5606    break 2
5607  fi
5608done
5609  done
5610IFS=$as_save_IFS
5611
5612  ;;
5613esac
5614fi
5615CP=$ac_cv_path_CP
5616if test -n "$CP"; then
5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5618$as_echo "$CP" >&6; }
5619else
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5621$as_echo "no" >&6; }
5622fi
5623
5624
5625  test -n "$CP" && break
5626done
5627
5628    else
5629      # If it succeeded, then it was overridden by the user. We will use it
5630      # for the tool.
5631
5632      # First remove it from the list of overridden variables, so we can test
5633      # for unknown variables in the end.
5634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5635
5636      # Check if the provided tool contains a complete path.
5637      tool_specified="$CP"
5638      tool_basename="${tool_specified##*/}"
5639      if test "x$tool_basename" = "x$tool_specified"; then
5640        # A command without a complete path is provided, search $PATH.
5641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5642$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5643        # Extract the first word of "$tool_basename", so it can be a program name with args.
5644set dummy $tool_basename; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_path_CP+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650  case $CP in
5651  [\\/]* | ?:[\\/]*)
5652  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5653  ;;
5654  *)
5655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656for as_dir in $PATH
5657do
5658  IFS=$as_save_IFS
5659  test -z "$as_dir" && as_dir=.
5660    for ac_exec_ext in '' $ac_executable_extensions; do
5661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5664    break 2
5665  fi
5666done
5667  done
5668IFS=$as_save_IFS
5669
5670  ;;
5671esac
5672fi
5673CP=$ac_cv_path_CP
5674if test -n "$CP"; then
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5676$as_echo "$CP" >&6; }
5677else
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
5680fi
5681
5682
5683        if test "x$CP" = x; then
5684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5685        fi
5686      else
5687        # Otherwise we believe it is a complete path. Use it as it is.
5688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5689$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5691$as_echo_n "checking for CP... " >&6; }
5692        if test ! -x "$tool_specified"; then
5693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5694$as_echo "not found" >&6; }
5695          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5696        fi
5697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5698$as_echo "$tool_specified" >&6; }
5699      fi
5700    fi
5701  fi
5702
5703
5704
5705  if test "x$CP" = x; then
5706    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5707  fi
5708
5709
5710
5711
5712
5713  # Publish this variable in the help.
5714
5715
5716  if test "x$CPIO" = x; then
5717    # The variable is not set by user, try to locate tool using the code snippet
5718    for ac_prog in cpio
5719do
5720  # Extract the first word of "$ac_prog", so it can be a program name with args.
5721set dummy $ac_prog; ac_word=$2
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723$as_echo_n "checking for $ac_word... " >&6; }
5724if ${ac_cv_path_CPIO+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  case $CPIO in
5728  [\\/]* | ?:[\\/]*)
5729  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5730  ;;
5731  *)
5732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735  IFS=$as_save_IFS
5736  test -z "$as_dir" && as_dir=.
5737    for ac_exec_ext in '' $ac_executable_extensions; do
5738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741    break 2
5742  fi
5743done
5744  done
5745IFS=$as_save_IFS
5746
5747  ;;
5748esac
5749fi
5750CPIO=$ac_cv_path_CPIO
5751if test -n "$CPIO"; then
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5753$as_echo "$CPIO" >&6; }
5754else
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756$as_echo "no" >&6; }
5757fi
5758
5759
5760  test -n "$CPIO" && break
5761done
5762
5763  else
5764    # The variable is set, but is it from the command line or the environment?
5765
5766    # Try to remove the string !CPIO! from our list.
5767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5769      # If it failed, the variable was not from the command line. Ignore it,
5770      # but warn the user (except for BASH, which is always set by the calling BASH).
5771      if test "xCPIO" != xBASH; then
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5773$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5774      fi
5775      # Try to locate tool using the code snippet
5776      for ac_prog in cpio
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CPIO+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CPIO in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CPIO=$ac_cv_path_CPIO
5809if test -n "$CPIO"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5811$as_echo "$CPIO" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CPIO" && break
5819done
5820
5821    else
5822      # If it succeeded, then it was overridden by the user. We will use it
5823      # for the tool.
5824
5825      # First remove it from the list of overridden variables, so we can test
5826      # for unknown variables in the end.
5827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5828
5829      # Check if the provided tool contains a complete path.
5830      tool_specified="$CPIO"
5831      tool_basename="${tool_specified##*/}"
5832      if test "x$tool_basename" = "x$tool_specified"; then
5833        # A command without a complete path is provided, search $PATH.
5834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5835$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5836        # Extract the first word of "$tool_basename", so it can be a program name with args.
5837set dummy $tool_basename; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CPIO+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CPIO in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CPIO=$ac_cv_path_CPIO
5867if test -n "$CPIO"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5869$as_echo "$CPIO" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876        if test "x$CPIO" = x; then
5877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5878        fi
5879      else
5880        # Otherwise we believe it is a complete path. Use it as it is.
5881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5882$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5884$as_echo_n "checking for CPIO... " >&6; }
5885        if test ! -x "$tool_specified"; then
5886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5887$as_echo "not found" >&6; }
5888          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5889        fi
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5891$as_echo "$tool_specified" >&6; }
5892      fi
5893    fi
5894  fi
5895
5896
5897
5898  if test "x$CPIO" = x; then
5899    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5900  fi
5901
5902
5903
5904
5905
5906  # Publish this variable in the help.
5907
5908
5909  if test "x$CUT" = x; then
5910    # The variable is not set by user, try to locate tool using the code snippet
5911    for ac_prog in cut
5912do
5913  # Extract the first word of "$ac_prog", so it can be a program name with args.
5914set dummy $ac_prog; ac_word=$2
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5916$as_echo_n "checking for $ac_word... " >&6; }
5917if ${ac_cv_path_CUT+:} false; then :
5918  $as_echo_n "(cached) " >&6
5919else
5920  case $CUT in
5921  [\\/]* | ?:[\\/]*)
5922  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5923  ;;
5924  *)
5925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5926for as_dir in $PATH
5927do
5928  IFS=$as_save_IFS
5929  test -z "$as_dir" && as_dir=.
5930    for ac_exec_ext in '' $ac_executable_extensions; do
5931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5932    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5934    break 2
5935  fi
5936done
5937  done
5938IFS=$as_save_IFS
5939
5940  ;;
5941esac
5942fi
5943CUT=$ac_cv_path_CUT
5944if test -n "$CUT"; then
5945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5946$as_echo "$CUT" >&6; }
5947else
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5949$as_echo "no" >&6; }
5950fi
5951
5952
5953  test -n "$CUT" && break
5954done
5955
5956  else
5957    # The variable is set, but is it from the command line or the environment?
5958
5959    # Try to remove the string !CUT! from our list.
5960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5962      # If it failed, the variable was not from the command line. Ignore it,
5963      # but warn the user (except for BASH, which is always set by the calling BASH).
5964      if test "xCUT" != xBASH; then
5965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5966$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5967      fi
5968      # Try to locate tool using the code snippet
5969      for ac_prog in cut
5970do
5971  # Extract the first word of "$ac_prog", so it can be a program name with args.
5972set dummy $ac_prog; ac_word=$2
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
5975if ${ac_cv_path_CUT+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  case $CUT in
5979  [\\/]* | ?:[\\/]*)
5980  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5981  ;;
5982  *)
5983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986  IFS=$as_save_IFS
5987  test -z "$as_dir" && as_dir=.
5988    for ac_exec_ext in '' $ac_executable_extensions; do
5989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5990    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992    break 2
5993  fi
5994done
5995  done
5996IFS=$as_save_IFS
5997
5998  ;;
5999esac
6000fi
6001CUT=$ac_cv_path_CUT
6002if test -n "$CUT"; then
6003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6004$as_echo "$CUT" >&6; }
6005else
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011  test -n "$CUT" && break
6012done
6013
6014    else
6015      # If it succeeded, then it was overridden by the user. We will use it
6016      # for the tool.
6017
6018      # First remove it from the list of overridden variables, so we can test
6019      # for unknown variables in the end.
6020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6021
6022      # Check if the provided tool contains a complete path.
6023      tool_specified="$CUT"
6024      tool_basename="${tool_specified##*/}"
6025      if test "x$tool_basename" = "x$tool_specified"; then
6026        # A command without a complete path is provided, search $PATH.
6027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6028$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6029        # Extract the first word of "$tool_basename", so it can be a program name with args.
6030set dummy $tool_basename; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_path_CUT+:} false; then :
6034  $as_echo_n "(cached) " >&6
6035else
6036  case $CUT in
6037  [\\/]* | ?:[\\/]*)
6038  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6039  ;;
6040  *)
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050    break 2
6051  fi
6052done
6053  done
6054IFS=$as_save_IFS
6055
6056  ;;
6057esac
6058fi
6059CUT=$ac_cv_path_CUT
6060if test -n "$CUT"; then
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6062$as_echo "$CUT" >&6; }
6063else
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069        if test "x$CUT" = x; then
6070          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6071        fi
6072      else
6073        # Otherwise we believe it is a complete path. Use it as it is.
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6075$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6077$as_echo_n "checking for CUT... " >&6; }
6078        if test ! -x "$tool_specified"; then
6079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6080$as_echo "not found" >&6; }
6081          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6082        fi
6083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6084$as_echo "$tool_specified" >&6; }
6085      fi
6086    fi
6087  fi
6088
6089
6090
6091  if test "x$CUT" = x; then
6092    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6093  fi
6094
6095
6096
6097
6098
6099  # Publish this variable in the help.
6100
6101
6102  if test "x$DATE" = x; then
6103    # The variable is not set by user, try to locate tool using the code snippet
6104    for ac_prog in date
6105do
6106  # Extract the first word of "$ac_prog", so it can be a program name with args.
6107set dummy $ac_prog; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_DATE+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $DATE in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136DATE=$ac_cv_path_DATE
6137if test -n "$DATE"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6139$as_echo "$DATE" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146  test -n "$DATE" && break
6147done
6148
6149  else
6150    # The variable is set, but is it from the command line or the environment?
6151
6152    # Try to remove the string !DATE! from our list.
6153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6155      # If it failed, the variable was not from the command line. Ignore it,
6156      # but warn the user (except for BASH, which is always set by the calling BASH).
6157      if test "xDATE" != xBASH; then
6158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6159$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6160      fi
6161      # Try to locate tool using the code snippet
6162      for ac_prog in date
6163do
6164  # Extract the first word of "$ac_prog", so it can be a program name with args.
6165set dummy $ac_prog; ac_word=$2
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6167$as_echo_n "checking for $ac_word... " >&6; }
6168if ${ac_cv_path_DATE+:} false; then :
6169  $as_echo_n "(cached) " >&6
6170else
6171  case $DATE in
6172  [\\/]* | ?:[\\/]*)
6173  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6174  ;;
6175  *)
6176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH
6178do
6179  IFS=$as_save_IFS
6180  test -z "$as_dir" && as_dir=.
6181    for ac_exec_ext in '' $ac_executable_extensions; do
6182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6183    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6185    break 2
6186  fi
6187done
6188  done
6189IFS=$as_save_IFS
6190
6191  ;;
6192esac
6193fi
6194DATE=$ac_cv_path_DATE
6195if test -n "$DATE"; then
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6197$as_echo "$DATE" >&6; }
6198else
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204  test -n "$DATE" && break
6205done
6206
6207    else
6208      # If it succeeded, then it was overridden by the user. We will use it
6209      # for the tool.
6210
6211      # First remove it from the list of overridden variables, so we can test
6212      # for unknown variables in the end.
6213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6214
6215      # Check if the provided tool contains a complete path.
6216      tool_specified="$DATE"
6217      tool_basename="${tool_specified##*/}"
6218      if test "x$tool_basename" = "x$tool_specified"; then
6219        # A command without a complete path is provided, search $PATH.
6220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6221$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6222        # Extract the first word of "$tool_basename", so it can be a program name with args.
6223set dummy $tool_basename; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_path_DATE+:} false; then :
6227  $as_echo_n "(cached) " >&6
6228else
6229  case $DATE in
6230  [\\/]* | ?:[\\/]*)
6231  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6232  ;;
6233  *)
6234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH
6236do
6237  IFS=$as_save_IFS
6238  test -z "$as_dir" && as_dir=.
6239    for ac_exec_ext in '' $ac_executable_extensions; do
6240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243    break 2
6244  fi
6245done
6246  done
6247IFS=$as_save_IFS
6248
6249  ;;
6250esac
6251fi
6252DATE=$ac_cv_path_DATE
6253if test -n "$DATE"; then
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6255$as_echo "$DATE" >&6; }
6256else
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
6259fi
6260
6261
6262        if test "x$DATE" = x; then
6263          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6264        fi
6265      else
6266        # Otherwise we believe it is a complete path. Use it as it is.
6267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6268$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6270$as_echo_n "checking for DATE... " >&6; }
6271        if test ! -x "$tool_specified"; then
6272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6273$as_echo "not found" >&6; }
6274          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6275        fi
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6277$as_echo "$tool_specified" >&6; }
6278      fi
6279    fi
6280  fi
6281
6282
6283
6284  if test "x$DATE" = x; then
6285    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6286  fi
6287
6288
6289
6290
6291
6292  # Publish this variable in the help.
6293
6294
6295  if test "x$DIFF" = x; then
6296    # The variable is not set by user, try to locate tool using the code snippet
6297    for ac_prog in gdiff diff
6298do
6299  # Extract the first word of "$ac_prog", so it can be a program name with args.
6300set dummy $ac_prog; ac_word=$2
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6302$as_echo_n "checking for $ac_word... " >&6; }
6303if ${ac_cv_path_DIFF+:} false; then :
6304  $as_echo_n "(cached) " >&6
6305else
6306  case $DIFF in
6307  [\\/]* | ?:[\\/]*)
6308  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6309  ;;
6310  *)
6311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312for as_dir in $PATH
6313do
6314  IFS=$as_save_IFS
6315  test -z "$as_dir" && as_dir=.
6316    for ac_exec_ext in '' $ac_executable_extensions; do
6317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6318    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6320    break 2
6321  fi
6322done
6323  done
6324IFS=$as_save_IFS
6325
6326  ;;
6327esac
6328fi
6329DIFF=$ac_cv_path_DIFF
6330if test -n "$DIFF"; then
6331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6332$as_echo "$DIFF" >&6; }
6333else
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
6336fi
6337
6338
6339  test -n "$DIFF" && break
6340done
6341
6342  else
6343    # The variable is set, but is it from the command line or the environment?
6344
6345    # Try to remove the string !DIFF! from our list.
6346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6348      # If it failed, the variable was not from the command line. Ignore it,
6349      # but warn the user (except for BASH, which is always set by the calling BASH).
6350      if test "xDIFF" != xBASH; then
6351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6352$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6353      fi
6354      # Try to locate tool using the code snippet
6355      for ac_prog in gdiff diff
6356do
6357  # Extract the first word of "$ac_prog", so it can be a program name with args.
6358set dummy $ac_prog; ac_word=$2
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
6361if ${ac_cv_path_DIFF+:} false; then :
6362  $as_echo_n "(cached) " >&6
6363else
6364  case $DIFF in
6365  [\\/]* | ?:[\\/]*)
6366  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6367  ;;
6368  *)
6369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372  IFS=$as_save_IFS
6373  test -z "$as_dir" && as_dir=.
6374    for ac_exec_ext in '' $ac_executable_extensions; do
6375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6376    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378    break 2
6379  fi
6380done
6381  done
6382IFS=$as_save_IFS
6383
6384  ;;
6385esac
6386fi
6387DIFF=$ac_cv_path_DIFF
6388if test -n "$DIFF"; then
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6390$as_echo "$DIFF" >&6; }
6391else
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396
6397  test -n "$DIFF" && break
6398done
6399
6400    else
6401      # If it succeeded, then it was overridden by the user. We will use it
6402      # for the tool.
6403
6404      # First remove it from the list of overridden variables, so we can test
6405      # for unknown variables in the end.
6406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6407
6408      # Check if the provided tool contains a complete path.
6409      tool_specified="$DIFF"
6410      tool_basename="${tool_specified##*/}"
6411      if test "x$tool_basename" = "x$tool_specified"; then
6412        # A command without a complete path is provided, search $PATH.
6413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6414$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6415        # Extract the first word of "$tool_basename", so it can be a program name with args.
6416set dummy $tool_basename; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_DIFF+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $DIFF in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445DIFF=$ac_cv_path_DIFF
6446if test -n "$DIFF"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6448$as_echo "$DIFF" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455        if test "x$DIFF" = x; then
6456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6457        fi
6458      else
6459        # Otherwise we believe it is a complete path. Use it as it is.
6460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6461$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6463$as_echo_n "checking for DIFF... " >&6; }
6464        if test ! -x "$tool_specified"; then
6465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6466$as_echo "not found" >&6; }
6467          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6468        fi
6469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6470$as_echo "$tool_specified" >&6; }
6471      fi
6472    fi
6473  fi
6474
6475
6476
6477  if test "x$DIFF" = x; then
6478    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6479  fi
6480
6481
6482
6483
6484
6485  # Publish this variable in the help.
6486
6487
6488  if test "x$DIRNAME" = x; then
6489    # The variable is not set by user, try to locate tool using the code snippet
6490    for ac_prog in dirname
6491do
6492  # Extract the first word of "$ac_prog", so it can be a program name with args.
6493set dummy $ac_prog; ac_word=$2
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495$as_echo_n "checking for $ac_word... " >&6; }
6496if ${ac_cv_path_DIRNAME+:} false; then :
6497  $as_echo_n "(cached) " >&6
6498else
6499  case $DIRNAME in
6500  [\\/]* | ?:[\\/]*)
6501  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6502  ;;
6503  *)
6504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505for as_dir in $PATH
6506do
6507  IFS=$as_save_IFS
6508  test -z "$as_dir" && as_dir=.
6509    for ac_exec_ext in '' $ac_executable_extensions; do
6510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6511    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6513    break 2
6514  fi
6515done
6516  done
6517IFS=$as_save_IFS
6518
6519  ;;
6520esac
6521fi
6522DIRNAME=$ac_cv_path_DIRNAME
6523if test -n "$DIRNAME"; then
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6525$as_echo "$DIRNAME" >&6; }
6526else
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6528$as_echo "no" >&6; }
6529fi
6530
6531
6532  test -n "$DIRNAME" && break
6533done
6534
6535  else
6536    # The variable is set, but is it from the command line or the environment?
6537
6538    # Try to remove the string !DIRNAME! from our list.
6539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6541      # If it failed, the variable was not from the command line. Ignore it,
6542      # but warn the user (except for BASH, which is always set by the calling BASH).
6543      if test "xDIRNAME" != xBASH; then
6544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6545$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6546      fi
6547      # Try to locate tool using the code snippet
6548      for ac_prog in dirname
6549do
6550  # Extract the first word of "$ac_prog", so it can be a program name with args.
6551set dummy $ac_prog; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_DIRNAME+:} false; then :
6555  $as_echo_n "(cached) " >&6
6556else
6557  case $DIRNAME in
6558  [\\/]* | ?:[\\/]*)
6559  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6560  ;;
6561  *)
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565  IFS=$as_save_IFS
6566  test -z "$as_dir" && as_dir=.
6567    for ac_exec_ext in '' $ac_executable_extensions; do
6568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6569    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571    break 2
6572  fi
6573done
6574  done
6575IFS=$as_save_IFS
6576
6577  ;;
6578esac
6579fi
6580DIRNAME=$ac_cv_path_DIRNAME
6581if test -n "$DIRNAME"; then
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6583$as_echo "$DIRNAME" >&6; }
6584else
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589
6590  test -n "$DIRNAME" && break
6591done
6592
6593    else
6594      # If it succeeded, then it was overridden by the user. We will use it
6595      # for the tool.
6596
6597      # First remove it from the list of overridden variables, so we can test
6598      # for unknown variables in the end.
6599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6600
6601      # Check if the provided tool contains a complete path.
6602      tool_specified="$DIRNAME"
6603      tool_basename="${tool_specified##*/}"
6604      if test "x$tool_basename" = "x$tool_specified"; then
6605        # A command without a complete path is provided, search $PATH.
6606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6607$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6608        # Extract the first word of "$tool_basename", so it can be a program name with args.
6609set dummy $tool_basename; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_DIRNAME+:} false; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  case $DIRNAME in
6616  [\\/]* | ?:[\\/]*)
6617  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6618  ;;
6619  *)
6620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623  IFS=$as_save_IFS
6624  test -z "$as_dir" && as_dir=.
6625    for ac_exec_ext in '' $ac_executable_extensions; do
6626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629    break 2
6630  fi
6631done
6632  done
6633IFS=$as_save_IFS
6634
6635  ;;
6636esac
6637fi
6638DIRNAME=$ac_cv_path_DIRNAME
6639if test -n "$DIRNAME"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6641$as_echo "$DIRNAME" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648        if test "x$DIRNAME" = x; then
6649          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6650        fi
6651      else
6652        # Otherwise we believe it is a complete path. Use it as it is.
6653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6654$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6656$as_echo_n "checking for DIRNAME... " >&6; }
6657        if test ! -x "$tool_specified"; then
6658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6659$as_echo "not found" >&6; }
6660          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6661        fi
6662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6663$as_echo "$tool_specified" >&6; }
6664      fi
6665    fi
6666  fi
6667
6668
6669
6670  if test "x$DIRNAME" = x; then
6671    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6672  fi
6673
6674
6675
6676
6677
6678  # Publish this variable in the help.
6679
6680
6681  if test "x$ECHO" = x; then
6682    # The variable is not set by user, try to locate tool using the code snippet
6683    for ac_prog in echo
6684do
6685  # Extract the first word of "$ac_prog", so it can be a program name with args.
6686set dummy $ac_prog; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_ECHO+:} false; then :
6690  $as_echo_n "(cached) " >&6
6691else
6692  case $ECHO in
6693  [\\/]* | ?:[\\/]*)
6694  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6695  ;;
6696  *)
6697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in $PATH
6699do
6700  IFS=$as_save_IFS
6701  test -z "$as_dir" && as_dir=.
6702    for ac_exec_ext in '' $ac_executable_extensions; do
6703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6704    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706    break 2
6707  fi
6708done
6709  done
6710IFS=$as_save_IFS
6711
6712  ;;
6713esac
6714fi
6715ECHO=$ac_cv_path_ECHO
6716if test -n "$ECHO"; then
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6718$as_echo "$ECHO" >&6; }
6719else
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
6725  test -n "$ECHO" && break
6726done
6727
6728  else
6729    # The variable is set, but is it from the command line or the environment?
6730
6731    # Try to remove the string !ECHO! from our list.
6732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6734      # If it failed, the variable was not from the command line. Ignore it,
6735      # but warn the user (except for BASH, which is always set by the calling BASH).
6736      if test "xECHO" != xBASH; then
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6738$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6739      fi
6740      # Try to locate tool using the code snippet
6741      for ac_prog in echo
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_ECHO+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $ECHO in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773ECHO=$ac_cv_path_ECHO
6774if test -n "$ECHO"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6776$as_echo "$ECHO" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$ECHO" && break
6784done
6785
6786    else
6787      # If it succeeded, then it was overridden by the user. We will use it
6788      # for the tool.
6789
6790      # First remove it from the list of overridden variables, so we can test
6791      # for unknown variables in the end.
6792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6793
6794      # Check if the provided tool contains a complete path.
6795      tool_specified="$ECHO"
6796      tool_basename="${tool_specified##*/}"
6797      if test "x$tool_basename" = "x$tool_specified"; then
6798        # A command without a complete path is provided, search $PATH.
6799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6800$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6801        # Extract the first word of "$tool_basename", so it can be a program name with args.
6802set dummy $tool_basename; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_ECHO+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $ECHO in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831ECHO=$ac_cv_path_ECHO
6832if test -n "$ECHO"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6834$as_echo "$ECHO" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841        if test "x$ECHO" = x; then
6842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6843        fi
6844      else
6845        # Otherwise we believe it is a complete path. Use it as it is.
6846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6847$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6849$as_echo_n "checking for ECHO... " >&6; }
6850        if test ! -x "$tool_specified"; then
6851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6852$as_echo "not found" >&6; }
6853          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6854        fi
6855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6856$as_echo "$tool_specified" >&6; }
6857      fi
6858    fi
6859  fi
6860
6861
6862
6863  if test "x$ECHO" = x; then
6864    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6865  fi
6866
6867
6868
6869
6870
6871  # Publish this variable in the help.
6872
6873
6874  if test "x$EXPR" = x; then
6875    # The variable is not set by user, try to locate tool using the code snippet
6876    for ac_prog in expr
6877do
6878  # Extract the first word of "$ac_prog", so it can be a program name with args.
6879set dummy $ac_prog; ac_word=$2
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881$as_echo_n "checking for $ac_word... " >&6; }
6882if ${ac_cv_path_EXPR+:} false; then :
6883  $as_echo_n "(cached) " >&6
6884else
6885  case $EXPR in
6886  [\\/]* | ?:[\\/]*)
6887  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6888  ;;
6889  *)
6890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891for as_dir in $PATH
6892do
6893  IFS=$as_save_IFS
6894  test -z "$as_dir" && as_dir=.
6895    for ac_exec_ext in '' $ac_executable_extensions; do
6896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899    break 2
6900  fi
6901done
6902  done
6903IFS=$as_save_IFS
6904
6905  ;;
6906esac
6907fi
6908EXPR=$ac_cv_path_EXPR
6909if test -n "$EXPR"; then
6910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6911$as_echo "$EXPR" >&6; }
6912else
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914$as_echo "no" >&6; }
6915fi
6916
6917
6918  test -n "$EXPR" && break
6919done
6920
6921  else
6922    # The variable is set, but is it from the command line or the environment?
6923
6924    # Try to remove the string !EXPR! from our list.
6925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6927      # If it failed, the variable was not from the command line. Ignore it,
6928      # but warn the user (except for BASH, which is always set by the calling BASH).
6929      if test "xEXPR" != xBASH; then
6930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6931$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6932      fi
6933      # Try to locate tool using the code snippet
6934      for ac_prog in expr
6935do
6936  # Extract the first word of "$ac_prog", so it can be a program name with args.
6937set dummy $ac_prog; ac_word=$2
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939$as_echo_n "checking for $ac_word... " >&6; }
6940if ${ac_cv_path_EXPR+:} false; then :
6941  $as_echo_n "(cached) " >&6
6942else
6943  case $EXPR in
6944  [\\/]* | ?:[\\/]*)
6945  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6946  ;;
6947  *)
6948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949for as_dir in $PATH
6950do
6951  IFS=$as_save_IFS
6952  test -z "$as_dir" && as_dir=.
6953    for ac_exec_ext in '' $ac_executable_extensions; do
6954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957    break 2
6958  fi
6959done
6960  done
6961IFS=$as_save_IFS
6962
6963  ;;
6964esac
6965fi
6966EXPR=$ac_cv_path_EXPR
6967if test -n "$EXPR"; then
6968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6969$as_echo "$EXPR" >&6; }
6970else
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972$as_echo "no" >&6; }
6973fi
6974
6975
6976  test -n "$EXPR" && break
6977done
6978
6979    else
6980      # If it succeeded, then it was overridden by the user. We will use it
6981      # for the tool.
6982
6983      # First remove it from the list of overridden variables, so we can test
6984      # for unknown variables in the end.
6985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6986
6987      # Check if the provided tool contains a complete path.
6988      tool_specified="$EXPR"
6989      tool_basename="${tool_specified##*/}"
6990      if test "x$tool_basename" = "x$tool_specified"; then
6991        # A command without a complete path is provided, search $PATH.
6992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6993$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6994        # Extract the first word of "$tool_basename", so it can be a program name with args.
6995set dummy $tool_basename; ac_word=$2
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6997$as_echo_n "checking for $ac_word... " >&6; }
6998if ${ac_cv_path_EXPR+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  case $EXPR in
7002  [\\/]* | ?:[\\/]*)
7003  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7004  ;;
7005  *)
7006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007for as_dir in $PATH
7008do
7009  IFS=$as_save_IFS
7010  test -z "$as_dir" && as_dir=.
7011    for ac_exec_ext in '' $ac_executable_extensions; do
7012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015    break 2
7016  fi
7017done
7018  done
7019IFS=$as_save_IFS
7020
7021  ;;
7022esac
7023fi
7024EXPR=$ac_cv_path_EXPR
7025if test -n "$EXPR"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7027$as_echo "$EXPR" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034        if test "x$EXPR" = x; then
7035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7036        fi
7037      else
7038        # Otherwise we believe it is a complete path. Use it as it is.
7039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7040$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7042$as_echo_n "checking for EXPR... " >&6; }
7043        if test ! -x "$tool_specified"; then
7044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7045$as_echo "not found" >&6; }
7046          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7047        fi
7048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7049$as_echo "$tool_specified" >&6; }
7050      fi
7051    fi
7052  fi
7053
7054
7055
7056  if test "x$EXPR" = x; then
7057    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7058  fi
7059
7060
7061
7062
7063
7064  # Publish this variable in the help.
7065
7066
7067  if test "x$FILE" = x; then
7068    # The variable is not set by user, try to locate tool using the code snippet
7069    for ac_prog in file
7070do
7071  # Extract the first word of "$ac_prog", so it can be a program name with args.
7072set dummy $ac_prog; ac_word=$2
7073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7074$as_echo_n "checking for $ac_word... " >&6; }
7075if ${ac_cv_path_FILE+:} false; then :
7076  $as_echo_n "(cached) " >&6
7077else
7078  case $FILE in
7079  [\\/]* | ?:[\\/]*)
7080  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7081  ;;
7082  *)
7083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084for as_dir in $PATH
7085do
7086  IFS=$as_save_IFS
7087  test -z "$as_dir" && as_dir=.
7088    for ac_exec_ext in '' $ac_executable_extensions; do
7089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7090    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7092    break 2
7093  fi
7094done
7095  done
7096IFS=$as_save_IFS
7097
7098  ;;
7099esac
7100fi
7101FILE=$ac_cv_path_FILE
7102if test -n "$FILE"; then
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7104$as_echo "$FILE" >&6; }
7105else
7106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7107$as_echo "no" >&6; }
7108fi
7109
7110
7111  test -n "$FILE" && break
7112done
7113
7114  else
7115    # The variable is set, but is it from the command line or the environment?
7116
7117    # Try to remove the string !FILE! from our list.
7118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7120      # If it failed, the variable was not from the command line. Ignore it,
7121      # but warn the user (except for BASH, which is always set by the calling BASH).
7122      if test "xFILE" != xBASH; then
7123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7124$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7125      fi
7126      # Try to locate tool using the code snippet
7127      for ac_prog in file
7128do
7129  # Extract the first word of "$ac_prog", so it can be a program name with args.
7130set dummy $ac_prog; ac_word=$2
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7132$as_echo_n "checking for $ac_word... " >&6; }
7133if ${ac_cv_path_FILE+:} false; then :
7134  $as_echo_n "(cached) " >&6
7135else
7136  case $FILE in
7137  [\\/]* | ?:[\\/]*)
7138  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7139  ;;
7140  *)
7141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142for as_dir in $PATH
7143do
7144  IFS=$as_save_IFS
7145  test -z "$as_dir" && as_dir=.
7146    for ac_exec_ext in '' $ac_executable_extensions; do
7147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150    break 2
7151  fi
7152done
7153  done
7154IFS=$as_save_IFS
7155
7156  ;;
7157esac
7158fi
7159FILE=$ac_cv_path_FILE
7160if test -n "$FILE"; then
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7162$as_echo "$FILE" >&6; }
7163else
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
7166fi
7167
7168
7169  test -n "$FILE" && break
7170done
7171
7172    else
7173      # If it succeeded, then it was overridden by the user. We will use it
7174      # for the tool.
7175
7176      # First remove it from the list of overridden variables, so we can test
7177      # for unknown variables in the end.
7178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7179
7180      # Check if the provided tool contains a complete path.
7181      tool_specified="$FILE"
7182      tool_basename="${tool_specified##*/}"
7183      if test "x$tool_basename" = "x$tool_specified"; then
7184        # A command without a complete path is provided, search $PATH.
7185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7186$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7187        # Extract the first word of "$tool_basename", so it can be a program name with args.
7188set dummy $tool_basename; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_FILE+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $FILE in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217FILE=$ac_cv_path_FILE
7218if test -n "$FILE"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7220$as_echo "$FILE" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227        if test "x$FILE" = x; then
7228          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7229        fi
7230      else
7231        # Otherwise we believe it is a complete path. Use it as it is.
7232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7233$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7235$as_echo_n "checking for FILE... " >&6; }
7236        if test ! -x "$tool_specified"; then
7237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7238$as_echo "not found" >&6; }
7239          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7240        fi
7241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7242$as_echo "$tool_specified" >&6; }
7243      fi
7244    fi
7245  fi
7246
7247
7248
7249  if test "x$FILE" = x; then
7250    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7251  fi
7252
7253
7254
7255
7256
7257  # Publish this variable in the help.
7258
7259
7260  if test "x$FIND" = x; then
7261    # The variable is not set by user, try to locate tool using the code snippet
7262    for ac_prog in find
7263do
7264  # Extract the first word of "$ac_prog", so it can be a program name with args.
7265set dummy $ac_prog; ac_word=$2
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
7268if ${ac_cv_path_FIND+:} false; then :
7269  $as_echo_n "(cached) " >&6
7270else
7271  case $FIND in
7272  [\\/]* | ?:[\\/]*)
7273  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7274  ;;
7275  *)
7276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279  IFS=$as_save_IFS
7280  test -z "$as_dir" && as_dir=.
7281    for ac_exec_ext in '' $ac_executable_extensions; do
7282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7283    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7285    break 2
7286  fi
7287done
7288  done
7289IFS=$as_save_IFS
7290
7291  ;;
7292esac
7293fi
7294FIND=$ac_cv_path_FIND
7295if test -n "$FIND"; then
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7297$as_echo "$FIND" >&6; }
7298else
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300$as_echo "no" >&6; }
7301fi
7302
7303
7304  test -n "$FIND" && break
7305done
7306
7307  else
7308    # The variable is set, but is it from the command line or the environment?
7309
7310    # Try to remove the string !FIND! from our list.
7311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7313      # If it failed, the variable was not from the command line. Ignore it,
7314      # but warn the user (except for BASH, which is always set by the calling BASH).
7315      if test "xFIND" != xBASH; then
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7317$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7318      fi
7319      # Try to locate tool using the code snippet
7320      for ac_prog in find
7321do
7322  # Extract the first word of "$ac_prog", so it can be a program name with args.
7323set dummy $ac_prog; ac_word=$2
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if ${ac_cv_path_FIND+:} false; then :
7327  $as_echo_n "(cached) " >&6
7328else
7329  case $FIND in
7330  [\\/]* | ?:[\\/]*)
7331  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7332  ;;
7333  *)
7334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335for as_dir in $PATH
7336do
7337  IFS=$as_save_IFS
7338  test -z "$as_dir" && as_dir=.
7339    for ac_exec_ext in '' $ac_executable_extensions; do
7340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343    break 2
7344  fi
7345done
7346  done
7347IFS=$as_save_IFS
7348
7349  ;;
7350esac
7351fi
7352FIND=$ac_cv_path_FIND
7353if test -n "$FIND"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7355$as_echo "$FIND" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362  test -n "$FIND" && break
7363done
7364
7365    else
7366      # If it succeeded, then it was overridden by the user. We will use it
7367      # for the tool.
7368
7369      # First remove it from the list of overridden variables, so we can test
7370      # for unknown variables in the end.
7371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7372
7373      # Check if the provided tool contains a complete path.
7374      tool_specified="$FIND"
7375      tool_basename="${tool_specified##*/}"
7376      if test "x$tool_basename" = "x$tool_specified"; then
7377        # A command without a complete path is provided, search $PATH.
7378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7379$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7380        # Extract the first word of "$tool_basename", so it can be a program name with args.
7381set dummy $tool_basename; ac_word=$2
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383$as_echo_n "checking for $ac_word... " >&6; }
7384if ${ac_cv_path_FIND+:} false; then :
7385  $as_echo_n "(cached) " >&6
7386else
7387  case $FIND in
7388  [\\/]* | ?:[\\/]*)
7389  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7390  ;;
7391  *)
7392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395  IFS=$as_save_IFS
7396  test -z "$as_dir" && as_dir=.
7397    for ac_exec_ext in '' $ac_executable_extensions; do
7398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401    break 2
7402  fi
7403done
7404  done
7405IFS=$as_save_IFS
7406
7407  ;;
7408esac
7409fi
7410FIND=$ac_cv_path_FIND
7411if test -n "$FIND"; then
7412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7413$as_echo "$FIND" >&6; }
7414else
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420        if test "x$FIND" = x; then
7421          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7422        fi
7423      else
7424        # Otherwise we believe it is a complete path. Use it as it is.
7425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7426$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7428$as_echo_n "checking for FIND... " >&6; }
7429        if test ! -x "$tool_specified"; then
7430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7431$as_echo "not found" >&6; }
7432          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7433        fi
7434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7435$as_echo "$tool_specified" >&6; }
7436      fi
7437    fi
7438  fi
7439
7440
7441
7442  if test "x$FIND" = x; then
7443    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7444  fi
7445
7446
7447
7448
7449
7450  # Publish this variable in the help.
7451
7452
7453  if test "x$HEAD" = x; then
7454    # The variable is not set by user, try to locate tool using the code snippet
7455    for ac_prog in head
7456do
7457  # Extract the first word of "$ac_prog", so it can be a program name with args.
7458set dummy $ac_prog; ac_word=$2
7459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7460$as_echo_n "checking for $ac_word... " >&6; }
7461if ${ac_cv_path_HEAD+:} false; then :
7462  $as_echo_n "(cached) " >&6
7463else
7464  case $HEAD in
7465  [\\/]* | ?:[\\/]*)
7466  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7467  ;;
7468  *)
7469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7470for as_dir in $PATH
7471do
7472  IFS=$as_save_IFS
7473  test -z "$as_dir" && as_dir=.
7474    for ac_exec_ext in '' $ac_executable_extensions; do
7475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7476    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7478    break 2
7479  fi
7480done
7481  done
7482IFS=$as_save_IFS
7483
7484  ;;
7485esac
7486fi
7487HEAD=$ac_cv_path_HEAD
7488if test -n "$HEAD"; then
7489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7490$as_echo "$HEAD" >&6; }
7491else
7492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493$as_echo "no" >&6; }
7494fi
7495
7496
7497  test -n "$HEAD" && break
7498done
7499
7500  else
7501    # The variable is set, but is it from the command line or the environment?
7502
7503    # Try to remove the string !HEAD! from our list.
7504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7506      # If it failed, the variable was not from the command line. Ignore it,
7507      # but warn the user (except for BASH, which is always set by the calling BASH).
7508      if test "xHEAD" != xBASH; then
7509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7510$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7511      fi
7512      # Try to locate tool using the code snippet
7513      for ac_prog in head
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_HEAD+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $HEAD in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545HEAD=$ac_cv_path_HEAD
7546if test -n "$HEAD"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7548$as_echo "$HEAD" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$HEAD" && break
7556done
7557
7558    else
7559      # If it succeeded, then it was overridden by the user. We will use it
7560      # for the tool.
7561
7562      # First remove it from the list of overridden variables, so we can test
7563      # for unknown variables in the end.
7564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7565
7566      # Check if the provided tool contains a complete path.
7567      tool_specified="$HEAD"
7568      tool_basename="${tool_specified##*/}"
7569      if test "x$tool_basename" = "x$tool_specified"; then
7570        # A command without a complete path is provided, search $PATH.
7571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7572$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7573        # Extract the first word of "$tool_basename", so it can be a program name with args.
7574set dummy $tool_basename; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_HEAD+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $HEAD in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603HEAD=$ac_cv_path_HEAD
7604if test -n "$HEAD"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7606$as_echo "$HEAD" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613        if test "x$HEAD" = x; then
7614          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7615        fi
7616      else
7617        # Otherwise we believe it is a complete path. Use it as it is.
7618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7619$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7621$as_echo_n "checking for HEAD... " >&6; }
7622        if test ! -x "$tool_specified"; then
7623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7624$as_echo "not found" >&6; }
7625          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7626        fi
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7628$as_echo "$tool_specified" >&6; }
7629      fi
7630    fi
7631  fi
7632
7633
7634
7635  if test "x$HEAD" = x; then
7636    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7637  fi
7638
7639
7640
7641
7642
7643  # Publish this variable in the help.
7644
7645
7646  if test "x$LN" = x; then
7647    # The variable is not set by user, try to locate tool using the code snippet
7648    for ac_prog in ln
7649do
7650  # Extract the first word of "$ac_prog", so it can be a program name with args.
7651set dummy $ac_prog; ac_word=$2
7652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7653$as_echo_n "checking for $ac_word... " >&6; }
7654if ${ac_cv_path_LN+:} false; then :
7655  $as_echo_n "(cached) " >&6
7656else
7657  case $LN in
7658  [\\/]* | ?:[\\/]*)
7659  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7660  ;;
7661  *)
7662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7663for as_dir in $PATH
7664do
7665  IFS=$as_save_IFS
7666  test -z "$as_dir" && as_dir=.
7667    for ac_exec_ext in '' $ac_executable_extensions; do
7668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7669    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7671    break 2
7672  fi
7673done
7674  done
7675IFS=$as_save_IFS
7676
7677  ;;
7678esac
7679fi
7680LN=$ac_cv_path_LN
7681if test -n "$LN"; then
7682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7683$as_echo "$LN" >&6; }
7684else
7685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7686$as_echo "no" >&6; }
7687fi
7688
7689
7690  test -n "$LN" && break
7691done
7692
7693  else
7694    # The variable is set, but is it from the command line or the environment?
7695
7696    # Try to remove the string !LN! from our list.
7697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7699      # If it failed, the variable was not from the command line. Ignore it,
7700      # but warn the user (except for BASH, which is always set by the calling BASH).
7701      if test "xLN" != xBASH; then
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7703$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7704      fi
7705      # Try to locate tool using the code snippet
7706      for ac_prog in ln
7707do
7708  # Extract the first word of "$ac_prog", so it can be a program name with args.
7709set dummy $ac_prog; ac_word=$2
7710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711$as_echo_n "checking for $ac_word... " >&6; }
7712if ${ac_cv_path_LN+:} false; then :
7713  $as_echo_n "(cached) " >&6
7714else
7715  case $LN in
7716  [\\/]* | ?:[\\/]*)
7717  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7718  ;;
7719  *)
7720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723  IFS=$as_save_IFS
7724  test -z "$as_dir" && as_dir=.
7725    for ac_exec_ext in '' $ac_executable_extensions; do
7726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7727    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729    break 2
7730  fi
7731done
7732  done
7733IFS=$as_save_IFS
7734
7735  ;;
7736esac
7737fi
7738LN=$ac_cv_path_LN
7739if test -n "$LN"; then
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7741$as_echo "$LN" >&6; }
7742else
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744$as_echo "no" >&6; }
7745fi
7746
7747
7748  test -n "$LN" && break
7749done
7750
7751    else
7752      # If it succeeded, then it was overridden by the user. We will use it
7753      # for the tool.
7754
7755      # First remove it from the list of overridden variables, so we can test
7756      # for unknown variables in the end.
7757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7758
7759      # Check if the provided tool contains a complete path.
7760      tool_specified="$LN"
7761      tool_basename="${tool_specified##*/}"
7762      if test "x$tool_basename" = "x$tool_specified"; then
7763        # A command without a complete path is provided, search $PATH.
7764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7765$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7766        # Extract the first word of "$tool_basename", so it can be a program name with args.
7767set dummy $tool_basename; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if ${ac_cv_path_LN+:} false; then :
7771  $as_echo_n "(cached) " >&6
7772else
7773  case $LN in
7774  [\\/]* | ?:[\\/]*)
7775  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7776  ;;
7777  *)
7778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781  IFS=$as_save_IFS
7782  test -z "$as_dir" && as_dir=.
7783    for ac_exec_ext in '' $ac_executable_extensions; do
7784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7785    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7787    break 2
7788  fi
7789done
7790  done
7791IFS=$as_save_IFS
7792
7793  ;;
7794esac
7795fi
7796LN=$ac_cv_path_LN
7797if test -n "$LN"; then
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7799$as_echo "$LN" >&6; }
7800else
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
7803fi
7804
7805
7806        if test "x$LN" = x; then
7807          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7808        fi
7809      else
7810        # Otherwise we believe it is a complete path. Use it as it is.
7811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7812$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7814$as_echo_n "checking for LN... " >&6; }
7815        if test ! -x "$tool_specified"; then
7816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7817$as_echo "not found" >&6; }
7818          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7819        fi
7820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7821$as_echo "$tool_specified" >&6; }
7822      fi
7823    fi
7824  fi
7825
7826
7827
7828  if test "x$LN" = x; then
7829    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7830  fi
7831
7832
7833
7834
7835
7836  # Publish this variable in the help.
7837
7838
7839  if test "x$LS" = x; then
7840    # The variable is not set by user, try to locate tool using the code snippet
7841    for ac_prog in ls
7842do
7843  # Extract the first word of "$ac_prog", so it can be a program name with args.
7844set dummy $ac_prog; ac_word=$2
7845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7846$as_echo_n "checking for $ac_word... " >&6; }
7847if ${ac_cv_path_LS+:} false; then :
7848  $as_echo_n "(cached) " >&6
7849else
7850  case $LS in
7851  [\\/]* | ?:[\\/]*)
7852  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7853  ;;
7854  *)
7855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7856for as_dir in $PATH
7857do
7858  IFS=$as_save_IFS
7859  test -z "$as_dir" && as_dir=.
7860    for ac_exec_ext in '' $ac_executable_extensions; do
7861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7862    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7864    break 2
7865  fi
7866done
7867  done
7868IFS=$as_save_IFS
7869
7870  ;;
7871esac
7872fi
7873LS=$ac_cv_path_LS
7874if test -n "$LS"; then
7875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7876$as_echo "$LS" >&6; }
7877else
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7879$as_echo "no" >&6; }
7880fi
7881
7882
7883  test -n "$LS" && break
7884done
7885
7886  else
7887    # The variable is set, but is it from the command line or the environment?
7888
7889    # Try to remove the string !LS! from our list.
7890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7892      # If it failed, the variable was not from the command line. Ignore it,
7893      # but warn the user (except for BASH, which is always set by the calling BASH).
7894      if test "xLS" != xBASH; then
7895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7896$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7897      fi
7898      # Try to locate tool using the code snippet
7899      for ac_prog in ls
7900do
7901  # Extract the first word of "$ac_prog", so it can be a program name with args.
7902set dummy $ac_prog; ac_word=$2
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7904$as_echo_n "checking for $ac_word... " >&6; }
7905if ${ac_cv_path_LS+:} false; then :
7906  $as_echo_n "(cached) " >&6
7907else
7908  case $LS in
7909  [\\/]* | ?:[\\/]*)
7910  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7911  ;;
7912  *)
7913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914for as_dir in $PATH
7915do
7916  IFS=$as_save_IFS
7917  test -z "$as_dir" && as_dir=.
7918    for ac_exec_ext in '' $ac_executable_extensions; do
7919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922    break 2
7923  fi
7924done
7925  done
7926IFS=$as_save_IFS
7927
7928  ;;
7929esac
7930fi
7931LS=$ac_cv_path_LS
7932if test -n "$LS"; then
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7934$as_echo "$LS" >&6; }
7935else
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7937$as_echo "no" >&6; }
7938fi
7939
7940
7941  test -n "$LS" && break
7942done
7943
7944    else
7945      # If it succeeded, then it was overridden by the user. We will use it
7946      # for the tool.
7947
7948      # First remove it from the list of overridden variables, so we can test
7949      # for unknown variables in the end.
7950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7951
7952      # Check if the provided tool contains a complete path.
7953      tool_specified="$LS"
7954      tool_basename="${tool_specified##*/}"
7955      if test "x$tool_basename" = "x$tool_specified"; then
7956        # A command without a complete path is provided, search $PATH.
7957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7958$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7959        # Extract the first word of "$tool_basename", so it can be a program name with args.
7960set dummy $tool_basename; ac_word=$2
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7962$as_echo_n "checking for $ac_word... " >&6; }
7963if ${ac_cv_path_LS+:} false; then :
7964  $as_echo_n "(cached) " >&6
7965else
7966  case $LS in
7967  [\\/]* | ?:[\\/]*)
7968  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7969  ;;
7970  *)
7971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7972for as_dir in $PATH
7973do
7974  IFS=$as_save_IFS
7975  test -z "$as_dir" && as_dir=.
7976    for ac_exec_ext in '' $ac_executable_extensions; do
7977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7978    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7980    break 2
7981  fi
7982done
7983  done
7984IFS=$as_save_IFS
7985
7986  ;;
7987esac
7988fi
7989LS=$ac_cv_path_LS
7990if test -n "$LS"; then
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7992$as_echo "$LS" >&6; }
7993else
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999        if test "x$LS" = x; then
8000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8001        fi
8002      else
8003        # Otherwise we believe it is a complete path. Use it as it is.
8004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8005$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8007$as_echo_n "checking for LS... " >&6; }
8008        if test ! -x "$tool_specified"; then
8009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8010$as_echo "not found" >&6; }
8011          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8012        fi
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8014$as_echo "$tool_specified" >&6; }
8015      fi
8016    fi
8017  fi
8018
8019
8020
8021  if test "x$LS" = x; then
8022    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8023  fi
8024
8025
8026
8027
8028
8029  # Publish this variable in the help.
8030
8031
8032  if test "x$MKDIR" = x; then
8033    # The variable is not set by user, try to locate tool using the code snippet
8034    for ac_prog in mkdir
8035do
8036  # Extract the first word of "$ac_prog", so it can be a program name with args.
8037set dummy $ac_prog; ac_word=$2
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8039$as_echo_n "checking for $ac_word... " >&6; }
8040if ${ac_cv_path_MKDIR+:} false; then :
8041  $as_echo_n "(cached) " >&6
8042else
8043  case $MKDIR in
8044  [\\/]* | ?:[\\/]*)
8045  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8046  ;;
8047  *)
8048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8049for as_dir in $PATH
8050do
8051  IFS=$as_save_IFS
8052  test -z "$as_dir" && as_dir=.
8053    for ac_exec_ext in '' $ac_executable_extensions; do
8054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8055    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8057    break 2
8058  fi
8059done
8060  done
8061IFS=$as_save_IFS
8062
8063  ;;
8064esac
8065fi
8066MKDIR=$ac_cv_path_MKDIR
8067if test -n "$MKDIR"; then
8068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8069$as_echo "$MKDIR" >&6; }
8070else
8071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8072$as_echo "no" >&6; }
8073fi
8074
8075
8076  test -n "$MKDIR" && break
8077done
8078
8079  else
8080    # The variable is set, but is it from the command line or the environment?
8081
8082    # Try to remove the string !MKDIR! from our list.
8083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8085      # If it failed, the variable was not from the command line. Ignore it,
8086      # but warn the user (except for BASH, which is always set by the calling BASH).
8087      if test "xMKDIR" != xBASH; then
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8089$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8090      fi
8091      # Try to locate tool using the code snippet
8092      for ac_prog in mkdir
8093do
8094  # Extract the first word of "$ac_prog", so it can be a program name with args.
8095set dummy $ac_prog; ac_word=$2
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if ${ac_cv_path_MKDIR+:} false; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101  case $MKDIR in
8102  [\\/]* | ?:[\\/]*)
8103  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8104  ;;
8105  *)
8106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111    for ac_exec_ext in '' $ac_executable_extensions; do
8112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8113    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118  done
8119IFS=$as_save_IFS
8120
8121  ;;
8122esac
8123fi
8124MKDIR=$ac_cv_path_MKDIR
8125if test -n "$MKDIR"; then
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8127$as_echo "$MKDIR" >&6; }
8128else
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
8131fi
8132
8133
8134  test -n "$MKDIR" && break
8135done
8136
8137    else
8138      # If it succeeded, then it was overridden by the user. We will use it
8139      # for the tool.
8140
8141      # First remove it from the list of overridden variables, so we can test
8142      # for unknown variables in the end.
8143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8144
8145      # Check if the provided tool contains a complete path.
8146      tool_specified="$MKDIR"
8147      tool_basename="${tool_specified##*/}"
8148      if test "x$tool_basename" = "x$tool_specified"; then
8149        # A command without a complete path is provided, search $PATH.
8150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8151$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8152        # Extract the first word of "$tool_basename", so it can be a program name with args.
8153set dummy $tool_basename; ac_word=$2
8154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
8156if ${ac_cv_path_MKDIR+:} false; then :
8157  $as_echo_n "(cached) " >&6
8158else
8159  case $MKDIR in
8160  [\\/]* | ?:[\\/]*)
8161  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8162  ;;
8163  *)
8164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167  IFS=$as_save_IFS
8168  test -z "$as_dir" && as_dir=.
8169    for ac_exec_ext in '' $ac_executable_extensions; do
8170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8171    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8173    break 2
8174  fi
8175done
8176  done
8177IFS=$as_save_IFS
8178
8179  ;;
8180esac
8181fi
8182MKDIR=$ac_cv_path_MKDIR
8183if test -n "$MKDIR"; then
8184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8185$as_echo "$MKDIR" >&6; }
8186else
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192        if test "x$MKDIR" = x; then
8193          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8194        fi
8195      else
8196        # Otherwise we believe it is a complete path. Use it as it is.
8197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8198$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8200$as_echo_n "checking for MKDIR... " >&6; }
8201        if test ! -x "$tool_specified"; then
8202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8203$as_echo "not found" >&6; }
8204          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8205        fi
8206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8207$as_echo "$tool_specified" >&6; }
8208      fi
8209    fi
8210  fi
8211
8212
8213
8214  if test "x$MKDIR" = x; then
8215    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8216  fi
8217
8218
8219
8220
8221
8222  # Publish this variable in the help.
8223
8224
8225  if test "x$MKTEMP" = x; then
8226    # The variable is not set by user, try to locate tool using the code snippet
8227    for ac_prog in mktemp
8228do
8229  # Extract the first word of "$ac_prog", so it can be a program name with args.
8230set dummy $ac_prog; ac_word=$2
8231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8232$as_echo_n "checking for $ac_word... " >&6; }
8233if ${ac_cv_path_MKTEMP+:} false; then :
8234  $as_echo_n "(cached) " >&6
8235else
8236  case $MKTEMP in
8237  [\\/]* | ?:[\\/]*)
8238  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8239  ;;
8240  *)
8241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8242for as_dir in $PATH
8243do
8244  IFS=$as_save_IFS
8245  test -z "$as_dir" && as_dir=.
8246    for ac_exec_ext in '' $ac_executable_extensions; do
8247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8248    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8250    break 2
8251  fi
8252done
8253  done
8254IFS=$as_save_IFS
8255
8256  ;;
8257esac
8258fi
8259MKTEMP=$ac_cv_path_MKTEMP
8260if test -n "$MKTEMP"; then
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8262$as_echo "$MKTEMP" >&6; }
8263else
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8265$as_echo "no" >&6; }
8266fi
8267
8268
8269  test -n "$MKTEMP" && break
8270done
8271
8272  else
8273    # The variable is set, but is it from the command line or the environment?
8274
8275    # Try to remove the string !MKTEMP! from our list.
8276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8278      # If it failed, the variable was not from the command line. Ignore it,
8279      # but warn the user (except for BASH, which is always set by the calling BASH).
8280      if test "xMKTEMP" != xBASH; then
8281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8282$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8283      fi
8284      # Try to locate tool using the code snippet
8285      for ac_prog in mktemp
8286do
8287  # Extract the first word of "$ac_prog", so it can be a program name with args.
8288set dummy $ac_prog; ac_word=$2
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290$as_echo_n "checking for $ac_word... " >&6; }
8291if ${ac_cv_path_MKTEMP+:} false; then :
8292  $as_echo_n "(cached) " >&6
8293else
8294  case $MKTEMP in
8295  [\\/]* | ?:[\\/]*)
8296  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8297  ;;
8298  *)
8299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300for as_dir in $PATH
8301do
8302  IFS=$as_save_IFS
8303  test -z "$as_dir" && as_dir=.
8304    for ac_exec_ext in '' $ac_executable_extensions; do
8305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308    break 2
8309  fi
8310done
8311  done
8312IFS=$as_save_IFS
8313
8314  ;;
8315esac
8316fi
8317MKTEMP=$ac_cv_path_MKTEMP
8318if test -n "$MKTEMP"; then
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8320$as_echo "$MKTEMP" >&6; }
8321else
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324fi
8325
8326
8327  test -n "$MKTEMP" && break
8328done
8329
8330    else
8331      # If it succeeded, then it was overridden by the user. We will use it
8332      # for the tool.
8333
8334      # First remove it from the list of overridden variables, so we can test
8335      # for unknown variables in the end.
8336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8337
8338      # Check if the provided tool contains a complete path.
8339      tool_specified="$MKTEMP"
8340      tool_basename="${tool_specified##*/}"
8341      if test "x$tool_basename" = "x$tool_specified"; then
8342        # A command without a complete path is provided, search $PATH.
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8344$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8345        # Extract the first word of "$tool_basename", so it can be a program name with args.
8346set dummy $tool_basename; ac_word=$2
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8348$as_echo_n "checking for $ac_word... " >&6; }
8349if ${ac_cv_path_MKTEMP+:} false; then :
8350  $as_echo_n "(cached) " >&6
8351else
8352  case $MKTEMP in
8353  [\\/]* | ?:[\\/]*)
8354  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8355  ;;
8356  *)
8357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358for as_dir in $PATH
8359do
8360  IFS=$as_save_IFS
8361  test -z "$as_dir" && as_dir=.
8362    for ac_exec_ext in '' $ac_executable_extensions; do
8363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366    break 2
8367  fi
8368done
8369  done
8370IFS=$as_save_IFS
8371
8372  ;;
8373esac
8374fi
8375MKTEMP=$ac_cv_path_MKTEMP
8376if test -n "$MKTEMP"; then
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8378$as_echo "$MKTEMP" >&6; }
8379else
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381$as_echo "no" >&6; }
8382fi
8383
8384
8385        if test "x$MKTEMP" = x; then
8386          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8387        fi
8388      else
8389        # Otherwise we believe it is a complete path. Use it as it is.
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8391$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8393$as_echo_n "checking for MKTEMP... " >&6; }
8394        if test ! -x "$tool_specified"; then
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8396$as_echo "not found" >&6; }
8397          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8398        fi
8399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8400$as_echo "$tool_specified" >&6; }
8401      fi
8402    fi
8403  fi
8404
8405
8406
8407  if test "x$MKTEMP" = x; then
8408    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8409  fi
8410
8411
8412
8413
8414
8415  # Publish this variable in the help.
8416
8417
8418  if test "x$MV" = x; then
8419    # The variable is not set by user, try to locate tool using the code snippet
8420    for ac_prog in mv
8421do
8422  # Extract the first word of "$ac_prog", so it can be a program name with args.
8423set dummy $ac_prog; ac_word=$2
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8425$as_echo_n "checking for $ac_word... " >&6; }
8426if ${ac_cv_path_MV+:} false; then :
8427  $as_echo_n "(cached) " >&6
8428else
8429  case $MV in
8430  [\\/]* | ?:[\\/]*)
8431  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8432  ;;
8433  *)
8434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8435for as_dir in $PATH
8436do
8437  IFS=$as_save_IFS
8438  test -z "$as_dir" && as_dir=.
8439    for ac_exec_ext in '' $ac_executable_extensions; do
8440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8441    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8443    break 2
8444  fi
8445done
8446  done
8447IFS=$as_save_IFS
8448
8449  ;;
8450esac
8451fi
8452MV=$ac_cv_path_MV
8453if test -n "$MV"; then
8454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8455$as_echo "$MV" >&6; }
8456else
8457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8458$as_echo "no" >&6; }
8459fi
8460
8461
8462  test -n "$MV" && break
8463done
8464
8465  else
8466    # The variable is set, but is it from the command line or the environment?
8467
8468    # Try to remove the string !MV! from our list.
8469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8471      # If it failed, the variable was not from the command line. Ignore it,
8472      # but warn the user (except for BASH, which is always set by the calling BASH).
8473      if test "xMV" != xBASH; then
8474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8475$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8476      fi
8477      # Try to locate tool using the code snippet
8478      for ac_prog in mv
8479do
8480  # Extract the first word of "$ac_prog", so it can be a program name with args.
8481set dummy $ac_prog; ac_word=$2
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483$as_echo_n "checking for $ac_word... " >&6; }
8484if ${ac_cv_path_MV+:} false; then :
8485  $as_echo_n "(cached) " >&6
8486else
8487  case $MV in
8488  [\\/]* | ?:[\\/]*)
8489  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8490  ;;
8491  *)
8492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493for as_dir in $PATH
8494do
8495  IFS=$as_save_IFS
8496  test -z "$as_dir" && as_dir=.
8497    for ac_exec_ext in '' $ac_executable_extensions; do
8498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8499    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8501    break 2
8502  fi
8503done
8504  done
8505IFS=$as_save_IFS
8506
8507  ;;
8508esac
8509fi
8510MV=$ac_cv_path_MV
8511if test -n "$MV"; then
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8513$as_echo "$MV" >&6; }
8514else
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8516$as_echo "no" >&6; }
8517fi
8518
8519
8520  test -n "$MV" && break
8521done
8522
8523    else
8524      # If it succeeded, then it was overridden by the user. We will use it
8525      # for the tool.
8526
8527      # First remove it from the list of overridden variables, so we can test
8528      # for unknown variables in the end.
8529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8530
8531      # Check if the provided tool contains a complete path.
8532      tool_specified="$MV"
8533      tool_basename="${tool_specified##*/}"
8534      if test "x$tool_basename" = "x$tool_specified"; then
8535        # A command without a complete path is provided, search $PATH.
8536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8537$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8538        # Extract the first word of "$tool_basename", so it can be a program name with args.
8539set dummy $tool_basename; ac_word=$2
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541$as_echo_n "checking for $ac_word... " >&6; }
8542if ${ac_cv_path_MV+:} false; then :
8543  $as_echo_n "(cached) " >&6
8544else
8545  case $MV in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553  IFS=$as_save_IFS
8554  test -z "$as_dir" && as_dir=.
8555    for ac_exec_ext in '' $ac_executable_extensions; do
8556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559    break 2
8560  fi
8561done
8562  done
8563IFS=$as_save_IFS
8564
8565  ;;
8566esac
8567fi
8568MV=$ac_cv_path_MV
8569if test -n "$MV"; then
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8571$as_echo "$MV" >&6; }
8572else
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
8575fi
8576
8577
8578        if test "x$MV" = x; then
8579          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8580        fi
8581      else
8582        # Otherwise we believe it is a complete path. Use it as it is.
8583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8584$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8586$as_echo_n "checking for MV... " >&6; }
8587        if test ! -x "$tool_specified"; then
8588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8589$as_echo "not found" >&6; }
8590          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8591        fi
8592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8593$as_echo "$tool_specified" >&6; }
8594      fi
8595    fi
8596  fi
8597
8598
8599
8600  if test "x$MV" = x; then
8601    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8602  fi
8603
8604
8605
8606
8607
8608  # Publish this variable in the help.
8609
8610
8611  if test "x$NAWK" = x; then
8612    # The variable is not set by user, try to locate tool using the code snippet
8613    for ac_prog in nawk gawk awk
8614do
8615  # Extract the first word of "$ac_prog", so it can be a program name with args.
8616set dummy $ac_prog; ac_word=$2
8617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8618$as_echo_n "checking for $ac_word... " >&6; }
8619if ${ac_cv_path_NAWK+:} false; then :
8620  $as_echo_n "(cached) " >&6
8621else
8622  case $NAWK in
8623  [\\/]* | ?:[\\/]*)
8624  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8625  ;;
8626  *)
8627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8628for as_dir in $PATH
8629do
8630  IFS=$as_save_IFS
8631  test -z "$as_dir" && as_dir=.
8632    for ac_exec_ext in '' $ac_executable_extensions; do
8633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8634    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8636    break 2
8637  fi
8638done
8639  done
8640IFS=$as_save_IFS
8641
8642  ;;
8643esac
8644fi
8645NAWK=$ac_cv_path_NAWK
8646if test -n "$NAWK"; then
8647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8648$as_echo "$NAWK" >&6; }
8649else
8650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8651$as_echo "no" >&6; }
8652fi
8653
8654
8655  test -n "$NAWK" && break
8656done
8657
8658  else
8659    # The variable is set, but is it from the command line or the environment?
8660
8661    # Try to remove the string !NAWK! from our list.
8662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8664      # If it failed, the variable was not from the command line. Ignore it,
8665      # but warn the user (except for BASH, which is always set by the calling BASH).
8666      if test "xNAWK" != xBASH; then
8667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8668$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8669      fi
8670      # Try to locate tool using the code snippet
8671      for ac_prog in nawk gawk awk
8672do
8673  # Extract the first word of "$ac_prog", so it can be a program name with args.
8674set dummy $ac_prog; ac_word=$2
8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8676$as_echo_n "checking for $ac_word... " >&6; }
8677if ${ac_cv_path_NAWK+:} false; then :
8678  $as_echo_n "(cached) " >&6
8679else
8680  case $NAWK in
8681  [\\/]* | ?:[\\/]*)
8682  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8683  ;;
8684  *)
8685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688  IFS=$as_save_IFS
8689  test -z "$as_dir" && as_dir=.
8690    for ac_exec_ext in '' $ac_executable_extensions; do
8691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8692    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8694    break 2
8695  fi
8696done
8697  done
8698IFS=$as_save_IFS
8699
8700  ;;
8701esac
8702fi
8703NAWK=$ac_cv_path_NAWK
8704if test -n "$NAWK"; then
8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8706$as_echo "$NAWK" >&6; }
8707else
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
8710fi
8711
8712
8713  test -n "$NAWK" && break
8714done
8715
8716    else
8717      # If it succeeded, then it was overridden by the user. We will use it
8718      # for the tool.
8719
8720      # First remove it from the list of overridden variables, so we can test
8721      # for unknown variables in the end.
8722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8723
8724      # Check if the provided tool contains a complete path.
8725      tool_specified="$NAWK"
8726      tool_basename="${tool_specified##*/}"
8727      if test "x$tool_basename" = "x$tool_specified"; then
8728        # A command without a complete path is provided, search $PATH.
8729        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8730$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8731        # Extract the first word of "$tool_basename", so it can be a program name with args.
8732set dummy $tool_basename; ac_word=$2
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734$as_echo_n "checking for $ac_word... " >&6; }
8735if ${ac_cv_path_NAWK+:} false; then :
8736  $as_echo_n "(cached) " >&6
8737else
8738  case $NAWK in
8739  [\\/]* | ?:[\\/]*)
8740  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8741  ;;
8742  *)
8743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744for as_dir in $PATH
8745do
8746  IFS=$as_save_IFS
8747  test -z "$as_dir" && as_dir=.
8748    for ac_exec_ext in '' $ac_executable_extensions; do
8749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8750    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8752    break 2
8753  fi
8754done
8755  done
8756IFS=$as_save_IFS
8757
8758  ;;
8759esac
8760fi
8761NAWK=$ac_cv_path_NAWK
8762if test -n "$NAWK"; then
8763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8764$as_echo "$NAWK" >&6; }
8765else
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8767$as_echo "no" >&6; }
8768fi
8769
8770
8771        if test "x$NAWK" = x; then
8772          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8773        fi
8774      else
8775        # Otherwise we believe it is a complete path. Use it as it is.
8776        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8777$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8779$as_echo_n "checking for NAWK... " >&6; }
8780        if test ! -x "$tool_specified"; then
8781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8782$as_echo "not found" >&6; }
8783          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8784        fi
8785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8786$as_echo "$tool_specified" >&6; }
8787      fi
8788    fi
8789  fi
8790
8791
8792
8793  if test "x$NAWK" = x; then
8794    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8795  fi
8796
8797
8798
8799
8800
8801  # Publish this variable in the help.
8802
8803
8804  if test "x$PRINTF" = x; then
8805    # The variable is not set by user, try to locate tool using the code snippet
8806    for ac_prog in printf
8807do
8808  # Extract the first word of "$ac_prog", so it can be a program name with args.
8809set dummy $ac_prog; ac_word=$2
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if ${ac_cv_path_PRINTF+:} false; then :
8813  $as_echo_n "(cached) " >&6
8814else
8815  case $PRINTF in
8816  [\\/]* | ?:[\\/]*)
8817  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8818  ;;
8819  *)
8820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821for as_dir in $PATH
8822do
8823  IFS=$as_save_IFS
8824  test -z "$as_dir" && as_dir=.
8825    for ac_exec_ext in '' $ac_executable_extensions; do
8826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829    break 2
8830  fi
8831done
8832  done
8833IFS=$as_save_IFS
8834
8835  ;;
8836esac
8837fi
8838PRINTF=$ac_cv_path_PRINTF
8839if test -n "$PRINTF"; then
8840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8841$as_echo "$PRINTF" >&6; }
8842else
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8844$as_echo "no" >&6; }
8845fi
8846
8847
8848  test -n "$PRINTF" && break
8849done
8850
8851  else
8852    # The variable is set, but is it from the command line or the environment?
8853
8854    # Try to remove the string !PRINTF! from our list.
8855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8857      # If it failed, the variable was not from the command line. Ignore it,
8858      # but warn the user (except for BASH, which is always set by the calling BASH).
8859      if test "xPRINTF" != xBASH; then
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8861$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8862      fi
8863      # Try to locate tool using the code snippet
8864      for ac_prog in printf
8865do
8866  # Extract the first word of "$ac_prog", so it can be a program name with args.
8867set dummy $ac_prog; ac_word=$2
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869$as_echo_n "checking for $ac_word... " >&6; }
8870if ${ac_cv_path_PRINTF+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  case $PRINTF in
8874  [\\/]* | ?:[\\/]*)
8875  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8876  ;;
8877  *)
8878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8879for as_dir in $PATH
8880do
8881  IFS=$as_save_IFS
8882  test -z "$as_dir" && as_dir=.
8883    for ac_exec_ext in '' $ac_executable_extensions; do
8884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8885    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8887    break 2
8888  fi
8889done
8890  done
8891IFS=$as_save_IFS
8892
8893  ;;
8894esac
8895fi
8896PRINTF=$ac_cv_path_PRINTF
8897if test -n "$PRINTF"; then
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8899$as_echo "$PRINTF" >&6; }
8900else
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
8903fi
8904
8905
8906  test -n "$PRINTF" && break
8907done
8908
8909    else
8910      # If it succeeded, then it was overridden by the user. We will use it
8911      # for the tool.
8912
8913      # First remove it from the list of overridden variables, so we can test
8914      # for unknown variables in the end.
8915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8916
8917      # Check if the provided tool contains a complete path.
8918      tool_specified="$PRINTF"
8919      tool_basename="${tool_specified##*/}"
8920      if test "x$tool_basename" = "x$tool_specified"; then
8921        # A command without a complete path is provided, search $PATH.
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8923$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8924        # Extract the first word of "$tool_basename", so it can be a program name with args.
8925set dummy $tool_basename; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_PRINTF+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $PRINTF in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954PRINTF=$ac_cv_path_PRINTF
8955if test -n "$PRINTF"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8957$as_echo "$PRINTF" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964        if test "x$PRINTF" = x; then
8965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8966        fi
8967      else
8968        # Otherwise we believe it is a complete path. Use it as it is.
8969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8970$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8972$as_echo_n "checking for PRINTF... " >&6; }
8973        if test ! -x "$tool_specified"; then
8974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8975$as_echo "not found" >&6; }
8976          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8977        fi
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8979$as_echo "$tool_specified" >&6; }
8980      fi
8981    fi
8982  fi
8983
8984
8985
8986  if test "x$PRINTF" = x; then
8987    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8988  fi
8989
8990
8991
8992
8993
8994  # Publish this variable in the help.
8995
8996
8997  if test "x$RM" = x; then
8998    # The variable is not set by user, try to locate tool using the code snippet
8999    for ac_prog in rm
9000do
9001  # Extract the first word of "$ac_prog", so it can be a program name with args.
9002set dummy $ac_prog; ac_word=$2
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9004$as_echo_n "checking for $ac_word... " >&6; }
9005if ${ac_cv_path_RM+:} false; then :
9006  $as_echo_n "(cached) " >&6
9007else
9008  case $RM in
9009  [\\/]* | ?:[\\/]*)
9010  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9011  ;;
9012  *)
9013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9014for as_dir in $PATH
9015do
9016  IFS=$as_save_IFS
9017  test -z "$as_dir" && as_dir=.
9018    for ac_exec_ext in '' $ac_executable_extensions; do
9019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9020    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9022    break 2
9023  fi
9024done
9025  done
9026IFS=$as_save_IFS
9027
9028  ;;
9029esac
9030fi
9031RM=$ac_cv_path_RM
9032if test -n "$RM"; then
9033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9034$as_echo "$RM" >&6; }
9035else
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9037$as_echo "no" >&6; }
9038fi
9039
9040
9041  test -n "$RM" && break
9042done
9043
9044  else
9045    # The variable is set, but is it from the command line or the environment?
9046
9047    # Try to remove the string !RM! from our list.
9048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9050      # If it failed, the variable was not from the command line. Ignore it,
9051      # but warn the user (except for BASH, which is always set by the calling BASH).
9052      if test "xRM" != xBASH; then
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9054$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9055      fi
9056      # Try to locate tool using the code snippet
9057      for ac_prog in rm
9058do
9059  # Extract the first word of "$ac_prog", so it can be a program name with args.
9060set dummy $ac_prog; ac_word=$2
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9062$as_echo_n "checking for $ac_word... " >&6; }
9063if ${ac_cv_path_RM+:} false; then :
9064  $as_echo_n "(cached) " >&6
9065else
9066  case $RM in
9067  [\\/]* | ?:[\\/]*)
9068  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9069  ;;
9070  *)
9071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9072for as_dir in $PATH
9073do
9074  IFS=$as_save_IFS
9075  test -z "$as_dir" && as_dir=.
9076    for ac_exec_ext in '' $ac_executable_extensions; do
9077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9078    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9080    break 2
9081  fi
9082done
9083  done
9084IFS=$as_save_IFS
9085
9086  ;;
9087esac
9088fi
9089RM=$ac_cv_path_RM
9090if test -n "$RM"; then
9091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9092$as_echo "$RM" >&6; }
9093else
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
9096fi
9097
9098
9099  test -n "$RM" && break
9100done
9101
9102    else
9103      # If it succeeded, then it was overridden by the user. We will use it
9104      # for the tool.
9105
9106      # First remove it from the list of overridden variables, so we can test
9107      # for unknown variables in the end.
9108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9109
9110      # Check if the provided tool contains a complete path.
9111      tool_specified="$RM"
9112      tool_basename="${tool_specified##*/}"
9113      if test "x$tool_basename" = "x$tool_specified"; then
9114        # A command without a complete path is provided, search $PATH.
9115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9116$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9117        # Extract the first word of "$tool_basename", so it can be a program name with args.
9118set dummy $tool_basename; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_RM+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $RM in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147RM=$ac_cv_path_RM
9148if test -n "$RM"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9150$as_echo "$RM" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157        if test "x$RM" = x; then
9158          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9159        fi
9160      else
9161        # Otherwise we believe it is a complete path. Use it as it is.
9162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9163$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9165$as_echo_n "checking for RM... " >&6; }
9166        if test ! -x "$tool_specified"; then
9167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9168$as_echo "not found" >&6; }
9169          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9170        fi
9171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9172$as_echo "$tool_specified" >&6; }
9173      fi
9174    fi
9175  fi
9176
9177
9178
9179  if test "x$RM" = x; then
9180    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9181  fi
9182
9183
9184
9185
9186
9187  # Publish this variable in the help.
9188
9189
9190  if test "x$SH" = x; then
9191    # The variable is not set by user, try to locate tool using the code snippet
9192    for ac_prog in sh
9193do
9194  # Extract the first word of "$ac_prog", so it can be a program name with args.
9195set dummy $ac_prog; ac_word=$2
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9197$as_echo_n "checking for $ac_word... " >&6; }
9198if ${ac_cv_path_SH+:} false; then :
9199  $as_echo_n "(cached) " >&6
9200else
9201  case $SH in
9202  [\\/]* | ?:[\\/]*)
9203  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9204  ;;
9205  *)
9206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207for as_dir in $PATH
9208do
9209  IFS=$as_save_IFS
9210  test -z "$as_dir" && as_dir=.
9211    for ac_exec_ext in '' $ac_executable_extensions; do
9212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9213    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9215    break 2
9216  fi
9217done
9218  done
9219IFS=$as_save_IFS
9220
9221  ;;
9222esac
9223fi
9224SH=$ac_cv_path_SH
9225if test -n "$SH"; then
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9227$as_echo "$SH" >&6; }
9228else
9229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9230$as_echo "no" >&6; }
9231fi
9232
9233
9234  test -n "$SH" && break
9235done
9236
9237  else
9238    # The variable is set, but is it from the command line or the environment?
9239
9240    # Try to remove the string !SH! from our list.
9241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9243      # If it failed, the variable was not from the command line. Ignore it,
9244      # but warn the user (except for BASH, which is always set by the calling BASH).
9245      if test "xSH" != xBASH; then
9246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9247$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9248      fi
9249      # Try to locate tool using the code snippet
9250      for ac_prog in sh
9251do
9252  # Extract the first word of "$ac_prog", so it can be a program name with args.
9253set dummy $ac_prog; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_SH+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $SH in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282SH=$ac_cv_path_SH
9283if test -n "$SH"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9285$as_echo "$SH" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292  test -n "$SH" && break
9293done
9294
9295    else
9296      # If it succeeded, then it was overridden by the user. We will use it
9297      # for the tool.
9298
9299      # First remove it from the list of overridden variables, so we can test
9300      # for unknown variables in the end.
9301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9302
9303      # Check if the provided tool contains a complete path.
9304      tool_specified="$SH"
9305      tool_basename="${tool_specified##*/}"
9306      if test "x$tool_basename" = "x$tool_specified"; then
9307        # A command without a complete path is provided, search $PATH.
9308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9309$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9310        # Extract the first word of "$tool_basename", so it can be a program name with args.
9311set dummy $tool_basename; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_SH+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $SH in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340SH=$ac_cv_path_SH
9341if test -n "$SH"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9343$as_echo "$SH" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350        if test "x$SH" = x; then
9351          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9352        fi
9353      else
9354        # Otherwise we believe it is a complete path. Use it as it is.
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9356$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9358$as_echo_n "checking for SH... " >&6; }
9359        if test ! -x "$tool_specified"; then
9360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9361$as_echo "not found" >&6; }
9362          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9363        fi
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9365$as_echo "$tool_specified" >&6; }
9366      fi
9367    fi
9368  fi
9369
9370
9371
9372  if test "x$SH" = x; then
9373    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9374  fi
9375
9376
9377
9378
9379
9380  # Publish this variable in the help.
9381
9382
9383  if test "x$SORT" = x; then
9384    # The variable is not set by user, try to locate tool using the code snippet
9385    for ac_prog in sort
9386do
9387  # Extract the first word of "$ac_prog", so it can be a program name with args.
9388set dummy $ac_prog; ac_word=$2
9389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9390$as_echo_n "checking for $ac_word... " >&6; }
9391if ${ac_cv_path_SORT+:} false; then :
9392  $as_echo_n "(cached) " >&6
9393else
9394  case $SORT in
9395  [\\/]* | ?:[\\/]*)
9396  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9397  ;;
9398  *)
9399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9400for as_dir in $PATH
9401do
9402  IFS=$as_save_IFS
9403  test -z "$as_dir" && as_dir=.
9404    for ac_exec_ext in '' $ac_executable_extensions; do
9405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9406    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9408    break 2
9409  fi
9410done
9411  done
9412IFS=$as_save_IFS
9413
9414  ;;
9415esac
9416fi
9417SORT=$ac_cv_path_SORT
9418if test -n "$SORT"; then
9419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9420$as_echo "$SORT" >&6; }
9421else
9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9423$as_echo "no" >&6; }
9424fi
9425
9426
9427  test -n "$SORT" && break
9428done
9429
9430  else
9431    # The variable is set, but is it from the command line or the environment?
9432
9433    # Try to remove the string !SORT! from our list.
9434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9436      # If it failed, the variable was not from the command line. Ignore it,
9437      # but warn the user (except for BASH, which is always set by the calling BASH).
9438      if test "xSORT" != xBASH; then
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9440$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9441      fi
9442      # Try to locate tool using the code snippet
9443      for ac_prog in sort
9444do
9445  # Extract the first word of "$ac_prog", so it can be a program name with args.
9446set dummy $ac_prog; ac_word=$2
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9448$as_echo_n "checking for $ac_word... " >&6; }
9449if ${ac_cv_path_SORT+:} false; then :
9450  $as_echo_n "(cached) " >&6
9451else
9452  case $SORT in
9453  [\\/]* | ?:[\\/]*)
9454  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9455  ;;
9456  *)
9457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9458for as_dir in $PATH
9459do
9460  IFS=$as_save_IFS
9461  test -z "$as_dir" && as_dir=.
9462    for ac_exec_ext in '' $ac_executable_extensions; do
9463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9464    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9466    break 2
9467  fi
9468done
9469  done
9470IFS=$as_save_IFS
9471
9472  ;;
9473esac
9474fi
9475SORT=$ac_cv_path_SORT
9476if test -n "$SORT"; then
9477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9478$as_echo "$SORT" >&6; }
9479else
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
9482fi
9483
9484
9485  test -n "$SORT" && break
9486done
9487
9488    else
9489      # If it succeeded, then it was overridden by the user. We will use it
9490      # for the tool.
9491
9492      # First remove it from the list of overridden variables, so we can test
9493      # for unknown variables in the end.
9494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9495
9496      # Check if the provided tool contains a complete path.
9497      tool_specified="$SORT"
9498      tool_basename="${tool_specified##*/}"
9499      if test "x$tool_basename" = "x$tool_specified"; then
9500        # A command without a complete path is provided, search $PATH.
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9502$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9503        # Extract the first word of "$tool_basename", so it can be a program name with args.
9504set dummy $tool_basename; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_SORT+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $SORT in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533SORT=$ac_cv_path_SORT
9534if test -n "$SORT"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9536$as_echo "$SORT" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543        if test "x$SORT" = x; then
9544          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9545        fi
9546      else
9547        # Otherwise we believe it is a complete path. Use it as it is.
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9549$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9551$as_echo_n "checking for SORT... " >&6; }
9552        if test ! -x "$tool_specified"; then
9553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9554$as_echo "not found" >&6; }
9555          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9556        fi
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9558$as_echo "$tool_specified" >&6; }
9559      fi
9560    fi
9561  fi
9562
9563
9564
9565  if test "x$SORT" = x; then
9566    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9567  fi
9568
9569
9570
9571
9572
9573  # Publish this variable in the help.
9574
9575
9576  if test "x$TAIL" = x; then
9577    # The variable is not set by user, try to locate tool using the code snippet
9578    for ac_prog in tail
9579do
9580  # Extract the first word of "$ac_prog", so it can be a program name with args.
9581set dummy $ac_prog; ac_word=$2
9582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9583$as_echo_n "checking for $ac_word... " >&6; }
9584if ${ac_cv_path_TAIL+:} false; then :
9585  $as_echo_n "(cached) " >&6
9586else
9587  case $TAIL in
9588  [\\/]* | ?:[\\/]*)
9589  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9590  ;;
9591  *)
9592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593for as_dir in $PATH
9594do
9595  IFS=$as_save_IFS
9596  test -z "$as_dir" && as_dir=.
9597    for ac_exec_ext in '' $ac_executable_extensions; do
9598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9599    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9601    break 2
9602  fi
9603done
9604  done
9605IFS=$as_save_IFS
9606
9607  ;;
9608esac
9609fi
9610TAIL=$ac_cv_path_TAIL
9611if test -n "$TAIL"; then
9612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9613$as_echo "$TAIL" >&6; }
9614else
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9616$as_echo "no" >&6; }
9617fi
9618
9619
9620  test -n "$TAIL" && break
9621done
9622
9623  else
9624    # The variable is set, but is it from the command line or the environment?
9625
9626    # Try to remove the string !TAIL! from our list.
9627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9629      # If it failed, the variable was not from the command line. Ignore it,
9630      # but warn the user (except for BASH, which is always set by the calling BASH).
9631      if test "xTAIL" != xBASH; then
9632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9633$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9634      fi
9635      # Try to locate tool using the code snippet
9636      for ac_prog in tail
9637do
9638  # Extract the first word of "$ac_prog", so it can be a program name with args.
9639set dummy $ac_prog; ac_word=$2
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641$as_echo_n "checking for $ac_word... " >&6; }
9642if ${ac_cv_path_TAIL+:} false; then :
9643  $as_echo_n "(cached) " >&6
9644else
9645  case $TAIL in
9646  [\\/]* | ?:[\\/]*)
9647  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9648  ;;
9649  *)
9650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9651for as_dir in $PATH
9652do
9653  IFS=$as_save_IFS
9654  test -z "$as_dir" && as_dir=.
9655    for ac_exec_ext in '' $ac_executable_extensions; do
9656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9657    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9659    break 2
9660  fi
9661done
9662  done
9663IFS=$as_save_IFS
9664
9665  ;;
9666esac
9667fi
9668TAIL=$ac_cv_path_TAIL
9669if test -n "$TAIL"; then
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9671$as_echo "$TAIL" >&6; }
9672else
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674$as_echo "no" >&6; }
9675fi
9676
9677
9678  test -n "$TAIL" && break
9679done
9680
9681    else
9682      # If it succeeded, then it was overridden by the user. We will use it
9683      # for the tool.
9684
9685      # First remove it from the list of overridden variables, so we can test
9686      # for unknown variables in the end.
9687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9688
9689      # Check if the provided tool contains a complete path.
9690      tool_specified="$TAIL"
9691      tool_basename="${tool_specified##*/}"
9692      if test "x$tool_basename" = "x$tool_specified"; then
9693        # A command without a complete path is provided, search $PATH.
9694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9695$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9696        # Extract the first word of "$tool_basename", so it can be a program name with args.
9697set dummy $tool_basename; ac_word=$2
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
9700if ${ac_cv_path_TAIL+:} false; then :
9701  $as_echo_n "(cached) " >&6
9702else
9703  case $TAIL in
9704  [\\/]* | ?:[\\/]*)
9705  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9706  ;;
9707  *)
9708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709for as_dir in $PATH
9710do
9711  IFS=$as_save_IFS
9712  test -z "$as_dir" && as_dir=.
9713    for ac_exec_ext in '' $ac_executable_extensions; do
9714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9715    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9717    break 2
9718  fi
9719done
9720  done
9721IFS=$as_save_IFS
9722
9723  ;;
9724esac
9725fi
9726TAIL=$ac_cv_path_TAIL
9727if test -n "$TAIL"; then
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9729$as_echo "$TAIL" >&6; }
9730else
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
9733fi
9734
9735
9736        if test "x$TAIL" = x; then
9737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9738        fi
9739      else
9740        # Otherwise we believe it is a complete path. Use it as it is.
9741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9742$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9744$as_echo_n "checking for TAIL... " >&6; }
9745        if test ! -x "$tool_specified"; then
9746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9747$as_echo "not found" >&6; }
9748          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9749        fi
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9751$as_echo "$tool_specified" >&6; }
9752      fi
9753    fi
9754  fi
9755
9756
9757
9758  if test "x$TAIL" = x; then
9759    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9760  fi
9761
9762
9763
9764
9765
9766  # Publish this variable in the help.
9767
9768
9769  if test "x$TAR" = x; then
9770    # The variable is not set by user, try to locate tool using the code snippet
9771    for ac_prog in tar
9772do
9773  # Extract the first word of "$ac_prog", so it can be a program name with args.
9774set dummy $ac_prog; ac_word=$2
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9776$as_echo_n "checking for $ac_word... " >&6; }
9777if ${ac_cv_path_TAR+:} false; then :
9778  $as_echo_n "(cached) " >&6
9779else
9780  case $TAR in
9781  [\\/]* | ?:[\\/]*)
9782  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9783  ;;
9784  *)
9785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9786for as_dir in $PATH
9787do
9788  IFS=$as_save_IFS
9789  test -z "$as_dir" && as_dir=.
9790    for ac_exec_ext in '' $ac_executable_extensions; do
9791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9792    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9794    break 2
9795  fi
9796done
9797  done
9798IFS=$as_save_IFS
9799
9800  ;;
9801esac
9802fi
9803TAR=$ac_cv_path_TAR
9804if test -n "$TAR"; then
9805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9806$as_echo "$TAR" >&6; }
9807else
9808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809$as_echo "no" >&6; }
9810fi
9811
9812
9813  test -n "$TAR" && break
9814done
9815
9816  else
9817    # The variable is set, but is it from the command line or the environment?
9818
9819    # Try to remove the string !TAR! from our list.
9820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9822      # If it failed, the variable was not from the command line. Ignore it,
9823      # but warn the user (except for BASH, which is always set by the calling BASH).
9824      if test "xTAR" != xBASH; then
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9826$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9827      fi
9828      # Try to locate tool using the code snippet
9829      for ac_prog in tar
9830do
9831  # Extract the first word of "$ac_prog", so it can be a program name with args.
9832set dummy $ac_prog; ac_word=$2
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9834$as_echo_n "checking for $ac_word... " >&6; }
9835if ${ac_cv_path_TAR+:} false; then :
9836  $as_echo_n "(cached) " >&6
9837else
9838  case $TAR in
9839  [\\/]* | ?:[\\/]*)
9840  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9841  ;;
9842  *)
9843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844for as_dir in $PATH
9845do
9846  IFS=$as_save_IFS
9847  test -z "$as_dir" && as_dir=.
9848    for ac_exec_ext in '' $ac_executable_extensions; do
9849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852    break 2
9853  fi
9854done
9855  done
9856IFS=$as_save_IFS
9857
9858  ;;
9859esac
9860fi
9861TAR=$ac_cv_path_TAR
9862if test -n "$TAR"; then
9863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9864$as_echo "$TAR" >&6; }
9865else
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
9868fi
9869
9870
9871  test -n "$TAR" && break
9872done
9873
9874    else
9875      # If it succeeded, then it was overridden by the user. We will use it
9876      # for the tool.
9877
9878      # First remove it from the list of overridden variables, so we can test
9879      # for unknown variables in the end.
9880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9881
9882      # Check if the provided tool contains a complete path.
9883      tool_specified="$TAR"
9884      tool_basename="${tool_specified##*/}"
9885      if test "x$tool_basename" = "x$tool_specified"; then
9886        # A command without a complete path is provided, search $PATH.
9887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9888$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9889        # Extract the first word of "$tool_basename", so it can be a program name with args.
9890set dummy $tool_basename; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_TAR+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $TAR in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919TAR=$ac_cv_path_TAR
9920if test -n "$TAR"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9922$as_echo "$TAR" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929        if test "x$TAR" = x; then
9930          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9931        fi
9932      else
9933        # Otherwise we believe it is a complete path. Use it as it is.
9934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9935$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9937$as_echo_n "checking for TAR... " >&6; }
9938        if test ! -x "$tool_specified"; then
9939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9940$as_echo "not found" >&6; }
9941          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9942        fi
9943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9944$as_echo "$tool_specified" >&6; }
9945      fi
9946    fi
9947  fi
9948
9949
9950
9951  if test "x$TAR" = x; then
9952    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9953  fi
9954
9955
9956
9957
9958
9959  # Publish this variable in the help.
9960
9961
9962  if test "x$TEE" = x; then
9963    # The variable is not set by user, try to locate tool using the code snippet
9964    for ac_prog in tee
9965do
9966  # Extract the first word of "$ac_prog", so it can be a program name with args.
9967set dummy $ac_prog; ac_word=$2
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9969$as_echo_n "checking for $ac_word... " >&6; }
9970if ${ac_cv_path_TEE+:} false; then :
9971  $as_echo_n "(cached) " >&6
9972else
9973  case $TEE in
9974  [\\/]* | ?:[\\/]*)
9975  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9976  ;;
9977  *)
9978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9979for as_dir in $PATH
9980do
9981  IFS=$as_save_IFS
9982  test -z "$as_dir" && as_dir=.
9983    for ac_exec_ext in '' $ac_executable_extensions; do
9984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9985    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9987    break 2
9988  fi
9989done
9990  done
9991IFS=$as_save_IFS
9992
9993  ;;
9994esac
9995fi
9996TEE=$ac_cv_path_TEE
9997if test -n "$TEE"; then
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9999$as_echo "$TEE" >&6; }
10000else
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
10003fi
10004
10005
10006  test -n "$TEE" && break
10007done
10008
10009  else
10010    # The variable is set, but is it from the command line or the environment?
10011
10012    # Try to remove the string !TEE! from our list.
10013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10015      # If it failed, the variable was not from the command line. Ignore it,
10016      # but warn the user (except for BASH, which is always set by the calling BASH).
10017      if test "xTEE" != xBASH; then
10018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10019$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10020      fi
10021      # Try to locate tool using the code snippet
10022      for ac_prog in tee
10023do
10024  # Extract the first word of "$ac_prog", so it can be a program name with args.
10025set dummy $ac_prog; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_TEE+:} false; then :
10029  $as_echo_n "(cached) " >&6
10030else
10031  case $TEE in
10032  [\\/]* | ?:[\\/]*)
10033  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10034  ;;
10035  *)
10036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039  IFS=$as_save_IFS
10040  test -z "$as_dir" && as_dir=.
10041    for ac_exec_ext in '' $ac_executable_extensions; do
10042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045    break 2
10046  fi
10047done
10048  done
10049IFS=$as_save_IFS
10050
10051  ;;
10052esac
10053fi
10054TEE=$ac_cv_path_TEE
10055if test -n "$TEE"; then
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10057$as_echo "$TEE" >&6; }
10058else
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063
10064  test -n "$TEE" && break
10065done
10066
10067    else
10068      # If it succeeded, then it was overridden by the user. We will use it
10069      # for the tool.
10070
10071      # First remove it from the list of overridden variables, so we can test
10072      # for unknown variables in the end.
10073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10074
10075      # Check if the provided tool contains a complete path.
10076      tool_specified="$TEE"
10077      tool_basename="${tool_specified##*/}"
10078      if test "x$tool_basename" = "x$tool_specified"; then
10079        # A command without a complete path is provided, search $PATH.
10080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10081$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10082        # Extract the first word of "$tool_basename", so it can be a program name with args.
10083set dummy $tool_basename; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_TEE+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $TEE in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112TEE=$ac_cv_path_TEE
10113if test -n "$TEE"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10115$as_echo "$TEE" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122        if test "x$TEE" = x; then
10123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10124        fi
10125      else
10126        # Otherwise we believe it is a complete path. Use it as it is.
10127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10128$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10130$as_echo_n "checking for TEE... " >&6; }
10131        if test ! -x "$tool_specified"; then
10132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10133$as_echo "not found" >&6; }
10134          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10135        fi
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10137$as_echo "$tool_specified" >&6; }
10138      fi
10139    fi
10140  fi
10141
10142
10143
10144  if test "x$TEE" = x; then
10145    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10146  fi
10147
10148
10149
10150
10151
10152  # Publish this variable in the help.
10153
10154
10155  if test "x$TOUCH" = x; then
10156    # The variable is not set by user, try to locate tool using the code snippet
10157    for ac_prog in touch
10158do
10159  # Extract the first word of "$ac_prog", so it can be a program name with args.
10160set dummy $ac_prog; ac_word=$2
10161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10162$as_echo_n "checking for $ac_word... " >&6; }
10163if ${ac_cv_path_TOUCH+:} false; then :
10164  $as_echo_n "(cached) " >&6
10165else
10166  case $TOUCH in
10167  [\\/]* | ?:[\\/]*)
10168  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10169  ;;
10170  *)
10171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10172for as_dir in $PATH
10173do
10174  IFS=$as_save_IFS
10175  test -z "$as_dir" && as_dir=.
10176    for ac_exec_ext in '' $ac_executable_extensions; do
10177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10178    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10180    break 2
10181  fi
10182done
10183  done
10184IFS=$as_save_IFS
10185
10186  ;;
10187esac
10188fi
10189TOUCH=$ac_cv_path_TOUCH
10190if test -n "$TOUCH"; then
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10192$as_echo "$TOUCH" >&6; }
10193else
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10195$as_echo "no" >&6; }
10196fi
10197
10198
10199  test -n "$TOUCH" && break
10200done
10201
10202  else
10203    # The variable is set, but is it from the command line or the environment?
10204
10205    # Try to remove the string !TOUCH! from our list.
10206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10208      # If it failed, the variable was not from the command line. Ignore it,
10209      # but warn the user (except for BASH, which is always set by the calling BASH).
10210      if test "xTOUCH" != xBASH; then
10211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10212$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10213      fi
10214      # Try to locate tool using the code snippet
10215      for ac_prog in touch
10216do
10217  # Extract the first word of "$ac_prog", so it can be a program name with args.
10218set dummy $ac_prog; ac_word=$2
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10220$as_echo_n "checking for $ac_word... " >&6; }
10221if ${ac_cv_path_TOUCH+:} false; then :
10222  $as_echo_n "(cached) " >&6
10223else
10224  case $TOUCH in
10225  [\\/]* | ?:[\\/]*)
10226  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10227  ;;
10228  *)
10229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10230for as_dir in $PATH
10231do
10232  IFS=$as_save_IFS
10233  test -z "$as_dir" && as_dir=.
10234    for ac_exec_ext in '' $ac_executable_extensions; do
10235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10236    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10238    break 2
10239  fi
10240done
10241  done
10242IFS=$as_save_IFS
10243
10244  ;;
10245esac
10246fi
10247TOUCH=$ac_cv_path_TOUCH
10248if test -n "$TOUCH"; then
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10250$as_echo "$TOUCH" >&6; }
10251else
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
10254fi
10255
10256
10257  test -n "$TOUCH" && break
10258done
10259
10260    else
10261      # If it succeeded, then it was overridden by the user. We will use it
10262      # for the tool.
10263
10264      # First remove it from the list of overridden variables, so we can test
10265      # for unknown variables in the end.
10266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10267
10268      # Check if the provided tool contains a complete path.
10269      tool_specified="$TOUCH"
10270      tool_basename="${tool_specified##*/}"
10271      if test "x$tool_basename" = "x$tool_specified"; then
10272        # A command without a complete path is provided, search $PATH.
10273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10274$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10275        # Extract the first word of "$tool_basename", so it can be a program name with args.
10276set dummy $tool_basename; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_TOUCH+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $TOUCH in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305TOUCH=$ac_cv_path_TOUCH
10306if test -n "$TOUCH"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10308$as_echo "$TOUCH" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315        if test "x$TOUCH" = x; then
10316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10317        fi
10318      else
10319        # Otherwise we believe it is a complete path. Use it as it is.
10320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10321$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10323$as_echo_n "checking for TOUCH... " >&6; }
10324        if test ! -x "$tool_specified"; then
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10326$as_echo "not found" >&6; }
10327          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10328        fi
10329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10330$as_echo "$tool_specified" >&6; }
10331      fi
10332    fi
10333  fi
10334
10335
10336
10337  if test "x$TOUCH" = x; then
10338    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10339  fi
10340
10341
10342
10343
10344
10345  # Publish this variable in the help.
10346
10347
10348  if test "x$TR" = x; then
10349    # The variable is not set by user, try to locate tool using the code snippet
10350    for ac_prog in tr
10351do
10352  # Extract the first word of "$ac_prog", so it can be a program name with args.
10353set dummy $ac_prog; ac_word=$2
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355$as_echo_n "checking for $ac_word... " >&6; }
10356if ${ac_cv_path_TR+:} false; then :
10357  $as_echo_n "(cached) " >&6
10358else
10359  case $TR in
10360  [\\/]* | ?:[\\/]*)
10361  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10362  ;;
10363  *)
10364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365for as_dir in $PATH
10366do
10367  IFS=$as_save_IFS
10368  test -z "$as_dir" && as_dir=.
10369    for ac_exec_ext in '' $ac_executable_extensions; do
10370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10371    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373    break 2
10374  fi
10375done
10376  done
10377IFS=$as_save_IFS
10378
10379  ;;
10380esac
10381fi
10382TR=$ac_cv_path_TR
10383if test -n "$TR"; then
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10385$as_echo "$TR" >&6; }
10386else
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
10389fi
10390
10391
10392  test -n "$TR" && break
10393done
10394
10395  else
10396    # The variable is set, but is it from the command line or the environment?
10397
10398    # Try to remove the string !TR! from our list.
10399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10401      # If it failed, the variable was not from the command line. Ignore it,
10402      # but warn the user (except for BASH, which is always set by the calling BASH).
10403      if test "xTR" != xBASH; then
10404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10405$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10406      fi
10407      # Try to locate tool using the code snippet
10408      for ac_prog in tr
10409do
10410  # Extract the first word of "$ac_prog", so it can be a program name with args.
10411set dummy $ac_prog; ac_word=$2
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10413$as_echo_n "checking for $ac_word... " >&6; }
10414if ${ac_cv_path_TR+:} false; then :
10415  $as_echo_n "(cached) " >&6
10416else
10417  case $TR in
10418  [\\/]* | ?:[\\/]*)
10419  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10420  ;;
10421  *)
10422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10423for as_dir in $PATH
10424do
10425  IFS=$as_save_IFS
10426  test -z "$as_dir" && as_dir=.
10427    for ac_exec_ext in '' $ac_executable_extensions; do
10428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10429    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10431    break 2
10432  fi
10433done
10434  done
10435IFS=$as_save_IFS
10436
10437  ;;
10438esac
10439fi
10440TR=$ac_cv_path_TR
10441if test -n "$TR"; then
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10443$as_echo "$TR" >&6; }
10444else
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
10447fi
10448
10449
10450  test -n "$TR" && break
10451done
10452
10453    else
10454      # If it succeeded, then it was overridden by the user. We will use it
10455      # for the tool.
10456
10457      # First remove it from the list of overridden variables, so we can test
10458      # for unknown variables in the end.
10459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10460
10461      # Check if the provided tool contains a complete path.
10462      tool_specified="$TR"
10463      tool_basename="${tool_specified##*/}"
10464      if test "x$tool_basename" = "x$tool_specified"; then
10465        # A command without a complete path is provided, search $PATH.
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10467$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10468        # Extract the first word of "$tool_basename", so it can be a program name with args.
10469set dummy $tool_basename; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_TR+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $TR in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498TR=$ac_cv_path_TR
10499if test -n "$TR"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10501$as_echo "$TR" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508        if test "x$TR" = x; then
10509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10510        fi
10511      else
10512        # Otherwise we believe it is a complete path. Use it as it is.
10513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10514$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10516$as_echo_n "checking for TR... " >&6; }
10517        if test ! -x "$tool_specified"; then
10518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10519$as_echo "not found" >&6; }
10520          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10521        fi
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10523$as_echo "$tool_specified" >&6; }
10524      fi
10525    fi
10526  fi
10527
10528
10529
10530  if test "x$TR" = x; then
10531    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10532  fi
10533
10534
10535
10536
10537
10538  # Publish this variable in the help.
10539
10540
10541  if test "x$UNAME" = x; then
10542    # The variable is not set by user, try to locate tool using the code snippet
10543    for ac_prog in uname
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_path_UNAME+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  case $UNAME in
10553  [\\/]* | ?:[\\/]*)
10554  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10555  ;;
10556  *)
10557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558for as_dir in $PATH
10559do
10560  IFS=$as_save_IFS
10561  test -z "$as_dir" && as_dir=.
10562    for ac_exec_ext in '' $ac_executable_extensions; do
10563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566    break 2
10567  fi
10568done
10569  done
10570IFS=$as_save_IFS
10571
10572  ;;
10573esac
10574fi
10575UNAME=$ac_cv_path_UNAME
10576if test -n "$UNAME"; then
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10578$as_echo "$UNAME" >&6; }
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582fi
10583
10584
10585  test -n "$UNAME" && break
10586done
10587
10588  else
10589    # The variable is set, but is it from the command line or the environment?
10590
10591    # Try to remove the string !UNAME! from our list.
10592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10594      # If it failed, the variable was not from the command line. Ignore it,
10595      # but warn the user (except for BASH, which is always set by the calling BASH).
10596      if test "xUNAME" != xBASH; then
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10598$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10599      fi
10600      # Try to locate tool using the code snippet
10601      for ac_prog in uname
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_UNAME+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $UNAME in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633UNAME=$ac_cv_path_UNAME
10634if test -n "$UNAME"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10636$as_echo "$UNAME" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$UNAME" && break
10644done
10645
10646    else
10647      # If it succeeded, then it was overridden by the user. We will use it
10648      # for the tool.
10649
10650      # First remove it from the list of overridden variables, so we can test
10651      # for unknown variables in the end.
10652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10653
10654      # Check if the provided tool contains a complete path.
10655      tool_specified="$UNAME"
10656      tool_basename="${tool_specified##*/}"
10657      if test "x$tool_basename" = "x$tool_specified"; then
10658        # A command without a complete path is provided, search $PATH.
10659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10660$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10661        # Extract the first word of "$tool_basename", so it can be a program name with args.
10662set dummy $tool_basename; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_UNAME+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $UNAME in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691UNAME=$ac_cv_path_UNAME
10692if test -n "$UNAME"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10694$as_echo "$UNAME" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701        if test "x$UNAME" = x; then
10702          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10703        fi
10704      else
10705        # Otherwise we believe it is a complete path. Use it as it is.
10706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10707$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10709$as_echo_n "checking for UNAME... " >&6; }
10710        if test ! -x "$tool_specified"; then
10711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10712$as_echo "not found" >&6; }
10713          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10714        fi
10715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10716$as_echo "$tool_specified" >&6; }
10717      fi
10718    fi
10719  fi
10720
10721
10722
10723  if test "x$UNAME" = x; then
10724    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10725  fi
10726
10727
10728
10729
10730
10731  # Publish this variable in the help.
10732
10733
10734  if test "x$UNIQ" = x; then
10735    # The variable is not set by user, try to locate tool using the code snippet
10736    for ac_prog in uniq
10737do
10738  # Extract the first word of "$ac_prog", so it can be a program name with args.
10739set dummy $ac_prog; ac_word=$2
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10741$as_echo_n "checking for $ac_word... " >&6; }
10742if ${ac_cv_path_UNIQ+:} false; then :
10743  $as_echo_n "(cached) " >&6
10744else
10745  case $UNIQ in
10746  [\\/]* | ?:[\\/]*)
10747  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10748  ;;
10749  *)
10750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10751for as_dir in $PATH
10752do
10753  IFS=$as_save_IFS
10754  test -z "$as_dir" && as_dir=.
10755    for ac_exec_ext in '' $ac_executable_extensions; do
10756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10757    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10759    break 2
10760  fi
10761done
10762  done
10763IFS=$as_save_IFS
10764
10765  ;;
10766esac
10767fi
10768UNIQ=$ac_cv_path_UNIQ
10769if test -n "$UNIQ"; then
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10771$as_echo "$UNIQ" >&6; }
10772else
10773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
10775fi
10776
10777
10778  test -n "$UNIQ" && break
10779done
10780
10781  else
10782    # The variable is set, but is it from the command line or the environment?
10783
10784    # Try to remove the string !UNIQ! from our list.
10785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10787      # If it failed, the variable was not from the command line. Ignore it,
10788      # but warn the user (except for BASH, which is always set by the calling BASH).
10789      if test "xUNIQ" != xBASH; then
10790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10791$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10792      fi
10793      # Try to locate tool using the code snippet
10794      for ac_prog in uniq
10795do
10796  # Extract the first word of "$ac_prog", so it can be a program name with args.
10797set dummy $ac_prog; ac_word=$2
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10799$as_echo_n "checking for $ac_word... " >&6; }
10800if ${ac_cv_path_UNIQ+:} false; then :
10801  $as_echo_n "(cached) " >&6
10802else
10803  case $UNIQ in
10804  [\\/]* | ?:[\\/]*)
10805  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10806  ;;
10807  *)
10808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10809for as_dir in $PATH
10810do
10811  IFS=$as_save_IFS
10812  test -z "$as_dir" && as_dir=.
10813    for ac_exec_ext in '' $ac_executable_extensions; do
10814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10815    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10817    break 2
10818  fi
10819done
10820  done
10821IFS=$as_save_IFS
10822
10823  ;;
10824esac
10825fi
10826UNIQ=$ac_cv_path_UNIQ
10827if test -n "$UNIQ"; then
10828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10829$as_echo "$UNIQ" >&6; }
10830else
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
10833fi
10834
10835
10836  test -n "$UNIQ" && break
10837done
10838
10839    else
10840      # If it succeeded, then it was overridden by the user. We will use it
10841      # for the tool.
10842
10843      # First remove it from the list of overridden variables, so we can test
10844      # for unknown variables in the end.
10845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10846
10847      # Check if the provided tool contains a complete path.
10848      tool_specified="$UNIQ"
10849      tool_basename="${tool_specified##*/}"
10850      if test "x$tool_basename" = "x$tool_specified"; then
10851        # A command without a complete path is provided, search $PATH.
10852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10853$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10854        # Extract the first word of "$tool_basename", so it can be a program name with args.
10855set dummy $tool_basename; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_path_UNIQ+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  case $UNIQ in
10862  [\\/]* | ?:[\\/]*)
10863  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10864  ;;
10865  *)
10866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867for as_dir in $PATH
10868do
10869  IFS=$as_save_IFS
10870  test -z "$as_dir" && as_dir=.
10871    for ac_exec_ext in '' $ac_executable_extensions; do
10872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875    break 2
10876  fi
10877done
10878  done
10879IFS=$as_save_IFS
10880
10881  ;;
10882esac
10883fi
10884UNIQ=$ac_cv_path_UNIQ
10885if test -n "$UNIQ"; then
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10887$as_echo "$UNIQ" >&6; }
10888else
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891fi
10892
10893
10894        if test "x$UNIQ" = x; then
10895          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10896        fi
10897      else
10898        # Otherwise we believe it is a complete path. Use it as it is.
10899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10900$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10902$as_echo_n "checking for UNIQ... " >&6; }
10903        if test ! -x "$tool_specified"; then
10904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10905$as_echo "not found" >&6; }
10906          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10907        fi
10908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10909$as_echo "$tool_specified" >&6; }
10910      fi
10911    fi
10912  fi
10913
10914
10915
10916  if test "x$UNIQ" = x; then
10917    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10918  fi
10919
10920
10921
10922
10923
10924  # Publish this variable in the help.
10925
10926
10927  if test "x$WC" = x; then
10928    # The variable is not set by user, try to locate tool using the code snippet
10929    for ac_prog in wc
10930do
10931  # Extract the first word of "$ac_prog", so it can be a program name with args.
10932set dummy $ac_prog; ac_word=$2
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10934$as_echo_n "checking for $ac_word... " >&6; }
10935if ${ac_cv_path_WC+:} false; then :
10936  $as_echo_n "(cached) " >&6
10937else
10938  case $WC in
10939  [\\/]* | ?:[\\/]*)
10940  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10941  ;;
10942  *)
10943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946  IFS=$as_save_IFS
10947  test -z "$as_dir" && as_dir=.
10948    for ac_exec_ext in '' $ac_executable_extensions; do
10949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10950    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10952    break 2
10953  fi
10954done
10955  done
10956IFS=$as_save_IFS
10957
10958  ;;
10959esac
10960fi
10961WC=$ac_cv_path_WC
10962if test -n "$WC"; then
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10964$as_echo "$WC" >&6; }
10965else
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
10968fi
10969
10970
10971  test -n "$WC" && break
10972done
10973
10974  else
10975    # The variable is set, but is it from the command line or the environment?
10976
10977    # Try to remove the string !WC! from our list.
10978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10980      # If it failed, the variable was not from the command line. Ignore it,
10981      # but warn the user (except for BASH, which is always set by the calling BASH).
10982      if test "xWC" != xBASH; then
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10984$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10985      fi
10986      # Try to locate tool using the code snippet
10987      for ac_prog in wc
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_WC+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $WC in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019WC=$ac_cv_path_WC
11020if test -n "$WC"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11022$as_echo "$WC" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$WC" && break
11030done
11031
11032    else
11033      # If it succeeded, then it was overridden by the user. We will use it
11034      # for the tool.
11035
11036      # First remove it from the list of overridden variables, so we can test
11037      # for unknown variables in the end.
11038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11039
11040      # Check if the provided tool contains a complete path.
11041      tool_specified="$WC"
11042      tool_basename="${tool_specified##*/}"
11043      if test "x$tool_basename" = "x$tool_specified"; then
11044        # A command without a complete path is provided, search $PATH.
11045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11046$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11047        # Extract the first word of "$tool_basename", so it can be a program name with args.
11048set dummy $tool_basename; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_WC+:} false; then :
11052  $as_echo_n "(cached) " >&6
11053else
11054  case $WC in
11055  [\\/]* | ?:[\\/]*)
11056  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11057  ;;
11058  *)
11059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062  IFS=$as_save_IFS
11063  test -z "$as_dir" && as_dir=.
11064    for ac_exec_ext in '' $ac_executable_extensions; do
11065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068    break 2
11069  fi
11070done
11071  done
11072IFS=$as_save_IFS
11073
11074  ;;
11075esac
11076fi
11077WC=$ac_cv_path_WC
11078if test -n "$WC"; then
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11080$as_echo "$WC" >&6; }
11081else
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
11084fi
11085
11086
11087        if test "x$WC" = x; then
11088          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11089        fi
11090      else
11091        # Otherwise we believe it is a complete path. Use it as it is.
11092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11093$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11095$as_echo_n "checking for WC... " >&6; }
11096        if test ! -x "$tool_specified"; then
11097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11098$as_echo "not found" >&6; }
11099          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11100        fi
11101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11102$as_echo "$tool_specified" >&6; }
11103      fi
11104    fi
11105  fi
11106
11107
11108
11109  if test "x$WC" = x; then
11110    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11111  fi
11112
11113
11114
11115
11116
11117  # Publish this variable in the help.
11118
11119
11120  if test "x$WHICH" = x; then
11121    # The variable is not set by user, try to locate tool using the code snippet
11122    for ac_prog in which
11123do
11124  # Extract the first word of "$ac_prog", so it can be a program name with args.
11125set dummy $ac_prog; ac_word=$2
11126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11127$as_echo_n "checking for $ac_word... " >&6; }
11128if ${ac_cv_path_WHICH+:} false; then :
11129  $as_echo_n "(cached) " >&6
11130else
11131  case $WHICH in
11132  [\\/]* | ?:[\\/]*)
11133  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11134  ;;
11135  *)
11136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11137for as_dir in $PATH
11138do
11139  IFS=$as_save_IFS
11140  test -z "$as_dir" && as_dir=.
11141    for ac_exec_ext in '' $ac_executable_extensions; do
11142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11143    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11145    break 2
11146  fi
11147done
11148  done
11149IFS=$as_save_IFS
11150
11151  ;;
11152esac
11153fi
11154WHICH=$ac_cv_path_WHICH
11155if test -n "$WHICH"; then
11156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11157$as_echo "$WHICH" >&6; }
11158else
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11160$as_echo "no" >&6; }
11161fi
11162
11163
11164  test -n "$WHICH" && break
11165done
11166
11167  else
11168    # The variable is set, but is it from the command line or the environment?
11169
11170    # Try to remove the string !WHICH! from our list.
11171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11173      # If it failed, the variable was not from the command line. Ignore it,
11174      # but warn the user (except for BASH, which is always set by the calling BASH).
11175      if test "xWHICH" != xBASH; then
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11177$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11178      fi
11179      # Try to locate tool using the code snippet
11180      for ac_prog in which
11181do
11182  # Extract the first word of "$ac_prog", so it can be a program name with args.
11183set dummy $ac_prog; ac_word=$2
11184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11185$as_echo_n "checking for $ac_word... " >&6; }
11186if ${ac_cv_path_WHICH+:} false; then :
11187  $as_echo_n "(cached) " >&6
11188else
11189  case $WHICH in
11190  [\\/]* | ?:[\\/]*)
11191  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11192  ;;
11193  *)
11194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197  IFS=$as_save_IFS
11198  test -z "$as_dir" && as_dir=.
11199    for ac_exec_ext in '' $ac_executable_extensions; do
11200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11201    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11203    break 2
11204  fi
11205done
11206  done
11207IFS=$as_save_IFS
11208
11209  ;;
11210esac
11211fi
11212WHICH=$ac_cv_path_WHICH
11213if test -n "$WHICH"; then
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11215$as_echo "$WHICH" >&6; }
11216else
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
11219fi
11220
11221
11222  test -n "$WHICH" && break
11223done
11224
11225    else
11226      # If it succeeded, then it was overridden by the user. We will use it
11227      # for the tool.
11228
11229      # First remove it from the list of overridden variables, so we can test
11230      # for unknown variables in the end.
11231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11232
11233      # Check if the provided tool contains a complete path.
11234      tool_specified="$WHICH"
11235      tool_basename="${tool_specified##*/}"
11236      if test "x$tool_basename" = "x$tool_specified"; then
11237        # A command without a complete path is provided, search $PATH.
11238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11239$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11240        # Extract the first word of "$tool_basename", so it can be a program name with args.
11241set dummy $tool_basename; ac_word=$2
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11243$as_echo_n "checking for $ac_word... " >&6; }
11244if ${ac_cv_path_WHICH+:} false; then :
11245  $as_echo_n "(cached) " >&6
11246else
11247  case $WHICH in
11248  [\\/]* | ?:[\\/]*)
11249  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11250  ;;
11251  *)
11252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11253for as_dir in $PATH
11254do
11255  IFS=$as_save_IFS
11256  test -z "$as_dir" && as_dir=.
11257    for ac_exec_ext in '' $ac_executable_extensions; do
11258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11259    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11261    break 2
11262  fi
11263done
11264  done
11265IFS=$as_save_IFS
11266
11267  ;;
11268esac
11269fi
11270WHICH=$ac_cv_path_WHICH
11271if test -n "$WHICH"; then
11272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11273$as_echo "$WHICH" >&6; }
11274else
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
11277fi
11278
11279
11280        if test "x$WHICH" = x; then
11281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11282        fi
11283      else
11284        # Otherwise we believe it is a complete path. Use it as it is.
11285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11286$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11288$as_echo_n "checking for WHICH... " >&6; }
11289        if test ! -x "$tool_specified"; then
11290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11291$as_echo "not found" >&6; }
11292          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11293        fi
11294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11295$as_echo "$tool_specified" >&6; }
11296      fi
11297    fi
11298  fi
11299
11300
11301
11302  if test "x$WHICH" = x; then
11303    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11304  fi
11305
11306
11307
11308
11309
11310  # Publish this variable in the help.
11311
11312
11313  if test "x$XARGS" = x; then
11314    # The variable is not set by user, try to locate tool using the code snippet
11315    for ac_prog in xargs
11316do
11317  # Extract the first word of "$ac_prog", so it can be a program name with args.
11318set dummy $ac_prog; ac_word=$2
11319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11320$as_echo_n "checking for $ac_word... " >&6; }
11321if ${ac_cv_path_XARGS+:} false; then :
11322  $as_echo_n "(cached) " >&6
11323else
11324  case $XARGS in
11325  [\\/]* | ?:[\\/]*)
11326  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11327  ;;
11328  *)
11329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11330for as_dir in $PATH
11331do
11332  IFS=$as_save_IFS
11333  test -z "$as_dir" && as_dir=.
11334    for ac_exec_ext in '' $ac_executable_extensions; do
11335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11336    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11338    break 2
11339  fi
11340done
11341  done
11342IFS=$as_save_IFS
11343
11344  ;;
11345esac
11346fi
11347XARGS=$ac_cv_path_XARGS
11348if test -n "$XARGS"; then
11349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11350$as_echo "$XARGS" >&6; }
11351else
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
11354fi
11355
11356
11357  test -n "$XARGS" && break
11358done
11359
11360  else
11361    # The variable is set, but is it from the command line or the environment?
11362
11363    # Try to remove the string !XARGS! from our list.
11364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11366      # If it failed, the variable was not from the command line. Ignore it,
11367      # but warn the user (except for BASH, which is always set by the calling BASH).
11368      if test "xXARGS" != xBASH; then
11369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11370$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11371      fi
11372      # Try to locate tool using the code snippet
11373      for ac_prog in xargs
11374do
11375  # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_path_XARGS+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  case $XARGS in
11383  [\\/]* | ?:[\\/]*)
11384  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11385  ;;
11386  *)
11387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402  ;;
11403esac
11404fi
11405XARGS=$ac_cv_path_XARGS
11406if test -n "$XARGS"; then
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11408$as_echo "$XARGS" >&6; }
11409else
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
11412fi
11413
11414
11415  test -n "$XARGS" && break
11416done
11417
11418    else
11419      # If it succeeded, then it was overridden by the user. We will use it
11420      # for the tool.
11421
11422      # First remove it from the list of overridden variables, so we can test
11423      # for unknown variables in the end.
11424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11425
11426      # Check if the provided tool contains a complete path.
11427      tool_specified="$XARGS"
11428      tool_basename="${tool_specified##*/}"
11429      if test "x$tool_basename" = "x$tool_specified"; then
11430        # A command without a complete path is provided, search $PATH.
11431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11432$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11433        # Extract the first word of "$tool_basename", so it can be a program name with args.
11434set dummy $tool_basename; ac_word=$2
11435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436$as_echo_n "checking for $ac_word... " >&6; }
11437if ${ac_cv_path_XARGS+:} false; then :
11438  $as_echo_n "(cached) " >&6
11439else
11440  case $XARGS in
11441  [\\/]* | ?:[\\/]*)
11442  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11443  ;;
11444  *)
11445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446for as_dir in $PATH
11447do
11448  IFS=$as_save_IFS
11449  test -z "$as_dir" && as_dir=.
11450    for ac_exec_ext in '' $ac_executable_extensions; do
11451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454    break 2
11455  fi
11456done
11457  done
11458IFS=$as_save_IFS
11459
11460  ;;
11461esac
11462fi
11463XARGS=$ac_cv_path_XARGS
11464if test -n "$XARGS"; then
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11466$as_echo "$XARGS" >&6; }
11467else
11468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470fi
11471
11472
11473        if test "x$XARGS" = x; then
11474          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11475        fi
11476      else
11477        # Otherwise we believe it is a complete path. Use it as it is.
11478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11479$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11481$as_echo_n "checking for XARGS... " >&6; }
11482        if test ! -x "$tool_specified"; then
11483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11484$as_echo "not found" >&6; }
11485          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11486        fi
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11488$as_echo "$tool_specified" >&6; }
11489      fi
11490    fi
11491  fi
11492
11493
11494
11495  if test "x$XARGS" = x; then
11496    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11497  fi
11498
11499
11500
11501  # Then required tools that require some special treatment.
11502
11503
11504  # Publish this variable in the help.
11505
11506
11507  if test "x$AWK" = x; then
11508    # The variable is not set by user, try to locate tool using the code snippet
11509    for ac_prog in gawk mawk nawk awk
11510do
11511  # Extract the first word of "$ac_prog", so it can be a program name with args.
11512set dummy $ac_prog; ac_word=$2
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11514$as_echo_n "checking for $ac_word... " >&6; }
11515if ${ac_cv_prog_AWK+:} false; then :
11516  $as_echo_n "(cached) " >&6
11517else
11518  if test -n "$AWK"; then
11519  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11520else
11521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522for as_dir in $PATH
11523do
11524  IFS=$as_save_IFS
11525  test -z "$as_dir" && as_dir=.
11526    for ac_exec_ext in '' $ac_executable_extensions; do
11527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528    ac_cv_prog_AWK="$ac_prog"
11529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530    break 2
11531  fi
11532done
11533  done
11534IFS=$as_save_IFS
11535
11536fi
11537fi
11538AWK=$ac_cv_prog_AWK
11539if test -n "$AWK"; then
11540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11541$as_echo "$AWK" >&6; }
11542else
11543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544$as_echo "no" >&6; }
11545fi
11546
11547
11548  test -n "$AWK" && break
11549done
11550
11551  else
11552    # The variable is set, but is it from the command line or the environment?
11553
11554    # Try to remove the string !AWK! from our list.
11555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11557      # If it failed, the variable was not from the command line. Ignore it,
11558      # but warn the user (except for BASH, which is always set by the calling BASH).
11559      if test "xAWK" != xBASH; then
11560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11561$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11562      fi
11563      # Try to locate tool using the code snippet
11564      for ac_prog in gawk mawk nawk awk
11565do
11566  # Extract the first word of "$ac_prog", so it can be a program name with args.
11567set dummy $ac_prog; ac_word=$2
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11569$as_echo_n "checking for $ac_word... " >&6; }
11570if ${ac_cv_prog_AWK+:} false; then :
11571  $as_echo_n "(cached) " >&6
11572else
11573  if test -n "$AWK"; then
11574  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11575else
11576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11577for as_dir in $PATH
11578do
11579  IFS=$as_save_IFS
11580  test -z "$as_dir" && as_dir=.
11581    for ac_exec_ext in '' $ac_executable_extensions; do
11582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11583    ac_cv_prog_AWK="$ac_prog"
11584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11585    break 2
11586  fi
11587done
11588  done
11589IFS=$as_save_IFS
11590
11591fi
11592fi
11593AWK=$ac_cv_prog_AWK
11594if test -n "$AWK"; then
11595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11596$as_echo "$AWK" >&6; }
11597else
11598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
11600fi
11601
11602
11603  test -n "$AWK" && break
11604done
11605
11606    else
11607      # If it succeeded, then it was overridden by the user. We will use it
11608      # for the tool.
11609
11610      # First remove it from the list of overridden variables, so we can test
11611      # for unknown variables in the end.
11612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11613
11614      # Check if the provided tool contains a complete path.
11615      tool_specified="$AWK"
11616      tool_basename="${tool_specified##*/}"
11617      if test "x$tool_basename" = "x$tool_specified"; then
11618        # A command without a complete path is provided, search $PATH.
11619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11620$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11621        # Extract the first word of "$tool_basename", so it can be a program name with args.
11622set dummy $tool_basename; ac_word=$2
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11624$as_echo_n "checking for $ac_word... " >&6; }
11625if ${ac_cv_path_AWK+:} false; then :
11626  $as_echo_n "(cached) " >&6
11627else
11628  case $AWK in
11629  [\\/]* | ?:[\\/]*)
11630  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11631  ;;
11632  *)
11633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636  IFS=$as_save_IFS
11637  test -z "$as_dir" && as_dir=.
11638    for ac_exec_ext in '' $ac_executable_extensions; do
11639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11640    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11642    break 2
11643  fi
11644done
11645  done
11646IFS=$as_save_IFS
11647
11648  ;;
11649esac
11650fi
11651AWK=$ac_cv_path_AWK
11652if test -n "$AWK"; then
11653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11654$as_echo "$AWK" >&6; }
11655else
11656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
11658fi
11659
11660
11661        if test "x$AWK" = x; then
11662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11663        fi
11664      else
11665        # Otherwise we believe it is a complete path. Use it as it is.
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11667$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11669$as_echo_n "checking for AWK... " >&6; }
11670        if test ! -x "$tool_specified"; then
11671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11672$as_echo "not found" >&6; }
11673          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11674        fi
11675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11676$as_echo "$tool_specified" >&6; }
11677      fi
11678    fi
11679  fi
11680
11681
11682  if test "x$AWK" = x; then
11683    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11684  fi
11685
11686
11687
11688
11689  # Publish this variable in the help.
11690
11691
11692  if test "x$GREP" = x; then
11693    # The variable is not set by user, try to locate tool using the code snippet
11694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11695$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11696if ${ac_cv_path_GREP+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  if test -z "$GREP"; then
11700  ac_path_GREP_found=false
11701  # Loop through the user's path and test for each of PROGNAME-LIST
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_prog in grep ggrep; do
11708    for ac_exec_ext in '' $ac_executable_extensions; do
11709      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11710      as_fn_executable_p "$ac_path_GREP" || continue
11711# Check for GNU ac_path_GREP and select it if it is found.
11712  # Check for GNU $ac_path_GREP
11713case `"$ac_path_GREP" --version 2>&1` in
11714*GNU*)
11715  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11716*)
11717  ac_count=0
11718  $as_echo_n 0123456789 >"conftest.in"
11719  while :
11720  do
11721    cat "conftest.in" "conftest.in" >"conftest.tmp"
11722    mv "conftest.tmp" "conftest.in"
11723    cp "conftest.in" "conftest.nl"
11724    $as_echo 'GREP' >> "conftest.nl"
11725    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11726    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11727    as_fn_arith $ac_count + 1 && ac_count=$as_val
11728    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11729      # Best one so far, save it but keep looking for a better one
11730      ac_cv_path_GREP="$ac_path_GREP"
11731      ac_path_GREP_max=$ac_count
11732    fi
11733    # 10*(2^10) chars as input seems more than enough
11734    test $ac_count -gt 10 && break
11735  done
11736  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11737esac
11738
11739      $ac_path_GREP_found && break 3
11740    done
11741  done
11742  done
11743IFS=$as_save_IFS
11744  if test -z "$ac_cv_path_GREP"; then
11745    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11746  fi
11747else
11748  ac_cv_path_GREP=$GREP
11749fi
11750
11751fi
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11753$as_echo "$ac_cv_path_GREP" >&6; }
11754 GREP="$ac_cv_path_GREP"
11755
11756
11757  else
11758    # The variable is set, but is it from the command line or the environment?
11759
11760    # Try to remove the string !GREP! from our list.
11761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11763      # If it failed, the variable was not from the command line. Ignore it,
11764      # but warn the user (except for BASH, which is always set by the calling BASH).
11765      if test "xGREP" != xBASH; then
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11767$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11768      fi
11769      # Try to locate tool using the code snippet
11770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11771$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11772if ${ac_cv_path_GREP+:} false; then :
11773  $as_echo_n "(cached) " >&6
11774else
11775  if test -z "$GREP"; then
11776  ac_path_GREP_found=false
11777  # Loop through the user's path and test for each of PROGNAME-LIST
11778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11779for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11780do
11781  IFS=$as_save_IFS
11782  test -z "$as_dir" && as_dir=.
11783    for ac_prog in grep ggrep; do
11784    for ac_exec_ext in '' $ac_executable_extensions; do
11785      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11786      as_fn_executable_p "$ac_path_GREP" || continue
11787# Check for GNU ac_path_GREP and select it if it is found.
11788  # Check for GNU $ac_path_GREP
11789case `"$ac_path_GREP" --version 2>&1` in
11790*GNU*)
11791  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11792*)
11793  ac_count=0
11794  $as_echo_n 0123456789 >"conftest.in"
11795  while :
11796  do
11797    cat "conftest.in" "conftest.in" >"conftest.tmp"
11798    mv "conftest.tmp" "conftest.in"
11799    cp "conftest.in" "conftest.nl"
11800    $as_echo 'GREP' >> "conftest.nl"
11801    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11802    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11803    as_fn_arith $ac_count + 1 && ac_count=$as_val
11804    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11805      # Best one so far, save it but keep looking for a better one
11806      ac_cv_path_GREP="$ac_path_GREP"
11807      ac_path_GREP_max=$ac_count
11808    fi
11809    # 10*(2^10) chars as input seems more than enough
11810    test $ac_count -gt 10 && break
11811  done
11812  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11813esac
11814
11815      $ac_path_GREP_found && break 3
11816    done
11817  done
11818  done
11819IFS=$as_save_IFS
11820  if test -z "$ac_cv_path_GREP"; then
11821    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11822  fi
11823else
11824  ac_cv_path_GREP=$GREP
11825fi
11826
11827fi
11828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11829$as_echo "$ac_cv_path_GREP" >&6; }
11830 GREP="$ac_cv_path_GREP"
11831
11832
11833    else
11834      # If it succeeded, then it was overridden by the user. We will use it
11835      # for the tool.
11836
11837      # First remove it from the list of overridden variables, so we can test
11838      # for unknown variables in the end.
11839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11840
11841      # Check if the provided tool contains a complete path.
11842      tool_specified="$GREP"
11843      tool_basename="${tool_specified##*/}"
11844      if test "x$tool_basename" = "x$tool_specified"; then
11845        # A command without a complete path is provided, search $PATH.
11846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11847$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11848        # Extract the first word of "$tool_basename", so it can be a program name with args.
11849set dummy $tool_basename; ac_word=$2
11850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11851$as_echo_n "checking for $ac_word... " >&6; }
11852if ${ac_cv_path_GREP+:} false; then :
11853  $as_echo_n "(cached) " >&6
11854else
11855  case $GREP in
11856  [\\/]* | ?:[\\/]*)
11857  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11858  ;;
11859  *)
11860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11861for as_dir in $PATH
11862do
11863  IFS=$as_save_IFS
11864  test -z "$as_dir" && as_dir=.
11865    for ac_exec_ext in '' $ac_executable_extensions; do
11866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11867    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11869    break 2
11870  fi
11871done
11872  done
11873IFS=$as_save_IFS
11874
11875  ;;
11876esac
11877fi
11878GREP=$ac_cv_path_GREP
11879if test -n "$GREP"; then
11880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11881$as_echo "$GREP" >&6; }
11882else
11883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11884$as_echo "no" >&6; }
11885fi
11886
11887
11888        if test "x$GREP" = x; then
11889          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11890        fi
11891      else
11892        # Otherwise we believe it is a complete path. Use it as it is.
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11894$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11896$as_echo_n "checking for GREP... " >&6; }
11897        if test ! -x "$tool_specified"; then
11898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11899$as_echo "not found" >&6; }
11900          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11901        fi
11902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11903$as_echo "$tool_specified" >&6; }
11904      fi
11905    fi
11906  fi
11907
11908
11909  if test "x$GREP" = x; then
11910    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11911  fi
11912
11913
11914
11915
11916  # Publish this variable in the help.
11917
11918
11919  if test "x$EGREP" = x; then
11920    # The variable is not set by user, try to locate tool using the code snippet
11921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11922$as_echo_n "checking for egrep... " >&6; }
11923if ${ac_cv_path_EGREP+:} false; then :
11924  $as_echo_n "(cached) " >&6
11925else
11926  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11927   then ac_cv_path_EGREP="$GREP -E"
11928   else
11929     if test -z "$EGREP"; then
11930  ac_path_EGREP_found=false
11931  # Loop through the user's path and test for each of PROGNAME-LIST
11932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11934do
11935  IFS=$as_save_IFS
11936  test -z "$as_dir" && as_dir=.
11937    for ac_prog in egrep; do
11938    for ac_exec_ext in '' $ac_executable_extensions; do
11939      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11940      as_fn_executable_p "$ac_path_EGREP" || continue
11941# Check for GNU ac_path_EGREP and select it if it is found.
11942  # Check for GNU $ac_path_EGREP
11943case `"$ac_path_EGREP" --version 2>&1` in
11944*GNU*)
11945  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11946*)
11947  ac_count=0
11948  $as_echo_n 0123456789 >"conftest.in"
11949  while :
11950  do
11951    cat "conftest.in" "conftest.in" >"conftest.tmp"
11952    mv "conftest.tmp" "conftest.in"
11953    cp "conftest.in" "conftest.nl"
11954    $as_echo 'EGREP' >> "conftest.nl"
11955    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11956    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11957    as_fn_arith $ac_count + 1 && ac_count=$as_val
11958    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11959      # Best one so far, save it but keep looking for a better one
11960      ac_cv_path_EGREP="$ac_path_EGREP"
11961      ac_path_EGREP_max=$ac_count
11962    fi
11963    # 10*(2^10) chars as input seems more than enough
11964    test $ac_count -gt 10 && break
11965  done
11966  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11967esac
11968
11969      $ac_path_EGREP_found && break 3
11970    done
11971  done
11972  done
11973IFS=$as_save_IFS
11974  if test -z "$ac_cv_path_EGREP"; then
11975    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11976  fi
11977else
11978  ac_cv_path_EGREP=$EGREP
11979fi
11980
11981   fi
11982fi
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11984$as_echo "$ac_cv_path_EGREP" >&6; }
11985 EGREP="$ac_cv_path_EGREP"
11986
11987
11988  else
11989    # The variable is set, but is it from the command line or the environment?
11990
11991    # Try to remove the string !EGREP! from our list.
11992    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11993    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11994      # If it failed, the variable was not from the command line. Ignore it,
11995      # but warn the user (except for BASH, which is always set by the calling BASH).
11996      if test "xEGREP" != xBASH; then
11997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11998$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11999      fi
12000      # Try to locate tool using the code snippet
12001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12002$as_echo_n "checking for egrep... " >&6; }
12003if ${ac_cv_path_EGREP+:} false; then :
12004  $as_echo_n "(cached) " >&6
12005else
12006  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12007   then ac_cv_path_EGREP="$GREP -E"
12008   else
12009     if test -z "$EGREP"; then
12010  ac_path_EGREP_found=false
12011  # Loop through the user's path and test for each of PROGNAME-LIST
12012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12013for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12014do
12015  IFS=$as_save_IFS
12016  test -z "$as_dir" && as_dir=.
12017    for ac_prog in egrep; do
12018    for ac_exec_ext in '' $ac_executable_extensions; do
12019      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12020      as_fn_executable_p "$ac_path_EGREP" || continue
12021# Check for GNU ac_path_EGREP and select it if it is found.
12022  # Check for GNU $ac_path_EGREP
12023case `"$ac_path_EGREP" --version 2>&1` in
12024*GNU*)
12025  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12026*)
12027  ac_count=0
12028  $as_echo_n 0123456789 >"conftest.in"
12029  while :
12030  do
12031    cat "conftest.in" "conftest.in" >"conftest.tmp"
12032    mv "conftest.tmp" "conftest.in"
12033    cp "conftest.in" "conftest.nl"
12034    $as_echo 'EGREP' >> "conftest.nl"
12035    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12036    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12037    as_fn_arith $ac_count + 1 && ac_count=$as_val
12038    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12039      # Best one so far, save it but keep looking for a better one
12040      ac_cv_path_EGREP="$ac_path_EGREP"
12041      ac_path_EGREP_max=$ac_count
12042    fi
12043    # 10*(2^10) chars as input seems more than enough
12044    test $ac_count -gt 10 && break
12045  done
12046  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12047esac
12048
12049      $ac_path_EGREP_found && break 3
12050    done
12051  done
12052  done
12053IFS=$as_save_IFS
12054  if test -z "$ac_cv_path_EGREP"; then
12055    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12056  fi
12057else
12058  ac_cv_path_EGREP=$EGREP
12059fi
12060
12061   fi
12062fi
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12064$as_echo "$ac_cv_path_EGREP" >&6; }
12065 EGREP="$ac_cv_path_EGREP"
12066
12067
12068    else
12069      # If it succeeded, then it was overridden by the user. We will use it
12070      # for the tool.
12071
12072      # First remove it from the list of overridden variables, so we can test
12073      # for unknown variables in the end.
12074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12075
12076      # Check if the provided tool contains a complete path.
12077      tool_specified="$EGREP"
12078      tool_basename="${tool_specified##*/}"
12079      if test "x$tool_basename" = "x$tool_specified"; then
12080        # A command without a complete path is provided, search $PATH.
12081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12082$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12083        # Extract the first word of "$tool_basename", so it can be a program name with args.
12084set dummy $tool_basename; ac_word=$2
12085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12086$as_echo_n "checking for $ac_word... " >&6; }
12087if ${ac_cv_path_EGREP+:} false; then :
12088  $as_echo_n "(cached) " >&6
12089else
12090  case $EGREP in
12091  [\\/]* | ?:[\\/]*)
12092  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12093  ;;
12094  *)
12095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12096for as_dir in $PATH
12097do
12098  IFS=$as_save_IFS
12099  test -z "$as_dir" && as_dir=.
12100    for ac_exec_ext in '' $ac_executable_extensions; do
12101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12102    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12104    break 2
12105  fi
12106done
12107  done
12108IFS=$as_save_IFS
12109
12110  ;;
12111esac
12112fi
12113EGREP=$ac_cv_path_EGREP
12114if test -n "$EGREP"; then
12115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12116$as_echo "$EGREP" >&6; }
12117else
12118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
12120fi
12121
12122
12123        if test "x$EGREP" = x; then
12124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12125        fi
12126      else
12127        # Otherwise we believe it is a complete path. Use it as it is.
12128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12129$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12131$as_echo_n "checking for EGREP... " >&6; }
12132        if test ! -x "$tool_specified"; then
12133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12134$as_echo "not found" >&6; }
12135          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12136        fi
12137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12138$as_echo "$tool_specified" >&6; }
12139      fi
12140    fi
12141  fi
12142
12143
12144  if test "x$EGREP" = x; then
12145    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12146  fi
12147
12148
12149
12150
12151  # Publish this variable in the help.
12152
12153
12154  if test "x$FGREP" = x; then
12155    # The variable is not set by user, try to locate tool using the code snippet
12156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12157$as_echo_n "checking for fgrep... " >&6; }
12158if ${ac_cv_path_FGREP+:} false; then :
12159  $as_echo_n "(cached) " >&6
12160else
12161  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12162   then ac_cv_path_FGREP="$GREP -F"
12163   else
12164     if test -z "$FGREP"; then
12165  ac_path_FGREP_found=false
12166  # Loop through the user's path and test for each of PROGNAME-LIST
12167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12168for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12169do
12170  IFS=$as_save_IFS
12171  test -z "$as_dir" && as_dir=.
12172    for ac_prog in fgrep; do
12173    for ac_exec_ext in '' $ac_executable_extensions; do
12174      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12175      as_fn_executable_p "$ac_path_FGREP" || continue
12176# Check for GNU ac_path_FGREP and select it if it is found.
12177  # Check for GNU $ac_path_FGREP
12178case `"$ac_path_FGREP" --version 2>&1` in
12179*GNU*)
12180  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12181*)
12182  ac_count=0
12183  $as_echo_n 0123456789 >"conftest.in"
12184  while :
12185  do
12186    cat "conftest.in" "conftest.in" >"conftest.tmp"
12187    mv "conftest.tmp" "conftest.in"
12188    cp "conftest.in" "conftest.nl"
12189    $as_echo 'FGREP' >> "conftest.nl"
12190    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12191    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12192    as_fn_arith $ac_count + 1 && ac_count=$as_val
12193    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12194      # Best one so far, save it but keep looking for a better one
12195      ac_cv_path_FGREP="$ac_path_FGREP"
12196      ac_path_FGREP_max=$ac_count
12197    fi
12198    # 10*(2^10) chars as input seems more than enough
12199    test $ac_count -gt 10 && break
12200  done
12201  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12202esac
12203
12204      $ac_path_FGREP_found && break 3
12205    done
12206  done
12207  done
12208IFS=$as_save_IFS
12209  if test -z "$ac_cv_path_FGREP"; then
12210    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12211  fi
12212else
12213  ac_cv_path_FGREP=$FGREP
12214fi
12215
12216   fi
12217fi
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12219$as_echo "$ac_cv_path_FGREP" >&6; }
12220 FGREP="$ac_cv_path_FGREP"
12221
12222
12223  else
12224    # The variable is set, but is it from the command line or the environment?
12225
12226    # Try to remove the string !FGREP! from our list.
12227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12229      # If it failed, the variable was not from the command line. Ignore it,
12230      # but warn the user (except for BASH, which is always set by the calling BASH).
12231      if test "xFGREP" != xBASH; then
12232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12233$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12234      fi
12235      # Try to locate tool using the code snippet
12236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12237$as_echo_n "checking for fgrep... " >&6; }
12238if ${ac_cv_path_FGREP+:} false; then :
12239  $as_echo_n "(cached) " >&6
12240else
12241  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12242   then ac_cv_path_FGREP="$GREP -F"
12243   else
12244     if test -z "$FGREP"; then
12245  ac_path_FGREP_found=false
12246  # Loop through the user's path and test for each of PROGNAME-LIST
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_prog in fgrep; do
12253    for ac_exec_ext in '' $ac_executable_extensions; do
12254      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12255      as_fn_executable_p "$ac_path_FGREP" || continue
12256# Check for GNU ac_path_FGREP and select it if it is found.
12257  # Check for GNU $ac_path_FGREP
12258case `"$ac_path_FGREP" --version 2>&1` in
12259*GNU*)
12260  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12261*)
12262  ac_count=0
12263  $as_echo_n 0123456789 >"conftest.in"
12264  while :
12265  do
12266    cat "conftest.in" "conftest.in" >"conftest.tmp"
12267    mv "conftest.tmp" "conftest.in"
12268    cp "conftest.in" "conftest.nl"
12269    $as_echo 'FGREP' >> "conftest.nl"
12270    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12272    as_fn_arith $ac_count + 1 && ac_count=$as_val
12273    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12274      # Best one so far, save it but keep looking for a better one
12275      ac_cv_path_FGREP="$ac_path_FGREP"
12276      ac_path_FGREP_max=$ac_count
12277    fi
12278    # 10*(2^10) chars as input seems more than enough
12279    test $ac_count -gt 10 && break
12280  done
12281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12282esac
12283
12284      $ac_path_FGREP_found && break 3
12285    done
12286  done
12287  done
12288IFS=$as_save_IFS
12289  if test -z "$ac_cv_path_FGREP"; then
12290    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12291  fi
12292else
12293  ac_cv_path_FGREP=$FGREP
12294fi
12295
12296   fi
12297fi
12298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12299$as_echo "$ac_cv_path_FGREP" >&6; }
12300 FGREP="$ac_cv_path_FGREP"
12301
12302
12303    else
12304      # If it succeeded, then it was overridden by the user. We will use it
12305      # for the tool.
12306
12307      # First remove it from the list of overridden variables, so we can test
12308      # for unknown variables in the end.
12309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12310
12311      # Check if the provided tool contains a complete path.
12312      tool_specified="$FGREP"
12313      tool_basename="${tool_specified##*/}"
12314      if test "x$tool_basename" = "x$tool_specified"; then
12315        # A command without a complete path is provided, search $PATH.
12316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12317$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12318        # Extract the first word of "$tool_basename", so it can be a program name with args.
12319set dummy $tool_basename; ac_word=$2
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12321$as_echo_n "checking for $ac_word... " >&6; }
12322if ${ac_cv_path_FGREP+:} false; then :
12323  $as_echo_n "(cached) " >&6
12324else
12325  case $FGREP in
12326  [\\/]* | ?:[\\/]*)
12327  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12328  ;;
12329  *)
12330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12331for as_dir in $PATH
12332do
12333  IFS=$as_save_IFS
12334  test -z "$as_dir" && as_dir=.
12335    for ac_exec_ext in '' $ac_executable_extensions; do
12336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12337    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12339    break 2
12340  fi
12341done
12342  done
12343IFS=$as_save_IFS
12344
12345  ;;
12346esac
12347fi
12348FGREP=$ac_cv_path_FGREP
12349if test -n "$FGREP"; then
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12351$as_echo "$FGREP" >&6; }
12352else
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
12355fi
12356
12357
12358        if test "x$FGREP" = x; then
12359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12360        fi
12361      else
12362        # Otherwise we believe it is a complete path. Use it as it is.
12363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12364$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12366$as_echo_n "checking for FGREP... " >&6; }
12367        if test ! -x "$tool_specified"; then
12368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12369$as_echo "not found" >&6; }
12370          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12371        fi
12372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12373$as_echo "$tool_specified" >&6; }
12374      fi
12375    fi
12376  fi
12377
12378
12379  if test "x$FGREP" = x; then
12380    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12381  fi
12382
12383
12384
12385
12386  # Publish this variable in the help.
12387
12388
12389  if test "x$SED" = x; then
12390    # The variable is not set by user, try to locate tool using the code snippet
12391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12392$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12393if ${ac_cv_path_SED+:} false; then :
12394  $as_echo_n "(cached) " >&6
12395else
12396            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12397     for ac_i in 1 2 3 4 5 6 7; do
12398       ac_script="$ac_script$as_nl$ac_script"
12399     done
12400     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12401     { ac_script=; unset ac_script;}
12402     if test -z "$SED"; then
12403  ac_path_SED_found=false
12404  # Loop through the user's path and test for each of PROGNAME-LIST
12405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12406for as_dir in $PATH
12407do
12408  IFS=$as_save_IFS
12409  test -z "$as_dir" && as_dir=.
12410    for ac_prog in sed gsed; do
12411    for ac_exec_ext in '' $ac_executable_extensions; do
12412      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12413      as_fn_executable_p "$ac_path_SED" || continue
12414# Check for GNU ac_path_SED and select it if it is found.
12415  # Check for GNU $ac_path_SED
12416case `"$ac_path_SED" --version 2>&1` in
12417*GNU*)
12418  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12419*)
12420  ac_count=0
12421  $as_echo_n 0123456789 >"conftest.in"
12422  while :
12423  do
12424    cat "conftest.in" "conftest.in" >"conftest.tmp"
12425    mv "conftest.tmp" "conftest.in"
12426    cp "conftest.in" "conftest.nl"
12427    $as_echo '' >> "conftest.nl"
12428    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12429    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12430    as_fn_arith $ac_count + 1 && ac_count=$as_val
12431    if test $ac_count -gt ${ac_path_SED_max-0}; then
12432      # Best one so far, save it but keep looking for a better one
12433      ac_cv_path_SED="$ac_path_SED"
12434      ac_path_SED_max=$ac_count
12435    fi
12436    # 10*(2^10) chars as input seems more than enough
12437    test $ac_count -gt 10 && break
12438  done
12439  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12440esac
12441
12442      $ac_path_SED_found && break 3
12443    done
12444  done
12445  done
12446IFS=$as_save_IFS
12447  if test -z "$ac_cv_path_SED"; then
12448    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12449  fi
12450else
12451  ac_cv_path_SED=$SED
12452fi
12453
12454fi
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12456$as_echo "$ac_cv_path_SED" >&6; }
12457 SED="$ac_cv_path_SED"
12458  rm -f conftest.sed
12459
12460  else
12461    # The variable is set, but is it from the command line or the environment?
12462
12463    # Try to remove the string !SED! from our list.
12464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12466      # If it failed, the variable was not from the command line. Ignore it,
12467      # but warn the user (except for BASH, which is always set by the calling BASH).
12468      if test "xSED" != xBASH; then
12469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12470$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12471      fi
12472      # Try to locate tool using the code snippet
12473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12474$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12475if ${ac_cv_path_SED+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12479     for ac_i in 1 2 3 4 5 6 7; do
12480       ac_script="$ac_script$as_nl$ac_script"
12481     done
12482     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12483     { ac_script=; unset ac_script;}
12484     if test -z "$SED"; then
12485  ac_path_SED_found=false
12486  # Loop through the user's path and test for each of PROGNAME-LIST
12487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12488for as_dir in $PATH
12489do
12490  IFS=$as_save_IFS
12491  test -z "$as_dir" && as_dir=.
12492    for ac_prog in sed gsed; do
12493    for ac_exec_ext in '' $ac_executable_extensions; do
12494      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12495      as_fn_executable_p "$ac_path_SED" || continue
12496# Check for GNU ac_path_SED and select it if it is found.
12497  # Check for GNU $ac_path_SED
12498case `"$ac_path_SED" --version 2>&1` in
12499*GNU*)
12500  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12501*)
12502  ac_count=0
12503  $as_echo_n 0123456789 >"conftest.in"
12504  while :
12505  do
12506    cat "conftest.in" "conftest.in" >"conftest.tmp"
12507    mv "conftest.tmp" "conftest.in"
12508    cp "conftest.in" "conftest.nl"
12509    $as_echo '' >> "conftest.nl"
12510    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12511    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12512    as_fn_arith $ac_count + 1 && ac_count=$as_val
12513    if test $ac_count -gt ${ac_path_SED_max-0}; then
12514      # Best one so far, save it but keep looking for a better one
12515      ac_cv_path_SED="$ac_path_SED"
12516      ac_path_SED_max=$ac_count
12517    fi
12518    # 10*(2^10) chars as input seems more than enough
12519    test $ac_count -gt 10 && break
12520  done
12521  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12522esac
12523
12524      $ac_path_SED_found && break 3
12525    done
12526  done
12527  done
12528IFS=$as_save_IFS
12529  if test -z "$ac_cv_path_SED"; then
12530    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12531  fi
12532else
12533  ac_cv_path_SED=$SED
12534fi
12535
12536fi
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12538$as_echo "$ac_cv_path_SED" >&6; }
12539 SED="$ac_cv_path_SED"
12540  rm -f conftest.sed
12541
12542    else
12543      # If it succeeded, then it was overridden by the user. We will use it
12544      # for the tool.
12545
12546      # First remove it from the list of overridden variables, so we can test
12547      # for unknown variables in the end.
12548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12549
12550      # Check if the provided tool contains a complete path.
12551      tool_specified="$SED"
12552      tool_basename="${tool_specified##*/}"
12553      if test "x$tool_basename" = "x$tool_specified"; then
12554        # A command without a complete path is provided, search $PATH.
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12556$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12557        # Extract the first word of "$tool_basename", so it can be a program name with args.
12558set dummy $tool_basename; ac_word=$2
12559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12560$as_echo_n "checking for $ac_word... " >&6; }
12561if ${ac_cv_path_SED+:} false; then :
12562  $as_echo_n "(cached) " >&6
12563else
12564  case $SED in
12565  [\\/]* | ?:[\\/]*)
12566  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12567  ;;
12568  *)
12569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12570for as_dir in $PATH
12571do
12572  IFS=$as_save_IFS
12573  test -z "$as_dir" && as_dir=.
12574    for ac_exec_ext in '' $ac_executable_extensions; do
12575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12576    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12578    break 2
12579  fi
12580done
12581  done
12582IFS=$as_save_IFS
12583
12584  ;;
12585esac
12586fi
12587SED=$ac_cv_path_SED
12588if test -n "$SED"; then
12589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12590$as_echo "$SED" >&6; }
12591else
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12593$as_echo "no" >&6; }
12594fi
12595
12596
12597        if test "x$SED" = x; then
12598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12599        fi
12600      else
12601        # Otherwise we believe it is a complete path. Use it as it is.
12602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12603$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12605$as_echo_n "checking for SED... " >&6; }
12606        if test ! -x "$tool_specified"; then
12607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12608$as_echo "not found" >&6; }
12609          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12610        fi
12611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12612$as_echo "$tool_specified" >&6; }
12613      fi
12614    fi
12615  fi
12616
12617
12618  if test "x$SED" = x; then
12619    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12620  fi
12621
12622
12623
12624  # Always force rm.
12625  RM="$RM -f"
12626
12627  # pwd behaves differently on various platforms and some don't support the -L flag.
12628  # Always use the bash builtin pwd to get uniform behavior.
12629  THEPWDCMD=pwd
12630
12631  # These are not required on all platforms
12632
12633
12634  # Publish this variable in the help.
12635
12636
12637  if test "x$CYGPATH" = x; then
12638    # The variable is not set by user, try to locate tool using the code snippet
12639    for ac_prog in cygpath
12640do
12641  # Extract the first word of "$ac_prog", so it can be a program name with args.
12642set dummy $ac_prog; ac_word=$2
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12644$as_echo_n "checking for $ac_word... " >&6; }
12645if ${ac_cv_path_CYGPATH+:} false; then :
12646  $as_echo_n "(cached) " >&6
12647else
12648  case $CYGPATH in
12649  [\\/]* | ?:[\\/]*)
12650  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12651  ;;
12652  *)
12653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12654for as_dir in $PATH
12655do
12656  IFS=$as_save_IFS
12657  test -z "$as_dir" && as_dir=.
12658    for ac_exec_ext in '' $ac_executable_extensions; do
12659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12660    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12662    break 2
12663  fi
12664done
12665  done
12666IFS=$as_save_IFS
12667
12668  ;;
12669esac
12670fi
12671CYGPATH=$ac_cv_path_CYGPATH
12672if test -n "$CYGPATH"; then
12673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12674$as_echo "$CYGPATH" >&6; }
12675else
12676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12677$as_echo "no" >&6; }
12678fi
12679
12680
12681  test -n "$CYGPATH" && break
12682done
12683
12684  else
12685    # The variable is set, but is it from the command line or the environment?
12686
12687    # Try to remove the string !CYGPATH! from our list.
12688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12690      # If it failed, the variable was not from the command line. Ignore it,
12691      # but warn the user (except for BASH, which is always set by the calling BASH).
12692      if test "xCYGPATH" != xBASH; then
12693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12694$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12695      fi
12696      # Try to locate tool using the code snippet
12697      for ac_prog in cygpath
12698do
12699  # Extract the first word of "$ac_prog", so it can be a program name with args.
12700set dummy $ac_prog; ac_word=$2
12701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12702$as_echo_n "checking for $ac_word... " >&6; }
12703if ${ac_cv_path_CYGPATH+:} false; then :
12704  $as_echo_n "(cached) " >&6
12705else
12706  case $CYGPATH in
12707  [\\/]* | ?:[\\/]*)
12708  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12709  ;;
12710  *)
12711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12712for as_dir in $PATH
12713do
12714  IFS=$as_save_IFS
12715  test -z "$as_dir" && as_dir=.
12716    for ac_exec_ext in '' $ac_executable_extensions; do
12717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12718    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12720    break 2
12721  fi
12722done
12723  done
12724IFS=$as_save_IFS
12725
12726  ;;
12727esac
12728fi
12729CYGPATH=$ac_cv_path_CYGPATH
12730if test -n "$CYGPATH"; then
12731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12732$as_echo "$CYGPATH" >&6; }
12733else
12734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12735$as_echo "no" >&6; }
12736fi
12737
12738
12739  test -n "$CYGPATH" && break
12740done
12741
12742    else
12743      # If it succeeded, then it was overridden by the user. We will use it
12744      # for the tool.
12745
12746      # First remove it from the list of overridden variables, so we can test
12747      # for unknown variables in the end.
12748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12749
12750      # Check if the provided tool contains a complete path.
12751      tool_specified="$CYGPATH"
12752      tool_basename="${tool_specified##*/}"
12753      if test "x$tool_basename" = "x$tool_specified"; then
12754        # A command without a complete path is provided, search $PATH.
12755        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12756$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12757        # Extract the first word of "$tool_basename", so it can be a program name with args.
12758set dummy $tool_basename; ac_word=$2
12759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12760$as_echo_n "checking for $ac_word... " >&6; }
12761if ${ac_cv_path_CYGPATH+:} false; then :
12762  $as_echo_n "(cached) " >&6
12763else
12764  case $CYGPATH in
12765  [\\/]* | ?:[\\/]*)
12766  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12767  ;;
12768  *)
12769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12770for as_dir in $PATH
12771do
12772  IFS=$as_save_IFS
12773  test -z "$as_dir" && as_dir=.
12774    for ac_exec_ext in '' $ac_executable_extensions; do
12775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12776    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12778    break 2
12779  fi
12780done
12781  done
12782IFS=$as_save_IFS
12783
12784  ;;
12785esac
12786fi
12787CYGPATH=$ac_cv_path_CYGPATH
12788if test -n "$CYGPATH"; then
12789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12790$as_echo "$CYGPATH" >&6; }
12791else
12792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12793$as_echo "no" >&6; }
12794fi
12795
12796
12797        if test "x$CYGPATH" = x; then
12798          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12799        fi
12800      else
12801        # Otherwise we believe it is a complete path. Use it as it is.
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12803$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12805$as_echo_n "checking for CYGPATH... " >&6; }
12806        if test ! -x "$tool_specified"; then
12807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12808$as_echo "not found" >&6; }
12809          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12810        fi
12811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12812$as_echo "$tool_specified" >&6; }
12813      fi
12814    fi
12815  fi
12816
12817
12818
12819
12820  # Publish this variable in the help.
12821
12822
12823  if test "x$READLINK" = x; then
12824    # The variable is not set by user, try to locate tool using the code snippet
12825    for ac_prog in greadlink readlink
12826do
12827  # Extract the first word of "$ac_prog", so it can be a program name with args.
12828set dummy $ac_prog; ac_word=$2
12829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12830$as_echo_n "checking for $ac_word... " >&6; }
12831if ${ac_cv_path_READLINK+:} false; then :
12832  $as_echo_n "(cached) " >&6
12833else
12834  case $READLINK in
12835  [\\/]* | ?:[\\/]*)
12836  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12837  ;;
12838  *)
12839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12840for as_dir in $PATH
12841do
12842  IFS=$as_save_IFS
12843  test -z "$as_dir" && as_dir=.
12844    for ac_exec_ext in '' $ac_executable_extensions; do
12845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12846    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12848    break 2
12849  fi
12850done
12851  done
12852IFS=$as_save_IFS
12853
12854  ;;
12855esac
12856fi
12857READLINK=$ac_cv_path_READLINK
12858if test -n "$READLINK"; then
12859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12860$as_echo "$READLINK" >&6; }
12861else
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12863$as_echo "no" >&6; }
12864fi
12865
12866
12867  test -n "$READLINK" && break
12868done
12869
12870  else
12871    # The variable is set, but is it from the command line or the environment?
12872
12873    # Try to remove the string !READLINK! from our list.
12874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12876      # If it failed, the variable was not from the command line. Ignore it,
12877      # but warn the user (except for BASH, which is always set by the calling BASH).
12878      if test "xREADLINK" != xBASH; then
12879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12880$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12881      fi
12882      # Try to locate tool using the code snippet
12883      for ac_prog in greadlink readlink
12884do
12885  # Extract the first word of "$ac_prog", so it can be a program name with args.
12886set dummy $ac_prog; ac_word=$2
12887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12888$as_echo_n "checking for $ac_word... " >&6; }
12889if ${ac_cv_path_READLINK+:} false; then :
12890  $as_echo_n "(cached) " >&6
12891else
12892  case $READLINK in
12893  [\\/]* | ?:[\\/]*)
12894  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12895  ;;
12896  *)
12897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12898for as_dir in $PATH
12899do
12900  IFS=$as_save_IFS
12901  test -z "$as_dir" && as_dir=.
12902    for ac_exec_ext in '' $ac_executable_extensions; do
12903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12904    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12906    break 2
12907  fi
12908done
12909  done
12910IFS=$as_save_IFS
12911
12912  ;;
12913esac
12914fi
12915READLINK=$ac_cv_path_READLINK
12916if test -n "$READLINK"; then
12917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12918$as_echo "$READLINK" >&6; }
12919else
12920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12921$as_echo "no" >&6; }
12922fi
12923
12924
12925  test -n "$READLINK" && break
12926done
12927
12928    else
12929      # If it succeeded, then it was overridden by the user. We will use it
12930      # for the tool.
12931
12932      # First remove it from the list of overridden variables, so we can test
12933      # for unknown variables in the end.
12934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12935
12936      # Check if the provided tool contains a complete path.
12937      tool_specified="$READLINK"
12938      tool_basename="${tool_specified##*/}"
12939      if test "x$tool_basename" = "x$tool_specified"; then
12940        # A command without a complete path is provided, search $PATH.
12941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12942$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12943        # Extract the first word of "$tool_basename", so it can be a program name with args.
12944set dummy $tool_basename; ac_word=$2
12945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12946$as_echo_n "checking for $ac_word... " >&6; }
12947if ${ac_cv_path_READLINK+:} false; then :
12948  $as_echo_n "(cached) " >&6
12949else
12950  case $READLINK in
12951  [\\/]* | ?:[\\/]*)
12952  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12953  ;;
12954  *)
12955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12956for as_dir in $PATH
12957do
12958  IFS=$as_save_IFS
12959  test -z "$as_dir" && as_dir=.
12960    for ac_exec_ext in '' $ac_executable_extensions; do
12961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12962    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12964    break 2
12965  fi
12966done
12967  done
12968IFS=$as_save_IFS
12969
12970  ;;
12971esac
12972fi
12973READLINK=$ac_cv_path_READLINK
12974if test -n "$READLINK"; then
12975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12976$as_echo "$READLINK" >&6; }
12977else
12978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12979$as_echo "no" >&6; }
12980fi
12981
12982
12983        if test "x$READLINK" = x; then
12984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12985        fi
12986      else
12987        # Otherwise we believe it is a complete path. Use it as it is.
12988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12989$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12991$as_echo_n "checking for READLINK... " >&6; }
12992        if test ! -x "$tool_specified"; then
12993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12994$as_echo "not found" >&6; }
12995          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12996        fi
12997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12998$as_echo "$tool_specified" >&6; }
12999      fi
13000    fi
13001  fi
13002
13003
13004
13005
13006  # Publish this variable in the help.
13007
13008
13009  if test "x$DF" = x; then
13010    # The variable is not set by user, try to locate tool using the code snippet
13011    for ac_prog in df
13012do
13013  # Extract the first word of "$ac_prog", so it can be a program name with args.
13014set dummy $ac_prog; ac_word=$2
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13016$as_echo_n "checking for $ac_word... " >&6; }
13017if ${ac_cv_path_DF+:} false; then :
13018  $as_echo_n "(cached) " >&6
13019else
13020  case $DF in
13021  [\\/]* | ?:[\\/]*)
13022  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13023  ;;
13024  *)
13025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13026for as_dir in $PATH
13027do
13028  IFS=$as_save_IFS
13029  test -z "$as_dir" && as_dir=.
13030    for ac_exec_ext in '' $ac_executable_extensions; do
13031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13032    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13034    break 2
13035  fi
13036done
13037  done
13038IFS=$as_save_IFS
13039
13040  ;;
13041esac
13042fi
13043DF=$ac_cv_path_DF
13044if test -n "$DF"; then
13045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13046$as_echo "$DF" >&6; }
13047else
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13049$as_echo "no" >&6; }
13050fi
13051
13052
13053  test -n "$DF" && break
13054done
13055
13056  else
13057    # The variable is set, but is it from the command line or the environment?
13058
13059    # Try to remove the string !DF! from our list.
13060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13062      # If it failed, the variable was not from the command line. Ignore it,
13063      # but warn the user (except for BASH, which is always set by the calling BASH).
13064      if test "xDF" != xBASH; then
13065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13066$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13067      fi
13068      # Try to locate tool using the code snippet
13069      for ac_prog in df
13070do
13071  # Extract the first word of "$ac_prog", so it can be a program name with args.
13072set dummy $ac_prog; ac_word=$2
13073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13074$as_echo_n "checking for $ac_word... " >&6; }
13075if ${ac_cv_path_DF+:} false; then :
13076  $as_echo_n "(cached) " >&6
13077else
13078  case $DF in
13079  [\\/]* | ?:[\\/]*)
13080  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13081  ;;
13082  *)
13083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13084for as_dir in $PATH
13085do
13086  IFS=$as_save_IFS
13087  test -z "$as_dir" && as_dir=.
13088    for ac_exec_ext in '' $ac_executable_extensions; do
13089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13090    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13092    break 2
13093  fi
13094done
13095  done
13096IFS=$as_save_IFS
13097
13098  ;;
13099esac
13100fi
13101DF=$ac_cv_path_DF
13102if test -n "$DF"; then
13103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13104$as_echo "$DF" >&6; }
13105else
13106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13107$as_echo "no" >&6; }
13108fi
13109
13110
13111  test -n "$DF" && break
13112done
13113
13114    else
13115      # If it succeeded, then it was overridden by the user. We will use it
13116      # for the tool.
13117
13118      # First remove it from the list of overridden variables, so we can test
13119      # for unknown variables in the end.
13120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13121
13122      # Check if the provided tool contains a complete path.
13123      tool_specified="$DF"
13124      tool_basename="${tool_specified##*/}"
13125      if test "x$tool_basename" = "x$tool_specified"; then
13126        # A command without a complete path is provided, search $PATH.
13127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13128$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13129        # Extract the first word of "$tool_basename", so it can be a program name with args.
13130set dummy $tool_basename; ac_word=$2
13131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13132$as_echo_n "checking for $ac_word... " >&6; }
13133if ${ac_cv_path_DF+:} false; then :
13134  $as_echo_n "(cached) " >&6
13135else
13136  case $DF in
13137  [\\/]* | ?:[\\/]*)
13138  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13139  ;;
13140  *)
13141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13142for as_dir in $PATH
13143do
13144  IFS=$as_save_IFS
13145  test -z "$as_dir" && as_dir=.
13146    for ac_exec_ext in '' $ac_executable_extensions; do
13147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13148    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13150    break 2
13151  fi
13152done
13153  done
13154IFS=$as_save_IFS
13155
13156  ;;
13157esac
13158fi
13159DF=$ac_cv_path_DF
13160if test -n "$DF"; then
13161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13162$as_echo "$DF" >&6; }
13163else
13164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13165$as_echo "no" >&6; }
13166fi
13167
13168
13169        if test "x$DF" = x; then
13170          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13171        fi
13172      else
13173        # Otherwise we believe it is a complete path. Use it as it is.
13174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13175$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13177$as_echo_n "checking for DF... " >&6; }
13178        if test ! -x "$tool_specified"; then
13179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13180$as_echo "not found" >&6; }
13181          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13182        fi
13183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13184$as_echo "$tool_specified" >&6; }
13185      fi
13186    fi
13187  fi
13188
13189
13190
13191
13192  # Publish this variable in the help.
13193
13194
13195  if test "x$SETFILE" = x; then
13196    # The variable is not set by user, try to locate tool using the code snippet
13197    for ac_prog in SetFile
13198do
13199  # Extract the first word of "$ac_prog", so it can be a program name with args.
13200set dummy $ac_prog; ac_word=$2
13201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13202$as_echo_n "checking for $ac_word... " >&6; }
13203if ${ac_cv_path_SETFILE+:} false; then :
13204  $as_echo_n "(cached) " >&6
13205else
13206  case $SETFILE in
13207  [\\/]* | ?:[\\/]*)
13208  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13209  ;;
13210  *)
13211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13212for as_dir in $PATH
13213do
13214  IFS=$as_save_IFS
13215  test -z "$as_dir" && as_dir=.
13216    for ac_exec_ext in '' $ac_executable_extensions; do
13217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13218    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13220    break 2
13221  fi
13222done
13223  done
13224IFS=$as_save_IFS
13225
13226  ;;
13227esac
13228fi
13229SETFILE=$ac_cv_path_SETFILE
13230if test -n "$SETFILE"; then
13231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13232$as_echo "$SETFILE" >&6; }
13233else
13234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13235$as_echo "no" >&6; }
13236fi
13237
13238
13239  test -n "$SETFILE" && break
13240done
13241
13242  else
13243    # The variable is set, but is it from the command line or the environment?
13244
13245    # Try to remove the string !SETFILE! from our list.
13246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13248      # If it failed, the variable was not from the command line. Ignore it,
13249      # but warn the user (except for BASH, which is always set by the calling BASH).
13250      if test "xSETFILE" != xBASH; then
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13252$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13253      fi
13254      # Try to locate tool using the code snippet
13255      for ac_prog in SetFile
13256do
13257  # Extract the first word of "$ac_prog", so it can be a program name with args.
13258set dummy $ac_prog; ac_word=$2
13259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13260$as_echo_n "checking for $ac_word... " >&6; }
13261if ${ac_cv_path_SETFILE+:} false; then :
13262  $as_echo_n "(cached) " >&6
13263else
13264  case $SETFILE in
13265  [\\/]* | ?:[\\/]*)
13266  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13267  ;;
13268  *)
13269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13270for as_dir in $PATH
13271do
13272  IFS=$as_save_IFS
13273  test -z "$as_dir" && as_dir=.
13274    for ac_exec_ext in '' $ac_executable_extensions; do
13275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13276    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13278    break 2
13279  fi
13280done
13281  done
13282IFS=$as_save_IFS
13283
13284  ;;
13285esac
13286fi
13287SETFILE=$ac_cv_path_SETFILE
13288if test -n "$SETFILE"; then
13289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13290$as_echo "$SETFILE" >&6; }
13291else
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13293$as_echo "no" >&6; }
13294fi
13295
13296
13297  test -n "$SETFILE" && break
13298done
13299
13300    else
13301      # If it succeeded, then it was overridden by the user. We will use it
13302      # for the tool.
13303
13304      # First remove it from the list of overridden variables, so we can test
13305      # for unknown variables in the end.
13306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13307
13308      # Check if the provided tool contains a complete path.
13309      tool_specified="$SETFILE"
13310      tool_basename="${tool_specified##*/}"
13311      if test "x$tool_basename" = "x$tool_specified"; then
13312        # A command without a complete path is provided, search $PATH.
13313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13314$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13315        # Extract the first word of "$tool_basename", so it can be a program name with args.
13316set dummy $tool_basename; ac_word=$2
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13318$as_echo_n "checking for $ac_word... " >&6; }
13319if ${ac_cv_path_SETFILE+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  case $SETFILE in
13323  [\\/]* | ?:[\\/]*)
13324  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13325  ;;
13326  *)
13327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13328for as_dir in $PATH
13329do
13330  IFS=$as_save_IFS
13331  test -z "$as_dir" && as_dir=.
13332    for ac_exec_ext in '' $ac_executable_extensions; do
13333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13334    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13336    break 2
13337  fi
13338done
13339  done
13340IFS=$as_save_IFS
13341
13342  ;;
13343esac
13344fi
13345SETFILE=$ac_cv_path_SETFILE
13346if test -n "$SETFILE"; then
13347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13348$as_echo "$SETFILE" >&6; }
13349else
13350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13351$as_echo "no" >&6; }
13352fi
13353
13354
13355        if test "x$SETFILE" = x; then
13356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13357        fi
13358      else
13359        # Otherwise we believe it is a complete path. Use it as it is.
13360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13361$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13363$as_echo_n "checking for SETFILE... " >&6; }
13364        if test ! -x "$tool_specified"; then
13365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13366$as_echo "not found" >&6; }
13367          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13368        fi
13369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13370$as_echo "$tool_specified" >&6; }
13371      fi
13372    fi
13373  fi
13374
13375
13376
13377
13378# Now we can determine OpenJDK build and target platforms. This is required to
13379# have early on.
13380# Make sure we can run config.sub.
13381$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13382  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13383
13384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13385$as_echo_n "checking build system type... " >&6; }
13386if ${ac_cv_build+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389  ac_build_alias=$build_alias
13390test "x$ac_build_alias" = x &&
13391  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13392test "x$ac_build_alias" = x &&
13393  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13394ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13395  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13396
13397fi
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13399$as_echo "$ac_cv_build" >&6; }
13400case $ac_cv_build in
13401*-*-*) ;;
13402*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13403esac
13404build=$ac_cv_build
13405ac_save_IFS=$IFS; IFS='-'
13406set x $ac_cv_build
13407shift
13408build_cpu=$1
13409build_vendor=$2
13410shift; shift
13411# Remember, the first character of IFS is used to create $*,
13412# except with old shells:
13413build_os=$*
13414IFS=$ac_save_IFS
13415case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13416
13417
13418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13419$as_echo_n "checking host system type... " >&6; }
13420if ${ac_cv_host+:} false; then :
13421  $as_echo_n "(cached) " >&6
13422else
13423  if test "x$host_alias" = x; then
13424  ac_cv_host=$ac_cv_build
13425else
13426  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13427    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13428fi
13429
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13432$as_echo "$ac_cv_host" >&6; }
13433case $ac_cv_host in
13434*-*-*) ;;
13435*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13436esac
13437host=$ac_cv_host
13438ac_save_IFS=$IFS; IFS='-'
13439set x $ac_cv_host
13440shift
13441host_cpu=$1
13442host_vendor=$2
13443shift; shift
13444# Remember, the first character of IFS is used to create $*,
13445# except with old shells:
13446host_os=$*
13447IFS=$ac_save_IFS
13448case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13449
13450
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13452$as_echo_n "checking target system type... " >&6; }
13453if ${ac_cv_target+:} false; then :
13454  $as_echo_n "(cached) " >&6
13455else
13456  if test "x$target_alias" = x; then
13457  ac_cv_target=$ac_cv_host
13458else
13459  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13460    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13461fi
13462
13463fi
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13465$as_echo "$ac_cv_target" >&6; }
13466case $ac_cv_target in
13467*-*-*) ;;
13468*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13469esac
13470target=$ac_cv_target
13471ac_save_IFS=$IFS; IFS='-'
13472set x $ac_cv_target
13473shift
13474target_cpu=$1
13475target_vendor=$2
13476shift; shift
13477# Remember, the first character of IFS is used to create $*,
13478# except with old shells:
13479target_os=$*
13480IFS=$ac_save_IFS
13481case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13482
13483
13484# The aliases save the names the user supplied, while $host etc.
13485# will get canonicalized.
13486test -n "$target_alias" &&
13487  test "$program_prefix$program_suffix$program_transform_name" = \
13488    NONENONEs,x,x, &&
13489  program_prefix=${target_alias}-
13490
13491  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13492  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13493  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13494  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13495  # to use the configure naming style.
13496
13497
13498
13499
13500
13501  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13502  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13503  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13504  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13505  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13506  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13507
13508
13509
13510  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13511
13512  case "$build_os" in
13513    *linux*)
13514      VAR_OS=linux
13515      VAR_OS_API=posix
13516      VAR_OS_ENV=linux
13517      ;;
13518    *solaris*)
13519      VAR_OS=solaris
13520      VAR_OS_API=posix
13521      VAR_OS_ENV=solaris
13522      ;;
13523    *darwin*)
13524      VAR_OS=macosx
13525      VAR_OS_API=posix
13526      VAR_OS_ENV=macosx
13527      ;;
13528    *bsd*)
13529      VAR_OS=bsd
13530      VAR_OS_API=posix
13531      VAR_OS_ENV=bsd
13532      ;;
13533    *cygwin*)
13534      VAR_OS=windows
13535      VAR_OS_API=winapi
13536      VAR_OS_ENV=windows.cygwin
13537      ;;
13538    *mingw*)
13539      VAR_OS=windows
13540      VAR_OS_API=winapi
13541      VAR_OS_ENV=windows.msys
13542      ;;
13543    *aix*)
13544      VAR_OS=aix
13545      VAR_OS_API=posix
13546      VAR_OS_ENV=aix
13547      ;;
13548    *)
13549      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13550      ;;
13551  esac
13552
13553
13554  # First argument is the cpu name from the trip/quad
13555  case "$build_cpu" in
13556    x86_64)
13557      VAR_CPU=x86_64
13558      VAR_CPU_ARCH=x86
13559      VAR_CPU_BITS=64
13560      VAR_CPU_ENDIAN=little
13561      ;;
13562    i?86)
13563      VAR_CPU=x86
13564      VAR_CPU_ARCH=x86
13565      VAR_CPU_BITS=32
13566      VAR_CPU_ENDIAN=little
13567      ;;
13568    arm*)
13569      VAR_CPU=arm
13570      VAR_CPU_ARCH=arm
13571      VAR_CPU_BITS=32
13572      VAR_CPU_ENDIAN=little
13573      ;;
13574    powerpc)
13575      VAR_CPU=ppc
13576      VAR_CPU_ARCH=ppc
13577      VAR_CPU_BITS=32
13578      VAR_CPU_ENDIAN=big
13579      ;;
13580    powerpc64)
13581      VAR_CPU=ppc64
13582      VAR_CPU_ARCH=ppc
13583      VAR_CPU_BITS=64
13584      VAR_CPU_ENDIAN=big
13585      ;;
13586    powerpc64le)
13587      VAR_CPU=ppc64
13588      VAR_CPU_ARCH=ppc
13589      VAR_CPU_BITS=64
13590      VAR_CPU_ENDIAN=little
13591      ;;
13592    s390)
13593      VAR_CPU=s390
13594      VAR_CPU_ARCH=s390
13595      VAR_CPU_BITS=32
13596      VAR_CPU_ENDIAN=big
13597      ;;
13598    s390x)
13599      VAR_CPU=s390x
13600      VAR_CPU_ARCH=s390
13601      VAR_CPU_BITS=64
13602      VAR_CPU_ENDIAN=big
13603      ;;
13604    sparc)
13605      VAR_CPU=sparc
13606      VAR_CPU_ARCH=sparc
13607      VAR_CPU_BITS=32
13608      VAR_CPU_ENDIAN=big
13609      ;;
13610    sparcv9)
13611      VAR_CPU=sparcv9
13612      VAR_CPU_ARCH=sparc
13613      VAR_CPU_BITS=64
13614      VAR_CPU_ENDIAN=big
13615      ;;
13616    *)
13617      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13618      ;;
13619  esac
13620
13621  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13622  OPENJDK_BUILD_OS="$VAR_OS"
13623  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13624  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13625  OPENJDK_BUILD_CPU="$VAR_CPU"
13626  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13627  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13628  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13629
13630
13631
13632
13633
13634
13635
13636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13637$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13639$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13640
13641  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13642
13643  case "$host_os" in
13644    *linux*)
13645      VAR_OS=linux
13646      VAR_OS_API=posix
13647      VAR_OS_ENV=linux
13648      ;;
13649    *solaris*)
13650      VAR_OS=solaris
13651      VAR_OS_API=posix
13652      VAR_OS_ENV=solaris
13653      ;;
13654    *darwin*)
13655      VAR_OS=macosx
13656      VAR_OS_API=posix
13657      VAR_OS_ENV=macosx
13658      ;;
13659    *bsd*)
13660      VAR_OS=bsd
13661      VAR_OS_API=posix
13662      VAR_OS_ENV=bsd
13663      ;;
13664    *cygwin*)
13665      VAR_OS=windows
13666      VAR_OS_API=winapi
13667      VAR_OS_ENV=windows.cygwin
13668      ;;
13669    *mingw*)
13670      VAR_OS=windows
13671      VAR_OS_API=winapi
13672      VAR_OS_ENV=windows.msys
13673      ;;
13674    *aix*)
13675      VAR_OS=aix
13676      VAR_OS_API=posix
13677      VAR_OS_ENV=aix
13678      ;;
13679    *)
13680      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13681      ;;
13682  esac
13683
13684
13685  # First argument is the cpu name from the trip/quad
13686  case "$host_cpu" in
13687    x86_64)
13688      VAR_CPU=x86_64
13689      VAR_CPU_ARCH=x86
13690      VAR_CPU_BITS=64
13691      VAR_CPU_ENDIAN=little
13692      ;;
13693    i?86)
13694      VAR_CPU=x86
13695      VAR_CPU_ARCH=x86
13696      VAR_CPU_BITS=32
13697      VAR_CPU_ENDIAN=little
13698      ;;
13699    arm*)
13700      VAR_CPU=arm
13701      VAR_CPU_ARCH=arm
13702      VAR_CPU_BITS=32
13703      VAR_CPU_ENDIAN=little
13704      ;;
13705    powerpc)
13706      VAR_CPU=ppc
13707      VAR_CPU_ARCH=ppc
13708      VAR_CPU_BITS=32
13709      VAR_CPU_ENDIAN=big
13710      ;;
13711    powerpc64)
13712      VAR_CPU=ppc64
13713      VAR_CPU_ARCH=ppc
13714      VAR_CPU_BITS=64
13715      VAR_CPU_ENDIAN=big
13716      ;;
13717    powerpc64le)
13718      VAR_CPU=ppc64
13719      VAR_CPU_ARCH=ppc
13720      VAR_CPU_BITS=64
13721      VAR_CPU_ENDIAN=little
13722      ;;
13723    s390)
13724      VAR_CPU=s390
13725      VAR_CPU_ARCH=s390
13726      VAR_CPU_BITS=32
13727      VAR_CPU_ENDIAN=big
13728      ;;
13729    s390x)
13730      VAR_CPU=s390x
13731      VAR_CPU_ARCH=s390
13732      VAR_CPU_BITS=64
13733      VAR_CPU_ENDIAN=big
13734      ;;
13735    sparc)
13736      VAR_CPU=sparc
13737      VAR_CPU_ARCH=sparc
13738      VAR_CPU_BITS=32
13739      VAR_CPU_ENDIAN=big
13740      ;;
13741    sparcv9)
13742      VAR_CPU=sparcv9
13743      VAR_CPU_ARCH=sparc
13744      VAR_CPU_BITS=64
13745      VAR_CPU_ENDIAN=big
13746      ;;
13747    *)
13748      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13749      ;;
13750  esac
13751
13752  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13753  OPENJDK_TARGET_OS="$VAR_OS"
13754  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13755  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13756  OPENJDK_TARGET_CPU="$VAR_CPU"
13757  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13758  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13759  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13760
13761
13762
13763
13764
13765
13766
13767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13768$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13770$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13771
13772
13773
13774# Check whether --with-target-bits was given.
13775if test "${with_target_bits+set}" = set; then :
13776  withval=$with_target_bits;
13777fi
13778
13779
13780  # We have three types of compiles:
13781  # native  == normal compilation, target system == build system
13782  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13783  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13784  #
13785  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13786    # We're doing a proper cross-compilation
13787    COMPILE_TYPE="cross"
13788  else
13789    COMPILE_TYPE="native"
13790  fi
13791
13792  if test "x$with_target_bits" != x; then
13793    if test "x$COMPILE_TYPE" = "xcross"; then
13794      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13795    fi
13796
13797    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13798      # A reduced build is requested
13799      COMPILE_TYPE="reduced"
13800      OPENJDK_TARGET_CPU_BITS=32
13801      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13802        OPENJDK_TARGET_CPU=x86
13803      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13804        OPENJDK_TARGET_CPU=sparc
13805      else
13806        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13807      fi
13808    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13809      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
13810    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13811      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13812$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13813    else
13814      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13815    fi
13816  fi
13817
13818
13819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13820$as_echo_n "checking compilation type... " >&6; }
13821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13822$as_echo "$COMPILE_TYPE" >&6; }
13823
13824
13825  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13826    REQUIRED_OS_NAME=SunOS
13827    REQUIRED_OS_VERSION=5.10
13828  fi
13829  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13830    REQUIRED_OS_NAME=Linux
13831    REQUIRED_OS_VERSION=2.6
13832  fi
13833  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13834    REQUIRED_OS_NAME=Windows
13835    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13836      REQUIRED_OS_VERSION=5.2
13837    else
13838      REQUIRED_OS_VERSION=5.1
13839    fi
13840  fi
13841  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13842    REQUIRED_OS_NAME=Darwin
13843    REQUIRED_OS_VERSION=11.2
13844  fi
13845
13846
13847
13848
13849
13850  # Also store the legacy naming of the cpu.
13851  # Ie i586 and amd64 instead of x86 and x86_64
13852  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13853  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13854    OPENJDK_TARGET_CPU_LEGACY="i586"
13855  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13856    # On all platforms except MacOSX replace x86_64 with amd64.
13857    OPENJDK_TARGET_CPU_LEGACY="amd64"
13858  fi
13859
13860
13861  # And the second legacy naming of the cpu.
13862  # Ie i386 and amd64 instead of x86 and x86_64.
13863  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13864  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13865    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13866  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13867    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13868  fi
13869
13870
13871  # This is the name of the cpu (but using i386 and amd64 instead of
13872  # x86 and x86_64, respectively), preceeded by a /, to be used when
13873  # locating libraries. On macosx, it's empty, though.
13874  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13875  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13876    OPENJDK_TARGET_CPU_LIBDIR=""
13877  fi
13878
13879
13880  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13881  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13882  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13883  OPENJDK_TARGET_CPU_ISADIR=""
13884  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13885    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13886      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13887    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13888      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13889    fi
13890  fi
13891
13892
13893  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13894  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13895  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13896    # On linux only, we replace x86 with i386.
13897    OPENJDK_TARGET_CPU_OSARCH="i386"
13898  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13899    # On all platforms except macosx, we replace x86_64 with amd64.
13900    OPENJDK_TARGET_CPU_OSARCH="amd64"
13901  fi
13902
13903
13904  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13905  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13906    OPENJDK_TARGET_CPU_JLI="i386"
13907  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13908    # On all platforms except macosx, we replace x86_64 with amd64.
13909    OPENJDK_TARGET_CPU_JLI="amd64"
13910  fi
13911  # Now setup the -D flags for building libjli.
13912  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13913  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13914    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13915      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13916    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13917      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13918    fi
13919  fi
13920
13921
13922  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13923  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13924    OPENJDK_TARGET_OS_API_DIR="solaris"
13925  fi
13926  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13927    OPENJDK_TARGET_OS_API_DIR="windows"
13928  fi
13929
13930
13931  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13932      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13933  else
13934      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13935  fi
13936
13937
13938  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13939    A_LP64="LP64:="
13940    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13941    # unpack200.exe
13942    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13943      ADD_LP64="-D_LP64=1"
13944    fi
13945  fi
13946  LP64=$A_LP64
13947
13948
13949  if test "x$COMPILE_TYPE" = "xcross"; then
13950    # FIXME: ... or should this include reduced builds..?
13951    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13952  else
13953    DEFINE_CROSS_COMPILE_ARCH=""
13954  fi
13955
13956
13957  # ZERO_ARCHDEF is used to enable architecture-specific code
13958  case "${OPENJDK_TARGET_CPU}" in
13959    ppc*)    ZERO_ARCHDEF=PPC   ;;
13960    s390*)   ZERO_ARCHDEF=S390  ;;
13961    sparc*)  ZERO_ARCHDEF=SPARC ;;
13962    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13963    x86)     ZERO_ARCHDEF=IA32  ;;
13964    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13965  esac
13966
13967
13968
13969
13970# Continue setting up basic stuff. Most remaining code require fundamental tools.
13971
13972  # Save the current directory this script was started from
13973  CURDIR="$PWD"
13974
13975  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13976    PATH_SEP=";"
13977
13978  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13979  if test $SRC_ROOT_LENGTH -gt 100; then
13980    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13981  fi
13982
13983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13985$as_echo_n "checking cygwin release... " >&6; }
13986    CYGWIN_VERSION=`$UNAME -r`
13987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13988$as_echo "$CYGWIN_VERSION" >&6; }
13989    WINDOWS_ENV_VENDOR='cygwin'
13990    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13991
13992    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13993    if test "x$CYGWIN_VERSION_OK" = x; then
13994      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
13995$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
13996      as_fn_error $? "Cannot continue" "$LINENO" 5
13997    fi
13998    if test "x$CYGPATH" = x; then
13999      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14000    fi
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14002$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14003    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14004    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14005    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14006    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14008$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14009    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14010    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14011    if test "x$test_cygdrive_prefix" = x; then
14012      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14013    fi
14014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14016$as_echo_n "checking msys release... " >&6; }
14017    MSYS_VERSION=`$UNAME -r`
14018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14019$as_echo "$MSYS_VERSION" >&6; }
14020
14021    WINDOWS_ENV_VENDOR='msys'
14022    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14023
14024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14025$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14026    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14027    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14028
14029  windows_path="$MSYS_ROOT_PATH"
14030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14031    unix_path=`$CYGPATH -u "$windows_path"`
14032    MSYS_ROOT_PATH="$unix_path"
14033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14035    MSYS_ROOT_PATH="$unix_path"
14036  fi
14037
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14039$as_echo "$MSYS_ROOT_PATH" >&6; }
14040    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14041  else
14042    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14043  fi
14044
14045  # Test if windows or unix (cygwin/msys) find is first in path.
14046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14047$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14048  FIND_BINARY_OUTPUT=`find --version 2>&1`
14049  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14051$as_echo "unix style" >&6; }
14052  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14054$as_echo "Windows" >&6; }
14055    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14056$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14057    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
14058$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14059    as_fn_error $? "Cannot continue" "$LINENO" 5
14060  else
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14062$as_echo "unknown" >&6; }
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14064$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14065  fi
14066
14067  else
14068    PATH_SEP=":"
14069  fi
14070
14071
14072  # We get the top-level directory from the supporting wrappers.
14073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14074$as_echo_n "checking for top-level directory... " >&6; }
14075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14076$as_echo "$TOPDIR" >&6; }
14077
14078
14079  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14080
14081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14082
14083  # Input might be given as Windows format, start by converting to
14084  # unix format.
14085  path="$CURDIR"
14086  new_path=`$CYGPATH -u "$path"`
14087
14088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14091  # "foo.exe" is OK but "foo" is an error.
14092  #
14093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14094  # It is also a way to make sure we got the proper file name for the real test later on.
14095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14096  if test "x$test_shortpath" = x; then
14097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14098$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14099    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14100  fi
14101
14102  # Call helper function which possibly converts this using DOS-style short mode.
14103  # If so, the updated path is stored in $new_path.
14104
14105  input_path="$new_path"
14106  # Check if we need to convert this using DOS-style short mode. If the path
14107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14108  # take no chances and rewrite it.
14109  # Note: m4 eats our [], so we need to use [ and ] instead.
14110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14111  if test "x$has_forbidden_chars" != x; then
14112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14116      # Going to short mode and back again did indeed matter. Since short mode is
14117      # case insensitive, let's make it lowercase to improve readability.
14118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14119      # Now convert it back to Unix-stile (cygpath)
14120      input_path=`$CYGPATH -u "$shortmode_path"`
14121      new_path="$input_path"
14122    fi
14123  fi
14124
14125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14126  if test "x$test_cygdrive_prefix" = x; then
14127    # As a simple fix, exclude /usr/bin since it's not a real path.
14128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14130      # a path prefixed by /cygdrive for fixpath to work.
14131      new_path="$CYGWIN_ROOT_PATH$input_path"
14132    fi
14133  fi
14134
14135
14136  if test "x$path" != "x$new_path"; then
14137    CURDIR="$new_path"
14138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14139$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14140  fi
14141
14142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14143
14144  path="$CURDIR"
14145  has_colon=`$ECHO $path | $GREP ^.:`
14146  new_path="$path"
14147  if test "x$has_colon" = x; then
14148    # Not in mixed or Windows style, start by that.
14149    new_path=`cmd //c echo $path`
14150  fi
14151
14152
14153  input_path="$new_path"
14154  # Check if we need to convert this using DOS-style short mode. If the path
14155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14156  # take no chances and rewrite it.
14157  # Note: m4 eats our [], so we need to use [ and ] instead.
14158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14159  if test "x$has_forbidden_chars" != x; then
14160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14162  fi
14163
14164
14165  windows_path="$new_path"
14166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14167    unix_path=`$CYGPATH -u "$windows_path"`
14168    new_path="$unix_path"
14169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14171    new_path="$unix_path"
14172  fi
14173
14174  if test "x$path" != "x$new_path"; then
14175    CURDIR="$new_path"
14176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14177$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14178  fi
14179
14180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14182
14183  else
14184    # We're on a posix platform. Hooray! :)
14185    path="$CURDIR"
14186    has_space=`$ECHO "$path" | $GREP " "`
14187    if test "x$has_space" != x; then
14188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14189$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14191    fi
14192
14193    # Use eval to expand a potential ~
14194    eval path="$path"
14195    if test ! -f "$path" && test ! -d "$path"; then
14196      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14197    fi
14198
14199    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14200  fi
14201
14202
14203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14204
14205  # Input might be given as Windows format, start by converting to
14206  # unix format.
14207  path="$TOPDIR"
14208  new_path=`$CYGPATH -u "$path"`
14209
14210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14213  # "foo.exe" is OK but "foo" is an error.
14214  #
14215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14216  # It is also a way to make sure we got the proper file name for the real test later on.
14217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14218  if test "x$test_shortpath" = x; then
14219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14220$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14221    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14222  fi
14223
14224  # Call helper function which possibly converts this using DOS-style short mode.
14225  # If so, the updated path is stored in $new_path.
14226
14227  input_path="$new_path"
14228  # Check if we need to convert this using DOS-style short mode. If the path
14229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14230  # take no chances and rewrite it.
14231  # Note: m4 eats our [], so we need to use [ and ] instead.
14232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14233  if test "x$has_forbidden_chars" != x; then
14234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14238      # Going to short mode and back again did indeed matter. Since short mode is
14239      # case insensitive, let's make it lowercase to improve readability.
14240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14241      # Now convert it back to Unix-stile (cygpath)
14242      input_path=`$CYGPATH -u "$shortmode_path"`
14243      new_path="$input_path"
14244    fi
14245  fi
14246
14247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14248  if test "x$test_cygdrive_prefix" = x; then
14249    # As a simple fix, exclude /usr/bin since it's not a real path.
14250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14252      # a path prefixed by /cygdrive for fixpath to work.
14253      new_path="$CYGWIN_ROOT_PATH$input_path"
14254    fi
14255  fi
14256
14257
14258  if test "x$path" != "x$new_path"; then
14259    TOPDIR="$new_path"
14260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14261$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14262  fi
14263
14264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14265
14266  path="$TOPDIR"
14267  has_colon=`$ECHO $path | $GREP ^.:`
14268  new_path="$path"
14269  if test "x$has_colon" = x; then
14270    # Not in mixed or Windows style, start by that.
14271    new_path=`cmd //c echo $path`
14272  fi
14273
14274
14275  input_path="$new_path"
14276  # Check if we need to convert this using DOS-style short mode. If the path
14277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14278  # take no chances and rewrite it.
14279  # Note: m4 eats our [], so we need to use [ and ] instead.
14280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14281  if test "x$has_forbidden_chars" != x; then
14282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14284  fi
14285
14286
14287  windows_path="$new_path"
14288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14289    unix_path=`$CYGPATH -u "$windows_path"`
14290    new_path="$unix_path"
14291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14293    new_path="$unix_path"
14294  fi
14295
14296  if test "x$path" != "x$new_path"; then
14297    TOPDIR="$new_path"
14298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14299$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14300  fi
14301
14302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14304
14305  else
14306    # We're on a posix platform. Hooray! :)
14307    path="$TOPDIR"
14308    has_space=`$ECHO "$path" | $GREP " "`
14309    if test "x$has_space" != x; then
14310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14311$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14313    fi
14314
14315    # Use eval to expand a potential ~
14316    eval path="$path"
14317    if test ! -f "$path" && test ! -d "$path"; then
14318      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14319    fi
14320
14321    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14322  fi
14323
14324  # SRC_ROOT is a traditional alias for TOPDIR.
14325  SRC_ROOT=$TOPDIR
14326
14327  # Locate the directory of this script.
14328  AUTOCONF_DIR=$TOPDIR/common/autoconf
14329
14330
14331  # Setup default logging of stdout and stderr to build.log in the output root.
14332  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14333  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14334  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14335
14336
14337
14338
14339
14340# Check if it's a pure open build or if custom sources are to be used.
14341
14342  # Check whether --enable-openjdk-only was given.
14343if test "${enable_openjdk_only+set}" = set; then :
14344  enableval=$enable_openjdk_only;
14345else
14346  enable_openjdk_only="no"
14347fi
14348
14349
14350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14351$as_echo_n "checking for presence of closed sources... " >&6; }
14352  if test -d "$SRC_ROOT/jdk/src/closed"; then
14353    CLOSED_SOURCE_PRESENT=yes
14354  else
14355    CLOSED_SOURCE_PRESENT=no
14356  fi
14357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14358$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14359
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14361$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14362  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14364$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14365
14366  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14367    OPENJDK=true
14368    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14369      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14370$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14371    fi
14372  else
14373    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14374      OPENJDK=true
14375    else
14376      OPENJDK=false
14377    fi
14378  fi
14379
14380  if test "x$OPENJDK" = "xtrue"; then
14381    SET_OPENJDK="OPENJDK=true"
14382  fi
14383
14384
14385
14386  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14387  # the IncludeCustomExtension macro.
14388
14389
14390# Check whether --with-custom-make-dir was given.
14391if test "${with_custom_make_dir+set}" = set; then :
14392  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14393$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14394fi
14395
14396
14397
14398
14399# These are needed to be able to create a configuration name (and thus the output directory)
14400
14401  ###############################################################################
14402  #
14403  # Check which variant of the JDK that we want to build.
14404  # Currently we have:
14405  #    normal:   standard edition
14406  # but the custom make system may add other variants
14407  #
14408  # Effectively the JDK variant gives a name to a specific set of
14409  # modules to compile into the JDK. In the future, these modules
14410  # might even be Jigsaw modules.
14411  #
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14413$as_echo_n "checking which variant of the JDK to build... " >&6; }
14414
14415# Check whether --with-jdk-variant was given.
14416if test "${with_jdk_variant+set}" = set; then :
14417  withval=$with_jdk_variant;
14418fi
14419
14420
14421  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14422    JDK_VARIANT="normal"
14423  else
14424    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14425  fi
14426
14427
14428
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14430$as_echo "$JDK_VARIANT" >&6; }
14431
14432
14433###############################################################################
14434#
14435# Check which interpreter of the JVM we want to build.
14436# Currently we have:
14437#    template: Template interpreter (the default)
14438#    cpp     : C++ interpreter
14439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14440$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14441
14442# Check whether --with-jvm-interpreter was given.
14443if test "${with_jvm_interpreter+set}" = set; then :
14444  withval=$with_jvm_interpreter;
14445fi
14446
14447
14448if test "x$with_jvm_interpreter" = x; then
14449     with_jvm_interpreter="template"
14450fi
14451
14452JVM_INTERPRETER="$with_jvm_interpreter"
14453
14454if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14455   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14456fi
14457
14458
14459
14460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14461$as_echo "$with_jvm_interpreter" >&6; }
14462
14463
14464
14465  ###############################################################################
14466  #
14467  # Check which variants of the JVM that we want to build.
14468  # Currently we have:
14469  #    server: normal interpreter and a tiered C1/C2 compiler
14470  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14471  #    minimal1: reduced form of client with optional VM services and features stripped out
14472  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14473  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14474  #    zero: no machine code interpreter, no compiler
14475  #    zeroshark: zero interpreter and shark/llvm compiler backend
14476#    core: interpreter only, no compiler (only works on some platforms)
14477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14478$as_echo_n "checking which variants of the JVM to build... " >&6; }
14479
14480# Check whether --with-jvm-variants was given.
14481if test "${with_jvm_variants+set}" = set; then :
14482  withval=$with_jvm_variants;
14483fi
14484
14485
14486  if test "x$with_jvm_variants" = x; then
14487    with_jvm_variants="server"
14488  fi
14489
14490  JVM_VARIANTS=",$with_jvm_variants,"
14491  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14492
14493  if test "x$TEST_VARIANTS" != "x,"; then
14494     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14495  fi
14496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14497$as_echo "$with_jvm_variants" >&6; }
14498
14499  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14500  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14501  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14502  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14503  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14504  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14505  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14506
14507  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14508    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14509      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14510    fi
14511  fi
14512  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14513    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14514      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14515    fi
14516  fi
14517  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14518    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14519      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14520    fi
14521  fi
14522
14523  # Replace the commas with AND for use in the build directory name.
14524  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14525  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14526  if test "x$COUNT_VARIANTS" != "x,1"; then
14527    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14528  else
14529    BUILDING_MULTIPLE_JVM_VARIANTS=no
14530  fi
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541  INCLUDE_SA=true
14542  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14543    INCLUDE_SA=false
14544  fi
14545  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14546    INCLUDE_SA=false
14547  fi
14548  if test "x$VAR_CPU" = xppc64 ; then
14549    INCLUDE_SA=false
14550  fi
14551
14552
14553  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14554    MACOSX_UNIVERSAL="true"
14555  fi
14556
14557
14558
14559
14560  ###############################################################################
14561  #
14562  # Set the debug level
14563  #    release: no debug information, all optimizations, no asserts.
14564  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14565  #    fastdebug: debug information (-g), all optimizations, all asserts
14566  #    slowdebug: debug information (-g), no optimizations, all asserts
14567  #
14568  DEBUG_LEVEL="release"
14569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14570$as_echo_n "checking which debug level to use... " >&6; }
14571  # Check whether --enable-debug was given.
14572if test "${enable_debug+set}" = set; then :
14573  enableval=$enable_debug;
14574        ENABLE_DEBUG="${enableval}"
14575        DEBUG_LEVEL="fastdebug"
14576
14577else
14578  ENABLE_DEBUG="no"
14579fi
14580
14581
14582
14583# Check whether --with-debug-level was given.
14584if test "${with_debug_level+set}" = set; then :
14585  withval=$with_debug_level;
14586        DEBUG_LEVEL="${withval}"
14587        if test "x$ENABLE_DEBUG" = xyes; then
14588          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14589        fi
14590
14591fi
14592
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14594$as_echo "$DEBUG_LEVEL" >&6; }
14595
14596  if test "x$DEBUG_LEVEL" != xrelease && \
14597      test "x$DEBUG_LEVEL" != xoptimized && \
14598      test "x$DEBUG_LEVEL" != xfastdebug && \
14599      test "x$DEBUG_LEVEL" != xslowdebug; then
14600    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14601  fi
14602
14603
14604  ###############################################################################
14605  #
14606  # Setup legacy vars/targets and new vars to deal with different debug levels.
14607  #
14608
14609  case $DEBUG_LEVEL in
14610    release )
14611      VARIANT="OPT"
14612      FASTDEBUG="false"
14613      DEBUG_CLASSFILES="false"
14614      BUILD_VARIANT_RELEASE=""
14615      HOTSPOT_DEBUG_LEVEL="product"
14616      HOTSPOT_EXPORT="product"
14617      ;;
14618    fastdebug )
14619      VARIANT="DBG"
14620      FASTDEBUG="true"
14621      DEBUG_CLASSFILES="true"
14622      BUILD_VARIANT_RELEASE="-fastdebug"
14623      HOTSPOT_DEBUG_LEVEL="fastdebug"
14624      HOTSPOT_EXPORT="fastdebug"
14625      ;;
14626    slowdebug )
14627      VARIANT="DBG"
14628      FASTDEBUG="false"
14629      DEBUG_CLASSFILES="true"
14630      BUILD_VARIANT_RELEASE="-debug"
14631      HOTSPOT_DEBUG_LEVEL="jvmg"
14632      HOTSPOT_EXPORT="debug"
14633      ;;
14634    optimized )
14635      VARIANT="OPT"
14636      FASTDEBUG="false"
14637      DEBUG_CLASSFILES="false"
14638      BUILD_VARIANT_RELEASE="-optimized"
14639      HOTSPOT_DEBUG_LEVEL="optimized"
14640      HOTSPOT_EXPORT="optimized"
14641      ;;
14642  esac
14643
14644  # The debug level 'optimized' is a little special because it is currently only
14645  # applicable to the HotSpot build where it means to build a completely
14646  # optimized version of the VM without any debugging code (like for the
14647  # 'release' debug level which is called 'product' in the HotSpot build) but
14648  # with the exception that it can contain additional code which is otherwise
14649  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14650  # test new and/or experimental features which are not intended for customer
14651  # shipment. Because these new features need to be tested and benchmarked in
14652  # real world scenarios, we want to build the containing JDK at the 'release'
14653  # debug level.
14654  if test "x$DEBUG_LEVEL" = xoptimized; then
14655    DEBUG_LEVEL="release"
14656  fi
14657
14658  #####
14659  # Generate the legacy makefile targets for hotspot.
14660  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14661  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14662  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14663  # But until then ...
14664  HOTSPOT_TARGET=""
14665
14666  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14667    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14668  fi
14669
14670  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14671    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14672  fi
14673
14674  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14675    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14676  fi
14677
14678  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14679    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14680  fi
14681
14682  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14683    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14684  fi
14685
14686  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14687    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14688  fi
14689
14690  if test "x$JVM_VARIANT_CORE" = xtrue; then
14691    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14692  fi
14693
14694  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14695
14696  # On Macosx universal binaries are produced, but they only contain
14697  # 64 bit intel. This invalidates control of which jvms are built
14698  # from configure, but only server is valid anyway. Fix this
14699  # when hotspot makefiles are rewritten.
14700  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14701    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14702  fi
14703
14704  #####
14705
14706
14707
14708
14709
14710
14711
14712
14713# With basic setup done, call the custom early hook.
14714
14715
14716# Check if we have devkits, extra paths or sysroot set.
14717
14718
14719# Check whether --with-devkit was given.
14720if test "${with_devkit+set}" = set; then :
14721  withval=$with_devkit;
14722
14723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14724
14725  # Input might be given as Windows format, start by converting to
14726  # unix format.
14727  path="$with_devkit"
14728  new_path=`$CYGPATH -u "$path"`
14729
14730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14733  # "foo.exe" is OK but "foo" is an error.
14734  #
14735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14736  # It is also a way to make sure we got the proper file name for the real test later on.
14737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14738  if test "x$test_shortpath" = x; then
14739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14740$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14741    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14742  fi
14743
14744  # Call helper function which possibly converts this using DOS-style short mode.
14745  # If so, the updated path is stored in $new_path.
14746
14747  input_path="$new_path"
14748  # Check if we need to convert this using DOS-style short mode. If the path
14749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14750  # take no chances and rewrite it.
14751  # Note: m4 eats our [], so we need to use [ and ] instead.
14752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14753  if test "x$has_forbidden_chars" != x; then
14754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14758      # Going to short mode and back again did indeed matter. Since short mode is
14759      # case insensitive, let's make it lowercase to improve readability.
14760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14761      # Now convert it back to Unix-stile (cygpath)
14762      input_path=`$CYGPATH -u "$shortmode_path"`
14763      new_path="$input_path"
14764    fi
14765  fi
14766
14767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14768  if test "x$test_cygdrive_prefix" = x; then
14769    # As a simple fix, exclude /usr/bin since it's not a real path.
14770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14772      # a path prefixed by /cygdrive for fixpath to work.
14773      new_path="$CYGWIN_ROOT_PATH$input_path"
14774    fi
14775  fi
14776
14777
14778  if test "x$path" != "x$new_path"; then
14779    with_devkit="$new_path"
14780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14781$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14782  fi
14783
14784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14785
14786  path="$with_devkit"
14787  has_colon=`$ECHO $path | $GREP ^.:`
14788  new_path="$path"
14789  if test "x$has_colon" = x; then
14790    # Not in mixed or Windows style, start by that.
14791    new_path=`cmd //c echo $path`
14792  fi
14793
14794
14795  input_path="$new_path"
14796  # Check if we need to convert this using DOS-style short mode. If the path
14797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14798  # take no chances and rewrite it.
14799  # Note: m4 eats our [], so we need to use [ and ] instead.
14800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14801  if test "x$has_forbidden_chars" != x; then
14802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14804  fi
14805
14806
14807  windows_path="$new_path"
14808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14809    unix_path=`$CYGPATH -u "$windows_path"`
14810    new_path="$unix_path"
14811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14813    new_path="$unix_path"
14814  fi
14815
14816  if test "x$path" != "x$new_path"; then
14817    with_devkit="$new_path"
14818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14819$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14820  fi
14821
14822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14824
14825  else
14826    # We're on a posix platform. Hooray! :)
14827    path="$with_devkit"
14828    has_space=`$ECHO "$path" | $GREP " "`
14829    if test "x$has_space" != x; then
14830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14831$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14832      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14833    fi
14834
14835    # Use eval to expand a potential ~
14836    eval path="$path"
14837    if test ! -f "$path" && test ! -d "$path"; then
14838      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14839    fi
14840
14841    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14842  fi
14843
14844        DEVKIT_ROOT="$with_devkit"
14845        # Check for a meta data info file in the root of the devkit
14846        if test -f "$DEVKIT_ROOT/devkit.info"; then
14847          # This potentially sets the following:
14848          # DEVKIT_NAME: A descriptive name of the devkit
14849          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14850          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14851          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14852          . $DEVKIT_ROOT/devkit.info
14853        fi
14854
14855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14856$as_echo_n "checking for devkit... " >&6; }
14857        if test "x$DEVKIT_NAME" != x; then
14858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14859$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14860        else
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14862$as_echo "$DEVKIT_ROOT" >&6; }
14863        fi
14864
14865        if test "x$DEVKIT_EXTRA_PATH" != x; then
14866
14867  if test "x$DEVKIT_EXTRA_PATH" != x; then
14868    if test "x$EXTRA_PATH" = x; then
14869      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14870    else
14871      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14872    fi
14873  fi
14874
14875        fi
14876
14877        # Fallback default of just /bin if DEVKIT_PATH is not defined
14878        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14879          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14880        fi
14881
14882  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14883    if test "x$TOOLCHAIN_PATH" = x; then
14884      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14885    else
14886      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14887    fi
14888  fi
14889
14890
14891        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14892        # places for backwards compatiblity.
14893        if test "x$DEVKIT_SYSROOT" != x; then
14894          SYSROOT="$DEVKIT_SYSROOT"
14895        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14896          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14897        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14898          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14899        fi
14900
14901
14902fi
14903
14904
14905  # You can force the sysroot if the sysroot encoded into the compiler tools
14906  # is not correct.
14907
14908# Check whether --with-sys-root was given.
14909if test "${with_sys_root+set}" = set; then :
14910  withval=$with_sys_root; SYSROOT=$with_sys_root
14911
14912fi
14913
14914
14915
14916# Check whether --with-sysroot was given.
14917if test "${with_sysroot+set}" = set; then :
14918  withval=$with_sysroot; SYSROOT=$with_sysroot
14919
14920fi
14921
14922
14923
14924# Check whether --with-tools-dir was given.
14925if test "${with_tools_dir+set}" = set; then :
14926  withval=$with_tools_dir;
14927  if test "x$with_tools_dir" != x; then
14928    if test "x$TOOLCHAIN_PATH" = x; then
14929      TOOLCHAIN_PATH="$with_tools_dir"
14930    else
14931      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14932    fi
14933  fi
14934
14935
14936fi
14937
14938
14939
14940# Check whether --with-toolchain-path was given.
14941if test "${with_toolchain_path+set}" = set; then :
14942  withval=$with_toolchain_path;
14943  if test "x$with_toolchain_path" != x; then
14944    if test "x$TOOLCHAIN_PATH" = x; then
14945      TOOLCHAIN_PATH="$with_toolchain_path"
14946    else
14947      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14948    fi
14949  fi
14950
14951
14952fi
14953
14954
14955
14956# Check whether --with-extra-path was given.
14957if test "${with_extra_path+set}" = set; then :
14958  withval=$with_extra_path;
14959  if test "x$with_extra_path" != x; then
14960    if test "x$EXTRA_PATH" = x; then
14961      EXTRA_PATH="$with_extra_path"
14962    else
14963      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14964    fi
14965  fi
14966
14967
14968fi
14969
14970
14971  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14972    # detect if Xcode is installed by running xcodebuild -version
14973    # if no Xcode installed, xcodebuild exits with 1
14974    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14975    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14976      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14977      # fall back on the stub binary in /usr/bin/xcodebuild
14978      # Extract the first word of "xcodebuild", so it can be a program name with args.
14979set dummy xcodebuild; ac_word=$2
14980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14981$as_echo_n "checking for $ac_word... " >&6; }
14982if ${ac_cv_path_XCODEBUILD+:} false; then :
14983  $as_echo_n "(cached) " >&6
14984else
14985  case $XCODEBUILD in
14986  [\\/]* | ?:[\\/]*)
14987  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14988  ;;
14989  *)
14990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14991for as_dir in $TOOLCHAIN_PATH
14992do
14993  IFS=$as_save_IFS
14994  test -z "$as_dir" && as_dir=.
14995    for ac_exec_ext in '' $ac_executable_extensions; do
14996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14997    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14999    break 2
15000  fi
15001done
15002  done
15003IFS=$as_save_IFS
15004
15005  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15006  ;;
15007esac
15008fi
15009XCODEBUILD=$ac_cv_path_XCODEBUILD
15010if test -n "$XCODEBUILD"; then
15011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15012$as_echo "$XCODEBUILD" >&6; }
15013else
15014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15015$as_echo "no" >&6; }
15016fi
15017
15018
15019    else
15020      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15021      # when only the command line tools are installed there are no SDKs, so headers
15022      # are copied into the system frameworks
15023      XCODEBUILD=
15024
15025    fi
15026
15027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15028$as_echo_n "checking for sdk name... " >&6; }
15029
15030# Check whether --with-sdk-name was given.
15031if test "${with_sdk_name+set}" = set; then :
15032  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15033
15034fi
15035
15036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15037$as_echo "$SDKNAME" >&6; }
15038
15039    # if toolchain path is specified then don't rely on system headers, they may not compile
15040    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15041    test -z "$TOOLCHAIN_PATH" && \
15042      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15043
15044    if test -z "$SYSROOT"; then
15045      if test -n "$XCODEBUILD"; then
15046        # if we don't have system headers, use default SDK name (last resort)
15047        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15048          SDKNAME=${SDKNAME:-macosx}
15049        fi
15050
15051        if test -n "$SDKNAME"; then
15052          # Call xcodebuild to determine SYSROOT
15053          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15054        fi
15055      else
15056        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15057          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
15058        fi
15059      fi
15060    else
15061      # warn user if --with-sdk-name was also set
15062      if test -n "$with_sdk_name"; then
15063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15064$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15065      fi
15066    fi
15067
15068    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15069      # If no system framework headers, then SYSROOT must be set, or we won't build
15070      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
15071    fi
15072
15073    # Perform a basic sanity test
15074    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15075      if test -z "$SYSROOT"; then
15076        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
15077      else
15078        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15079      fi
15080    fi
15081
15082    # set SDKROOT too, Xcode tools will pick it up
15083    SDKROOT=$SYSROOT
15084
15085  fi
15086
15087  # Prepend the extra path to the global path
15088
15089  if test "x$EXTRA_PATH" != x; then
15090    if test "x$PATH" = x; then
15091      PATH="$EXTRA_PATH"
15092    else
15093      PATH="$EXTRA_PATH:$PATH"
15094    fi
15095  fi
15096
15097
15098  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15099    # Add extra search paths on solaris for utilities like ar and as etc...
15100    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15101  fi
15102
15103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15104$as_echo_n "checking for sysroot... " >&6; }
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15106$as_echo "$SYSROOT" >&6; }
15107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15108$as_echo_n "checking for toolchain path... " >&6; }
15109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15110$as_echo "$TOOLCHAIN_PATH" >&6; }
15111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15112$as_echo_n "checking for extra path... " >&6; }
15113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15114$as_echo "$EXTRA_PATH" >&6; }
15115
15116
15117# To properly create a configuration name, we need to have the OpenJDK target
15118# and options (variants and debug level) parsed.
15119
15120
15121
15122# Check whether --with-conf-name was given.
15123if test "${with_conf_name+set}" = set; then :
15124  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15125fi
15126
15127
15128  # Test from where we are running configure, in or outside of src root.
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15130$as_echo_n "checking where to store configuration... " >&6; }
15131  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15132      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15133      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15134    # We are running configure from the src root.
15135    # Create a default ./build/target-variant-debuglevel output root.
15136    if test "x${CONF_NAME}" = x; then
15137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15138$as_echo "in default location" >&6; }
15139      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15140    else
15141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15142$as_echo "in build directory with custom name" >&6; }
15143    fi
15144    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15145    $MKDIR -p "$OUTPUT_ROOT"
15146    if test ! -d "$OUTPUT_ROOT"; then
15147      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15148    fi
15149  else
15150    # We are running configure from outside of the src dir.
15151    # Then use the current directory as output dir!
15152    # If configuration is situated in normal build directory, just use the build
15153    # directory name as configuration name, otherwise use the complete path.
15154    if test "x${CONF_NAME}" = x; then
15155      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15156    fi
15157    OUTPUT_ROOT="$CURDIR"
15158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15159$as_echo "in current directory" >&6; }
15160
15161    # WARNING: This might be a bad thing to do. You need to be sure you want to
15162    # have a configuration in this directory. Do some sanity checks!
15163
15164    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15165      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15166      # other files
15167      files_present=`$LS $OUTPUT_ROOT`
15168      # Configure has already touched config.log and confdefs.h in the current dir when this check
15169      # is performed.
15170      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15171      | $TR -d '\n'`
15172      if test "x$filtered_files" != x; then
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15174$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15176$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15177        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15178$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15179        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15180$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15182$as_echo "$as_me: seriously mess up just about everything." >&6;}
15183        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15184$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15185        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15186$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15187        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15188      fi
15189    fi
15190  fi
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15192$as_echo_n "checking what configuration name to use... " >&6; }
15193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15194$as_echo "$CONF_NAME" >&6; }
15195
15196
15197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15198
15199  # Input might be given as Windows format, start by converting to
15200  # unix format.
15201  path="$OUTPUT_ROOT"
15202  new_path=`$CYGPATH -u "$path"`
15203
15204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15207  # "foo.exe" is OK but "foo" is an error.
15208  #
15209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15210  # It is also a way to make sure we got the proper file name for the real test later on.
15211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15212  if test "x$test_shortpath" = x; then
15213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15214$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15215    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15216  fi
15217
15218  # Call helper function which possibly converts this using DOS-style short mode.
15219  # If so, the updated path is stored in $new_path.
15220
15221  input_path="$new_path"
15222  # Check if we need to convert this using DOS-style short mode. If the path
15223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15224  # take no chances and rewrite it.
15225  # Note: m4 eats our [], so we need to use [ and ] instead.
15226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15227  if test "x$has_forbidden_chars" != x; then
15228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15232      # Going to short mode and back again did indeed matter. Since short mode is
15233      # case insensitive, let's make it lowercase to improve readability.
15234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15235      # Now convert it back to Unix-stile (cygpath)
15236      input_path=`$CYGPATH -u "$shortmode_path"`
15237      new_path="$input_path"
15238    fi
15239  fi
15240
15241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15242  if test "x$test_cygdrive_prefix" = x; then
15243    # As a simple fix, exclude /usr/bin since it's not a real path.
15244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15246      # a path prefixed by /cygdrive for fixpath to work.
15247      new_path="$CYGWIN_ROOT_PATH$input_path"
15248    fi
15249  fi
15250
15251
15252  if test "x$path" != "x$new_path"; then
15253    OUTPUT_ROOT="$new_path"
15254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15255$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15256  fi
15257
15258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15259
15260  path="$OUTPUT_ROOT"
15261  has_colon=`$ECHO $path | $GREP ^.:`
15262  new_path="$path"
15263  if test "x$has_colon" = x; then
15264    # Not in mixed or Windows style, start by that.
15265    new_path=`cmd //c echo $path`
15266  fi
15267
15268
15269  input_path="$new_path"
15270  # Check if we need to convert this using DOS-style short mode. If the path
15271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15272  # take no chances and rewrite it.
15273  # Note: m4 eats our [], so we need to use [ and ] instead.
15274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15275  if test "x$has_forbidden_chars" != x; then
15276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15278  fi
15279
15280
15281  windows_path="$new_path"
15282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15283    unix_path=`$CYGPATH -u "$windows_path"`
15284    new_path="$unix_path"
15285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15287    new_path="$unix_path"
15288  fi
15289
15290  if test "x$path" != "x$new_path"; then
15291    OUTPUT_ROOT="$new_path"
15292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15293$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15294  fi
15295
15296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15298
15299  else
15300    # We're on a posix platform. Hooray! :)
15301    path="$OUTPUT_ROOT"
15302    has_space=`$ECHO "$path" | $GREP " "`
15303    if test "x$has_space" != x; then
15304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15305$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15307    fi
15308
15309    # Use eval to expand a potential ~
15310    eval path="$path"
15311    if test ! -f "$path" && test ! -d "$path"; then
15312      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15313    fi
15314
15315    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15316  fi
15317
15318
15319  SPEC=$OUTPUT_ROOT/spec.gmk
15320
15321  CONF_NAME=$CONF_NAME
15322
15323  OUTPUT_ROOT=$OUTPUT_ROOT
15324
15325
15326  # Most of the probed defines are put into config.h
15327  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15328
15329  # The spec.gmk file contains all variables for the make system.
15330  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15331
15332  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15333  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15334
15335  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15336  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15337
15338  # The compare.sh is used to compare the build output to other builds.
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15340
15341  # Spec.sh is currently used by compare-objects.sh
15342  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15343
15344  # The generated Makefile knows where the spec.gmk is and where the source is.
15345  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15346  # which will look for generated configurations
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15348
15349
15350
15351# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15352
15353  for ac_prog in apt-get yum port pkgutil pkgadd
15354do
15355  # Extract the first word of "$ac_prog", so it can be a program name with args.
15356set dummy $ac_prog; ac_word=$2
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15358$as_echo_n "checking for $ac_word... " >&6; }
15359if ${ac_cv_prog_PKGHANDLER+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test -n "$PKGHANDLER"; then
15363  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15364else
15365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15366for as_dir in $PATH
15367do
15368  IFS=$as_save_IFS
15369  test -z "$as_dir" && as_dir=.
15370    for ac_exec_ext in '' $ac_executable_extensions; do
15371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15372    ac_cv_prog_PKGHANDLER="$ac_prog"
15373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15374    break 2
15375  fi
15376done
15377  done
15378IFS=$as_save_IFS
15379
15380fi
15381fi
15382PKGHANDLER=$ac_cv_prog_PKGHANDLER
15383if test -n "$PKGHANDLER"; then
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15385$as_echo "$PKGHANDLER" >&6; }
15386else
15387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15388$as_echo "no" >&6; }
15389fi
15390
15391
15392  test -n "$PKGHANDLER" && break
15393done
15394
15395
15396
15397# Setup tools that requires more complex handling, or that is not needed by the configure script.
15398
15399
15400  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15401  if test "x$MAKE" != x; then
15402    # User has supplied a make, test it.
15403    if test ! -f "$MAKE"; then
15404      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15405    fi
15406
15407  MAKE_CANDIDATE=""$MAKE""
15408  DESCRIPTION="user supplied MAKE=$MAKE"
15409  if test "x$MAKE_CANDIDATE" != x; then
15410    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15411$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15412    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15413    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15414    if test "x$IS_GNU_MAKE" = x; then
15415      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15416$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15417    else
15418      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15419      if test "x$IS_MODERN_MAKE" = x; then
15420        { $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
15421$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;}
15422      else
15423        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15424          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15425            MAKE_EXPECTED_ENV='cygwin'
15426          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15427            MAKE_EXPECTED_ENV='msys'
15428          else
15429            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15430          fi
15431          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15432          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15433        else
15434          # Not relevant for non-Windows
15435          IS_MAKE_CORRECT_ENV=true
15436        fi
15437        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15438          { $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
15439$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;}
15440        else
15441          FOUND_MAKE=$MAKE_CANDIDATE
15442
15443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15444
15445  # First separate the path from the arguments. This will split at the first
15446  # space.
15447  complete="$FOUND_MAKE"
15448  path="${complete%% *}"
15449  tmp="$complete EOL"
15450  arguments="${tmp#* }"
15451
15452  # Input might be given as Windows format, start by converting to
15453  # unix format.
15454  new_path=`$CYGPATH -u "$path"`
15455
15456  # Now try to locate executable using which
15457  new_path=`$WHICH "$new_path" 2> /dev/null`
15458  # bat and cmd files are not always considered executable in cygwin causing which
15459  # to not find them
15460  if test "x$new_path" = x \
15461      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15462      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15463    new_path=`$CYGPATH -u "$path"`
15464  fi
15465  if test "x$new_path" = x; then
15466    # Oops. Which didn't find the executable.
15467    # The splitting of arguments from the executable at a space might have been incorrect,
15468    # since paths with space are more likely in Windows. Give it another try with the whole
15469    # argument.
15470    path="$complete"
15471    arguments="EOL"
15472    new_path=`$CYGPATH -u "$path"`
15473    new_path=`$WHICH "$new_path" 2> /dev/null`
15474    # bat and cmd files are not always considered executable in cygwin causing which
15475    # to not find them
15476    if test "x$new_path" = x \
15477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15479      new_path=`$CYGPATH -u "$path"`
15480    fi
15481    if test "x$new_path" = x; then
15482      # It's still not found. Now this is an unrecoverable error.
15483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15484$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15485      has_space=`$ECHO "$complete" | $GREP " "`
15486      if test "x$has_space" != x; then
15487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15489      fi
15490      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15491    fi
15492  fi
15493
15494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15497  # "foo.exe" is OK but "foo" is an error.
15498  #
15499  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15500  # It is also a way to make sure we got the proper file name for the real test later on.
15501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15502  if test "x$test_shortpath" = x; then
15503    # Short path failed, file does not exist as specified.
15504    # Try adding .exe or .cmd
15505    if test -f "${new_path}.exe"; then
15506      input_to_shortpath="${new_path}.exe"
15507    elif test -f "${new_path}.cmd"; then
15508      input_to_shortpath="${new_path}.cmd"
15509    else
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15511$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15512      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15513$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15515    fi
15516  else
15517    input_to_shortpath="$new_path"
15518  fi
15519
15520  # Call helper function which possibly converts this using DOS-style short mode.
15521  # If so, the updated path is stored in $new_path.
15522  new_path="$input_to_shortpath"
15523
15524  input_path="$input_to_shortpath"
15525  # Check if we need to convert this using DOS-style short mode. If the path
15526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15527  # take no chances and rewrite it.
15528  # Note: m4 eats our [], so we need to use [ and ] instead.
15529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15530  if test "x$has_forbidden_chars" != x; then
15531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15535      # Going to short mode and back again did indeed matter. Since short mode is
15536      # case insensitive, let's make it lowercase to improve readability.
15537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15538      # Now convert it back to Unix-stile (cygpath)
15539      input_path=`$CYGPATH -u "$shortmode_path"`
15540      new_path="$input_path"
15541    fi
15542  fi
15543
15544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15545  if test "x$test_cygdrive_prefix" = x; then
15546    # As a simple fix, exclude /usr/bin since it's not a real path.
15547    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15549      # a path prefixed by /cygdrive for fixpath to work.
15550      new_path="$CYGWIN_ROOT_PATH$input_path"
15551    fi
15552  fi
15553
15554  # remove trailing .exe if any
15555  new_path="${new_path/%.exe/}"
15556
15557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558
15559  # First separate the path from the arguments. This will split at the first
15560  # space.
15561  complete="$FOUND_MAKE"
15562  path="${complete%% *}"
15563  tmp="$complete EOL"
15564  arguments="${tmp#* }"
15565
15566  # Input might be given as Windows format, start by converting to
15567  # unix format.
15568  new_path="$path"
15569
15570  windows_path="$new_path"
15571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15572    unix_path=`$CYGPATH -u "$windows_path"`
15573    new_path="$unix_path"
15574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15576    new_path="$unix_path"
15577  fi
15578
15579
15580  # Now try to locate executable using which
15581  new_path=`$WHICH "$new_path" 2> /dev/null`
15582
15583  if test "x$new_path" = x; then
15584    # Oops. Which didn't find the executable.
15585    # The splitting of arguments from the executable at a space might have been incorrect,
15586    # since paths with space are more likely in Windows. Give it another try with the whole
15587    # argument.
15588    path="$complete"
15589    arguments="EOL"
15590    new_path="$path"
15591
15592  windows_path="$new_path"
15593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15594    unix_path=`$CYGPATH -u "$windows_path"`
15595    new_path="$unix_path"
15596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15598    new_path="$unix_path"
15599  fi
15600
15601
15602    new_path=`$WHICH "$new_path" 2> /dev/null`
15603
15604    if test "x$new_path" = x; then
15605      # It's still not found. Now this is an unrecoverable error.
15606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15607$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15608      has_space=`$ECHO "$complete" | $GREP " "`
15609      if test "x$has_space" != x; then
15610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15612      fi
15613      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15614    fi
15615  fi
15616
15617  # Now new_path has a complete unix path to the binary
15618  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15619    # Keep paths in /bin as-is, but remove trailing .exe if any
15620    new_path="${new_path/%.exe/}"
15621    # Do not save /bin paths to all_fixpath_prefixes!
15622  else
15623    # Not in mixed or Windows style, start by that.
15624    new_path=`cmd //c echo $new_path`
15625
15626  input_path="$new_path"
15627  # Check if we need to convert this using DOS-style short mode. If the path
15628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15629  # take no chances and rewrite it.
15630  # Note: m4 eats our [], so we need to use [ and ] instead.
15631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15632  if test "x$has_forbidden_chars" != x; then
15633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15635  fi
15636
15637    # Output is in $new_path
15638
15639  windows_path="$new_path"
15640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15641    unix_path=`$CYGPATH -u "$windows_path"`
15642    new_path="$unix_path"
15643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15645    new_path="$unix_path"
15646  fi
15647
15648    # remove trailing .exe if any
15649    new_path="${new_path/%.exe/}"
15650
15651    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15652    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15653  fi
15654
15655  else
15656    # We're on a posix platform. Hooray! :)
15657    # First separate the path from the arguments. This will split at the first
15658    # space.
15659    complete="$FOUND_MAKE"
15660    path="${complete%% *}"
15661    tmp="$complete EOL"
15662    arguments="${tmp#* }"
15663
15664    # Cannot rely on the command "which" here since it doesn't always work.
15665    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15666    if test -z "$is_absolute_path"; then
15667      # Path to executable is not absolute. Find it.
15668      IFS_save="$IFS"
15669      IFS=:
15670      for p in $PATH; do
15671        if test -f "$p/$path" && test -x "$p/$path"; then
15672          new_path="$p/$path"
15673          break
15674        fi
15675      done
15676      IFS="$IFS_save"
15677    else
15678      # This is an absolute path, we can use it without further modifications.
15679      new_path="$path"
15680    fi
15681
15682    if test "x$new_path" = x; then
15683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15685      has_space=`$ECHO "$complete" | $GREP " "`
15686      if test "x$has_space" != x; then
15687        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15688$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15689      fi
15690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15691    fi
15692  fi
15693
15694  # Now join together the path and the arguments once again
15695  if test "x$arguments" != xEOL; then
15696    new_complete="$new_path ${arguments% *}"
15697  else
15698    new_complete="$new_path"
15699  fi
15700
15701  if test "x$complete" != "x$new_complete"; then
15702    FOUND_MAKE="$new_complete"
15703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15704$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15705  fi
15706
15707        fi
15708      fi
15709    fi
15710  fi
15711
15712    if test "x$FOUND_MAKE" = x; then
15713      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15714    fi
15715  else
15716    # Try our hardest to locate a correct version of GNU make
15717    for ac_prog in gmake
15718do
15719  # Extract the first word of "$ac_prog", so it can be a program name with args.
15720set dummy $ac_prog; ac_word=$2
15721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15722$as_echo_n "checking for $ac_word... " >&6; }
15723if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15724  $as_echo_n "(cached) " >&6
15725else
15726  case $CHECK_GMAKE in
15727  [\\/]* | ?:[\\/]*)
15728  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15729  ;;
15730  *)
15731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15732for as_dir in $PATH
15733do
15734  IFS=$as_save_IFS
15735  test -z "$as_dir" && as_dir=.
15736    for ac_exec_ext in '' $ac_executable_extensions; do
15737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15738    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15740    break 2
15741  fi
15742done
15743  done
15744IFS=$as_save_IFS
15745
15746  ;;
15747esac
15748fi
15749CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15750if test -n "$CHECK_GMAKE"; then
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15752$as_echo "$CHECK_GMAKE" >&6; }
15753else
15754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15755$as_echo "no" >&6; }
15756fi
15757
15758
15759  test -n "$CHECK_GMAKE" && break
15760done
15761
15762
15763  MAKE_CANDIDATE=""$CHECK_GMAKE""
15764  DESCRIPTION="gmake in PATH"
15765  if test "x$MAKE_CANDIDATE" != x; then
15766    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15767$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15768    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15769    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15770    if test "x$IS_GNU_MAKE" = x; then
15771      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15772$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15773    else
15774      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15775      if test "x$IS_MODERN_MAKE" = x; then
15776        { $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
15777$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;}
15778      else
15779        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15780          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15781            MAKE_EXPECTED_ENV='cygwin'
15782          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15783            MAKE_EXPECTED_ENV='msys'
15784          else
15785            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15786          fi
15787          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15788          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15789        else
15790          # Not relevant for non-Windows
15791          IS_MAKE_CORRECT_ENV=true
15792        fi
15793        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15794          { $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
15795$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;}
15796        else
15797          FOUND_MAKE=$MAKE_CANDIDATE
15798
15799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15800
15801  # First separate the path from the arguments. This will split at the first
15802  # space.
15803  complete="$FOUND_MAKE"
15804  path="${complete%% *}"
15805  tmp="$complete EOL"
15806  arguments="${tmp#* }"
15807
15808  # Input might be given as Windows format, start by converting to
15809  # unix format.
15810  new_path=`$CYGPATH -u "$path"`
15811
15812  # Now try to locate executable using which
15813  new_path=`$WHICH "$new_path" 2> /dev/null`
15814  # bat and cmd files are not always considered executable in cygwin causing which
15815  # to not find them
15816  if test "x$new_path" = x \
15817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15819    new_path=`$CYGPATH -u "$path"`
15820  fi
15821  if test "x$new_path" = x; then
15822    # Oops. Which didn't find the executable.
15823    # The splitting of arguments from the executable at a space might have been incorrect,
15824    # since paths with space are more likely in Windows. Give it another try with the whole
15825    # argument.
15826    path="$complete"
15827    arguments="EOL"
15828    new_path=`$CYGPATH -u "$path"`
15829    new_path=`$WHICH "$new_path" 2> /dev/null`
15830    # bat and cmd files are not always considered executable in cygwin causing which
15831    # to not find them
15832    if test "x$new_path" = x \
15833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15835      new_path=`$CYGPATH -u "$path"`
15836    fi
15837    if test "x$new_path" = x; then
15838      # It's still not found. Now this is an unrecoverable error.
15839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15841      has_space=`$ECHO "$complete" | $GREP " "`
15842      if test "x$has_space" != x; then
15843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15845      fi
15846      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15847    fi
15848  fi
15849
15850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15853  # "foo.exe" is OK but "foo" is an error.
15854  #
15855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15856  # It is also a way to make sure we got the proper file name for the real test later on.
15857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15858  if test "x$test_shortpath" = x; then
15859    # Short path failed, file does not exist as specified.
15860    # Try adding .exe or .cmd
15861    if test -f "${new_path}.exe"; then
15862      input_to_shortpath="${new_path}.exe"
15863    elif test -f "${new_path}.cmd"; then
15864      input_to_shortpath="${new_path}.cmd"
15865    else
15866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15867$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15870      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15871    fi
15872  else
15873    input_to_shortpath="$new_path"
15874  fi
15875
15876  # Call helper function which possibly converts this using DOS-style short mode.
15877  # If so, the updated path is stored in $new_path.
15878  new_path="$input_to_shortpath"
15879
15880  input_path="$input_to_shortpath"
15881  # Check if we need to convert this using DOS-style short mode. If the path
15882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15883  # take no chances and rewrite it.
15884  # Note: m4 eats our [], so we need to use [ and ] instead.
15885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15886  if test "x$has_forbidden_chars" != x; then
15887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15891      # Going to short mode and back again did indeed matter. Since short mode is
15892      # case insensitive, let's make it lowercase to improve readability.
15893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15894      # Now convert it back to Unix-stile (cygpath)
15895      input_path=`$CYGPATH -u "$shortmode_path"`
15896      new_path="$input_path"
15897    fi
15898  fi
15899
15900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15901  if test "x$test_cygdrive_prefix" = x; then
15902    # As a simple fix, exclude /usr/bin since it's not a real path.
15903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15905      # a path prefixed by /cygdrive for fixpath to work.
15906      new_path="$CYGWIN_ROOT_PATH$input_path"
15907    fi
15908  fi
15909
15910  # remove trailing .exe if any
15911  new_path="${new_path/%.exe/}"
15912
15913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15914
15915  # First separate the path from the arguments. This will split at the first
15916  # space.
15917  complete="$FOUND_MAKE"
15918  path="${complete%% *}"
15919  tmp="$complete EOL"
15920  arguments="${tmp#* }"
15921
15922  # Input might be given as Windows format, start by converting to
15923  # unix format.
15924  new_path="$path"
15925
15926  windows_path="$new_path"
15927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15928    unix_path=`$CYGPATH -u "$windows_path"`
15929    new_path="$unix_path"
15930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15932    new_path="$unix_path"
15933  fi
15934
15935
15936  # Now try to locate executable using which
15937  new_path=`$WHICH "$new_path" 2> /dev/null`
15938
15939  if test "x$new_path" = x; then
15940    # Oops. Which didn't find the executable.
15941    # The splitting of arguments from the executable at a space might have been incorrect,
15942    # since paths with space are more likely in Windows. Give it another try with the whole
15943    # argument.
15944    path="$complete"
15945    arguments="EOL"
15946    new_path="$path"
15947
15948  windows_path="$new_path"
15949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15950    unix_path=`$CYGPATH -u "$windows_path"`
15951    new_path="$unix_path"
15952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15954    new_path="$unix_path"
15955  fi
15956
15957
15958    new_path=`$WHICH "$new_path" 2> /dev/null`
15959
15960    if test "x$new_path" = x; then
15961      # It's still not found. Now this is an unrecoverable error.
15962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15964      has_space=`$ECHO "$complete" | $GREP " "`
15965      if test "x$has_space" != x; then
15966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15968      fi
15969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15970    fi
15971  fi
15972
15973  # Now new_path has a complete unix path to the binary
15974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15975    # Keep paths in /bin as-is, but remove trailing .exe if any
15976    new_path="${new_path/%.exe/}"
15977    # Do not save /bin paths to all_fixpath_prefixes!
15978  else
15979    # Not in mixed or Windows style, start by that.
15980    new_path=`cmd //c echo $new_path`
15981
15982  input_path="$new_path"
15983  # Check if we need to convert this using DOS-style short mode. If the path
15984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15985  # take no chances and rewrite it.
15986  # Note: m4 eats our [], so we need to use [ and ] instead.
15987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15988  if test "x$has_forbidden_chars" != x; then
15989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15991  fi
15992
15993    # Output is in $new_path
15994
15995  windows_path="$new_path"
15996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15997    unix_path=`$CYGPATH -u "$windows_path"`
15998    new_path="$unix_path"
15999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16001    new_path="$unix_path"
16002  fi
16003
16004    # remove trailing .exe if any
16005    new_path="${new_path/%.exe/}"
16006
16007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16009  fi
16010
16011  else
16012    # We're on a posix platform. Hooray! :)
16013    # First separate the path from the arguments. This will split at the first
16014    # space.
16015    complete="$FOUND_MAKE"
16016    path="${complete%% *}"
16017    tmp="$complete EOL"
16018    arguments="${tmp#* }"
16019
16020    # Cannot rely on the command "which" here since it doesn't always work.
16021    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16022    if test -z "$is_absolute_path"; then
16023      # Path to executable is not absolute. Find it.
16024      IFS_save="$IFS"
16025      IFS=:
16026      for p in $PATH; do
16027        if test -f "$p/$path" && test -x "$p/$path"; then
16028          new_path="$p/$path"
16029          break
16030        fi
16031      done
16032      IFS="$IFS_save"
16033    else
16034      # This is an absolute path, we can use it without further modifications.
16035      new_path="$path"
16036    fi
16037
16038    if test "x$new_path" = x; then
16039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16041      has_space=`$ECHO "$complete" | $GREP " "`
16042      if test "x$has_space" != x; then
16043        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16045      fi
16046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16047    fi
16048  fi
16049
16050  # Now join together the path and the arguments once again
16051  if test "x$arguments" != xEOL; then
16052    new_complete="$new_path ${arguments% *}"
16053  else
16054    new_complete="$new_path"
16055  fi
16056
16057  if test "x$complete" != "x$new_complete"; then
16058    FOUND_MAKE="$new_complete"
16059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16061  fi
16062
16063        fi
16064      fi
16065    fi
16066  fi
16067
16068
16069    if test "x$FOUND_MAKE" = x; then
16070      for ac_prog in make
16071do
16072  # Extract the first word of "$ac_prog", so it can be a program name with args.
16073set dummy $ac_prog; ac_word=$2
16074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16075$as_echo_n "checking for $ac_word... " >&6; }
16076if ${ac_cv_path_CHECK_MAKE+:} false; then :
16077  $as_echo_n "(cached) " >&6
16078else
16079  case $CHECK_MAKE in
16080  [\\/]* | ?:[\\/]*)
16081  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16082  ;;
16083  *)
16084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16085for as_dir in $PATH
16086do
16087  IFS=$as_save_IFS
16088  test -z "$as_dir" && as_dir=.
16089    for ac_exec_ext in '' $ac_executable_extensions; do
16090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16091    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16093    break 2
16094  fi
16095done
16096  done
16097IFS=$as_save_IFS
16098
16099  ;;
16100esac
16101fi
16102CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16103if test -n "$CHECK_MAKE"; then
16104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16105$as_echo "$CHECK_MAKE" >&6; }
16106else
16107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16108$as_echo "no" >&6; }
16109fi
16110
16111
16112  test -n "$CHECK_MAKE" && break
16113done
16114
16115
16116  MAKE_CANDIDATE=""$CHECK_MAKE""
16117  DESCRIPTION="make in PATH"
16118  if test "x$MAKE_CANDIDATE" != x; then
16119    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16120$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16121    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16122    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16123    if test "x$IS_GNU_MAKE" = x; then
16124      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16125$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16126    else
16127      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16128      if test "x$IS_MODERN_MAKE" = x; then
16129        { $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
16130$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;}
16131      else
16132        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16133          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16134            MAKE_EXPECTED_ENV='cygwin'
16135          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16136            MAKE_EXPECTED_ENV='msys'
16137          else
16138            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16139          fi
16140          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16141          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16142        else
16143          # Not relevant for non-Windows
16144          IS_MAKE_CORRECT_ENV=true
16145        fi
16146        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16147          { $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
16148$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;}
16149        else
16150          FOUND_MAKE=$MAKE_CANDIDATE
16151
16152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16153
16154  # First separate the path from the arguments. This will split at the first
16155  # space.
16156  complete="$FOUND_MAKE"
16157  path="${complete%% *}"
16158  tmp="$complete EOL"
16159  arguments="${tmp#* }"
16160
16161  # Input might be given as Windows format, start by converting to
16162  # unix format.
16163  new_path=`$CYGPATH -u "$path"`
16164
16165  # Now try to locate executable using which
16166  new_path=`$WHICH "$new_path" 2> /dev/null`
16167  # bat and cmd files are not always considered executable in cygwin causing which
16168  # to not find them
16169  if test "x$new_path" = x \
16170      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16171      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16172    new_path=`$CYGPATH -u "$path"`
16173  fi
16174  if test "x$new_path" = x; then
16175    # Oops. Which didn't find the executable.
16176    # The splitting of arguments from the executable at a space might have been incorrect,
16177    # since paths with space are more likely in Windows. Give it another try with the whole
16178    # argument.
16179    path="$complete"
16180    arguments="EOL"
16181    new_path=`$CYGPATH -u "$path"`
16182    new_path=`$WHICH "$new_path" 2> /dev/null`
16183    # bat and cmd files are not always considered executable in cygwin causing which
16184    # to not find them
16185    if test "x$new_path" = x \
16186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16188      new_path=`$CYGPATH -u "$path"`
16189    fi
16190    if test "x$new_path" = x; then
16191      # It's still not found. Now this is an unrecoverable error.
16192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16194      has_space=`$ECHO "$complete" | $GREP " "`
16195      if test "x$has_space" != x; then
16196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16198      fi
16199      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16200    fi
16201  fi
16202
16203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16206  # "foo.exe" is OK but "foo" is an error.
16207  #
16208  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16209  # It is also a way to make sure we got the proper file name for the real test later on.
16210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16211  if test "x$test_shortpath" = x; then
16212    # Short path failed, file does not exist as specified.
16213    # Try adding .exe or .cmd
16214    if test -f "${new_path}.exe"; then
16215      input_to_shortpath="${new_path}.exe"
16216    elif test -f "${new_path}.cmd"; then
16217      input_to_shortpath="${new_path}.cmd"
16218    else
16219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16220$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16224    fi
16225  else
16226    input_to_shortpath="$new_path"
16227  fi
16228
16229  # Call helper function which possibly converts this using DOS-style short mode.
16230  # If so, the updated path is stored in $new_path.
16231  new_path="$input_to_shortpath"
16232
16233  input_path="$input_to_shortpath"
16234  # Check if we need to convert this using DOS-style short mode. If the path
16235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16236  # take no chances and rewrite it.
16237  # Note: m4 eats our [], so we need to use [ and ] instead.
16238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16239  if test "x$has_forbidden_chars" != x; then
16240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16244      # Going to short mode and back again did indeed matter. Since short mode is
16245      # case insensitive, let's make it lowercase to improve readability.
16246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16247      # Now convert it back to Unix-stile (cygpath)
16248      input_path=`$CYGPATH -u "$shortmode_path"`
16249      new_path="$input_path"
16250    fi
16251  fi
16252
16253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16254  if test "x$test_cygdrive_prefix" = x; then
16255    # As a simple fix, exclude /usr/bin since it's not a real path.
16256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16258      # a path prefixed by /cygdrive for fixpath to work.
16259      new_path="$CYGWIN_ROOT_PATH$input_path"
16260    fi
16261  fi
16262
16263  # remove trailing .exe if any
16264  new_path="${new_path/%.exe/}"
16265
16266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16267
16268  # First separate the path from the arguments. This will split at the first
16269  # space.
16270  complete="$FOUND_MAKE"
16271  path="${complete%% *}"
16272  tmp="$complete EOL"
16273  arguments="${tmp#* }"
16274
16275  # Input might be given as Windows format, start by converting to
16276  # unix format.
16277  new_path="$path"
16278
16279  windows_path="$new_path"
16280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16281    unix_path=`$CYGPATH -u "$windows_path"`
16282    new_path="$unix_path"
16283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16285    new_path="$unix_path"
16286  fi
16287
16288
16289  # Now try to locate executable using which
16290  new_path=`$WHICH "$new_path" 2> /dev/null`
16291
16292  if test "x$new_path" = x; then
16293    # Oops. Which didn't find the executable.
16294    # The splitting of arguments from the executable at a space might have been incorrect,
16295    # since paths with space are more likely in Windows. Give it another try with the whole
16296    # argument.
16297    path="$complete"
16298    arguments="EOL"
16299    new_path="$path"
16300
16301  windows_path="$new_path"
16302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16303    unix_path=`$CYGPATH -u "$windows_path"`
16304    new_path="$unix_path"
16305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16307    new_path="$unix_path"
16308  fi
16309
16310
16311    new_path=`$WHICH "$new_path" 2> /dev/null`
16312
16313    if test "x$new_path" = x; then
16314      # It's still not found. Now this is an unrecoverable error.
16315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16317      has_space=`$ECHO "$complete" | $GREP " "`
16318      if test "x$has_space" != x; then
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16321      fi
16322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16323    fi
16324  fi
16325
16326  # Now new_path has a complete unix path to the binary
16327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16328    # Keep paths in /bin as-is, but remove trailing .exe if any
16329    new_path="${new_path/%.exe/}"
16330    # Do not save /bin paths to all_fixpath_prefixes!
16331  else
16332    # Not in mixed or Windows style, start by that.
16333    new_path=`cmd //c echo $new_path`
16334
16335  input_path="$new_path"
16336  # Check if we need to convert this using DOS-style short mode. If the path
16337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16338  # take no chances and rewrite it.
16339  # Note: m4 eats our [], so we need to use [ and ] instead.
16340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16341  if test "x$has_forbidden_chars" != x; then
16342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16344  fi
16345
16346    # Output is in $new_path
16347
16348  windows_path="$new_path"
16349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16350    unix_path=`$CYGPATH -u "$windows_path"`
16351    new_path="$unix_path"
16352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16354    new_path="$unix_path"
16355  fi
16356
16357    # remove trailing .exe if any
16358    new_path="${new_path/%.exe/}"
16359
16360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16362  fi
16363
16364  else
16365    # We're on a posix platform. Hooray! :)
16366    # First separate the path from the arguments. This will split at the first
16367    # space.
16368    complete="$FOUND_MAKE"
16369    path="${complete%% *}"
16370    tmp="$complete EOL"
16371    arguments="${tmp#* }"
16372
16373    # Cannot rely on the command "which" here since it doesn't always work.
16374    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16375    if test -z "$is_absolute_path"; then
16376      # Path to executable is not absolute. Find it.
16377      IFS_save="$IFS"
16378      IFS=:
16379      for p in $PATH; do
16380        if test -f "$p/$path" && test -x "$p/$path"; then
16381          new_path="$p/$path"
16382          break
16383        fi
16384      done
16385      IFS="$IFS_save"
16386    else
16387      # This is an absolute path, we can use it without further modifications.
16388      new_path="$path"
16389    fi
16390
16391    if test "x$new_path" = x; then
16392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16394      has_space=`$ECHO "$complete" | $GREP " "`
16395      if test "x$has_space" != x; then
16396        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16398      fi
16399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16400    fi
16401  fi
16402
16403  # Now join together the path and the arguments once again
16404  if test "x$arguments" != xEOL; then
16405    new_complete="$new_path ${arguments% *}"
16406  else
16407    new_complete="$new_path"
16408  fi
16409
16410  if test "x$complete" != "x$new_complete"; then
16411    FOUND_MAKE="$new_complete"
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16413$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16414  fi
16415
16416        fi
16417      fi
16418    fi
16419  fi
16420
16421    fi
16422
16423    if test "x$FOUND_MAKE" = x; then
16424      if test "x$TOOLCHAIN_PATH" != x; then
16425        # We have a toolchain path, check that as well before giving up.
16426        OLD_PATH=$PATH
16427        PATH=$TOOLCHAIN_PATH:$PATH
16428        for ac_prog in gmake
16429do
16430  # Extract the first word of "$ac_prog", so it can be a program name with args.
16431set dummy $ac_prog; ac_word=$2
16432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16433$as_echo_n "checking for $ac_word... " >&6; }
16434if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16435  $as_echo_n "(cached) " >&6
16436else
16437  case $CHECK_TOOLSDIR_GMAKE in
16438  [\\/]* | ?:[\\/]*)
16439  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16440  ;;
16441  *)
16442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16443for as_dir in $PATH
16444do
16445  IFS=$as_save_IFS
16446  test -z "$as_dir" && as_dir=.
16447    for ac_exec_ext in '' $ac_executable_extensions; do
16448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16449    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16451    break 2
16452  fi
16453done
16454  done
16455IFS=$as_save_IFS
16456
16457  ;;
16458esac
16459fi
16460CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16461if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16463$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16464else
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16466$as_echo "no" >&6; }
16467fi
16468
16469
16470  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16471done
16472
16473
16474  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16475  DESCRIPTION="gmake in tools-dir"
16476  if test "x$MAKE_CANDIDATE" != x; then
16477    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16478$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16479    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16480    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16481    if test "x$IS_GNU_MAKE" = x; then
16482      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16483$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16484    else
16485      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16486      if test "x$IS_MODERN_MAKE" = x; then
16487        { $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
16488$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;}
16489      else
16490        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16491          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16492            MAKE_EXPECTED_ENV='cygwin'
16493          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16494            MAKE_EXPECTED_ENV='msys'
16495          else
16496            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16497          fi
16498          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16499          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16500        else
16501          # Not relevant for non-Windows
16502          IS_MAKE_CORRECT_ENV=true
16503        fi
16504        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16505          { $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
16506$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;}
16507        else
16508          FOUND_MAKE=$MAKE_CANDIDATE
16509
16510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16511
16512  # First separate the path from the arguments. This will split at the first
16513  # space.
16514  complete="$FOUND_MAKE"
16515  path="${complete%% *}"
16516  tmp="$complete EOL"
16517  arguments="${tmp#* }"
16518
16519  # Input might be given as Windows format, start by converting to
16520  # unix format.
16521  new_path=`$CYGPATH -u "$path"`
16522
16523  # Now try to locate executable using which
16524  new_path=`$WHICH "$new_path" 2> /dev/null`
16525  # bat and cmd files are not always considered executable in cygwin causing which
16526  # to not find them
16527  if test "x$new_path" = x \
16528      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16529      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16530    new_path=`$CYGPATH -u "$path"`
16531  fi
16532  if test "x$new_path" = x; then
16533    # Oops. Which didn't find the executable.
16534    # The splitting of arguments from the executable at a space might have been incorrect,
16535    # since paths with space are more likely in Windows. Give it another try with the whole
16536    # argument.
16537    path="$complete"
16538    arguments="EOL"
16539    new_path=`$CYGPATH -u "$path"`
16540    new_path=`$WHICH "$new_path" 2> /dev/null`
16541    # bat and cmd files are not always considered executable in cygwin causing which
16542    # to not find them
16543    if test "x$new_path" = x \
16544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16546      new_path=`$CYGPATH -u "$path"`
16547    fi
16548    if test "x$new_path" = x; then
16549      # It's still not found. Now this is an unrecoverable error.
16550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16552      has_space=`$ECHO "$complete" | $GREP " "`
16553      if test "x$has_space" != x; then
16554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16556      fi
16557      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16558    fi
16559  fi
16560
16561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16564  # "foo.exe" is OK but "foo" is an error.
16565  #
16566  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16567  # It is also a way to make sure we got the proper file name for the real test later on.
16568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16569  if test "x$test_shortpath" = x; then
16570    # Short path failed, file does not exist as specified.
16571    # Try adding .exe or .cmd
16572    if test -f "${new_path}.exe"; then
16573      input_to_shortpath="${new_path}.exe"
16574    elif test -f "${new_path}.cmd"; then
16575      input_to_shortpath="${new_path}.cmd"
16576    else
16577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16578$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16580$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16581      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16582    fi
16583  else
16584    input_to_shortpath="$new_path"
16585  fi
16586
16587  # Call helper function which possibly converts this using DOS-style short mode.
16588  # If so, the updated path is stored in $new_path.
16589  new_path="$input_to_shortpath"
16590
16591  input_path="$input_to_shortpath"
16592  # Check if we need to convert this using DOS-style short mode. If the path
16593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16594  # take no chances and rewrite it.
16595  # Note: m4 eats our [], so we need to use [ and ] instead.
16596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16597  if test "x$has_forbidden_chars" != x; then
16598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16602      # Going to short mode and back again did indeed matter. Since short mode is
16603      # case insensitive, let's make it lowercase to improve readability.
16604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16605      # Now convert it back to Unix-stile (cygpath)
16606      input_path=`$CYGPATH -u "$shortmode_path"`
16607      new_path="$input_path"
16608    fi
16609  fi
16610
16611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16612  if test "x$test_cygdrive_prefix" = x; then
16613    # As a simple fix, exclude /usr/bin since it's not a real path.
16614    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16616      # a path prefixed by /cygdrive for fixpath to work.
16617      new_path="$CYGWIN_ROOT_PATH$input_path"
16618    fi
16619  fi
16620
16621  # remove trailing .exe if any
16622  new_path="${new_path/%.exe/}"
16623
16624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16625
16626  # First separate the path from the arguments. This will split at the first
16627  # space.
16628  complete="$FOUND_MAKE"
16629  path="${complete%% *}"
16630  tmp="$complete EOL"
16631  arguments="${tmp#* }"
16632
16633  # Input might be given as Windows format, start by converting to
16634  # unix format.
16635  new_path="$path"
16636
16637  windows_path="$new_path"
16638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16639    unix_path=`$CYGPATH -u "$windows_path"`
16640    new_path="$unix_path"
16641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16643    new_path="$unix_path"
16644  fi
16645
16646
16647  # Now try to locate executable using which
16648  new_path=`$WHICH "$new_path" 2> /dev/null`
16649
16650  if test "x$new_path" = x; then
16651    # Oops. Which didn't find the executable.
16652    # The splitting of arguments from the executable at a space might have been incorrect,
16653    # since paths with space are more likely in Windows. Give it another try with the whole
16654    # argument.
16655    path="$complete"
16656    arguments="EOL"
16657    new_path="$path"
16658
16659  windows_path="$new_path"
16660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16661    unix_path=`$CYGPATH -u "$windows_path"`
16662    new_path="$unix_path"
16663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16665    new_path="$unix_path"
16666  fi
16667
16668
16669    new_path=`$WHICH "$new_path" 2> /dev/null`
16670
16671    if test "x$new_path" = x; then
16672      # It's still not found. Now this is an unrecoverable error.
16673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16675      has_space=`$ECHO "$complete" | $GREP " "`
16676      if test "x$has_space" != x; then
16677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16679      fi
16680      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16681    fi
16682  fi
16683
16684  # Now new_path has a complete unix path to the binary
16685  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16686    # Keep paths in /bin as-is, but remove trailing .exe if any
16687    new_path="${new_path/%.exe/}"
16688    # Do not save /bin paths to all_fixpath_prefixes!
16689  else
16690    # Not in mixed or Windows style, start by that.
16691    new_path=`cmd //c echo $new_path`
16692
16693  input_path="$new_path"
16694  # Check if we need to convert this using DOS-style short mode. If the path
16695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16696  # take no chances and rewrite it.
16697  # Note: m4 eats our [], so we need to use [ and ] instead.
16698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16699  if test "x$has_forbidden_chars" != x; then
16700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16702  fi
16703
16704    # Output is in $new_path
16705
16706  windows_path="$new_path"
16707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16708    unix_path=`$CYGPATH -u "$windows_path"`
16709    new_path="$unix_path"
16710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16712    new_path="$unix_path"
16713  fi
16714
16715    # remove trailing .exe if any
16716    new_path="${new_path/%.exe/}"
16717
16718    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16719    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16720  fi
16721
16722  else
16723    # We're on a posix platform. Hooray! :)
16724    # First separate the path from the arguments. This will split at the first
16725    # space.
16726    complete="$FOUND_MAKE"
16727    path="${complete%% *}"
16728    tmp="$complete EOL"
16729    arguments="${tmp#* }"
16730
16731    # Cannot rely on the command "which" here since it doesn't always work.
16732    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16733    if test -z "$is_absolute_path"; then
16734      # Path to executable is not absolute. Find it.
16735      IFS_save="$IFS"
16736      IFS=:
16737      for p in $PATH; do
16738        if test -f "$p/$path" && test -x "$p/$path"; then
16739          new_path="$p/$path"
16740          break
16741        fi
16742      done
16743      IFS="$IFS_save"
16744    else
16745      # This is an absolute path, we can use it without further modifications.
16746      new_path="$path"
16747    fi
16748
16749    if test "x$new_path" = x; then
16750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16752      has_space=`$ECHO "$complete" | $GREP " "`
16753      if test "x$has_space" != x; then
16754        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16755$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16756      fi
16757      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16758    fi
16759  fi
16760
16761  # Now join together the path and the arguments once again
16762  if test "x$arguments" != xEOL; then
16763    new_complete="$new_path ${arguments% *}"
16764  else
16765    new_complete="$new_path"
16766  fi
16767
16768  if test "x$complete" != "x$new_complete"; then
16769    FOUND_MAKE="$new_complete"
16770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16771$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16772  fi
16773
16774        fi
16775      fi
16776    fi
16777  fi
16778
16779        if test "x$FOUND_MAKE" = x; then
16780          for ac_prog in make
16781do
16782  # Extract the first word of "$ac_prog", so it can be a program name with args.
16783set dummy $ac_prog; ac_word=$2
16784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16785$as_echo_n "checking for $ac_word... " >&6; }
16786if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16787  $as_echo_n "(cached) " >&6
16788else
16789  case $CHECK_TOOLSDIR_MAKE in
16790  [\\/]* | ?:[\\/]*)
16791  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16792  ;;
16793  *)
16794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16795for as_dir in $PATH
16796do
16797  IFS=$as_save_IFS
16798  test -z "$as_dir" && as_dir=.
16799    for ac_exec_ext in '' $ac_executable_extensions; do
16800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16801    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16803    break 2
16804  fi
16805done
16806  done
16807IFS=$as_save_IFS
16808
16809  ;;
16810esac
16811fi
16812CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16813if test -n "$CHECK_TOOLSDIR_MAKE"; then
16814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16815$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16816else
16817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16818$as_echo "no" >&6; }
16819fi
16820
16821
16822  test -n "$CHECK_TOOLSDIR_MAKE" && break
16823done
16824
16825
16826  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16827  DESCRIPTION="make in tools-dir"
16828  if test "x$MAKE_CANDIDATE" != x; then
16829    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16830$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16831    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16832    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16833    if test "x$IS_GNU_MAKE" = x; then
16834      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16835$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16836    else
16837      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16838      if test "x$IS_MODERN_MAKE" = x; then
16839        { $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
16840$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;}
16841      else
16842        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16843          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844            MAKE_EXPECTED_ENV='cygwin'
16845          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846            MAKE_EXPECTED_ENV='msys'
16847          else
16848            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16849          fi
16850          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16851          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16852        else
16853          # Not relevant for non-Windows
16854          IS_MAKE_CORRECT_ENV=true
16855        fi
16856        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16857          { $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
16858$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;}
16859        else
16860          FOUND_MAKE=$MAKE_CANDIDATE
16861
16862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16863
16864  # First separate the path from the arguments. This will split at the first
16865  # space.
16866  complete="$FOUND_MAKE"
16867  path="${complete%% *}"
16868  tmp="$complete EOL"
16869  arguments="${tmp#* }"
16870
16871  # Input might be given as Windows format, start by converting to
16872  # unix format.
16873  new_path=`$CYGPATH -u "$path"`
16874
16875  # Now try to locate executable using which
16876  new_path=`$WHICH "$new_path" 2> /dev/null`
16877  # bat and cmd files are not always considered executable in cygwin causing which
16878  # to not find them
16879  if test "x$new_path" = x \
16880      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16881      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16882    new_path=`$CYGPATH -u "$path"`
16883  fi
16884  if test "x$new_path" = x; then
16885    # Oops. Which didn't find the executable.
16886    # The splitting of arguments from the executable at a space might have been incorrect,
16887    # since paths with space are more likely in Windows. Give it another try with the whole
16888    # argument.
16889    path="$complete"
16890    arguments="EOL"
16891    new_path=`$CYGPATH -u "$path"`
16892    new_path=`$WHICH "$new_path" 2> /dev/null`
16893    # bat and cmd files are not always considered executable in cygwin causing which
16894    # to not find them
16895    if test "x$new_path" = x \
16896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16898      new_path=`$CYGPATH -u "$path"`
16899    fi
16900    if test "x$new_path" = x; then
16901      # It's still not found. Now this is an unrecoverable error.
16902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16903$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16904      has_space=`$ECHO "$complete" | $GREP " "`
16905      if test "x$has_space" != x; then
16906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16908      fi
16909      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16910    fi
16911  fi
16912
16913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16916  # "foo.exe" is OK but "foo" is an error.
16917  #
16918  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16919  # It is also a way to make sure we got the proper file name for the real test later on.
16920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16921  if test "x$test_shortpath" = x; then
16922    # Short path failed, file does not exist as specified.
16923    # Try adding .exe or .cmd
16924    if test -f "${new_path}.exe"; then
16925      input_to_shortpath="${new_path}.exe"
16926    elif test -f "${new_path}.cmd"; then
16927      input_to_shortpath="${new_path}.cmd"
16928    else
16929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16930$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16933      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16934    fi
16935  else
16936    input_to_shortpath="$new_path"
16937  fi
16938
16939  # Call helper function which possibly converts this using DOS-style short mode.
16940  # If so, the updated path is stored in $new_path.
16941  new_path="$input_to_shortpath"
16942
16943  input_path="$input_to_shortpath"
16944  # Check if we need to convert this using DOS-style short mode. If the path
16945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16946  # take no chances and rewrite it.
16947  # Note: m4 eats our [], so we need to use [ and ] instead.
16948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16949  if test "x$has_forbidden_chars" != x; then
16950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16954      # Going to short mode and back again did indeed matter. Since short mode is
16955      # case insensitive, let's make it lowercase to improve readability.
16956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16957      # Now convert it back to Unix-stile (cygpath)
16958      input_path=`$CYGPATH -u "$shortmode_path"`
16959      new_path="$input_path"
16960    fi
16961  fi
16962
16963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16964  if test "x$test_cygdrive_prefix" = x; then
16965    # As a simple fix, exclude /usr/bin since it's not a real path.
16966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16968      # a path prefixed by /cygdrive for fixpath to work.
16969      new_path="$CYGWIN_ROOT_PATH$input_path"
16970    fi
16971  fi
16972
16973  # remove trailing .exe if any
16974  new_path="${new_path/%.exe/}"
16975
16976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16977
16978  # First separate the path from the arguments. This will split at the first
16979  # space.
16980  complete="$FOUND_MAKE"
16981  path="${complete%% *}"
16982  tmp="$complete EOL"
16983  arguments="${tmp#* }"
16984
16985  # Input might be given as Windows format, start by converting to
16986  # unix format.
16987  new_path="$path"
16988
16989  windows_path="$new_path"
16990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991    unix_path=`$CYGPATH -u "$windows_path"`
16992    new_path="$unix_path"
16993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995    new_path="$unix_path"
16996  fi
16997
16998
16999  # Now try to locate executable using which
17000  new_path=`$WHICH "$new_path" 2> /dev/null`
17001
17002  if test "x$new_path" = x; then
17003    # Oops. Which didn't find the executable.
17004    # The splitting of arguments from the executable at a space might have been incorrect,
17005    # since paths with space are more likely in Windows. Give it another try with the whole
17006    # argument.
17007    path="$complete"
17008    arguments="EOL"
17009    new_path="$path"
17010
17011  windows_path="$new_path"
17012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17013    unix_path=`$CYGPATH -u "$windows_path"`
17014    new_path="$unix_path"
17015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17017    new_path="$unix_path"
17018  fi
17019
17020
17021    new_path=`$WHICH "$new_path" 2> /dev/null`
17022
17023    if test "x$new_path" = x; then
17024      # It's still not found. Now this is an unrecoverable error.
17025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17027      has_space=`$ECHO "$complete" | $GREP " "`
17028      if test "x$has_space" != x; then
17029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17031      fi
17032      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17033    fi
17034  fi
17035
17036  # Now new_path has a complete unix path to the binary
17037  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17038    # Keep paths in /bin as-is, but remove trailing .exe if any
17039    new_path="${new_path/%.exe/}"
17040    # Do not save /bin paths to all_fixpath_prefixes!
17041  else
17042    # Not in mixed or Windows style, start by that.
17043    new_path=`cmd //c echo $new_path`
17044
17045  input_path="$new_path"
17046  # Check if we need to convert this using DOS-style short mode. If the path
17047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17048  # take no chances and rewrite it.
17049  # Note: m4 eats our [], so we need to use [ and ] instead.
17050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17051  if test "x$has_forbidden_chars" != x; then
17052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17054  fi
17055
17056    # Output is in $new_path
17057
17058  windows_path="$new_path"
17059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17060    unix_path=`$CYGPATH -u "$windows_path"`
17061    new_path="$unix_path"
17062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17064    new_path="$unix_path"
17065  fi
17066
17067    # remove trailing .exe if any
17068    new_path="${new_path/%.exe/}"
17069
17070    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17071    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17072  fi
17073
17074  else
17075    # We're on a posix platform. Hooray! :)
17076    # First separate the path from the arguments. This will split at the first
17077    # space.
17078    complete="$FOUND_MAKE"
17079    path="${complete%% *}"
17080    tmp="$complete EOL"
17081    arguments="${tmp#* }"
17082
17083    # Cannot rely on the command "which" here since it doesn't always work.
17084    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17085    if test -z "$is_absolute_path"; then
17086      # Path to executable is not absolute. Find it.
17087      IFS_save="$IFS"
17088      IFS=:
17089      for p in $PATH; do
17090        if test -f "$p/$path" && test -x "$p/$path"; then
17091          new_path="$p/$path"
17092          break
17093        fi
17094      done
17095      IFS="$IFS_save"
17096    else
17097      # This is an absolute path, we can use it without further modifications.
17098      new_path="$path"
17099    fi
17100
17101    if test "x$new_path" = x; then
17102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17104      has_space=`$ECHO "$complete" | $GREP " "`
17105      if test "x$has_space" != x; then
17106        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17107$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17108      fi
17109      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17110    fi
17111  fi
17112
17113  # Now join together the path and the arguments once again
17114  if test "x$arguments" != xEOL; then
17115    new_complete="$new_path ${arguments% *}"
17116  else
17117    new_complete="$new_path"
17118  fi
17119
17120  if test "x$complete" != "x$new_complete"; then
17121    FOUND_MAKE="$new_complete"
17122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17123$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17124  fi
17125
17126        fi
17127      fi
17128    fi
17129  fi
17130
17131        fi
17132        PATH=$OLD_PATH
17133      fi
17134    fi
17135
17136    if test "x$FOUND_MAKE" = x; then
17137      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
17138    fi
17139  fi
17140
17141  MAKE=$FOUND_MAKE
17142
17143  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17144$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17145
17146
17147
17148  # Test if find supports -delete
17149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17150$as_echo_n "checking if find supports -delete... " >&6; }
17151  FIND_DELETE="-delete"
17152
17153  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17154
17155  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17156
17157  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17158  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17159    # No, it does not.
17160    rm $DELETEDIR/TestIfFindSupportsDelete
17161    FIND_DELETE="-exec rm \{\} \+"
17162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17163$as_echo "no" >&6; }
17164  else
17165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17166$as_echo "yes" >&6; }
17167  fi
17168  rmdir $DELETEDIR
17169
17170
17171
17172  # These tools might not be installed by default,
17173  # need hint on how to install them.
17174
17175
17176
17177  # Publish this variable in the help.
17178
17179
17180  if test "x$UNZIP" = x; then
17181    # The variable is not set by user, try to locate tool using the code snippet
17182    for ac_prog in unzip
17183do
17184  # Extract the first word of "$ac_prog", so it can be a program name with args.
17185set dummy $ac_prog; ac_word=$2
17186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17187$as_echo_n "checking for $ac_word... " >&6; }
17188if ${ac_cv_path_UNZIP+:} false; then :
17189  $as_echo_n "(cached) " >&6
17190else
17191  case $UNZIP in
17192  [\\/]* | ?:[\\/]*)
17193  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17194  ;;
17195  *)
17196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17197for as_dir in $PATH
17198do
17199  IFS=$as_save_IFS
17200  test -z "$as_dir" && as_dir=.
17201    for ac_exec_ext in '' $ac_executable_extensions; do
17202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17203    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17205    break 2
17206  fi
17207done
17208  done
17209IFS=$as_save_IFS
17210
17211  ;;
17212esac
17213fi
17214UNZIP=$ac_cv_path_UNZIP
17215if test -n "$UNZIP"; then
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17217$as_echo "$UNZIP" >&6; }
17218else
17219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17220$as_echo "no" >&6; }
17221fi
17222
17223
17224  test -n "$UNZIP" && break
17225done
17226
17227  else
17228    # The variable is set, but is it from the command line or the environment?
17229
17230    # Try to remove the string !UNZIP! from our list.
17231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17233      # If it failed, the variable was not from the command line. Ignore it,
17234      # but warn the user (except for BASH, which is always set by the calling BASH).
17235      if test "xUNZIP" != xBASH; then
17236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17237$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17238      fi
17239      # Try to locate tool using the code snippet
17240      for ac_prog in unzip
17241do
17242  # Extract the first word of "$ac_prog", so it can be a program name with args.
17243set dummy $ac_prog; ac_word=$2
17244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17245$as_echo_n "checking for $ac_word... " >&6; }
17246if ${ac_cv_path_UNZIP+:} false; then :
17247  $as_echo_n "(cached) " >&6
17248else
17249  case $UNZIP in
17250  [\\/]* | ?:[\\/]*)
17251  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17252  ;;
17253  *)
17254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17255for as_dir in $PATH
17256do
17257  IFS=$as_save_IFS
17258  test -z "$as_dir" && as_dir=.
17259    for ac_exec_ext in '' $ac_executable_extensions; do
17260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17261    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17263    break 2
17264  fi
17265done
17266  done
17267IFS=$as_save_IFS
17268
17269  ;;
17270esac
17271fi
17272UNZIP=$ac_cv_path_UNZIP
17273if test -n "$UNZIP"; then
17274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17275$as_echo "$UNZIP" >&6; }
17276else
17277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17278$as_echo "no" >&6; }
17279fi
17280
17281
17282  test -n "$UNZIP" && break
17283done
17284
17285    else
17286      # If it succeeded, then it was overridden by the user. We will use it
17287      # for the tool.
17288
17289      # First remove it from the list of overridden variables, so we can test
17290      # for unknown variables in the end.
17291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17292
17293      # Check if the provided tool contains a complete path.
17294      tool_specified="$UNZIP"
17295      tool_basename="${tool_specified##*/}"
17296      if test "x$tool_basename" = "x$tool_specified"; then
17297        # A command without a complete path is provided, search $PATH.
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17299$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17300        # Extract the first word of "$tool_basename", so it can be a program name with args.
17301set dummy $tool_basename; ac_word=$2
17302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17303$as_echo_n "checking for $ac_word... " >&6; }
17304if ${ac_cv_path_UNZIP+:} false; then :
17305  $as_echo_n "(cached) " >&6
17306else
17307  case $UNZIP in
17308  [\\/]* | ?:[\\/]*)
17309  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17310  ;;
17311  *)
17312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17313for as_dir in $PATH
17314do
17315  IFS=$as_save_IFS
17316  test -z "$as_dir" && as_dir=.
17317    for ac_exec_ext in '' $ac_executable_extensions; do
17318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17319    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17321    break 2
17322  fi
17323done
17324  done
17325IFS=$as_save_IFS
17326
17327  ;;
17328esac
17329fi
17330UNZIP=$ac_cv_path_UNZIP
17331if test -n "$UNZIP"; then
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17333$as_echo "$UNZIP" >&6; }
17334else
17335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17336$as_echo "no" >&6; }
17337fi
17338
17339
17340        if test "x$UNZIP" = x; then
17341          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17342        fi
17343      else
17344        # Otherwise we believe it is a complete path. Use it as it is.
17345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17346$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17348$as_echo_n "checking for UNZIP... " >&6; }
17349        if test ! -x "$tool_specified"; then
17350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17351$as_echo "not found" >&6; }
17352          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17353        fi
17354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17355$as_echo "$tool_specified" >&6; }
17356      fi
17357    fi
17358  fi
17359
17360
17361
17362  if test "x$UNZIP" = x; then
17363    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17364  fi
17365
17366
17367
17368
17369
17370  # Publish this variable in the help.
17371
17372
17373  if test "x$ZIP" = x; then
17374    # The variable is not set by user, try to locate tool using the code snippet
17375    for ac_prog in zip
17376do
17377  # Extract the first word of "$ac_prog", so it can be a program name with args.
17378set dummy $ac_prog; ac_word=$2
17379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17380$as_echo_n "checking for $ac_word... " >&6; }
17381if ${ac_cv_path_ZIP+:} false; then :
17382  $as_echo_n "(cached) " >&6
17383else
17384  case $ZIP in
17385  [\\/]* | ?:[\\/]*)
17386  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17387  ;;
17388  *)
17389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17390for as_dir in $PATH
17391do
17392  IFS=$as_save_IFS
17393  test -z "$as_dir" && as_dir=.
17394    for ac_exec_ext in '' $ac_executable_extensions; do
17395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17396    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17398    break 2
17399  fi
17400done
17401  done
17402IFS=$as_save_IFS
17403
17404  ;;
17405esac
17406fi
17407ZIP=$ac_cv_path_ZIP
17408if test -n "$ZIP"; then
17409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17410$as_echo "$ZIP" >&6; }
17411else
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17413$as_echo "no" >&6; }
17414fi
17415
17416
17417  test -n "$ZIP" && break
17418done
17419
17420  else
17421    # The variable is set, but is it from the command line or the environment?
17422
17423    # Try to remove the string !ZIP! from our list.
17424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17426      # If it failed, the variable was not from the command line. Ignore it,
17427      # but warn the user (except for BASH, which is always set by the calling BASH).
17428      if test "xZIP" != xBASH; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17430$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17431      fi
17432      # Try to locate tool using the code snippet
17433      for ac_prog in zip
17434do
17435  # Extract the first word of "$ac_prog", so it can be a program name with args.
17436set dummy $ac_prog; ac_word=$2
17437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17438$as_echo_n "checking for $ac_word... " >&6; }
17439if ${ac_cv_path_ZIP+:} false; then :
17440  $as_echo_n "(cached) " >&6
17441else
17442  case $ZIP in
17443  [\\/]* | ?:[\\/]*)
17444  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17445  ;;
17446  *)
17447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448for as_dir in $PATH
17449do
17450  IFS=$as_save_IFS
17451  test -z "$as_dir" && as_dir=.
17452    for ac_exec_ext in '' $ac_executable_extensions; do
17453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17454    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456    break 2
17457  fi
17458done
17459  done
17460IFS=$as_save_IFS
17461
17462  ;;
17463esac
17464fi
17465ZIP=$ac_cv_path_ZIP
17466if test -n "$ZIP"; then
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17468$as_echo "$ZIP" >&6; }
17469else
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17471$as_echo "no" >&6; }
17472fi
17473
17474
17475  test -n "$ZIP" && break
17476done
17477
17478    else
17479      # If it succeeded, then it was overridden by the user. We will use it
17480      # for the tool.
17481
17482      # First remove it from the list of overridden variables, so we can test
17483      # for unknown variables in the end.
17484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17485
17486      # Check if the provided tool contains a complete path.
17487      tool_specified="$ZIP"
17488      tool_basename="${tool_specified##*/}"
17489      if test "x$tool_basename" = "x$tool_specified"; then
17490        # A command without a complete path is provided, search $PATH.
17491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17492$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17493        # Extract the first word of "$tool_basename", so it can be a program name with args.
17494set dummy $tool_basename; ac_word=$2
17495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17496$as_echo_n "checking for $ac_word... " >&6; }
17497if ${ac_cv_path_ZIP+:} false; then :
17498  $as_echo_n "(cached) " >&6
17499else
17500  case $ZIP in
17501  [\\/]* | ?:[\\/]*)
17502  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17503  ;;
17504  *)
17505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17506for as_dir in $PATH
17507do
17508  IFS=$as_save_IFS
17509  test -z "$as_dir" && as_dir=.
17510    for ac_exec_ext in '' $ac_executable_extensions; do
17511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17512    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17514    break 2
17515  fi
17516done
17517  done
17518IFS=$as_save_IFS
17519
17520  ;;
17521esac
17522fi
17523ZIP=$ac_cv_path_ZIP
17524if test -n "$ZIP"; then
17525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17526$as_echo "$ZIP" >&6; }
17527else
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17529$as_echo "no" >&6; }
17530fi
17531
17532
17533        if test "x$ZIP" = x; then
17534          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17535        fi
17536      else
17537        # Otherwise we believe it is a complete path. Use it as it is.
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17539$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17541$as_echo_n "checking for ZIP... " >&6; }
17542        if test ! -x "$tool_specified"; then
17543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17544$as_echo "not found" >&6; }
17545          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17546        fi
17547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17548$as_echo "$tool_specified" >&6; }
17549      fi
17550    fi
17551  fi
17552
17553
17554
17555  if test "x$ZIP" = x; then
17556    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17557  fi
17558
17559
17560
17561  # Non-required basic tools
17562
17563
17564
17565  # Publish this variable in the help.
17566
17567
17568  if test "x$LDD" = x; then
17569    # The variable is not set by user, try to locate tool using the code snippet
17570    for ac_prog in ldd
17571do
17572  # Extract the first word of "$ac_prog", so it can be a program name with args.
17573set dummy $ac_prog; ac_word=$2
17574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17575$as_echo_n "checking for $ac_word... " >&6; }
17576if ${ac_cv_path_LDD+:} false; then :
17577  $as_echo_n "(cached) " >&6
17578else
17579  case $LDD in
17580  [\\/]* | ?:[\\/]*)
17581  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17582  ;;
17583  *)
17584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17585for as_dir in $PATH
17586do
17587  IFS=$as_save_IFS
17588  test -z "$as_dir" && as_dir=.
17589    for ac_exec_ext in '' $ac_executable_extensions; do
17590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17591    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17593    break 2
17594  fi
17595done
17596  done
17597IFS=$as_save_IFS
17598
17599  ;;
17600esac
17601fi
17602LDD=$ac_cv_path_LDD
17603if test -n "$LDD"; then
17604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17605$as_echo "$LDD" >&6; }
17606else
17607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17608$as_echo "no" >&6; }
17609fi
17610
17611
17612  test -n "$LDD" && break
17613done
17614
17615  else
17616    # The variable is set, but is it from the command line or the environment?
17617
17618    # Try to remove the string !LDD! from our list.
17619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17621      # If it failed, the variable was not from the command line. Ignore it,
17622      # but warn the user (except for BASH, which is always set by the calling BASH).
17623      if test "xLDD" != xBASH; then
17624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17625$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17626      fi
17627      # Try to locate tool using the code snippet
17628      for ac_prog in ldd
17629do
17630  # Extract the first word of "$ac_prog", so it can be a program name with args.
17631set dummy $ac_prog; ac_word=$2
17632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17633$as_echo_n "checking for $ac_word... " >&6; }
17634if ${ac_cv_path_LDD+:} false; then :
17635  $as_echo_n "(cached) " >&6
17636else
17637  case $LDD in
17638  [\\/]* | ?:[\\/]*)
17639  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17640  ;;
17641  *)
17642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17643for as_dir in $PATH
17644do
17645  IFS=$as_save_IFS
17646  test -z "$as_dir" && as_dir=.
17647    for ac_exec_ext in '' $ac_executable_extensions; do
17648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17649    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17651    break 2
17652  fi
17653done
17654  done
17655IFS=$as_save_IFS
17656
17657  ;;
17658esac
17659fi
17660LDD=$ac_cv_path_LDD
17661if test -n "$LDD"; then
17662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17663$as_echo "$LDD" >&6; }
17664else
17665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17666$as_echo "no" >&6; }
17667fi
17668
17669
17670  test -n "$LDD" && break
17671done
17672
17673    else
17674      # If it succeeded, then it was overridden by the user. We will use it
17675      # for the tool.
17676
17677      # First remove it from the list of overridden variables, so we can test
17678      # for unknown variables in the end.
17679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17680
17681      # Check if the provided tool contains a complete path.
17682      tool_specified="$LDD"
17683      tool_basename="${tool_specified##*/}"
17684      if test "x$tool_basename" = "x$tool_specified"; then
17685        # A command without a complete path is provided, search $PATH.
17686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17687$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17688        # Extract the first word of "$tool_basename", so it can be a program name with args.
17689set dummy $tool_basename; ac_word=$2
17690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17691$as_echo_n "checking for $ac_word... " >&6; }
17692if ${ac_cv_path_LDD+:} false; then :
17693  $as_echo_n "(cached) " >&6
17694else
17695  case $LDD in
17696  [\\/]* | ?:[\\/]*)
17697  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17698  ;;
17699  *)
17700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17701for as_dir in $PATH
17702do
17703  IFS=$as_save_IFS
17704  test -z "$as_dir" && as_dir=.
17705    for ac_exec_ext in '' $ac_executable_extensions; do
17706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17707    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17709    break 2
17710  fi
17711done
17712  done
17713IFS=$as_save_IFS
17714
17715  ;;
17716esac
17717fi
17718LDD=$ac_cv_path_LDD
17719if test -n "$LDD"; then
17720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17721$as_echo "$LDD" >&6; }
17722else
17723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17724$as_echo "no" >&6; }
17725fi
17726
17727
17728        if test "x$LDD" = x; then
17729          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17730        fi
17731      else
17732        # Otherwise we believe it is a complete path. Use it as it is.
17733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17734$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17735        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17736$as_echo_n "checking for LDD... " >&6; }
17737        if test ! -x "$tool_specified"; then
17738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17739$as_echo "not found" >&6; }
17740          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17741        fi
17742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17743$as_echo "$tool_specified" >&6; }
17744      fi
17745    fi
17746  fi
17747
17748
17749  if test "x$LDD" = "x"; then
17750    # List shared lib dependencies is used for
17751    # debug output and checking for forbidden dependencies.
17752    # We can build without it.
17753    LDD="true"
17754  fi
17755
17756
17757  # Publish this variable in the help.
17758
17759
17760  if test "x$OTOOL" = x; then
17761    # The variable is not set by user, try to locate tool using the code snippet
17762    for ac_prog in otool
17763do
17764  # Extract the first word of "$ac_prog", so it can be a program name with args.
17765set dummy $ac_prog; ac_word=$2
17766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17767$as_echo_n "checking for $ac_word... " >&6; }
17768if ${ac_cv_path_OTOOL+:} false; then :
17769  $as_echo_n "(cached) " >&6
17770else
17771  case $OTOOL in
17772  [\\/]* | ?:[\\/]*)
17773  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17774  ;;
17775  *)
17776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17777for as_dir in $PATH
17778do
17779  IFS=$as_save_IFS
17780  test -z "$as_dir" && as_dir=.
17781    for ac_exec_ext in '' $ac_executable_extensions; do
17782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17783    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17785    break 2
17786  fi
17787done
17788  done
17789IFS=$as_save_IFS
17790
17791  ;;
17792esac
17793fi
17794OTOOL=$ac_cv_path_OTOOL
17795if test -n "$OTOOL"; then
17796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17797$as_echo "$OTOOL" >&6; }
17798else
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17800$as_echo "no" >&6; }
17801fi
17802
17803
17804  test -n "$OTOOL" && break
17805done
17806
17807  else
17808    # The variable is set, but is it from the command line or the environment?
17809
17810    # Try to remove the string !OTOOL! from our list.
17811    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17812    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17813      # If it failed, the variable was not from the command line. Ignore it,
17814      # but warn the user (except for BASH, which is always set by the calling BASH).
17815      if test "xOTOOL" != xBASH; then
17816        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17817$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17818      fi
17819      # Try to locate tool using the code snippet
17820      for ac_prog in otool
17821do
17822  # Extract the first word of "$ac_prog", so it can be a program name with args.
17823set dummy $ac_prog; ac_word=$2
17824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17825$as_echo_n "checking for $ac_word... " >&6; }
17826if ${ac_cv_path_OTOOL+:} false; then :
17827  $as_echo_n "(cached) " >&6
17828else
17829  case $OTOOL in
17830  [\\/]* | ?:[\\/]*)
17831  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17832  ;;
17833  *)
17834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17835for as_dir in $PATH
17836do
17837  IFS=$as_save_IFS
17838  test -z "$as_dir" && as_dir=.
17839    for ac_exec_ext in '' $ac_executable_extensions; do
17840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17841    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17843    break 2
17844  fi
17845done
17846  done
17847IFS=$as_save_IFS
17848
17849  ;;
17850esac
17851fi
17852OTOOL=$ac_cv_path_OTOOL
17853if test -n "$OTOOL"; then
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17855$as_echo "$OTOOL" >&6; }
17856else
17857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17858$as_echo "no" >&6; }
17859fi
17860
17861
17862  test -n "$OTOOL" && break
17863done
17864
17865    else
17866      # If it succeeded, then it was overridden by the user. We will use it
17867      # for the tool.
17868
17869      # First remove it from the list of overridden variables, so we can test
17870      # for unknown variables in the end.
17871      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17872
17873      # Check if the provided tool contains a complete path.
17874      tool_specified="$OTOOL"
17875      tool_basename="${tool_specified##*/}"
17876      if test "x$tool_basename" = "x$tool_specified"; then
17877        # A command without a complete path is provided, search $PATH.
17878        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17879$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17880        # Extract the first word of "$tool_basename", so it can be a program name with args.
17881set dummy $tool_basename; ac_word=$2
17882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17883$as_echo_n "checking for $ac_word... " >&6; }
17884if ${ac_cv_path_OTOOL+:} false; then :
17885  $as_echo_n "(cached) " >&6
17886else
17887  case $OTOOL in
17888  [\\/]* | ?:[\\/]*)
17889  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17890  ;;
17891  *)
17892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17893for as_dir in $PATH
17894do
17895  IFS=$as_save_IFS
17896  test -z "$as_dir" && as_dir=.
17897    for ac_exec_ext in '' $ac_executable_extensions; do
17898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17899    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17901    break 2
17902  fi
17903done
17904  done
17905IFS=$as_save_IFS
17906
17907  ;;
17908esac
17909fi
17910OTOOL=$ac_cv_path_OTOOL
17911if test -n "$OTOOL"; then
17912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17913$as_echo "$OTOOL" >&6; }
17914else
17915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17916$as_echo "no" >&6; }
17917fi
17918
17919
17920        if test "x$OTOOL" = x; then
17921          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17922        fi
17923      else
17924        # Otherwise we believe it is a complete path. Use it as it is.
17925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17926$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17928$as_echo_n "checking for OTOOL... " >&6; }
17929        if test ! -x "$tool_specified"; then
17930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17931$as_echo "not found" >&6; }
17932          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17933        fi
17934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17935$as_echo "$tool_specified" >&6; }
17936      fi
17937    fi
17938  fi
17939
17940
17941  if test "x$OTOOL" = "x"; then
17942    OTOOL="true"
17943  fi
17944
17945
17946  # Publish this variable in the help.
17947
17948
17949  if test "x$READELF" = x; then
17950    # The variable is not set by user, try to locate tool using the code snippet
17951    for ac_prog in greadelf readelf
17952do
17953  # Extract the first word of "$ac_prog", so it can be a program name with args.
17954set dummy $ac_prog; ac_word=$2
17955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956$as_echo_n "checking for $ac_word... " >&6; }
17957if ${ac_cv_path_READELF+:} false; then :
17958  $as_echo_n "(cached) " >&6
17959else
17960  case $READELF in
17961  [\\/]* | ?:[\\/]*)
17962  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17963  ;;
17964  *)
17965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17966for as_dir in $PATH
17967do
17968  IFS=$as_save_IFS
17969  test -z "$as_dir" && as_dir=.
17970    for ac_exec_ext in '' $ac_executable_extensions; do
17971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17972    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17974    break 2
17975  fi
17976done
17977  done
17978IFS=$as_save_IFS
17979
17980  ;;
17981esac
17982fi
17983READELF=$ac_cv_path_READELF
17984if test -n "$READELF"; then
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17986$as_echo "$READELF" >&6; }
17987else
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989$as_echo "no" >&6; }
17990fi
17991
17992
17993  test -n "$READELF" && break
17994done
17995
17996  else
17997    # The variable is set, but is it from the command line or the environment?
17998
17999    # Try to remove the string !READELF! from our list.
18000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18002      # If it failed, the variable was not from the command line. Ignore it,
18003      # but warn the user (except for BASH, which is always set by the calling BASH).
18004      if test "xREADELF" != xBASH; then
18005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18006$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18007      fi
18008      # Try to locate tool using the code snippet
18009      for ac_prog in greadelf readelf
18010do
18011  # Extract the first word of "$ac_prog", so it can be a program name with args.
18012set dummy $ac_prog; ac_word=$2
18013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18014$as_echo_n "checking for $ac_word... " >&6; }
18015if ${ac_cv_path_READELF+:} false; then :
18016  $as_echo_n "(cached) " >&6
18017else
18018  case $READELF in
18019  [\\/]* | ?:[\\/]*)
18020  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18021  ;;
18022  *)
18023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18024for as_dir in $PATH
18025do
18026  IFS=$as_save_IFS
18027  test -z "$as_dir" && as_dir=.
18028    for ac_exec_ext in '' $ac_executable_extensions; do
18029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18030    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18032    break 2
18033  fi
18034done
18035  done
18036IFS=$as_save_IFS
18037
18038  ;;
18039esac
18040fi
18041READELF=$ac_cv_path_READELF
18042if test -n "$READELF"; then
18043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18044$as_echo "$READELF" >&6; }
18045else
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18047$as_echo "no" >&6; }
18048fi
18049
18050
18051  test -n "$READELF" && break
18052done
18053
18054    else
18055      # If it succeeded, then it was overridden by the user. We will use it
18056      # for the tool.
18057
18058      # First remove it from the list of overridden variables, so we can test
18059      # for unknown variables in the end.
18060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18061
18062      # Check if the provided tool contains a complete path.
18063      tool_specified="$READELF"
18064      tool_basename="${tool_specified##*/}"
18065      if test "x$tool_basename" = "x$tool_specified"; then
18066        # A command without a complete path is provided, search $PATH.
18067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18068$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18069        # Extract the first word of "$tool_basename", so it can be a program name with args.
18070set dummy $tool_basename; ac_word=$2
18071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072$as_echo_n "checking for $ac_word... " >&6; }
18073if ${ac_cv_path_READELF+:} false; then :
18074  $as_echo_n "(cached) " >&6
18075else
18076  case $READELF in
18077  [\\/]* | ?:[\\/]*)
18078  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18079  ;;
18080  *)
18081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082for as_dir in $PATH
18083do
18084  IFS=$as_save_IFS
18085  test -z "$as_dir" && as_dir=.
18086    for ac_exec_ext in '' $ac_executable_extensions; do
18087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18088    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090    break 2
18091  fi
18092done
18093  done
18094IFS=$as_save_IFS
18095
18096  ;;
18097esac
18098fi
18099READELF=$ac_cv_path_READELF
18100if test -n "$READELF"; then
18101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18102$as_echo "$READELF" >&6; }
18103else
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105$as_echo "no" >&6; }
18106fi
18107
18108
18109        if test "x$READELF" = x; then
18110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18111        fi
18112      else
18113        # Otherwise we believe it is a complete path. Use it as it is.
18114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18115$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18117$as_echo_n "checking for READELF... " >&6; }
18118        if test ! -x "$tool_specified"; then
18119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18120$as_echo "not found" >&6; }
18121          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18122        fi
18123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18124$as_echo "$tool_specified" >&6; }
18125      fi
18126    fi
18127  fi
18128
18129
18130
18131
18132  # Publish this variable in the help.
18133
18134
18135  if test "x$HG" = x; then
18136    # The variable is not set by user, try to locate tool using the code snippet
18137    for ac_prog in hg
18138do
18139  # Extract the first word of "$ac_prog", so it can be a program name with args.
18140set dummy $ac_prog; ac_word=$2
18141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142$as_echo_n "checking for $ac_word... " >&6; }
18143if ${ac_cv_path_HG+:} false; then :
18144  $as_echo_n "(cached) " >&6
18145else
18146  case $HG in
18147  [\\/]* | ?:[\\/]*)
18148  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18149  ;;
18150  *)
18151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18152for as_dir in $PATH
18153do
18154  IFS=$as_save_IFS
18155  test -z "$as_dir" && as_dir=.
18156    for ac_exec_ext in '' $ac_executable_extensions; do
18157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18158    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18160    break 2
18161  fi
18162done
18163  done
18164IFS=$as_save_IFS
18165
18166  ;;
18167esac
18168fi
18169HG=$ac_cv_path_HG
18170if test -n "$HG"; then
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18172$as_echo "$HG" >&6; }
18173else
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175$as_echo "no" >&6; }
18176fi
18177
18178
18179  test -n "$HG" && break
18180done
18181
18182  else
18183    # The variable is set, but is it from the command line or the environment?
18184
18185    # Try to remove the string !HG! from our list.
18186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18188      # If it failed, the variable was not from the command line. Ignore it,
18189      # but warn the user (except for BASH, which is always set by the calling BASH).
18190      if test "xHG" != xBASH; then
18191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18192$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18193      fi
18194      # Try to locate tool using the code snippet
18195      for ac_prog in hg
18196do
18197  # Extract the first word of "$ac_prog", so it can be a program name with args.
18198set dummy $ac_prog; ac_word=$2
18199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18200$as_echo_n "checking for $ac_word... " >&6; }
18201if ${ac_cv_path_HG+:} false; then :
18202  $as_echo_n "(cached) " >&6
18203else
18204  case $HG in
18205  [\\/]* | ?:[\\/]*)
18206  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18207  ;;
18208  *)
18209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18210for as_dir in $PATH
18211do
18212  IFS=$as_save_IFS
18213  test -z "$as_dir" && as_dir=.
18214    for ac_exec_ext in '' $ac_executable_extensions; do
18215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18216    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18218    break 2
18219  fi
18220done
18221  done
18222IFS=$as_save_IFS
18223
18224  ;;
18225esac
18226fi
18227HG=$ac_cv_path_HG
18228if test -n "$HG"; then
18229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18230$as_echo "$HG" >&6; }
18231else
18232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18233$as_echo "no" >&6; }
18234fi
18235
18236
18237  test -n "$HG" && break
18238done
18239
18240    else
18241      # If it succeeded, then it was overridden by the user. We will use it
18242      # for the tool.
18243
18244      # First remove it from the list of overridden variables, so we can test
18245      # for unknown variables in the end.
18246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18247
18248      # Check if the provided tool contains a complete path.
18249      tool_specified="$HG"
18250      tool_basename="${tool_specified##*/}"
18251      if test "x$tool_basename" = "x$tool_specified"; then
18252        # A command without a complete path is provided, search $PATH.
18253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18254$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18255        # Extract the first word of "$tool_basename", so it can be a program name with args.
18256set dummy $tool_basename; ac_word=$2
18257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18258$as_echo_n "checking for $ac_word... " >&6; }
18259if ${ac_cv_path_HG+:} false; then :
18260  $as_echo_n "(cached) " >&6
18261else
18262  case $HG in
18263  [\\/]* | ?:[\\/]*)
18264  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18265  ;;
18266  *)
18267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18268for as_dir in $PATH
18269do
18270  IFS=$as_save_IFS
18271  test -z "$as_dir" && as_dir=.
18272    for ac_exec_ext in '' $ac_executable_extensions; do
18273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18274    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18276    break 2
18277  fi
18278done
18279  done
18280IFS=$as_save_IFS
18281
18282  ;;
18283esac
18284fi
18285HG=$ac_cv_path_HG
18286if test -n "$HG"; then
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18288$as_echo "$HG" >&6; }
18289else
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18291$as_echo "no" >&6; }
18292fi
18293
18294
18295        if test "x$HG" = x; then
18296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18297        fi
18298      else
18299        # Otherwise we believe it is a complete path. Use it as it is.
18300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18301$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18303$as_echo_n "checking for HG... " >&6; }
18304        if test ! -x "$tool_specified"; then
18305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18306$as_echo "not found" >&6; }
18307          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18308        fi
18309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18310$as_echo "$tool_specified" >&6; }
18311      fi
18312    fi
18313  fi
18314
18315
18316
18317
18318  # Publish this variable in the help.
18319
18320
18321  if test "x$STAT" = x; then
18322    # The variable is not set by user, try to locate tool using the code snippet
18323    for ac_prog in stat
18324do
18325  # Extract the first word of "$ac_prog", so it can be a program name with args.
18326set dummy $ac_prog; ac_word=$2
18327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18328$as_echo_n "checking for $ac_word... " >&6; }
18329if ${ac_cv_path_STAT+:} false; then :
18330  $as_echo_n "(cached) " >&6
18331else
18332  case $STAT in
18333  [\\/]* | ?:[\\/]*)
18334  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18335  ;;
18336  *)
18337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18338for as_dir in $PATH
18339do
18340  IFS=$as_save_IFS
18341  test -z "$as_dir" && as_dir=.
18342    for ac_exec_ext in '' $ac_executable_extensions; do
18343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18344    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18346    break 2
18347  fi
18348done
18349  done
18350IFS=$as_save_IFS
18351
18352  ;;
18353esac
18354fi
18355STAT=$ac_cv_path_STAT
18356if test -n "$STAT"; then
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18358$as_echo "$STAT" >&6; }
18359else
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18361$as_echo "no" >&6; }
18362fi
18363
18364
18365  test -n "$STAT" && break
18366done
18367
18368  else
18369    # The variable is set, but is it from the command line or the environment?
18370
18371    # Try to remove the string !STAT! from our list.
18372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18374      # If it failed, the variable was not from the command line. Ignore it,
18375      # but warn the user (except for BASH, which is always set by the calling BASH).
18376      if test "xSTAT" != xBASH; then
18377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18378$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18379      fi
18380      # Try to locate tool using the code snippet
18381      for ac_prog in stat
18382do
18383  # Extract the first word of "$ac_prog", so it can be a program name with args.
18384set dummy $ac_prog; ac_word=$2
18385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386$as_echo_n "checking for $ac_word... " >&6; }
18387if ${ac_cv_path_STAT+:} false; then :
18388  $as_echo_n "(cached) " >&6
18389else
18390  case $STAT in
18391  [\\/]* | ?:[\\/]*)
18392  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18393  ;;
18394  *)
18395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396for as_dir in $PATH
18397do
18398  IFS=$as_save_IFS
18399  test -z "$as_dir" && as_dir=.
18400    for ac_exec_ext in '' $ac_executable_extensions; do
18401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18402    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18404    break 2
18405  fi
18406done
18407  done
18408IFS=$as_save_IFS
18409
18410  ;;
18411esac
18412fi
18413STAT=$ac_cv_path_STAT
18414if test -n "$STAT"; then
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18416$as_echo "$STAT" >&6; }
18417else
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419$as_echo "no" >&6; }
18420fi
18421
18422
18423  test -n "$STAT" && break
18424done
18425
18426    else
18427      # If it succeeded, then it was overridden by the user. We will use it
18428      # for the tool.
18429
18430      # First remove it from the list of overridden variables, so we can test
18431      # for unknown variables in the end.
18432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18433
18434      # Check if the provided tool contains a complete path.
18435      tool_specified="$STAT"
18436      tool_basename="${tool_specified##*/}"
18437      if test "x$tool_basename" = "x$tool_specified"; then
18438        # A command without a complete path is provided, search $PATH.
18439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18440$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18441        # Extract the first word of "$tool_basename", so it can be a program name with args.
18442set dummy $tool_basename; ac_word=$2
18443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18444$as_echo_n "checking for $ac_word... " >&6; }
18445if ${ac_cv_path_STAT+:} false; then :
18446  $as_echo_n "(cached) " >&6
18447else
18448  case $STAT in
18449  [\\/]* | ?:[\\/]*)
18450  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18451  ;;
18452  *)
18453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18454for as_dir in $PATH
18455do
18456  IFS=$as_save_IFS
18457  test -z "$as_dir" && as_dir=.
18458    for ac_exec_ext in '' $ac_executable_extensions; do
18459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18460    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18462    break 2
18463  fi
18464done
18465  done
18466IFS=$as_save_IFS
18467
18468  ;;
18469esac
18470fi
18471STAT=$ac_cv_path_STAT
18472if test -n "$STAT"; then
18473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18474$as_echo "$STAT" >&6; }
18475else
18476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18477$as_echo "no" >&6; }
18478fi
18479
18480
18481        if test "x$STAT" = x; then
18482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18483        fi
18484      else
18485        # Otherwise we believe it is a complete path. Use it as it is.
18486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18487$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18489$as_echo_n "checking for STAT... " >&6; }
18490        if test ! -x "$tool_specified"; then
18491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18492$as_echo "not found" >&6; }
18493          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18494        fi
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18496$as_echo "$tool_specified" >&6; }
18497      fi
18498    fi
18499  fi
18500
18501
18502
18503
18504  # Publish this variable in the help.
18505
18506
18507  if test "x$TIME" = x; then
18508    # The variable is not set by user, try to locate tool using the code snippet
18509    for ac_prog in time
18510do
18511  # Extract the first word of "$ac_prog", so it can be a program name with args.
18512set dummy $ac_prog; ac_word=$2
18513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514$as_echo_n "checking for $ac_word... " >&6; }
18515if ${ac_cv_path_TIME+:} false; then :
18516  $as_echo_n "(cached) " >&6
18517else
18518  case $TIME in
18519  [\\/]* | ?:[\\/]*)
18520  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18521  ;;
18522  *)
18523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524for as_dir in $PATH
18525do
18526  IFS=$as_save_IFS
18527  test -z "$as_dir" && as_dir=.
18528    for ac_exec_ext in '' $ac_executable_extensions; do
18529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532    break 2
18533  fi
18534done
18535  done
18536IFS=$as_save_IFS
18537
18538  ;;
18539esac
18540fi
18541TIME=$ac_cv_path_TIME
18542if test -n "$TIME"; then
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18544$as_echo "$TIME" >&6; }
18545else
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547$as_echo "no" >&6; }
18548fi
18549
18550
18551  test -n "$TIME" && break
18552done
18553
18554  else
18555    # The variable is set, but is it from the command line or the environment?
18556
18557    # Try to remove the string !TIME! from our list.
18558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18560      # If it failed, the variable was not from the command line. Ignore it,
18561      # but warn the user (except for BASH, which is always set by the calling BASH).
18562      if test "xTIME" != xBASH; then
18563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18564$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18565      fi
18566      # Try to locate tool using the code snippet
18567      for ac_prog in time
18568do
18569  # Extract the first word of "$ac_prog", so it can be a program name with args.
18570set dummy $ac_prog; ac_word=$2
18571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18572$as_echo_n "checking for $ac_word... " >&6; }
18573if ${ac_cv_path_TIME+:} false; then :
18574  $as_echo_n "(cached) " >&6
18575else
18576  case $TIME in
18577  [\\/]* | ?:[\\/]*)
18578  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18579  ;;
18580  *)
18581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18582for as_dir in $PATH
18583do
18584  IFS=$as_save_IFS
18585  test -z "$as_dir" && as_dir=.
18586    for ac_exec_ext in '' $ac_executable_extensions; do
18587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18588    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18590    break 2
18591  fi
18592done
18593  done
18594IFS=$as_save_IFS
18595
18596  ;;
18597esac
18598fi
18599TIME=$ac_cv_path_TIME
18600if test -n "$TIME"; then
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18602$as_echo "$TIME" >&6; }
18603else
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18605$as_echo "no" >&6; }
18606fi
18607
18608
18609  test -n "$TIME" && break
18610done
18611
18612    else
18613      # If it succeeded, then it was overridden by the user. We will use it
18614      # for the tool.
18615
18616      # First remove it from the list of overridden variables, so we can test
18617      # for unknown variables in the end.
18618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18619
18620      # Check if the provided tool contains a complete path.
18621      tool_specified="$TIME"
18622      tool_basename="${tool_specified##*/}"
18623      if test "x$tool_basename" = "x$tool_specified"; then
18624        # A command without a complete path is provided, search $PATH.
18625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18626$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18627        # Extract the first word of "$tool_basename", so it can be a program name with args.
18628set dummy $tool_basename; ac_word=$2
18629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18630$as_echo_n "checking for $ac_word... " >&6; }
18631if ${ac_cv_path_TIME+:} false; then :
18632  $as_echo_n "(cached) " >&6
18633else
18634  case $TIME in
18635  [\\/]* | ?:[\\/]*)
18636  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18637  ;;
18638  *)
18639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18640for as_dir in $PATH
18641do
18642  IFS=$as_save_IFS
18643  test -z "$as_dir" && as_dir=.
18644    for ac_exec_ext in '' $ac_executable_extensions; do
18645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18646    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18648    break 2
18649  fi
18650done
18651  done
18652IFS=$as_save_IFS
18653
18654  ;;
18655esac
18656fi
18657TIME=$ac_cv_path_TIME
18658if test -n "$TIME"; then
18659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18660$as_echo "$TIME" >&6; }
18661else
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663$as_echo "no" >&6; }
18664fi
18665
18666
18667        if test "x$TIME" = x; then
18668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18669        fi
18670      else
18671        # Otherwise we believe it is a complete path. Use it as it is.
18672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18673$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18675$as_echo_n "checking for TIME... " >&6; }
18676        if test ! -x "$tool_specified"; then
18677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18678$as_echo "not found" >&6; }
18679          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18680        fi
18681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18682$as_echo "$tool_specified" >&6; }
18683      fi
18684    fi
18685  fi
18686
18687
18688  # Check if it's GNU time
18689  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18690  if test "x$IS_GNU_TIME" != x; then
18691    IS_GNU_TIME=yes
18692  else
18693    IS_GNU_TIME=no
18694  fi
18695
18696
18697  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18698
18699
18700
18701  # Publish this variable in the help.
18702
18703
18704  if test "x$COMM" = x; then
18705    # The variable is not set by user, try to locate tool using the code snippet
18706    for ac_prog in comm
18707do
18708  # Extract the first word of "$ac_prog", so it can be a program name with args.
18709set dummy $ac_prog; ac_word=$2
18710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18711$as_echo_n "checking for $ac_word... " >&6; }
18712if ${ac_cv_path_COMM+:} false; then :
18713  $as_echo_n "(cached) " >&6
18714else
18715  case $COMM in
18716  [\\/]* | ?:[\\/]*)
18717  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18718  ;;
18719  *)
18720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18721for as_dir in $PATH
18722do
18723  IFS=$as_save_IFS
18724  test -z "$as_dir" && as_dir=.
18725    for ac_exec_ext in '' $ac_executable_extensions; do
18726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18727    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18729    break 2
18730  fi
18731done
18732  done
18733IFS=$as_save_IFS
18734
18735  ;;
18736esac
18737fi
18738COMM=$ac_cv_path_COMM
18739if test -n "$COMM"; then
18740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18741$as_echo "$COMM" >&6; }
18742else
18743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18744$as_echo "no" >&6; }
18745fi
18746
18747
18748  test -n "$COMM" && break
18749done
18750
18751  else
18752    # The variable is set, but is it from the command line or the environment?
18753
18754    # Try to remove the string !COMM! from our list.
18755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18757      # If it failed, the variable was not from the command line. Ignore it,
18758      # but warn the user (except for BASH, which is always set by the calling BASH).
18759      if test "xCOMM" != xBASH; then
18760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18761$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18762      fi
18763      # Try to locate tool using the code snippet
18764      for ac_prog in comm
18765do
18766  # Extract the first word of "$ac_prog", so it can be a program name with args.
18767set dummy $ac_prog; ac_word=$2
18768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18769$as_echo_n "checking for $ac_word... " >&6; }
18770if ${ac_cv_path_COMM+:} false; then :
18771  $as_echo_n "(cached) " >&6
18772else
18773  case $COMM in
18774  [\\/]* | ?:[\\/]*)
18775  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18776  ;;
18777  *)
18778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18779for as_dir in $PATH
18780do
18781  IFS=$as_save_IFS
18782  test -z "$as_dir" && as_dir=.
18783    for ac_exec_ext in '' $ac_executable_extensions; do
18784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18785    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18787    break 2
18788  fi
18789done
18790  done
18791IFS=$as_save_IFS
18792
18793  ;;
18794esac
18795fi
18796COMM=$ac_cv_path_COMM
18797if test -n "$COMM"; then
18798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18799$as_echo "$COMM" >&6; }
18800else
18801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18802$as_echo "no" >&6; }
18803fi
18804
18805
18806  test -n "$COMM" && break
18807done
18808
18809    else
18810      # If it succeeded, then it was overridden by the user. We will use it
18811      # for the tool.
18812
18813      # First remove it from the list of overridden variables, so we can test
18814      # for unknown variables in the end.
18815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18816
18817      # Check if the provided tool contains a complete path.
18818      tool_specified="$COMM"
18819      tool_basename="${tool_specified##*/}"
18820      if test "x$tool_basename" = "x$tool_specified"; then
18821        # A command without a complete path is provided, search $PATH.
18822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18823$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18824        # Extract the first word of "$tool_basename", so it can be a program name with args.
18825set dummy $tool_basename; ac_word=$2
18826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18827$as_echo_n "checking for $ac_word... " >&6; }
18828if ${ac_cv_path_COMM+:} false; then :
18829  $as_echo_n "(cached) " >&6
18830else
18831  case $COMM in
18832  [\\/]* | ?:[\\/]*)
18833  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18834  ;;
18835  *)
18836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18837for as_dir in $PATH
18838do
18839  IFS=$as_save_IFS
18840  test -z "$as_dir" && as_dir=.
18841    for ac_exec_ext in '' $ac_executable_extensions; do
18842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18843    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18845    break 2
18846  fi
18847done
18848  done
18849IFS=$as_save_IFS
18850
18851  ;;
18852esac
18853fi
18854COMM=$ac_cv_path_COMM
18855if test -n "$COMM"; then
18856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18857$as_echo "$COMM" >&6; }
18858else
18859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18860$as_echo "no" >&6; }
18861fi
18862
18863
18864        if test "x$COMM" = x; then
18865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18866        fi
18867      else
18868        # Otherwise we believe it is a complete path. Use it as it is.
18869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18870$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18872$as_echo_n "checking for COMM... " >&6; }
18873        if test ! -x "$tool_specified"; then
18874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18875$as_echo "not found" >&6; }
18876          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18877        fi
18878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18879$as_echo "$tool_specified" >&6; }
18880      fi
18881    fi
18882  fi
18883
18884
18885
18886  if test "x$COMM" = x; then
18887    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18888  fi
18889
18890
18891  fi
18892
18893  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18894
18895
18896
18897  # Publish this variable in the help.
18898
18899
18900  if test "x$DSYMUTIL" = x; then
18901    # The variable is not set by user, try to locate tool using the code snippet
18902    for ac_prog in dsymutil
18903do
18904  # Extract the first word of "$ac_prog", so it can be a program name with args.
18905set dummy $ac_prog; ac_word=$2
18906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18907$as_echo_n "checking for $ac_word... " >&6; }
18908if ${ac_cv_path_DSYMUTIL+:} false; then :
18909  $as_echo_n "(cached) " >&6
18910else
18911  case $DSYMUTIL in
18912  [\\/]* | ?:[\\/]*)
18913  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18914  ;;
18915  *)
18916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18917for as_dir in $PATH
18918do
18919  IFS=$as_save_IFS
18920  test -z "$as_dir" && as_dir=.
18921    for ac_exec_ext in '' $ac_executable_extensions; do
18922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18923    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18925    break 2
18926  fi
18927done
18928  done
18929IFS=$as_save_IFS
18930
18931  ;;
18932esac
18933fi
18934DSYMUTIL=$ac_cv_path_DSYMUTIL
18935if test -n "$DSYMUTIL"; then
18936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18937$as_echo "$DSYMUTIL" >&6; }
18938else
18939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18940$as_echo "no" >&6; }
18941fi
18942
18943
18944  test -n "$DSYMUTIL" && break
18945done
18946
18947  else
18948    # The variable is set, but is it from the command line or the environment?
18949
18950    # Try to remove the string !DSYMUTIL! from our list.
18951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18953      # If it failed, the variable was not from the command line. Ignore it,
18954      # but warn the user (except for BASH, which is always set by the calling BASH).
18955      if test "xDSYMUTIL" != xBASH; then
18956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18957$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18958      fi
18959      # Try to locate tool using the code snippet
18960      for ac_prog in dsymutil
18961do
18962  # Extract the first word of "$ac_prog", so it can be a program name with args.
18963set dummy $ac_prog; ac_word=$2
18964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18965$as_echo_n "checking for $ac_word... " >&6; }
18966if ${ac_cv_path_DSYMUTIL+:} false; then :
18967  $as_echo_n "(cached) " >&6
18968else
18969  case $DSYMUTIL in
18970  [\\/]* | ?:[\\/]*)
18971  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18972  ;;
18973  *)
18974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18975for as_dir in $PATH
18976do
18977  IFS=$as_save_IFS
18978  test -z "$as_dir" && as_dir=.
18979    for ac_exec_ext in '' $ac_executable_extensions; do
18980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18981    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18983    break 2
18984  fi
18985done
18986  done
18987IFS=$as_save_IFS
18988
18989  ;;
18990esac
18991fi
18992DSYMUTIL=$ac_cv_path_DSYMUTIL
18993if test -n "$DSYMUTIL"; then
18994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18995$as_echo "$DSYMUTIL" >&6; }
18996else
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18998$as_echo "no" >&6; }
18999fi
19000
19001
19002  test -n "$DSYMUTIL" && break
19003done
19004
19005    else
19006      # If it succeeded, then it was overridden by the user. We will use it
19007      # for the tool.
19008
19009      # First remove it from the list of overridden variables, so we can test
19010      # for unknown variables in the end.
19011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19012
19013      # Check if the provided tool contains a complete path.
19014      tool_specified="$DSYMUTIL"
19015      tool_basename="${tool_specified##*/}"
19016      if test "x$tool_basename" = "x$tool_specified"; then
19017        # A command without a complete path is provided, search $PATH.
19018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19019$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19020        # Extract the first word of "$tool_basename", so it can be a program name with args.
19021set dummy $tool_basename; ac_word=$2
19022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19023$as_echo_n "checking for $ac_word... " >&6; }
19024if ${ac_cv_path_DSYMUTIL+:} false; then :
19025  $as_echo_n "(cached) " >&6
19026else
19027  case $DSYMUTIL in
19028  [\\/]* | ?:[\\/]*)
19029  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19030  ;;
19031  *)
19032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19033for as_dir in $PATH
19034do
19035  IFS=$as_save_IFS
19036  test -z "$as_dir" && as_dir=.
19037    for ac_exec_ext in '' $ac_executable_extensions; do
19038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19039    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19041    break 2
19042  fi
19043done
19044  done
19045IFS=$as_save_IFS
19046
19047  ;;
19048esac
19049fi
19050DSYMUTIL=$ac_cv_path_DSYMUTIL
19051if test -n "$DSYMUTIL"; then
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19053$as_echo "$DSYMUTIL" >&6; }
19054else
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19056$as_echo "no" >&6; }
19057fi
19058
19059
19060        if test "x$DSYMUTIL" = x; then
19061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19062        fi
19063      else
19064        # Otherwise we believe it is a complete path. Use it as it is.
19065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19066$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19068$as_echo_n "checking for DSYMUTIL... " >&6; }
19069        if test ! -x "$tool_specified"; then
19070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19071$as_echo "not found" >&6; }
19072          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19073        fi
19074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19075$as_echo "$tool_specified" >&6; }
19076      fi
19077    fi
19078  fi
19079
19080
19081
19082  if test "x$DSYMUTIL" = x; then
19083    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19084  fi
19085
19086
19087
19088
19089
19090  # Publish this variable in the help.
19091
19092
19093  if test "x$XATTR" = x; then
19094    # The variable is not set by user, try to locate tool using the code snippet
19095    for ac_prog in xattr
19096do
19097  # Extract the first word of "$ac_prog", so it can be a program name with args.
19098set dummy $ac_prog; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_path_XATTR+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $XATTR in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19107  ;;
19108  *)
19109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110for as_dir in $PATH
19111do
19112  IFS=$as_save_IFS
19113  test -z "$as_dir" && as_dir=.
19114    for ac_exec_ext in '' $ac_executable_extensions; do
19115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19118    break 2
19119  fi
19120done
19121  done
19122IFS=$as_save_IFS
19123
19124  ;;
19125esac
19126fi
19127XATTR=$ac_cv_path_XATTR
19128if test -n "$XATTR"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19130$as_echo "$XATTR" >&6; }
19131else
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19133$as_echo "no" >&6; }
19134fi
19135
19136
19137  test -n "$XATTR" && break
19138done
19139
19140  else
19141    # The variable is set, but is it from the command line or the environment?
19142
19143    # Try to remove the string !XATTR! from our list.
19144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19146      # If it failed, the variable was not from the command line. Ignore it,
19147      # but warn the user (except for BASH, which is always set by the calling BASH).
19148      if test "xXATTR" != xBASH; then
19149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19150$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19151      fi
19152      # Try to locate tool using the code snippet
19153      for ac_prog in xattr
19154do
19155  # Extract the first word of "$ac_prog", so it can be a program name with args.
19156set dummy $ac_prog; ac_word=$2
19157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19158$as_echo_n "checking for $ac_word... " >&6; }
19159if ${ac_cv_path_XATTR+:} false; then :
19160  $as_echo_n "(cached) " >&6
19161else
19162  case $XATTR in
19163  [\\/]* | ?:[\\/]*)
19164  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19165  ;;
19166  *)
19167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19168for as_dir in $PATH
19169do
19170  IFS=$as_save_IFS
19171  test -z "$as_dir" && as_dir=.
19172    for ac_exec_ext in '' $ac_executable_extensions; do
19173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19174    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19176    break 2
19177  fi
19178done
19179  done
19180IFS=$as_save_IFS
19181
19182  ;;
19183esac
19184fi
19185XATTR=$ac_cv_path_XATTR
19186if test -n "$XATTR"; then
19187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19188$as_echo "$XATTR" >&6; }
19189else
19190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19191$as_echo "no" >&6; }
19192fi
19193
19194
19195  test -n "$XATTR" && break
19196done
19197
19198    else
19199      # If it succeeded, then it was overridden by the user. We will use it
19200      # for the tool.
19201
19202      # First remove it from the list of overridden variables, so we can test
19203      # for unknown variables in the end.
19204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19205
19206      # Check if the provided tool contains a complete path.
19207      tool_specified="$XATTR"
19208      tool_basename="${tool_specified##*/}"
19209      if test "x$tool_basename" = "x$tool_specified"; then
19210        # A command without a complete path is provided, search $PATH.
19211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19212$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19213        # Extract the first word of "$tool_basename", so it can be a program name with args.
19214set dummy $tool_basename; ac_word=$2
19215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19216$as_echo_n "checking for $ac_word... " >&6; }
19217if ${ac_cv_path_XATTR+:} false; then :
19218  $as_echo_n "(cached) " >&6
19219else
19220  case $XATTR in
19221  [\\/]* | ?:[\\/]*)
19222  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19223  ;;
19224  *)
19225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19226for as_dir in $PATH
19227do
19228  IFS=$as_save_IFS
19229  test -z "$as_dir" && as_dir=.
19230    for ac_exec_ext in '' $ac_executable_extensions; do
19231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19232    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19234    break 2
19235  fi
19236done
19237  done
19238IFS=$as_save_IFS
19239
19240  ;;
19241esac
19242fi
19243XATTR=$ac_cv_path_XATTR
19244if test -n "$XATTR"; then
19245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19246$as_echo "$XATTR" >&6; }
19247else
19248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19249$as_echo "no" >&6; }
19250fi
19251
19252
19253        if test "x$XATTR" = x; then
19254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19255        fi
19256      else
19257        # Otherwise we believe it is a complete path. Use it as it is.
19258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19259$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19261$as_echo_n "checking for XATTR... " >&6; }
19262        if test ! -x "$tool_specified"; then
19263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19264$as_echo "not found" >&6; }
19265          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19266        fi
19267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19268$as_echo "$tool_specified" >&6; }
19269      fi
19270    fi
19271  fi
19272
19273
19274
19275  if test "x$XATTR" = x; then
19276    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19277  fi
19278
19279
19280
19281
19282  # Publish this variable in the help.
19283
19284
19285  if test "x$CODESIGN" = x; then
19286    # The variable is not set by user, try to locate tool using the code snippet
19287    for ac_prog in codesign
19288do
19289  # Extract the first word of "$ac_prog", so it can be a program name with args.
19290set dummy $ac_prog; ac_word=$2
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19292$as_echo_n "checking for $ac_word... " >&6; }
19293if ${ac_cv_path_CODESIGN+:} false; then :
19294  $as_echo_n "(cached) " >&6
19295else
19296  case $CODESIGN in
19297  [\\/]* | ?:[\\/]*)
19298  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19299  ;;
19300  *)
19301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19302for as_dir in $PATH
19303do
19304  IFS=$as_save_IFS
19305  test -z "$as_dir" && as_dir=.
19306    for ac_exec_ext in '' $ac_executable_extensions; do
19307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19308    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19310    break 2
19311  fi
19312done
19313  done
19314IFS=$as_save_IFS
19315
19316  ;;
19317esac
19318fi
19319CODESIGN=$ac_cv_path_CODESIGN
19320if test -n "$CODESIGN"; then
19321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19322$as_echo "$CODESIGN" >&6; }
19323else
19324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19325$as_echo "no" >&6; }
19326fi
19327
19328
19329  test -n "$CODESIGN" && break
19330done
19331
19332  else
19333    # The variable is set, but is it from the command line or the environment?
19334
19335    # Try to remove the string !CODESIGN! from our list.
19336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19338      # If it failed, the variable was not from the command line. Ignore it,
19339      # but warn the user (except for BASH, which is always set by the calling BASH).
19340      if test "xCODESIGN" != xBASH; then
19341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19342$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19343      fi
19344      # Try to locate tool using the code snippet
19345      for ac_prog in codesign
19346do
19347  # Extract the first word of "$ac_prog", so it can be a program name with args.
19348set dummy $ac_prog; ac_word=$2
19349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19350$as_echo_n "checking for $ac_word... " >&6; }
19351if ${ac_cv_path_CODESIGN+:} false; then :
19352  $as_echo_n "(cached) " >&6
19353else
19354  case $CODESIGN in
19355  [\\/]* | ?:[\\/]*)
19356  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19357  ;;
19358  *)
19359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19360for as_dir in $PATH
19361do
19362  IFS=$as_save_IFS
19363  test -z "$as_dir" && as_dir=.
19364    for ac_exec_ext in '' $ac_executable_extensions; do
19365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19366    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19368    break 2
19369  fi
19370done
19371  done
19372IFS=$as_save_IFS
19373
19374  ;;
19375esac
19376fi
19377CODESIGN=$ac_cv_path_CODESIGN
19378if test -n "$CODESIGN"; then
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19380$as_echo "$CODESIGN" >&6; }
19381else
19382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19383$as_echo "no" >&6; }
19384fi
19385
19386
19387  test -n "$CODESIGN" && break
19388done
19389
19390    else
19391      # If it succeeded, then it was overridden by the user. We will use it
19392      # for the tool.
19393
19394      # First remove it from the list of overridden variables, so we can test
19395      # for unknown variables in the end.
19396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19397
19398      # Check if the provided tool contains a complete path.
19399      tool_specified="$CODESIGN"
19400      tool_basename="${tool_specified##*/}"
19401      if test "x$tool_basename" = "x$tool_specified"; then
19402        # A command without a complete path is provided, search $PATH.
19403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19404$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19405        # Extract the first word of "$tool_basename", so it can be a program name with args.
19406set dummy $tool_basename; ac_word=$2
19407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19408$as_echo_n "checking for $ac_word... " >&6; }
19409if ${ac_cv_path_CODESIGN+:} false; then :
19410  $as_echo_n "(cached) " >&6
19411else
19412  case $CODESIGN in
19413  [\\/]* | ?:[\\/]*)
19414  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19415  ;;
19416  *)
19417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19418for as_dir in $PATH
19419do
19420  IFS=$as_save_IFS
19421  test -z "$as_dir" && as_dir=.
19422    for ac_exec_ext in '' $ac_executable_extensions; do
19423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19424    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19426    break 2
19427  fi
19428done
19429  done
19430IFS=$as_save_IFS
19431
19432  ;;
19433esac
19434fi
19435CODESIGN=$ac_cv_path_CODESIGN
19436if test -n "$CODESIGN"; then
19437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19438$as_echo "$CODESIGN" >&6; }
19439else
19440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19441$as_echo "no" >&6; }
19442fi
19443
19444
19445        if test "x$CODESIGN" = x; then
19446          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19447        fi
19448      else
19449        # Otherwise we believe it is a complete path. Use it as it is.
19450        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19451$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19453$as_echo_n "checking for CODESIGN... " >&6; }
19454        if test ! -x "$tool_specified"; then
19455          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19456$as_echo "not found" >&6; }
19457          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19458        fi
19459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19460$as_echo "$tool_specified" >&6; }
19461      fi
19462    fi
19463  fi
19464
19465
19466    if test "x$CODESIGN" != "x"; then
19467      # Verify that the openjdk_codesign certificate is present
19468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19469$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19470      rm -f codesign-testfile
19471      touch codesign-testfile
19472      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19473      rm -f codesign-testfile
19474      if test "x$CODESIGN" = x; then
19475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19476$as_echo "no" >&6; }
19477      else
19478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19479$as_echo "yes" >&6; }
19480      fi
19481    fi
19482  fi
19483
19484
19485# Check if pkg-config is available.
19486
19487
19488if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19489	if test -n "$ac_tool_prefix"; then
19490  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19491set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19493$as_echo_n "checking for $ac_word... " >&6; }
19494if ${ac_cv_path_PKG_CONFIG+:} false; then :
19495  $as_echo_n "(cached) " >&6
19496else
19497  case $PKG_CONFIG in
19498  [\\/]* | ?:[\\/]*)
19499  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19500  ;;
19501  *)
19502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19503for as_dir in $PATH
19504do
19505  IFS=$as_save_IFS
19506  test -z "$as_dir" && as_dir=.
19507    for ac_exec_ext in '' $ac_executable_extensions; do
19508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19509    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19511    break 2
19512  fi
19513done
19514  done
19515IFS=$as_save_IFS
19516
19517  ;;
19518esac
19519fi
19520PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19521if test -n "$PKG_CONFIG"; then
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19523$as_echo "$PKG_CONFIG" >&6; }
19524else
19525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526$as_echo "no" >&6; }
19527fi
19528
19529
19530fi
19531if test -z "$ac_cv_path_PKG_CONFIG"; then
19532  ac_pt_PKG_CONFIG=$PKG_CONFIG
19533  # Extract the first word of "pkg-config", so it can be a program name with args.
19534set dummy pkg-config; ac_word=$2
19535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19536$as_echo_n "checking for $ac_word... " >&6; }
19537if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19538  $as_echo_n "(cached) " >&6
19539else
19540  case $ac_pt_PKG_CONFIG in
19541  [\\/]* | ?:[\\/]*)
19542  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19543  ;;
19544  *)
19545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19546for as_dir in $PATH
19547do
19548  IFS=$as_save_IFS
19549  test -z "$as_dir" && as_dir=.
19550    for ac_exec_ext in '' $ac_executable_extensions; do
19551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19552    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19554    break 2
19555  fi
19556done
19557  done
19558IFS=$as_save_IFS
19559
19560  ;;
19561esac
19562fi
19563ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19564if test -n "$ac_pt_PKG_CONFIG"; then
19565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19566$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19567else
19568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19569$as_echo "no" >&6; }
19570fi
19571
19572  if test "x$ac_pt_PKG_CONFIG" = x; then
19573    PKG_CONFIG=""
19574  else
19575    case $cross_compiling:$ac_tool_warned in
19576yes:)
19577{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19579ac_tool_warned=yes ;;
19580esac
19581    PKG_CONFIG=$ac_pt_PKG_CONFIG
19582  fi
19583else
19584  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19585fi
19586
19587fi
19588if test -n "$PKG_CONFIG"; then
19589	_pkg_min_version=0.9.0
19590	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19591$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19592	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19593		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19594$as_echo "yes" >&6; }
19595	else
19596		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19597$as_echo "no" >&6; }
19598		PKG_CONFIG=""
19599	fi
19600
19601fi
19602
19603# After basic tools have been setup, we can check build os specific details.
19604
19605  ###############################################################################
19606
19607  # Note that this is the build platform OS version!
19608
19609  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19610  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19611  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19612  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19613
19614
19615
19616
19617
19618# Setup builddeps, for automatic downloading of tools we need.
19619# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19620# boot-jdk setup, but we need to have basic tools setup first.
19621
19622
19623# Check whether --with-builddeps-conf was given.
19624if test "${with_builddeps_conf+set}" = set; then :
19625  withval=$with_builddeps_conf;
19626fi
19627
19628
19629
19630# Check whether --with-builddeps-server was given.
19631if test "${with_builddeps_server+set}" = set; then :
19632  withval=$with_builddeps_server;
19633fi
19634
19635
19636
19637# Check whether --with-builddeps-dir was given.
19638if test "${with_builddeps_dir+set}" = set; then :
19639  withval=$with_builddeps_dir;
19640else
19641  with_builddeps_dir=/localhome/builddeps
19642fi
19643
19644
19645
19646# Check whether --with-builddeps-group was given.
19647if test "${with_builddeps_group+set}" = set; then :
19648  withval=$with_builddeps_group;
19649fi
19650
19651
19652
19653
19654  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19655    if test "x$with_builddeps_conf" != x; then
19656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19657$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19658      builddepsfile=$with_builddeps_conf
19659      if test -s $builddepsfile; then
19660        . $builddepsfile
19661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19662$as_echo "loaded!" >&6; }
19663      else
19664        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19665      fi
19666    else
19667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19668$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19669      builddepsfile=`mktemp`
19670      touch $builddepsfile
19671      # Put all found confs into a single file.
19672      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19673      # Source the file to acquire the variables
19674      if test -s $builddepsfile; then
19675        . $builddepsfile
19676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19677$as_echo "found at least one!" >&6; }
19678      else
19679        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19680      fi
19681    fi
19682    # Create build and target names that use _ instead of "-" and ".".
19683    # This is necessary to use them in variable names.
19684    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19685    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19686    # Extract rewrite information for build and target
19687    eval rewritten_build=\${REWRITE_${build_var}}
19688    if test "x$rewritten_build" = x; then
19689      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19690      echo Build stays the same $rewritten_build
19691    else
19692      echo Rewriting build for builddeps into $rewritten_build
19693    fi
19694    eval rewritten_target=\${REWRITE_${target_var}}
19695    if test "x$rewritten_target" = x; then
19696      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19697      echo Target stays the same $rewritten_target
19698    else
19699      echo Rewriting target for builddeps into $rewritten_target
19700    fi
19701    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19702    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19703  fi
19704  for ac_prog in 7z unzip
19705do
19706  # Extract the first word of "$ac_prog", so it can be a program name with args.
19707set dummy $ac_prog; ac_word=$2
19708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19709$as_echo_n "checking for $ac_word... " >&6; }
19710if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19711  $as_echo_n "(cached) " >&6
19712else
19713  if test -n "$BDEPS_UNZIP"; then
19714  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19715else
19716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19717for as_dir in $PATH
19718do
19719  IFS=$as_save_IFS
19720  test -z "$as_dir" && as_dir=.
19721    for ac_exec_ext in '' $ac_executable_extensions; do
19722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19723    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19725    break 2
19726  fi
19727done
19728  done
19729IFS=$as_save_IFS
19730
19731fi
19732fi
19733BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19734if test -n "$BDEPS_UNZIP"; then
19735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19736$as_echo "$BDEPS_UNZIP" >&6; }
19737else
19738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19739$as_echo "no" >&6; }
19740fi
19741
19742
19743  test -n "$BDEPS_UNZIP" && break
19744done
19745
19746  if test "x$BDEPS_UNZIP" = x7z; then
19747    BDEPS_UNZIP="7z x"
19748  fi
19749
19750  for ac_prog in wget lftp ftp
19751do
19752  # Extract the first word of "$ac_prog", so it can be a program name with args.
19753set dummy $ac_prog; ac_word=$2
19754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19755$as_echo_n "checking for $ac_word... " >&6; }
19756if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19757  $as_echo_n "(cached) " >&6
19758else
19759  if test -n "$BDEPS_FTP"; then
19760  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19761else
19762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19763for as_dir in $PATH
19764do
19765  IFS=$as_save_IFS
19766  test -z "$as_dir" && as_dir=.
19767    for ac_exec_ext in '' $ac_executable_extensions; do
19768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19769    ac_cv_prog_BDEPS_FTP="$ac_prog"
19770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19771    break 2
19772  fi
19773done
19774  done
19775IFS=$as_save_IFS
19776
19777fi
19778fi
19779BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19780if test -n "$BDEPS_FTP"; then
19781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19782$as_echo "$BDEPS_FTP" >&6; }
19783else
19784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19785$as_echo "no" >&6; }
19786fi
19787
19788
19789  test -n "$BDEPS_FTP" && break
19790done
19791
19792
19793
19794###############################################################################
19795#
19796# Determine OpenJDK variants, options and version numbers.
19797#
19798###############################################################################
19799
19800# We need build & target for this.
19801
19802
19803  ###############################################################################
19804  #
19805  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19806  # We always build headless support.
19807  #
19808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19809$as_echo_n "checking headful support... " >&6; }
19810  # Check whether --enable-headful was given.
19811if test "${enable_headful+set}" = set; then :
19812  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19813else
19814  SUPPORT_HEADFUL=yes
19815fi
19816
19817
19818  SUPPORT_HEADLESS=yes
19819  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19820
19821  if test "x$SUPPORT_HEADFUL" = xyes; then
19822    # We are building both headful and headless.
19823    headful_msg="include support for both headful and headless"
19824  fi
19825
19826  if test "x$SUPPORT_HEADFUL" = xno; then
19827    # Thus we are building headless only.
19828    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19829    headful_msg="headless only"
19830  fi
19831
19832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19833$as_echo "$headful_msg" >&6; }
19834
19835
19836
19837
19838
19839  # Control wether Hotspot runs Queens test after build.
19840  # Check whether --enable-hotspot-test-in-build was given.
19841if test "${enable_hotspot_test_in_build+set}" = set; then :
19842  enableval=$enable_hotspot_test_in_build;
19843else
19844  enable_hotspot_test_in_build=no
19845fi
19846
19847  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19848    TEST_IN_BUILD=true
19849  else
19850    TEST_IN_BUILD=false
19851  fi
19852
19853
19854  ###############################################################################
19855  #
19856  # Choose cacerts source file
19857  #
19858
19859# Check whether --with-cacerts-file was given.
19860if test "${with_cacerts_file+set}" = set; then :
19861  withval=$with_cacerts_file;
19862fi
19863
19864  if test "x$with_cacerts_file" != x; then
19865    CACERTS_FILE=$with_cacerts_file
19866  else
19867    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19868  fi
19869
19870
19871  ###############################################################################
19872  #
19873  # Enable or disable unlimited crypto
19874  #
19875  # Check whether --enable-unlimited-crypto was given.
19876if test "${enable_unlimited_crypto+set}" = set; then :
19877  enableval=$enable_unlimited_crypto;
19878else
19879  enable_unlimited_crypto=no
19880fi
19881
19882  if test "x$enable_unlimited_crypto" = "xyes"; then
19883    UNLIMITED_CRYPTO=true
19884  else
19885    UNLIMITED_CRYPTO=false
19886  fi
19887
19888
19889  ###############################################################################
19890  #
19891  # Enable or disable the elliptic curve crypto implementation
19892  #
19893
19894
19895  ###############################################################################
19896  #
19897  # --enable-rmiconnector-iiop
19898  #
19899  # Check whether --enable-rmiconnector-iiop was given.
19900if test "${enable_rmiconnector_iiop+set}" = set; then :
19901  enableval=$enable_rmiconnector_iiop;
19902fi
19903
19904  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19905    RMICONNECTOR_IIOP=true
19906  else
19907    RMICONNECTOR_IIOP=false
19908  fi
19909
19910
19911  ###############################################################################
19912  #
19913  # Compress jars
19914  #
19915  COMPRESS_JARS=false
19916
19917
19918
19919
19920  # Source the version numbers
19921  . $AUTOCONF_DIR/version-numbers
19922
19923  # Get the settings from parameters
19924
19925# Check whether --with-milestone was given.
19926if test "${with_milestone+set}" = set; then :
19927  withval=$with_milestone;
19928fi
19929
19930  if test "x$with_milestone" = xyes; then
19931    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19932  elif test "x$with_milestone" != x; then
19933    MILESTONE="$with_milestone"
19934  fi
19935  if test "x$MILESTONE" = x; then
19936    MILESTONE=internal
19937  fi
19938
19939
19940# Check whether --with-update-version was given.
19941if test "${with_update_version+set}" = set; then :
19942  withval=$with_update_version;
19943fi
19944
19945  if test "x$with_update_version" = xyes; then
19946    as_fn_error $? "Update version must have a value" "$LINENO" 5
19947  elif test "x$with_update_version" != x; then
19948    JDK_UPDATE_VERSION="$with_update_version"
19949    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19950    # to a bug in expr (which reduces it to just X). To work around this, we
19951    # always add a 0 to one digit update versions.
19952    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19953      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19954    fi
19955  fi
19956
19957
19958# Check whether --with-user-release-suffix was given.
19959if test "${with_user_release_suffix+set}" = set; then :
19960  withval=$with_user_release_suffix;
19961fi
19962
19963  if test "x$with_user_release_suffix" = xyes; then
19964    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19965  elif test "x$with_user_release_suffix" != x; then
19966    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19967  fi
19968
19969
19970# Check whether --with-build-number was given.
19971if test "${with_build_number+set}" = set; then :
19972  withval=$with_build_number;
19973fi
19974
19975  if test "x$with_build_number" = xyes; then
19976    as_fn_error $? "Build number must have a value" "$LINENO" 5
19977  elif test "x$with_build_number" != x; then
19978    JDK_BUILD_NUMBER="$with_build_number"
19979  fi
19980  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19981  if test "x$JDK_BUILD_NUMBER" = x; then
19982    JDK_BUILD_NUMBER=b00
19983    if test "x$USER_RELEASE_SUFFIX" = x; then
19984      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19985      # Avoid [:alnum:] since it depends on the locale.
19986      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19987      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19988    fi
19989  fi
19990
19991  # Now set the JDK version, milestone, build number etc.
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007  COPYRIGHT_YEAR=`date +'%Y'`
20008
20009
20010  if test "x$JDK_UPDATE_VERSION" != x; then
20011    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20012  else
20013    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20014  fi
20015
20016
20017  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20018
20019
20020
20021###############################################################################
20022#
20023# Setup BootJDK, used to bootstrap the build.
20024#
20025###############################################################################
20026
20027
20028  BOOT_JDK_FOUND=no
20029
20030# Check whether --with-boot-jdk was given.
20031if test "${with_boot_jdk+set}" = set; then :
20032  withval=$with_boot_jdk;
20033fi
20034
20035
20036  # We look for the Boot JDK through various means, going from more certain to
20037  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20038  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20039  # must check if this is indeed valid; otherwise we'll continue looking.
20040
20041  # Test: Is bootjdk explicitely set by command line arguments?
20042
20043  if test "x$BOOT_JDK_FOUND" = xno; then
20044    # Now execute the test
20045
20046  if test "x$with_boot_jdk" != x; then
20047    BOOT_JDK=$with_boot_jdk
20048    BOOT_JDK_FOUND=maybe
20049    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20050$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20051  fi
20052
20053
20054    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20055    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20056      # Do we have a bin/java?
20057      if test ! -x "$BOOT_JDK/bin/java"; then
20058        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20060        BOOT_JDK_FOUND=no
20061      else
20062        # Do we have a bin/javac?
20063        if test ! -x "$BOOT_JDK/bin/javac"; then
20064          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20066          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20067$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20068          BOOT_JDK_FOUND=no
20069        else
20070          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20071          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20072            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20074            BOOT_JDK_FOUND=no
20075          else
20076            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20077            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20078
20079            # Extra M4 quote needed to protect [] in grep expression.
20080            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20081            if test "x$FOUND_CORRECT_VERSION" = x; then
20082              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20084              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20085$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20086              BOOT_JDK_FOUND=no
20087            else
20088              # We're done! :-)
20089              BOOT_JDK_FOUND=yes
20090
20091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20092
20093  # Input might be given as Windows format, start by converting to
20094  # unix format.
20095  path="$BOOT_JDK"
20096  new_path=`$CYGPATH -u "$path"`
20097
20098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20101  # "foo.exe" is OK but "foo" is an error.
20102  #
20103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20104  # It is also a way to make sure we got the proper file name for the real test later on.
20105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20106  if test "x$test_shortpath" = x; then
20107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20108$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20109    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20110  fi
20111
20112  # Call helper function which possibly converts this using DOS-style short mode.
20113  # If so, the updated path is stored in $new_path.
20114
20115  input_path="$new_path"
20116  # Check if we need to convert this using DOS-style short mode. If the path
20117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20118  # take no chances and rewrite it.
20119  # Note: m4 eats our [], so we need to use [ and ] instead.
20120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20121  if test "x$has_forbidden_chars" != x; then
20122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20126      # Going to short mode and back again did indeed matter. Since short mode is
20127      # case insensitive, let's make it lowercase to improve readability.
20128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20129      # Now convert it back to Unix-stile (cygpath)
20130      input_path=`$CYGPATH -u "$shortmode_path"`
20131      new_path="$input_path"
20132    fi
20133  fi
20134
20135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20136  if test "x$test_cygdrive_prefix" = x; then
20137    # As a simple fix, exclude /usr/bin since it's not a real path.
20138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20140      # a path prefixed by /cygdrive for fixpath to work.
20141      new_path="$CYGWIN_ROOT_PATH$input_path"
20142    fi
20143  fi
20144
20145
20146  if test "x$path" != "x$new_path"; then
20147    BOOT_JDK="$new_path"
20148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20150  fi
20151
20152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20153
20154  path="$BOOT_JDK"
20155  has_colon=`$ECHO $path | $GREP ^.:`
20156  new_path="$path"
20157  if test "x$has_colon" = x; then
20158    # Not in mixed or Windows style, start by that.
20159    new_path=`cmd //c echo $path`
20160  fi
20161
20162
20163  input_path="$new_path"
20164  # Check if we need to convert this using DOS-style short mode. If the path
20165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20166  # take no chances and rewrite it.
20167  # Note: m4 eats our [], so we need to use [ and ] instead.
20168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20169  if test "x$has_forbidden_chars" != x; then
20170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20172  fi
20173
20174
20175  windows_path="$new_path"
20176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20177    unix_path=`$CYGPATH -u "$windows_path"`
20178    new_path="$unix_path"
20179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20181    new_path="$unix_path"
20182  fi
20183
20184  if test "x$path" != "x$new_path"; then
20185    BOOT_JDK="$new_path"
20186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20187$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20188  fi
20189
20190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20192
20193  else
20194    # We're on a posix platform. Hooray! :)
20195    path="$BOOT_JDK"
20196    has_space=`$ECHO "$path" | $GREP " "`
20197    if test "x$has_space" != x; then
20198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20200      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20201    fi
20202
20203    # Use eval to expand a potential ~
20204    eval path="$path"
20205    if test ! -f "$path" && test ! -d "$path"; then
20206      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20207    fi
20208
20209    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20210  fi
20211
20212              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20213$as_echo_n "checking for Boot JDK... " >&6; }
20214              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20215$as_echo "$BOOT_JDK" >&6; }
20216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20217$as_echo_n "checking Boot JDK version... " >&6; }
20218              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20219              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20220$as_echo "$BOOT_JDK_VERSION" >&6; }
20221            fi # end check jdk version
20222          fi # end check rt.jar
20223        fi # end check javac
20224      fi # end check java
20225    fi # end check boot jdk found
20226  fi
20227
20228  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20229    # Having specified an argument which is incorrect will produce an instant failure;
20230    # we should not go on looking
20231    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20232  fi
20233
20234  # Test: Is bootjdk available from builddeps?
20235
20236  if test "x$BOOT_JDK_FOUND" = xno; then
20237    # Now execute the test
20238
20239
20240
20241  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20242    # Source the builddeps file again, to make sure it uses the latest variables!
20243    . $builddepsfile
20244    # Look for a target and build machine specific resource!
20245    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20246    if test "x$resource" = x; then
20247      # Ok, lets instead look for a target specific resource
20248      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20249    fi
20250    if test "x$resource" = x; then
20251      # Ok, lets instead look for a build specific resource
20252      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20253    fi
20254    if test "x$resource" = x; then
20255      # Ok, lets instead look for a generic resource
20256      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20257      resource=${builddep_bootjdk}
20258    fi
20259    if test "x$resource" != x; then
20260      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20261$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20262      # If the resource in the builddeps.conf file is an existing directory,
20263      # for example /java/linux/cups
20264      if test -d ${resource}; then
20265        depdir=${resource}
20266      else
20267
20268  # bootjdk is for example mymodule
20269  # $resource is for example libs/general/libmymod_1_2_3.zip
20270  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20271  # $with_builddeps_dir is for example /localhome/builddeps
20272  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20273  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20274  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20275  filename=`basename $resource`
20276  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20277  filebase=${filename%%.*}
20278  extension=${filename#*.}
20279  installdir=$with_builddeps_dir/$filebase
20280  if test ! -f $installdir/$filename.unpacked; then
20281    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20282$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20283    if test ! -d $installdir; then
20284      mkdir -p $installdir
20285    fi
20286    if test ! -d $installdir; then
20287      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20288    fi
20289    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20290    touch $tmpfile
20291    if test ! -f $tmpfile; then
20292      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20293    fi
20294
20295  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20296  # $tmpfile is the local file name for the downloaded file.
20297  VALID_TOOL=no
20298  if test "x$BDEPS_FTP" = xwget; then
20299    VALID_TOOL=yes
20300    wget -O $tmpfile $with_builddeps_server/$resource
20301  fi
20302  if test "x$BDEPS_FTP" = xlftp; then
20303    VALID_TOOL=yes
20304    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20305  fi
20306  if test "x$BDEPS_FTP" = xftp; then
20307    VALID_TOOL=yes
20308    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20309    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20310    FTPUSERPWD=${FTPSERVER%%@*}
20311    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20312      FTPUSER=${userpwd%%:*}
20313      FTPPWD=${userpwd#*@}
20314      FTPSERVER=${FTPSERVER#*@}
20315    else
20316      FTPUSER=ftp
20317      FTPPWD=ftp
20318    fi
20319    # the "pass" command does not work on some
20320    # ftp clients (read ftp.exe) but if it works,
20321    # passive mode is better!
20322    ( \
20323        echo "user $FTPUSER $FTPPWD"        ; \
20324        echo "pass"                         ; \
20325        echo "bin"                          ; \
20326        echo "get $FTPPATH $tmpfile"              ; \
20327    ) | ftp -in $FTPSERVER
20328  fi
20329  if test "x$VALID_TOOL" != xyes; then
20330    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20331  fi
20332
20333    mv $tmpfile $installdir/$filename
20334    if test ! -s $installdir/$filename; then
20335      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20336    fi
20337    case "$extension" in
20338      zip)  echo "Unzipping $installdir/$filename..."
20339        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20340        ;;
20341      tar.gz) echo "Untaring $installdir/$filename..."
20342        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20343        ;;
20344      tgz) echo "Untaring $installdir/$filename..."
20345        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20346        ;;
20347      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20348        ;;
20349    esac
20350  fi
20351  if test -f $installdir/$filename.unpacked; then
20352    depdir=$installdir
20353  fi
20354
20355      fi
20356      # Source the builddeps file again, because in the previous command, the depdir
20357      # was updated to point at the current build dependency install directory.
20358      . $builddepsfile
20359      # Now extract variables from the builddeps.conf files.
20360      theroot=${builddep_bootjdk_ROOT}
20361      thecflags=${builddep_bootjdk_CFLAGS}
20362      thelibs=${builddep_bootjdk_LIBS}
20363      if test "x$depdir" = x; then
20364        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20365      fi
20366      BOOT_JDK=$depdir
20367      if test "x$theroot" != x; then
20368        BOOT_JDK="$theroot"
20369      fi
20370      if test "x$thecflags" != x; then
20371        BOOT_JDK_CFLAGS="$thecflags"
20372      fi
20373      if test "x$thelibs" != x; then
20374        BOOT_JDK_LIBS="$thelibs"
20375      fi
20376      BOOT_JDK_FOUND=maybe
20377      else BOOT_JDK_FOUND=no
20378
20379    fi
20380    else BOOT_JDK_FOUND=no
20381
20382  fi
20383
20384
20385
20386    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20387    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20388      # Do we have a bin/java?
20389      if test ! -x "$BOOT_JDK/bin/java"; then
20390        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20392        BOOT_JDK_FOUND=no
20393      else
20394        # Do we have a bin/javac?
20395        if test ! -x "$BOOT_JDK/bin/javac"; then
20396          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20398          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20399$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20400          BOOT_JDK_FOUND=no
20401        else
20402          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20403          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20404            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20406            BOOT_JDK_FOUND=no
20407          else
20408            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20409            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20410
20411            # Extra M4 quote needed to protect [] in grep expression.
20412            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20413            if test "x$FOUND_CORRECT_VERSION" = x; then
20414              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20416              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20418              BOOT_JDK_FOUND=no
20419            else
20420              # We're done! :-)
20421              BOOT_JDK_FOUND=yes
20422
20423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20424
20425  # Input might be given as Windows format, start by converting to
20426  # unix format.
20427  path="$BOOT_JDK"
20428  new_path=`$CYGPATH -u "$path"`
20429
20430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20433  # "foo.exe" is OK but "foo" is an error.
20434  #
20435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20436  # It is also a way to make sure we got the proper file name for the real test later on.
20437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20438  if test "x$test_shortpath" = x; then
20439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20441    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20442  fi
20443
20444  # Call helper function which possibly converts this using DOS-style short mode.
20445  # If so, the updated path is stored in $new_path.
20446
20447  input_path="$new_path"
20448  # Check if we need to convert this using DOS-style short mode. If the path
20449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20450  # take no chances and rewrite it.
20451  # Note: m4 eats our [], so we need to use [ and ] instead.
20452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20453  if test "x$has_forbidden_chars" != x; then
20454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20458      # Going to short mode and back again did indeed matter. Since short mode is
20459      # case insensitive, let's make it lowercase to improve readability.
20460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20461      # Now convert it back to Unix-stile (cygpath)
20462      input_path=`$CYGPATH -u "$shortmode_path"`
20463      new_path="$input_path"
20464    fi
20465  fi
20466
20467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20468  if test "x$test_cygdrive_prefix" = x; then
20469    # As a simple fix, exclude /usr/bin since it's not a real path.
20470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20472      # a path prefixed by /cygdrive for fixpath to work.
20473      new_path="$CYGWIN_ROOT_PATH$input_path"
20474    fi
20475  fi
20476
20477
20478  if test "x$path" != "x$new_path"; then
20479    BOOT_JDK="$new_path"
20480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20482  fi
20483
20484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20485
20486  path="$BOOT_JDK"
20487  has_colon=`$ECHO $path | $GREP ^.:`
20488  new_path="$path"
20489  if test "x$has_colon" = x; then
20490    # Not in mixed or Windows style, start by that.
20491    new_path=`cmd //c echo $path`
20492  fi
20493
20494
20495  input_path="$new_path"
20496  # Check if we need to convert this using DOS-style short mode. If the path
20497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20498  # take no chances and rewrite it.
20499  # Note: m4 eats our [], so we need to use [ and ] instead.
20500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20501  if test "x$has_forbidden_chars" != x; then
20502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20504  fi
20505
20506
20507  windows_path="$new_path"
20508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20509    unix_path=`$CYGPATH -u "$windows_path"`
20510    new_path="$unix_path"
20511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20513    new_path="$unix_path"
20514  fi
20515
20516  if test "x$path" != "x$new_path"; then
20517    BOOT_JDK="$new_path"
20518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20520  fi
20521
20522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20524
20525  else
20526    # We're on a posix platform. Hooray! :)
20527    path="$BOOT_JDK"
20528    has_space=`$ECHO "$path" | $GREP " "`
20529    if test "x$has_space" != x; then
20530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20532      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20533    fi
20534
20535    # Use eval to expand a potential ~
20536    eval path="$path"
20537    if test ! -f "$path" && test ! -d "$path"; then
20538      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20539    fi
20540
20541    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20542  fi
20543
20544              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20545$as_echo_n "checking for Boot JDK... " >&6; }
20546              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20547$as_echo "$BOOT_JDK" >&6; }
20548              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20549$as_echo_n "checking Boot JDK version... " >&6; }
20550              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20552$as_echo "$BOOT_JDK_VERSION" >&6; }
20553            fi # end check jdk version
20554          fi # end check rt.jar
20555        fi # end check javac
20556      fi # end check java
20557    fi # end check boot jdk found
20558  fi
20559
20560
20561  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20562
20563  if test "x$BOOT_JDK_FOUND" = xno; then
20564    # Now execute the test
20565
20566  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20567    # First check at user selected default
20568
20569  if test "x$BOOT_JDK_FOUND" = xno; then
20570    # Now execute the test
20571
20572  if test -x /usr/libexec/java_home; then
20573    BOOT_JDK=`/usr/libexec/java_home `
20574    BOOT_JDK_FOUND=maybe
20575    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20576$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20577  fi
20578
20579
20580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20582      # Do we have a bin/java?
20583      if test ! -x "$BOOT_JDK/bin/java"; then
20584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20586        BOOT_JDK_FOUND=no
20587      else
20588        # Do we have a bin/javac?
20589        if test ! -x "$BOOT_JDK/bin/javac"; then
20590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20594          BOOT_JDK_FOUND=no
20595        else
20596          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20597          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20598            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20600            BOOT_JDK_FOUND=no
20601          else
20602            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20603            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20604
20605            # Extra M4 quote needed to protect [] in grep expression.
20606            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20607            if test "x$FOUND_CORRECT_VERSION" = x; then
20608              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20610              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20611$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20612              BOOT_JDK_FOUND=no
20613            else
20614              # We're done! :-)
20615              BOOT_JDK_FOUND=yes
20616
20617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20618
20619  # Input might be given as Windows format, start by converting to
20620  # unix format.
20621  path="$BOOT_JDK"
20622  new_path=`$CYGPATH -u "$path"`
20623
20624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20627  # "foo.exe" is OK but "foo" is an error.
20628  #
20629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20630  # It is also a way to make sure we got the proper file name for the real test later on.
20631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20632  if test "x$test_shortpath" = x; then
20633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20635    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20636  fi
20637
20638  # Call helper function which possibly converts this using DOS-style short mode.
20639  # If so, the updated path is stored in $new_path.
20640
20641  input_path="$new_path"
20642  # Check if we need to convert this using DOS-style short mode. If the path
20643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20644  # take no chances and rewrite it.
20645  # Note: m4 eats our [], so we need to use [ and ] instead.
20646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20647  if test "x$has_forbidden_chars" != x; then
20648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20652      # Going to short mode and back again did indeed matter. Since short mode is
20653      # case insensitive, let's make it lowercase to improve readability.
20654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20655      # Now convert it back to Unix-stile (cygpath)
20656      input_path=`$CYGPATH -u "$shortmode_path"`
20657      new_path="$input_path"
20658    fi
20659  fi
20660
20661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20662  if test "x$test_cygdrive_prefix" = x; then
20663    # As a simple fix, exclude /usr/bin since it's not a real path.
20664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20666      # a path prefixed by /cygdrive for fixpath to work.
20667      new_path="$CYGWIN_ROOT_PATH$input_path"
20668    fi
20669  fi
20670
20671
20672  if test "x$path" != "x$new_path"; then
20673    BOOT_JDK="$new_path"
20674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20676  fi
20677
20678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20679
20680  path="$BOOT_JDK"
20681  has_colon=`$ECHO $path | $GREP ^.:`
20682  new_path="$path"
20683  if test "x$has_colon" = x; then
20684    # Not in mixed or Windows style, start by that.
20685    new_path=`cmd //c echo $path`
20686  fi
20687
20688
20689  input_path="$new_path"
20690  # Check if we need to convert this using DOS-style short mode. If the path
20691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20692  # take no chances and rewrite it.
20693  # Note: m4 eats our [], so we need to use [ and ] instead.
20694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20695  if test "x$has_forbidden_chars" != x; then
20696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20698  fi
20699
20700
20701  windows_path="$new_path"
20702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20703    unix_path=`$CYGPATH -u "$windows_path"`
20704    new_path="$unix_path"
20705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20707    new_path="$unix_path"
20708  fi
20709
20710  if test "x$path" != "x$new_path"; then
20711    BOOT_JDK="$new_path"
20712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20714  fi
20715
20716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20718
20719  else
20720    # We're on a posix platform. Hooray! :)
20721    path="$BOOT_JDK"
20722    has_space=`$ECHO "$path" | $GREP " "`
20723    if test "x$has_space" != x; then
20724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20726      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20727    fi
20728
20729    # Use eval to expand a potential ~
20730    eval path="$path"
20731    if test ! -f "$path" && test ! -d "$path"; then
20732      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20733    fi
20734
20735    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20736  fi
20737
20738              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20739$as_echo_n "checking for Boot JDK... " >&6; }
20740              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20741$as_echo "$BOOT_JDK" >&6; }
20742              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20743$as_echo_n "checking Boot JDK version... " >&6; }
20744              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20745              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20746$as_echo "$BOOT_JDK_VERSION" >&6; }
20747            fi # end check jdk version
20748          fi # end check rt.jar
20749        fi # end check javac
20750      fi # end check java
20751    fi # end check boot jdk found
20752  fi
20753
20754    # If that did not work out (e.g. too old), try explicit versions instead
20755
20756  if test "x$BOOT_JDK_FOUND" = xno; then
20757    # Now execute the test
20758
20759  if test -x /usr/libexec/java_home; then
20760    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20761    BOOT_JDK_FOUND=maybe
20762    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20763$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20764  fi
20765
20766
20767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20769      # Do we have a bin/java?
20770      if test ! -x "$BOOT_JDK/bin/java"; then
20771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20773        BOOT_JDK_FOUND=no
20774      else
20775        # Do we have a bin/javac?
20776        if test ! -x "$BOOT_JDK/bin/javac"; then
20777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20781          BOOT_JDK_FOUND=no
20782        else
20783          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20784          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20785            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20787            BOOT_JDK_FOUND=no
20788          else
20789            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20791
20792            # Extra M4 quote needed to protect [] in grep expression.
20793            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20794            if test "x$FOUND_CORRECT_VERSION" = x; then
20795              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20797              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20798$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20799              BOOT_JDK_FOUND=no
20800            else
20801              # We're done! :-)
20802              BOOT_JDK_FOUND=yes
20803
20804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20805
20806  # Input might be given as Windows format, start by converting to
20807  # unix format.
20808  path="$BOOT_JDK"
20809  new_path=`$CYGPATH -u "$path"`
20810
20811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20814  # "foo.exe" is OK but "foo" is an error.
20815  #
20816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20817  # It is also a way to make sure we got the proper file name for the real test later on.
20818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20819  if test "x$test_shortpath" = x; then
20820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20822    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20823  fi
20824
20825  # Call helper function which possibly converts this using DOS-style short mode.
20826  # If so, the updated path is stored in $new_path.
20827
20828  input_path="$new_path"
20829  # Check if we need to convert this using DOS-style short mode. If the path
20830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20831  # take no chances and rewrite it.
20832  # Note: m4 eats our [], so we need to use [ and ] instead.
20833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20834  if test "x$has_forbidden_chars" != x; then
20835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20839      # Going to short mode and back again did indeed matter. Since short mode is
20840      # case insensitive, let's make it lowercase to improve readability.
20841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20842      # Now convert it back to Unix-stile (cygpath)
20843      input_path=`$CYGPATH -u "$shortmode_path"`
20844      new_path="$input_path"
20845    fi
20846  fi
20847
20848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20849  if test "x$test_cygdrive_prefix" = x; then
20850    # As a simple fix, exclude /usr/bin since it's not a real path.
20851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20853      # a path prefixed by /cygdrive for fixpath to work.
20854      new_path="$CYGWIN_ROOT_PATH$input_path"
20855    fi
20856  fi
20857
20858
20859  if test "x$path" != "x$new_path"; then
20860    BOOT_JDK="$new_path"
20861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20862$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20863  fi
20864
20865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20866
20867  path="$BOOT_JDK"
20868  has_colon=`$ECHO $path | $GREP ^.:`
20869  new_path="$path"
20870  if test "x$has_colon" = x; then
20871    # Not in mixed or Windows style, start by that.
20872    new_path=`cmd //c echo $path`
20873  fi
20874
20875
20876  input_path="$new_path"
20877  # Check if we need to convert this using DOS-style short mode. If the path
20878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20879  # take no chances and rewrite it.
20880  # Note: m4 eats our [], so we need to use [ and ] instead.
20881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20882  if test "x$has_forbidden_chars" != x; then
20883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20885  fi
20886
20887
20888  windows_path="$new_path"
20889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20890    unix_path=`$CYGPATH -u "$windows_path"`
20891    new_path="$unix_path"
20892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20894    new_path="$unix_path"
20895  fi
20896
20897  if test "x$path" != "x$new_path"; then
20898    BOOT_JDK="$new_path"
20899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20901  fi
20902
20903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20905
20906  else
20907    # We're on a posix platform. Hooray! :)
20908    path="$BOOT_JDK"
20909    has_space=`$ECHO "$path" | $GREP " "`
20910    if test "x$has_space" != x; then
20911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20913      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20914    fi
20915
20916    # Use eval to expand a potential ~
20917    eval path="$path"
20918    if test ! -f "$path" && test ! -d "$path"; then
20919      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20920    fi
20921
20922    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20923  fi
20924
20925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20926$as_echo_n "checking for Boot JDK... " >&6; }
20927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20928$as_echo "$BOOT_JDK" >&6; }
20929              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20930$as_echo_n "checking Boot JDK version... " >&6; }
20931              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20932              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20933$as_echo "$BOOT_JDK_VERSION" >&6; }
20934            fi # end check jdk version
20935          fi # end check rt.jar
20936        fi # end check javac
20937      fi # end check java
20938    fi # end check boot jdk found
20939  fi
20940
20941
20942  if test "x$BOOT_JDK_FOUND" = xno; then
20943    # Now execute the test
20944
20945  if test -x /usr/libexec/java_home; then
20946    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20947    BOOT_JDK_FOUND=maybe
20948    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20949$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20950  fi
20951
20952
20953    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20954    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20955      # Do we have a bin/java?
20956      if test ! -x "$BOOT_JDK/bin/java"; then
20957        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20959        BOOT_JDK_FOUND=no
20960      else
20961        # Do we have a bin/javac?
20962        if test ! -x "$BOOT_JDK/bin/javac"; then
20963          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20965          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20966$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20967          BOOT_JDK_FOUND=no
20968        else
20969          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20970          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20973            BOOT_JDK_FOUND=no
20974          else
20975            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20977
20978            # Extra M4 quote needed to protect [] in grep expression.
20979            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20980            if test "x$FOUND_CORRECT_VERSION" = x; then
20981              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20983              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20984$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20985              BOOT_JDK_FOUND=no
20986            else
20987              # We're done! :-)
20988              BOOT_JDK_FOUND=yes
20989
20990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20991
20992  # Input might be given as Windows format, start by converting to
20993  # unix format.
20994  path="$BOOT_JDK"
20995  new_path=`$CYGPATH -u "$path"`
20996
20997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21000  # "foo.exe" is OK but "foo" is an error.
21001  #
21002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21003  # It is also a way to make sure we got the proper file name for the real test later on.
21004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21005  if test "x$test_shortpath" = x; then
21006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21008    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21009  fi
21010
21011  # Call helper function which possibly converts this using DOS-style short mode.
21012  # If so, the updated path is stored in $new_path.
21013
21014  input_path="$new_path"
21015  # Check if we need to convert this using DOS-style short mode. If the path
21016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21017  # take no chances and rewrite it.
21018  # Note: m4 eats our [], so we need to use [ and ] instead.
21019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21020  if test "x$has_forbidden_chars" != x; then
21021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21025      # Going to short mode and back again did indeed matter. Since short mode is
21026      # case insensitive, let's make it lowercase to improve readability.
21027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21028      # Now convert it back to Unix-stile (cygpath)
21029      input_path=`$CYGPATH -u "$shortmode_path"`
21030      new_path="$input_path"
21031    fi
21032  fi
21033
21034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21035  if test "x$test_cygdrive_prefix" = x; then
21036    # As a simple fix, exclude /usr/bin since it's not a real path.
21037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21039      # a path prefixed by /cygdrive for fixpath to work.
21040      new_path="$CYGWIN_ROOT_PATH$input_path"
21041    fi
21042  fi
21043
21044
21045  if test "x$path" != "x$new_path"; then
21046    BOOT_JDK="$new_path"
21047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21049  fi
21050
21051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21052
21053  path="$BOOT_JDK"
21054  has_colon=`$ECHO $path | $GREP ^.:`
21055  new_path="$path"
21056  if test "x$has_colon" = x; then
21057    # Not in mixed or Windows style, start by that.
21058    new_path=`cmd //c echo $path`
21059  fi
21060
21061
21062  input_path="$new_path"
21063  # Check if we need to convert this using DOS-style short mode. If the path
21064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21065  # take no chances and rewrite it.
21066  # Note: m4 eats our [], so we need to use [ and ] instead.
21067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21068  if test "x$has_forbidden_chars" != x; then
21069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21071  fi
21072
21073
21074  windows_path="$new_path"
21075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21076    unix_path=`$CYGPATH -u "$windows_path"`
21077    new_path="$unix_path"
21078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21080    new_path="$unix_path"
21081  fi
21082
21083  if test "x$path" != "x$new_path"; then
21084    BOOT_JDK="$new_path"
21085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21087  fi
21088
21089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21091
21092  else
21093    # We're on a posix platform. Hooray! :)
21094    path="$BOOT_JDK"
21095    has_space=`$ECHO "$path" | $GREP " "`
21096    if test "x$has_space" != x; then
21097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21100    fi
21101
21102    # Use eval to expand a potential ~
21103    eval path="$path"
21104    if test ! -f "$path" && test ! -d "$path"; then
21105      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21106    fi
21107
21108    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21109  fi
21110
21111              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21112$as_echo_n "checking for Boot JDK... " >&6; }
21113              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21114$as_echo "$BOOT_JDK" >&6; }
21115              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21116$as_echo_n "checking Boot JDK version... " >&6; }
21117              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21118              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21119$as_echo "$BOOT_JDK_VERSION" >&6; }
21120            fi # end check jdk version
21121          fi # end check rt.jar
21122        fi # end check javac
21123      fi # end check java
21124    fi # end check boot jdk found
21125  fi
21126
21127
21128  if test "x$BOOT_JDK_FOUND" = xno; then
21129    # Now execute the test
21130
21131  if test -x /usr/libexec/java_home; then
21132    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21133    BOOT_JDK_FOUND=maybe
21134    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21135$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21136  fi
21137
21138
21139    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21140    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21141      # Do we have a bin/java?
21142      if test ! -x "$BOOT_JDK/bin/java"; then
21143        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21145        BOOT_JDK_FOUND=no
21146      else
21147        # Do we have a bin/javac?
21148        if test ! -x "$BOOT_JDK/bin/javac"; then
21149          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21151          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21152$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21153          BOOT_JDK_FOUND=no
21154        else
21155          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21156          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21157            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21159            BOOT_JDK_FOUND=no
21160          else
21161            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21162            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21163
21164            # Extra M4 quote needed to protect [] in grep expression.
21165            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21166            if test "x$FOUND_CORRECT_VERSION" = x; then
21167              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21169              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21170$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21171              BOOT_JDK_FOUND=no
21172            else
21173              # We're done! :-)
21174              BOOT_JDK_FOUND=yes
21175
21176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21177
21178  # Input might be given as Windows format, start by converting to
21179  # unix format.
21180  path="$BOOT_JDK"
21181  new_path=`$CYGPATH -u "$path"`
21182
21183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21186  # "foo.exe" is OK but "foo" is an error.
21187  #
21188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21189  # It is also a way to make sure we got the proper file name for the real test later on.
21190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21191  if test "x$test_shortpath" = x; then
21192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21194    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21195  fi
21196
21197  # Call helper function which possibly converts this using DOS-style short mode.
21198  # If so, the updated path is stored in $new_path.
21199
21200  input_path="$new_path"
21201  # Check if we need to convert this using DOS-style short mode. If the path
21202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21203  # take no chances and rewrite it.
21204  # Note: m4 eats our [], so we need to use [ and ] instead.
21205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21206  if test "x$has_forbidden_chars" != x; then
21207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21211      # Going to short mode and back again did indeed matter. Since short mode is
21212      # case insensitive, let's make it lowercase to improve readability.
21213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21214      # Now convert it back to Unix-stile (cygpath)
21215      input_path=`$CYGPATH -u "$shortmode_path"`
21216      new_path="$input_path"
21217    fi
21218  fi
21219
21220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21221  if test "x$test_cygdrive_prefix" = x; then
21222    # As a simple fix, exclude /usr/bin since it's not a real path.
21223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21225      # a path prefixed by /cygdrive for fixpath to work.
21226      new_path="$CYGWIN_ROOT_PATH$input_path"
21227    fi
21228  fi
21229
21230
21231  if test "x$path" != "x$new_path"; then
21232    BOOT_JDK="$new_path"
21233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21235  fi
21236
21237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21238
21239  path="$BOOT_JDK"
21240  has_colon=`$ECHO $path | $GREP ^.:`
21241  new_path="$path"
21242  if test "x$has_colon" = x; then
21243    # Not in mixed or Windows style, start by that.
21244    new_path=`cmd //c echo $path`
21245  fi
21246
21247
21248  input_path="$new_path"
21249  # Check if we need to convert this using DOS-style short mode. If the path
21250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21251  # take no chances and rewrite it.
21252  # Note: m4 eats our [], so we need to use [ and ] instead.
21253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21254  if test "x$has_forbidden_chars" != x; then
21255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21257  fi
21258
21259
21260  windows_path="$new_path"
21261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21262    unix_path=`$CYGPATH -u "$windows_path"`
21263    new_path="$unix_path"
21264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21266    new_path="$unix_path"
21267  fi
21268
21269  if test "x$path" != "x$new_path"; then
21270    BOOT_JDK="$new_path"
21271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21273  fi
21274
21275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21277
21278  else
21279    # We're on a posix platform. Hooray! :)
21280    path="$BOOT_JDK"
21281    has_space=`$ECHO "$path" | $GREP " "`
21282    if test "x$has_space" != x; then
21283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21285      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21286    fi
21287
21288    # Use eval to expand a potential ~
21289    eval path="$path"
21290    if test ! -f "$path" && test ! -d "$path"; then
21291      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21292    fi
21293
21294    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21295  fi
21296
21297              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21298$as_echo_n "checking for Boot JDK... " >&6; }
21299              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21300$as_echo "$BOOT_JDK" >&6; }
21301              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21302$as_echo_n "checking Boot JDK version... " >&6; }
21303              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21304              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21305$as_echo "$BOOT_JDK_VERSION" >&6; }
21306            fi # end check jdk version
21307          fi # end check rt.jar
21308        fi # end check javac
21309      fi # end check java
21310    fi # end check boot jdk found
21311  fi
21312
21313  fi
21314
21315
21316    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21317    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21318      # Do we have a bin/java?
21319      if test ! -x "$BOOT_JDK/bin/java"; then
21320        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21322        BOOT_JDK_FOUND=no
21323      else
21324        # Do we have a bin/javac?
21325        if test ! -x "$BOOT_JDK/bin/javac"; then
21326          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21328          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21329$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21330          BOOT_JDK_FOUND=no
21331        else
21332          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21333          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21336            BOOT_JDK_FOUND=no
21337          else
21338            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21340
21341            # Extra M4 quote needed to protect [] in grep expression.
21342            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21343            if test "x$FOUND_CORRECT_VERSION" = x; then
21344              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21346              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21347$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21348              BOOT_JDK_FOUND=no
21349            else
21350              # We're done! :-)
21351              BOOT_JDK_FOUND=yes
21352
21353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21354
21355  # Input might be given as Windows format, start by converting to
21356  # unix format.
21357  path="$BOOT_JDK"
21358  new_path=`$CYGPATH -u "$path"`
21359
21360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21363  # "foo.exe" is OK but "foo" is an error.
21364  #
21365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21366  # It is also a way to make sure we got the proper file name for the real test later on.
21367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21368  if test "x$test_shortpath" = x; then
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21372  fi
21373
21374  # Call helper function which possibly converts this using DOS-style short mode.
21375  # If so, the updated path is stored in $new_path.
21376
21377  input_path="$new_path"
21378  # Check if we need to convert this using DOS-style short mode. If the path
21379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21380  # take no chances and rewrite it.
21381  # Note: m4 eats our [], so we need to use [ and ] instead.
21382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21383  if test "x$has_forbidden_chars" != x; then
21384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21388      # Going to short mode and back again did indeed matter. Since short mode is
21389      # case insensitive, let's make it lowercase to improve readability.
21390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21391      # Now convert it back to Unix-stile (cygpath)
21392      input_path=`$CYGPATH -u "$shortmode_path"`
21393      new_path="$input_path"
21394    fi
21395  fi
21396
21397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21398  if test "x$test_cygdrive_prefix" = x; then
21399    # As a simple fix, exclude /usr/bin since it's not a real path.
21400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21402      # a path prefixed by /cygdrive for fixpath to work.
21403      new_path="$CYGWIN_ROOT_PATH$input_path"
21404    fi
21405  fi
21406
21407
21408  if test "x$path" != "x$new_path"; then
21409    BOOT_JDK="$new_path"
21410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21412  fi
21413
21414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21415
21416  path="$BOOT_JDK"
21417  has_colon=`$ECHO $path | $GREP ^.:`
21418  new_path="$path"
21419  if test "x$has_colon" = x; then
21420    # Not in mixed or Windows style, start by that.
21421    new_path=`cmd //c echo $path`
21422  fi
21423
21424
21425  input_path="$new_path"
21426  # Check if we need to convert this using DOS-style short mode. If the path
21427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21428  # take no chances and rewrite it.
21429  # Note: m4 eats our [], so we need to use [ and ] instead.
21430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21431  if test "x$has_forbidden_chars" != x; then
21432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21434  fi
21435
21436
21437  windows_path="$new_path"
21438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21439    unix_path=`$CYGPATH -u "$windows_path"`
21440    new_path="$unix_path"
21441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21443    new_path="$unix_path"
21444  fi
21445
21446  if test "x$path" != "x$new_path"; then
21447    BOOT_JDK="$new_path"
21448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21450  fi
21451
21452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21454
21455  else
21456    # We're on a posix platform. Hooray! :)
21457    path="$BOOT_JDK"
21458    has_space=`$ECHO "$path" | $GREP " "`
21459    if test "x$has_space" != x; then
21460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21462      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21463    fi
21464
21465    # Use eval to expand a potential ~
21466    eval path="$path"
21467    if test ! -f "$path" && test ! -d "$path"; then
21468      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21469    fi
21470
21471    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21472  fi
21473
21474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21475$as_echo_n "checking for Boot JDK... " >&6; }
21476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21477$as_echo "$BOOT_JDK" >&6; }
21478              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21479$as_echo_n "checking Boot JDK version... " >&6; }
21480              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21481              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21482$as_echo "$BOOT_JDK_VERSION" >&6; }
21483            fi # end check jdk version
21484          fi # end check rt.jar
21485        fi # end check javac
21486      fi # end check java
21487    fi # end check boot jdk found
21488  fi
21489
21490
21491  # Test: Is $JAVA_HOME set?
21492
21493  if test "x$BOOT_JDK_FOUND" = xno; then
21494    # Now execute the test
21495
21496  if test "x$JAVA_HOME" != x; then
21497    JAVA_HOME_PROCESSED="$JAVA_HOME"
21498
21499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21500
21501  # Input might be given as Windows format, start by converting to
21502  # unix format.
21503  path="$JAVA_HOME_PROCESSED"
21504  new_path=`$CYGPATH -u "$path"`
21505
21506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21509  # "foo.exe" is OK but "foo" is an error.
21510  #
21511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21512  # It is also a way to make sure we got the proper file name for the real test later on.
21513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21514  if test "x$test_shortpath" = x; then
21515    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21516$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21517    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21518  fi
21519
21520  # Call helper function which possibly converts this using DOS-style short mode.
21521  # If so, the updated path is stored in $new_path.
21522
21523  input_path="$new_path"
21524  # Check if we need to convert this using DOS-style short mode. If the path
21525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21526  # take no chances and rewrite it.
21527  # Note: m4 eats our [], so we need to use [ and ] instead.
21528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21529  if test "x$has_forbidden_chars" != x; then
21530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21534      # Going to short mode and back again did indeed matter. Since short mode is
21535      # case insensitive, let's make it lowercase to improve readability.
21536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21537      # Now convert it back to Unix-stile (cygpath)
21538      input_path=`$CYGPATH -u "$shortmode_path"`
21539      new_path="$input_path"
21540    fi
21541  fi
21542
21543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21544  if test "x$test_cygdrive_prefix" = x; then
21545    # As a simple fix, exclude /usr/bin since it's not a real path.
21546    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21548      # a path prefixed by /cygdrive for fixpath to work.
21549      new_path="$CYGWIN_ROOT_PATH$input_path"
21550    fi
21551  fi
21552
21553
21554  if test "x$path" != "x$new_path"; then
21555    JAVA_HOME_PROCESSED="$new_path"
21556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21557$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21558  fi
21559
21560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21561
21562  path="$JAVA_HOME_PROCESSED"
21563  has_colon=`$ECHO $path | $GREP ^.:`
21564  new_path="$path"
21565  if test "x$has_colon" = x; then
21566    # Not in mixed or Windows style, start by that.
21567    new_path=`cmd //c echo $path`
21568  fi
21569
21570
21571  input_path="$new_path"
21572  # Check if we need to convert this using DOS-style short mode. If the path
21573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21574  # take no chances and rewrite it.
21575  # Note: m4 eats our [], so we need to use [ and ] instead.
21576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21577  if test "x$has_forbidden_chars" != x; then
21578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21580  fi
21581
21582
21583  windows_path="$new_path"
21584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21585    unix_path=`$CYGPATH -u "$windows_path"`
21586    new_path="$unix_path"
21587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21589    new_path="$unix_path"
21590  fi
21591
21592  if test "x$path" != "x$new_path"; then
21593    JAVA_HOME_PROCESSED="$new_path"
21594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21595$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21596  fi
21597
21598  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21599  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21600
21601  else
21602    # We're on a posix platform. Hooray! :)
21603    path="$JAVA_HOME_PROCESSED"
21604    has_space=`$ECHO "$path" | $GREP " "`
21605    if test "x$has_space" != x; then
21606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21607$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21608      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21609    fi
21610
21611    # Use eval to expand a potential ~
21612    eval path="$path"
21613    if test ! -f "$path" && test ! -d "$path"; then
21614      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21615    fi
21616
21617    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21618  fi
21619
21620    if test ! -d "$JAVA_HOME_PROCESSED"; then
21621      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21622$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21623    else
21624      # Aha, the user has set a JAVA_HOME
21625      # let us use that as the Boot JDK.
21626      BOOT_JDK="$JAVA_HOME_PROCESSED"
21627      BOOT_JDK_FOUND=maybe
21628      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21629$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21630    fi
21631  fi
21632
21633
21634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21636      # Do we have a bin/java?
21637      if test ! -x "$BOOT_JDK/bin/java"; then
21638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21640        BOOT_JDK_FOUND=no
21641      else
21642        # Do we have a bin/javac?
21643        if test ! -x "$BOOT_JDK/bin/javac"; then
21644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21648          BOOT_JDK_FOUND=no
21649        else
21650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21654            BOOT_JDK_FOUND=no
21655          else
21656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21658
21659            # Extra M4 quote needed to protect [] in grep expression.
21660            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21661            if test "x$FOUND_CORRECT_VERSION" = x; then
21662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21665$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21666              BOOT_JDK_FOUND=no
21667            else
21668              # We're done! :-)
21669              BOOT_JDK_FOUND=yes
21670
21671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21672
21673  # Input might be given as Windows format, start by converting to
21674  # unix format.
21675  path="$BOOT_JDK"
21676  new_path=`$CYGPATH -u "$path"`
21677
21678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21681  # "foo.exe" is OK but "foo" is an error.
21682  #
21683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21684  # It is also a way to make sure we got the proper file name for the real test later on.
21685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21686  if test "x$test_shortpath" = x; then
21687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21690  fi
21691
21692  # Call helper function which possibly converts this using DOS-style short mode.
21693  # If so, the updated path is stored in $new_path.
21694
21695  input_path="$new_path"
21696  # Check if we need to convert this using DOS-style short mode. If the path
21697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21698  # take no chances and rewrite it.
21699  # Note: m4 eats our [], so we need to use [ and ] instead.
21700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21701  if test "x$has_forbidden_chars" != x; then
21702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21706      # Going to short mode and back again did indeed matter. Since short mode is
21707      # case insensitive, let's make it lowercase to improve readability.
21708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21709      # Now convert it back to Unix-stile (cygpath)
21710      input_path=`$CYGPATH -u "$shortmode_path"`
21711      new_path="$input_path"
21712    fi
21713  fi
21714
21715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21716  if test "x$test_cygdrive_prefix" = x; then
21717    # As a simple fix, exclude /usr/bin since it's not a real path.
21718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21720      # a path prefixed by /cygdrive for fixpath to work.
21721      new_path="$CYGWIN_ROOT_PATH$input_path"
21722    fi
21723  fi
21724
21725
21726  if test "x$path" != "x$new_path"; then
21727    BOOT_JDK="$new_path"
21728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21730  fi
21731
21732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21733
21734  path="$BOOT_JDK"
21735  has_colon=`$ECHO $path | $GREP ^.:`
21736  new_path="$path"
21737  if test "x$has_colon" = x; then
21738    # Not in mixed or Windows style, start by that.
21739    new_path=`cmd //c echo $path`
21740  fi
21741
21742
21743  input_path="$new_path"
21744  # Check if we need to convert this using DOS-style short mode. If the path
21745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21746  # take no chances and rewrite it.
21747  # Note: m4 eats our [], so we need to use [ and ] instead.
21748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21749  if test "x$has_forbidden_chars" != x; then
21750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21752  fi
21753
21754
21755  windows_path="$new_path"
21756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21757    unix_path=`$CYGPATH -u "$windows_path"`
21758    new_path="$unix_path"
21759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21761    new_path="$unix_path"
21762  fi
21763
21764  if test "x$path" != "x$new_path"; then
21765    BOOT_JDK="$new_path"
21766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21768  fi
21769
21770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21772
21773  else
21774    # We're on a posix platform. Hooray! :)
21775    path="$BOOT_JDK"
21776    has_space=`$ECHO "$path" | $GREP " "`
21777    if test "x$has_space" != x; then
21778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21781    fi
21782
21783    # Use eval to expand a potential ~
21784    eval path="$path"
21785    if test ! -f "$path" && test ! -d "$path"; then
21786      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21787    fi
21788
21789    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21790  fi
21791
21792              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21793$as_echo_n "checking for Boot JDK... " >&6; }
21794              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21795$as_echo "$BOOT_JDK" >&6; }
21796              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21797$as_echo_n "checking Boot JDK version... " >&6; }
21798              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21800$as_echo "$BOOT_JDK_VERSION" >&6; }
21801            fi # end check jdk version
21802          fi # end check rt.jar
21803        fi # end check javac
21804      fi # end check java
21805    fi # end check boot jdk found
21806  fi
21807
21808
21809  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21810
21811  if test "x$BOOT_JDK_FOUND" = xno; then
21812    # Now execute the test
21813
21814  # Extract the first word of "javac", so it can be a program name with args.
21815set dummy javac; ac_word=$2
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21817$as_echo_n "checking for $ac_word... " >&6; }
21818if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  case $JAVAC_CHECK in
21822  [\\/]* | ?:[\\/]*)
21823  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21824  ;;
21825  *)
21826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21827for as_dir in $PATH
21828do
21829  IFS=$as_save_IFS
21830  test -z "$as_dir" && as_dir=.
21831    for ac_exec_ext in '' $ac_executable_extensions; do
21832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21833    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21835    break 2
21836  fi
21837done
21838  done
21839IFS=$as_save_IFS
21840
21841  ;;
21842esac
21843fi
21844JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21845if test -n "$JAVAC_CHECK"; then
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21847$as_echo "$JAVAC_CHECK" >&6; }
21848else
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21850$as_echo "no" >&6; }
21851fi
21852
21853
21854  # Extract the first word of "java", so it can be a program name with args.
21855set dummy java; ac_word=$2
21856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21857$as_echo_n "checking for $ac_word... " >&6; }
21858if ${ac_cv_path_JAVA_CHECK+:} false; then :
21859  $as_echo_n "(cached) " >&6
21860else
21861  case $JAVA_CHECK in
21862  [\\/]* | ?:[\\/]*)
21863  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21864  ;;
21865  *)
21866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21867for as_dir in $PATH
21868do
21869  IFS=$as_save_IFS
21870  test -z "$as_dir" && as_dir=.
21871    for ac_exec_ext in '' $ac_executable_extensions; do
21872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21873    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21875    break 2
21876  fi
21877done
21878  done
21879IFS=$as_save_IFS
21880
21881  ;;
21882esac
21883fi
21884JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21885if test -n "$JAVA_CHECK"; then
21886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21887$as_echo "$JAVA_CHECK" >&6; }
21888else
21889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21890$as_echo "no" >&6; }
21891fi
21892
21893
21894  BINARY="$JAVAC_CHECK"
21895  if test "x$JAVAC_CHECK" = x; then
21896    BINARY="$JAVA_CHECK"
21897  fi
21898  if test "x$BINARY" != x; then
21899    # So there is a java(c) binary, it might be part of a JDK.
21900    # Lets find the JDK/JRE directory by following symbolic links.
21901    # Linux/GNU systems often have links from /usr/bin/java to
21902    # /etc/alternatives/java to the real JDK binary.
21903
21904  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21905    # Follow a chain of symbolic links. Use readlink
21906    # where it exists, else fall back to horribly
21907    # complicated shell code.
21908    if test "x$READLINK_TESTED" != yes; then
21909      # On MacOSX there is a readlink tool with a different
21910      # purpose than the GNU readlink tool. Check the found readlink.
21911      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21912      if test "x$ISGNU" = x; then
21913        # A readlink that we do not know how to use.
21914        # Are there other non-GNU readlinks out there?
21915        READLINK_TESTED=yes
21916        READLINK=
21917      fi
21918    fi
21919
21920    if test "x$READLINK" != x; then
21921      BINARY=`$READLINK -f $BINARY`
21922    else
21923      # Save the current directory for restoring afterwards
21924      STARTDIR=$PWD
21925      COUNTER=0
21926      sym_link_dir=`$DIRNAME $BINARY`
21927      sym_link_file=`$BASENAME $BINARY`
21928      cd $sym_link_dir
21929      # Use -P flag to resolve symlinks in directories.
21930      cd `$THEPWDCMD -P`
21931      sym_link_dir=`$THEPWDCMD -P`
21932      # Resolve file symlinks
21933      while test $COUNTER -lt 20; do
21934        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21935        if test "x$ISLINK" == x; then
21936          # This is not a symbolic link! We are done!
21937          break
21938        fi
21939        # Again resolve directory symlinks since the target of the just found
21940        # link could be in a different directory
21941        cd `$DIRNAME $ISLINK`
21942        sym_link_dir=`$THEPWDCMD -P`
21943        sym_link_file=`$BASENAME $ISLINK`
21944        let COUNTER=COUNTER+1
21945      done
21946      cd $STARTDIR
21947      BINARY=$sym_link_dir/$sym_link_file
21948    fi
21949  fi
21950
21951    BOOT_JDK=`dirname "$BINARY"`
21952    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21953    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21954      # Looks like we found ourselves an JDK
21955      BOOT_JDK_FOUND=maybe
21956      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21957$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21958    fi
21959  fi
21960
21961
21962    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21963    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21964      # Do we have a bin/java?
21965      if test ! -x "$BOOT_JDK/bin/java"; then
21966        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21968        BOOT_JDK_FOUND=no
21969      else
21970        # Do we have a bin/javac?
21971        if test ! -x "$BOOT_JDK/bin/javac"; then
21972          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21974          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21975$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21976          BOOT_JDK_FOUND=no
21977        else
21978          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21979          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21980            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21982            BOOT_JDK_FOUND=no
21983          else
21984            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21985            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21986
21987            # Extra M4 quote needed to protect [] in grep expression.
21988            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21989            if test "x$FOUND_CORRECT_VERSION" = x; then
21990              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21992              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21993$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21994              BOOT_JDK_FOUND=no
21995            else
21996              # We're done! :-)
21997              BOOT_JDK_FOUND=yes
21998
21999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22000
22001  # Input might be given as Windows format, start by converting to
22002  # unix format.
22003  path="$BOOT_JDK"
22004  new_path=`$CYGPATH -u "$path"`
22005
22006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22009  # "foo.exe" is OK but "foo" is an error.
22010  #
22011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22012  # It is also a way to make sure we got the proper file name for the real test later on.
22013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22014  if test "x$test_shortpath" = x; then
22015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22018  fi
22019
22020  # Call helper function which possibly converts this using DOS-style short mode.
22021  # If so, the updated path is stored in $new_path.
22022
22023  input_path="$new_path"
22024  # Check if we need to convert this using DOS-style short mode. If the path
22025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22026  # take no chances and rewrite it.
22027  # Note: m4 eats our [], so we need to use [ and ] instead.
22028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22029  if test "x$has_forbidden_chars" != x; then
22030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22034      # Going to short mode and back again did indeed matter. Since short mode is
22035      # case insensitive, let's make it lowercase to improve readability.
22036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22037      # Now convert it back to Unix-stile (cygpath)
22038      input_path=`$CYGPATH -u "$shortmode_path"`
22039      new_path="$input_path"
22040    fi
22041  fi
22042
22043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22044  if test "x$test_cygdrive_prefix" = x; then
22045    # As a simple fix, exclude /usr/bin since it's not a real path.
22046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22048      # a path prefixed by /cygdrive for fixpath to work.
22049      new_path="$CYGWIN_ROOT_PATH$input_path"
22050    fi
22051  fi
22052
22053
22054  if test "x$path" != "x$new_path"; then
22055    BOOT_JDK="$new_path"
22056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22058  fi
22059
22060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22061
22062  path="$BOOT_JDK"
22063  has_colon=`$ECHO $path | $GREP ^.:`
22064  new_path="$path"
22065  if test "x$has_colon" = x; then
22066    # Not in mixed or Windows style, start by that.
22067    new_path=`cmd //c echo $path`
22068  fi
22069
22070
22071  input_path="$new_path"
22072  # Check if we need to convert this using DOS-style short mode. If the path
22073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22074  # take no chances and rewrite it.
22075  # Note: m4 eats our [], so we need to use [ and ] instead.
22076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22077  if test "x$has_forbidden_chars" != x; then
22078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22080  fi
22081
22082
22083  windows_path="$new_path"
22084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22085    unix_path=`$CYGPATH -u "$windows_path"`
22086    new_path="$unix_path"
22087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22089    new_path="$unix_path"
22090  fi
22091
22092  if test "x$path" != "x$new_path"; then
22093    BOOT_JDK="$new_path"
22094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22096  fi
22097
22098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22100
22101  else
22102    # We're on a posix platform. Hooray! :)
22103    path="$BOOT_JDK"
22104    has_space=`$ECHO "$path" | $GREP " "`
22105    if test "x$has_space" != x; then
22106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22108      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22109    fi
22110
22111    # Use eval to expand a potential ~
22112    eval path="$path"
22113    if test ! -f "$path" && test ! -d "$path"; then
22114      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22115    fi
22116
22117    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22118  fi
22119
22120              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22121$as_echo_n "checking for Boot JDK... " >&6; }
22122              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22123$as_echo "$BOOT_JDK" >&6; }
22124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22125$as_echo_n "checking Boot JDK version... " >&6; }
22126              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22127              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22128$as_echo "$BOOT_JDK_VERSION" >&6; }
22129            fi # end check jdk version
22130          fi # end check rt.jar
22131        fi # end check javac
22132      fi # end check java
22133    fi # end check boot jdk found
22134  fi
22135
22136
22137  # Test: Is there a JDK installed in default, well-known locations?
22138
22139  if test "x$BOOT_JDK_FOUND" = xno; then
22140    # Now execute the test
22141
22142  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22143
22144  if test "x$BOOT_JDK_FOUND" = xno; then
22145    # Now execute the test
22146
22147  if test "x$ProgramW6432" != x; then
22148    VIRTUAL_DIR="$ProgramW6432/Java"
22149
22150  windows_path="$VIRTUAL_DIR"
22151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22152    unix_path=`$CYGPATH -u "$windows_path"`
22153    VIRTUAL_DIR="$unix_path"
22154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22156    VIRTUAL_DIR="$unix_path"
22157  fi
22158
22159
22160  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22161  BOOT_JDK_SUFFIX=""
22162  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22163  if test "x$ALL_JDKS_FOUND" != x; then
22164    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22165
22166  if test "x$BOOT_JDK_FOUND" = xno; then
22167    # Now execute the test
22168
22169        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22170        if test -d "$BOOT_JDK"; then
22171          BOOT_JDK_FOUND=maybe
22172          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22173$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22174        fi
22175
22176
22177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22179      # Do we have a bin/java?
22180      if test ! -x "$BOOT_JDK/bin/java"; then
22181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22183        BOOT_JDK_FOUND=no
22184      else
22185        # Do we have a bin/javac?
22186        if test ! -x "$BOOT_JDK/bin/javac"; then
22187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22191          BOOT_JDK_FOUND=no
22192        else
22193          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22194          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22195            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22197            BOOT_JDK_FOUND=no
22198          else
22199            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22200            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22201
22202            # Extra M4 quote needed to protect [] in grep expression.
22203            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22204            if test "x$FOUND_CORRECT_VERSION" = x; then
22205              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22207              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22208$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22209              BOOT_JDK_FOUND=no
22210            else
22211              # We're done! :-)
22212              BOOT_JDK_FOUND=yes
22213
22214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22215
22216  # Input might be given as Windows format, start by converting to
22217  # unix format.
22218  path="$BOOT_JDK"
22219  new_path=`$CYGPATH -u "$path"`
22220
22221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22224  # "foo.exe" is OK but "foo" is an error.
22225  #
22226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22227  # It is also a way to make sure we got the proper file name for the real test later on.
22228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22229  if test "x$test_shortpath" = x; then
22230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22233  fi
22234
22235  # Call helper function which possibly converts this using DOS-style short mode.
22236  # If so, the updated path is stored in $new_path.
22237
22238  input_path="$new_path"
22239  # Check if we need to convert this using DOS-style short mode. If the path
22240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22241  # take no chances and rewrite it.
22242  # Note: m4 eats our [], so we need to use [ and ] instead.
22243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22244  if test "x$has_forbidden_chars" != x; then
22245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22249      # Going to short mode and back again did indeed matter. Since short mode is
22250      # case insensitive, let's make it lowercase to improve readability.
22251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22252      # Now convert it back to Unix-stile (cygpath)
22253      input_path=`$CYGPATH -u "$shortmode_path"`
22254      new_path="$input_path"
22255    fi
22256  fi
22257
22258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22259  if test "x$test_cygdrive_prefix" = x; then
22260    # As a simple fix, exclude /usr/bin since it's not a real path.
22261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22263      # a path prefixed by /cygdrive for fixpath to work.
22264      new_path="$CYGWIN_ROOT_PATH$input_path"
22265    fi
22266  fi
22267
22268
22269  if test "x$path" != "x$new_path"; then
22270    BOOT_JDK="$new_path"
22271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22273  fi
22274
22275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22276
22277  path="$BOOT_JDK"
22278  has_colon=`$ECHO $path | $GREP ^.:`
22279  new_path="$path"
22280  if test "x$has_colon" = x; then
22281    # Not in mixed or Windows style, start by that.
22282    new_path=`cmd //c echo $path`
22283  fi
22284
22285
22286  input_path="$new_path"
22287  # Check if we need to convert this using DOS-style short mode. If the path
22288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22289  # take no chances and rewrite it.
22290  # Note: m4 eats our [], so we need to use [ and ] instead.
22291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22292  if test "x$has_forbidden_chars" != x; then
22293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22295  fi
22296
22297
22298  windows_path="$new_path"
22299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22300    unix_path=`$CYGPATH -u "$windows_path"`
22301    new_path="$unix_path"
22302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22304    new_path="$unix_path"
22305  fi
22306
22307  if test "x$path" != "x$new_path"; then
22308    BOOT_JDK="$new_path"
22309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22311  fi
22312
22313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22315
22316  else
22317    # We're on a posix platform. Hooray! :)
22318    path="$BOOT_JDK"
22319    has_space=`$ECHO "$path" | $GREP " "`
22320    if test "x$has_space" != x; then
22321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22324    fi
22325
22326    # Use eval to expand a potential ~
22327    eval path="$path"
22328    if test ! -f "$path" && test ! -d "$path"; then
22329      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22330    fi
22331
22332    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22333  fi
22334
22335              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22336$as_echo_n "checking for Boot JDK... " >&6; }
22337              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22338$as_echo "$BOOT_JDK" >&6; }
22339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22340$as_echo_n "checking Boot JDK version... " >&6; }
22341              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22343$as_echo "$BOOT_JDK_VERSION" >&6; }
22344            fi # end check jdk version
22345          fi # end check rt.jar
22346        fi # end check javac
22347      fi # end check java
22348    fi # end check boot jdk found
22349  fi
22350
22351    done
22352  fi
22353
22354  fi
22355
22356
22357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22359      # Do we have a bin/java?
22360      if test ! -x "$BOOT_JDK/bin/java"; then
22361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22363        BOOT_JDK_FOUND=no
22364      else
22365        # Do we have a bin/javac?
22366        if test ! -x "$BOOT_JDK/bin/javac"; then
22367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22371          BOOT_JDK_FOUND=no
22372        else
22373          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22374          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22375            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22377            BOOT_JDK_FOUND=no
22378          else
22379            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22380            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22381
22382            # Extra M4 quote needed to protect [] in grep expression.
22383            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22384            if test "x$FOUND_CORRECT_VERSION" = x; then
22385              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22387              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22388$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22389              BOOT_JDK_FOUND=no
22390            else
22391              # We're done! :-)
22392              BOOT_JDK_FOUND=yes
22393
22394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22395
22396  # Input might be given as Windows format, start by converting to
22397  # unix format.
22398  path="$BOOT_JDK"
22399  new_path=`$CYGPATH -u "$path"`
22400
22401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22404  # "foo.exe" is OK but "foo" is an error.
22405  #
22406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22407  # It is also a way to make sure we got the proper file name for the real test later on.
22408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22409  if test "x$test_shortpath" = x; then
22410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22412    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22413  fi
22414
22415  # Call helper function which possibly converts this using DOS-style short mode.
22416  # If so, the updated path is stored in $new_path.
22417
22418  input_path="$new_path"
22419  # Check if we need to convert this using DOS-style short mode. If the path
22420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22421  # take no chances and rewrite it.
22422  # Note: m4 eats our [], so we need to use [ and ] instead.
22423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22424  if test "x$has_forbidden_chars" != x; then
22425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22429      # Going to short mode and back again did indeed matter. Since short mode is
22430      # case insensitive, let's make it lowercase to improve readability.
22431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22432      # Now convert it back to Unix-stile (cygpath)
22433      input_path=`$CYGPATH -u "$shortmode_path"`
22434      new_path="$input_path"
22435    fi
22436  fi
22437
22438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22439  if test "x$test_cygdrive_prefix" = x; then
22440    # As a simple fix, exclude /usr/bin since it's not a real path.
22441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22443      # a path prefixed by /cygdrive for fixpath to work.
22444      new_path="$CYGWIN_ROOT_PATH$input_path"
22445    fi
22446  fi
22447
22448
22449  if test "x$path" != "x$new_path"; then
22450    BOOT_JDK="$new_path"
22451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22452$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22453  fi
22454
22455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22456
22457  path="$BOOT_JDK"
22458  has_colon=`$ECHO $path | $GREP ^.:`
22459  new_path="$path"
22460  if test "x$has_colon" = x; then
22461    # Not in mixed or Windows style, start by that.
22462    new_path=`cmd //c echo $path`
22463  fi
22464
22465
22466  input_path="$new_path"
22467  # Check if we need to convert this using DOS-style short mode. If the path
22468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22469  # take no chances and rewrite it.
22470  # Note: m4 eats our [], so we need to use [ and ] instead.
22471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22472  if test "x$has_forbidden_chars" != x; then
22473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22475  fi
22476
22477
22478  windows_path="$new_path"
22479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22480    unix_path=`$CYGPATH -u "$windows_path"`
22481    new_path="$unix_path"
22482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22484    new_path="$unix_path"
22485  fi
22486
22487  if test "x$path" != "x$new_path"; then
22488    BOOT_JDK="$new_path"
22489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22491  fi
22492
22493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22495
22496  else
22497    # We're on a posix platform. Hooray! :)
22498    path="$BOOT_JDK"
22499    has_space=`$ECHO "$path" | $GREP " "`
22500    if test "x$has_space" != x; then
22501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22503      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22504    fi
22505
22506    # Use eval to expand a potential ~
22507    eval path="$path"
22508    if test ! -f "$path" && test ! -d "$path"; then
22509      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22510    fi
22511
22512    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22513  fi
22514
22515              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22516$as_echo_n "checking for Boot JDK... " >&6; }
22517              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22518$as_echo "$BOOT_JDK" >&6; }
22519              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22520$as_echo_n "checking Boot JDK version... " >&6; }
22521              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22522              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22523$as_echo "$BOOT_JDK_VERSION" >&6; }
22524            fi # end check jdk version
22525          fi # end check rt.jar
22526        fi # end check javac
22527      fi # end check java
22528    fi # end check boot jdk found
22529  fi
22530
22531
22532  if test "x$BOOT_JDK_FOUND" = xno; then
22533    # Now execute the test
22534
22535  if test "x$PROGRAMW6432" != x; then
22536    VIRTUAL_DIR="$PROGRAMW6432/Java"
22537
22538  windows_path="$VIRTUAL_DIR"
22539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22540    unix_path=`$CYGPATH -u "$windows_path"`
22541    VIRTUAL_DIR="$unix_path"
22542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22544    VIRTUAL_DIR="$unix_path"
22545  fi
22546
22547
22548  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22549  BOOT_JDK_SUFFIX=""
22550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22551  if test "x$ALL_JDKS_FOUND" != x; then
22552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22553
22554  if test "x$BOOT_JDK_FOUND" = xno; then
22555    # Now execute the test
22556
22557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22558        if test -d "$BOOT_JDK"; then
22559          BOOT_JDK_FOUND=maybe
22560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22562        fi
22563
22564
22565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22567      # Do we have a bin/java?
22568      if test ! -x "$BOOT_JDK/bin/java"; then
22569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22571        BOOT_JDK_FOUND=no
22572      else
22573        # Do we have a bin/javac?
22574        if test ! -x "$BOOT_JDK/bin/javac"; then
22575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22579          BOOT_JDK_FOUND=no
22580        else
22581          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22582          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22583            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22585            BOOT_JDK_FOUND=no
22586          else
22587            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22588            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22589
22590            # Extra M4 quote needed to protect [] in grep expression.
22591            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22592            if test "x$FOUND_CORRECT_VERSION" = x; then
22593              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22595              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22596$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22597              BOOT_JDK_FOUND=no
22598            else
22599              # We're done! :-)
22600              BOOT_JDK_FOUND=yes
22601
22602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22603
22604  # Input might be given as Windows format, start by converting to
22605  # unix format.
22606  path="$BOOT_JDK"
22607  new_path=`$CYGPATH -u "$path"`
22608
22609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22612  # "foo.exe" is OK but "foo" is an error.
22613  #
22614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22615  # It is also a way to make sure we got the proper file name for the real test later on.
22616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22617  if test "x$test_shortpath" = x; then
22618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22620    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22621  fi
22622
22623  # Call helper function which possibly converts this using DOS-style short mode.
22624  # If so, the updated path is stored in $new_path.
22625
22626  input_path="$new_path"
22627  # Check if we need to convert this using DOS-style short mode. If the path
22628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22629  # take no chances and rewrite it.
22630  # Note: m4 eats our [], so we need to use [ and ] instead.
22631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22632  if test "x$has_forbidden_chars" != x; then
22633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22637      # Going to short mode and back again did indeed matter. Since short mode is
22638      # case insensitive, let's make it lowercase to improve readability.
22639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22640      # Now convert it back to Unix-stile (cygpath)
22641      input_path=`$CYGPATH -u "$shortmode_path"`
22642      new_path="$input_path"
22643    fi
22644  fi
22645
22646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22647  if test "x$test_cygdrive_prefix" = x; then
22648    # As a simple fix, exclude /usr/bin since it's not a real path.
22649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22651      # a path prefixed by /cygdrive for fixpath to work.
22652      new_path="$CYGWIN_ROOT_PATH$input_path"
22653    fi
22654  fi
22655
22656
22657  if test "x$path" != "x$new_path"; then
22658    BOOT_JDK="$new_path"
22659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22660$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22661  fi
22662
22663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22664
22665  path="$BOOT_JDK"
22666  has_colon=`$ECHO $path | $GREP ^.:`
22667  new_path="$path"
22668  if test "x$has_colon" = x; then
22669    # Not in mixed or Windows style, start by that.
22670    new_path=`cmd //c echo $path`
22671  fi
22672
22673
22674  input_path="$new_path"
22675  # Check if we need to convert this using DOS-style short mode. If the path
22676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22677  # take no chances and rewrite it.
22678  # Note: m4 eats our [], so we need to use [ and ] instead.
22679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22680  if test "x$has_forbidden_chars" != x; then
22681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22683  fi
22684
22685
22686  windows_path="$new_path"
22687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22688    unix_path=`$CYGPATH -u "$windows_path"`
22689    new_path="$unix_path"
22690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22692    new_path="$unix_path"
22693  fi
22694
22695  if test "x$path" != "x$new_path"; then
22696    BOOT_JDK="$new_path"
22697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22699  fi
22700
22701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22703
22704  else
22705    # We're on a posix platform. Hooray! :)
22706    path="$BOOT_JDK"
22707    has_space=`$ECHO "$path" | $GREP " "`
22708    if test "x$has_space" != x; then
22709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22711      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22712    fi
22713
22714    # Use eval to expand a potential ~
22715    eval path="$path"
22716    if test ! -f "$path" && test ! -d "$path"; then
22717      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22718    fi
22719
22720    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22721  fi
22722
22723              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22724$as_echo_n "checking for Boot JDK... " >&6; }
22725              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22726$as_echo "$BOOT_JDK" >&6; }
22727              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22728$as_echo_n "checking Boot JDK version... " >&6; }
22729              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22730              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22731$as_echo "$BOOT_JDK_VERSION" >&6; }
22732            fi # end check jdk version
22733          fi # end check rt.jar
22734        fi # end check javac
22735      fi # end check java
22736    fi # end check boot jdk found
22737  fi
22738
22739    done
22740  fi
22741
22742  fi
22743
22744
22745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22747      # Do we have a bin/java?
22748      if test ! -x "$BOOT_JDK/bin/java"; then
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22751        BOOT_JDK_FOUND=no
22752      else
22753        # Do we have a bin/javac?
22754        if test ! -x "$BOOT_JDK/bin/javac"; then
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22759          BOOT_JDK_FOUND=no
22760        else
22761          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22762          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22765            BOOT_JDK_FOUND=no
22766          else
22767            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22769
22770            # Extra M4 quote needed to protect [] in grep expression.
22771            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22772            if test "x$FOUND_CORRECT_VERSION" = x; then
22773              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22775              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22777              BOOT_JDK_FOUND=no
22778            else
22779              # We're done! :-)
22780              BOOT_JDK_FOUND=yes
22781
22782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22783
22784  # Input might be given as Windows format, start by converting to
22785  # unix format.
22786  path="$BOOT_JDK"
22787  new_path=`$CYGPATH -u "$path"`
22788
22789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22792  # "foo.exe" is OK but "foo" is an error.
22793  #
22794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22795  # It is also a way to make sure we got the proper file name for the real test later on.
22796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22797  if test "x$test_shortpath" = x; then
22798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22801  fi
22802
22803  # Call helper function which possibly converts this using DOS-style short mode.
22804  # If so, the updated path is stored in $new_path.
22805
22806  input_path="$new_path"
22807  # Check if we need to convert this using DOS-style short mode. If the path
22808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22809  # take no chances and rewrite it.
22810  # Note: m4 eats our [], so we need to use [ and ] instead.
22811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22812  if test "x$has_forbidden_chars" != x; then
22813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22817      # Going to short mode and back again did indeed matter. Since short mode is
22818      # case insensitive, let's make it lowercase to improve readability.
22819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22820      # Now convert it back to Unix-stile (cygpath)
22821      input_path=`$CYGPATH -u "$shortmode_path"`
22822      new_path="$input_path"
22823    fi
22824  fi
22825
22826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22827  if test "x$test_cygdrive_prefix" = x; then
22828    # As a simple fix, exclude /usr/bin since it's not a real path.
22829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22831      # a path prefixed by /cygdrive for fixpath to work.
22832      new_path="$CYGWIN_ROOT_PATH$input_path"
22833    fi
22834  fi
22835
22836
22837  if test "x$path" != "x$new_path"; then
22838    BOOT_JDK="$new_path"
22839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22841  fi
22842
22843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844
22845  path="$BOOT_JDK"
22846  has_colon=`$ECHO $path | $GREP ^.:`
22847  new_path="$path"
22848  if test "x$has_colon" = x; then
22849    # Not in mixed or Windows style, start by that.
22850    new_path=`cmd //c echo $path`
22851  fi
22852
22853
22854  input_path="$new_path"
22855  # Check if we need to convert this using DOS-style short mode. If the path
22856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22857  # take no chances and rewrite it.
22858  # Note: m4 eats our [], so we need to use [ and ] instead.
22859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22860  if test "x$has_forbidden_chars" != x; then
22861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22863  fi
22864
22865
22866  windows_path="$new_path"
22867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22868    unix_path=`$CYGPATH -u "$windows_path"`
22869    new_path="$unix_path"
22870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22872    new_path="$unix_path"
22873  fi
22874
22875  if test "x$path" != "x$new_path"; then
22876    BOOT_JDK="$new_path"
22877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22879  fi
22880
22881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22883
22884  else
22885    # We're on a posix platform. Hooray! :)
22886    path="$BOOT_JDK"
22887    has_space=`$ECHO "$path" | $GREP " "`
22888    if test "x$has_space" != x; then
22889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22891      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22892    fi
22893
22894    # Use eval to expand a potential ~
22895    eval path="$path"
22896    if test ! -f "$path" && test ! -d "$path"; then
22897      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22898    fi
22899
22900    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22901  fi
22902
22903              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22904$as_echo_n "checking for Boot JDK... " >&6; }
22905              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22906$as_echo "$BOOT_JDK" >&6; }
22907              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22908$as_echo_n "checking Boot JDK version... " >&6; }
22909              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22910              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22911$as_echo "$BOOT_JDK_VERSION" >&6; }
22912            fi # end check jdk version
22913          fi # end check rt.jar
22914        fi # end check javac
22915      fi # end check java
22916    fi # end check boot jdk found
22917  fi
22918
22919
22920  if test "x$BOOT_JDK_FOUND" = xno; then
22921    # Now execute the test
22922
22923  if test "x$PROGRAMFILES" != x; then
22924    VIRTUAL_DIR="$PROGRAMFILES/Java"
22925
22926  windows_path="$VIRTUAL_DIR"
22927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22928    unix_path=`$CYGPATH -u "$windows_path"`
22929    VIRTUAL_DIR="$unix_path"
22930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22932    VIRTUAL_DIR="$unix_path"
22933  fi
22934
22935
22936  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22937  BOOT_JDK_SUFFIX=""
22938  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22939  if test "x$ALL_JDKS_FOUND" != x; then
22940    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22941
22942  if test "x$BOOT_JDK_FOUND" = xno; then
22943    # Now execute the test
22944
22945        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22946        if test -d "$BOOT_JDK"; then
22947          BOOT_JDK_FOUND=maybe
22948          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22949$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22950        fi
22951
22952
22953    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22954    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22955      # Do we have a bin/java?
22956      if test ! -x "$BOOT_JDK/bin/java"; then
22957        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22959        BOOT_JDK_FOUND=no
22960      else
22961        # Do we have a bin/javac?
22962        if test ! -x "$BOOT_JDK/bin/javac"; then
22963          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22965          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22966$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22967          BOOT_JDK_FOUND=no
22968        else
22969          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22970          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22973            BOOT_JDK_FOUND=no
22974          else
22975            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22977
22978            # Extra M4 quote needed to protect [] in grep expression.
22979            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22980            if test "x$FOUND_CORRECT_VERSION" = x; then
22981              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22983              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22984$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22985              BOOT_JDK_FOUND=no
22986            else
22987              # We're done! :-)
22988              BOOT_JDK_FOUND=yes
22989
22990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22991
22992  # Input might be given as Windows format, start by converting to
22993  # unix format.
22994  path="$BOOT_JDK"
22995  new_path=`$CYGPATH -u "$path"`
22996
22997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23000  # "foo.exe" is OK but "foo" is an error.
23001  #
23002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23003  # It is also a way to make sure we got the proper file name for the real test later on.
23004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23005  if test "x$test_shortpath" = x; then
23006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23008    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23009  fi
23010
23011  # Call helper function which possibly converts this using DOS-style short mode.
23012  # If so, the updated path is stored in $new_path.
23013
23014  input_path="$new_path"
23015  # Check if we need to convert this using DOS-style short mode. If the path
23016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23017  # take no chances and rewrite it.
23018  # Note: m4 eats our [], so we need to use [ and ] instead.
23019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23020  if test "x$has_forbidden_chars" != x; then
23021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23025      # Going to short mode and back again did indeed matter. Since short mode is
23026      # case insensitive, let's make it lowercase to improve readability.
23027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23028      # Now convert it back to Unix-stile (cygpath)
23029      input_path=`$CYGPATH -u "$shortmode_path"`
23030      new_path="$input_path"
23031    fi
23032  fi
23033
23034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23035  if test "x$test_cygdrive_prefix" = x; then
23036    # As a simple fix, exclude /usr/bin since it's not a real path.
23037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23039      # a path prefixed by /cygdrive for fixpath to work.
23040      new_path="$CYGWIN_ROOT_PATH$input_path"
23041    fi
23042  fi
23043
23044
23045  if test "x$path" != "x$new_path"; then
23046    BOOT_JDK="$new_path"
23047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23049  fi
23050
23051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23052
23053  path="$BOOT_JDK"
23054  has_colon=`$ECHO $path | $GREP ^.:`
23055  new_path="$path"
23056  if test "x$has_colon" = x; then
23057    # Not in mixed or Windows style, start by that.
23058    new_path=`cmd //c echo $path`
23059  fi
23060
23061
23062  input_path="$new_path"
23063  # Check if we need to convert this using DOS-style short mode. If the path
23064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23065  # take no chances and rewrite it.
23066  # Note: m4 eats our [], so we need to use [ and ] instead.
23067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23068  if test "x$has_forbidden_chars" != x; then
23069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23071  fi
23072
23073
23074  windows_path="$new_path"
23075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23076    unix_path=`$CYGPATH -u "$windows_path"`
23077    new_path="$unix_path"
23078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23080    new_path="$unix_path"
23081  fi
23082
23083  if test "x$path" != "x$new_path"; then
23084    BOOT_JDK="$new_path"
23085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23087  fi
23088
23089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23091
23092  else
23093    # We're on a posix platform. Hooray! :)
23094    path="$BOOT_JDK"
23095    has_space=`$ECHO "$path" | $GREP " "`
23096    if test "x$has_space" != x; then
23097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23100    fi
23101
23102    # Use eval to expand a potential ~
23103    eval path="$path"
23104    if test ! -f "$path" && test ! -d "$path"; then
23105      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23106    fi
23107
23108    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23109  fi
23110
23111              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23112$as_echo_n "checking for Boot JDK... " >&6; }
23113              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23114$as_echo "$BOOT_JDK" >&6; }
23115              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23116$as_echo_n "checking Boot JDK version... " >&6; }
23117              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23118              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23119$as_echo "$BOOT_JDK_VERSION" >&6; }
23120            fi # end check jdk version
23121          fi # end check rt.jar
23122        fi # end check javac
23123      fi # end check java
23124    fi # end check boot jdk found
23125  fi
23126
23127    done
23128  fi
23129
23130  fi
23131
23132
23133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23135      # Do we have a bin/java?
23136      if test ! -x "$BOOT_JDK/bin/java"; then
23137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23139        BOOT_JDK_FOUND=no
23140      else
23141        # Do we have a bin/javac?
23142        if test ! -x "$BOOT_JDK/bin/javac"; then
23143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23147          BOOT_JDK_FOUND=no
23148        else
23149          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23150          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23153            BOOT_JDK_FOUND=no
23154          else
23155            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23157
23158            # Extra M4 quote needed to protect [] in grep expression.
23159            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23160            if test "x$FOUND_CORRECT_VERSION" = x; then
23161              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23163              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23164$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23165              BOOT_JDK_FOUND=no
23166            else
23167              # We're done! :-)
23168              BOOT_JDK_FOUND=yes
23169
23170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23171
23172  # Input might be given as Windows format, start by converting to
23173  # unix format.
23174  path="$BOOT_JDK"
23175  new_path=`$CYGPATH -u "$path"`
23176
23177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23180  # "foo.exe" is OK but "foo" is an error.
23181  #
23182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23183  # It is also a way to make sure we got the proper file name for the real test later on.
23184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23185  if test "x$test_shortpath" = x; then
23186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23189  fi
23190
23191  # Call helper function which possibly converts this using DOS-style short mode.
23192  # If so, the updated path is stored in $new_path.
23193
23194  input_path="$new_path"
23195  # Check if we need to convert this using DOS-style short mode. If the path
23196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197  # take no chances and rewrite it.
23198  # Note: m4 eats our [], so we need to use [ and ] instead.
23199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23200  if test "x$has_forbidden_chars" != x; then
23201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23205      # Going to short mode and back again did indeed matter. Since short mode is
23206      # case insensitive, let's make it lowercase to improve readability.
23207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23208      # Now convert it back to Unix-stile (cygpath)
23209      input_path=`$CYGPATH -u "$shortmode_path"`
23210      new_path="$input_path"
23211    fi
23212  fi
23213
23214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23215  if test "x$test_cygdrive_prefix" = x; then
23216    # As a simple fix, exclude /usr/bin since it's not a real path.
23217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23219      # a path prefixed by /cygdrive for fixpath to work.
23220      new_path="$CYGWIN_ROOT_PATH$input_path"
23221    fi
23222  fi
23223
23224
23225  if test "x$path" != "x$new_path"; then
23226    BOOT_JDK="$new_path"
23227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23229  fi
23230
23231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232
23233  path="$BOOT_JDK"
23234  has_colon=`$ECHO $path | $GREP ^.:`
23235  new_path="$path"
23236  if test "x$has_colon" = x; then
23237    # Not in mixed or Windows style, start by that.
23238    new_path=`cmd //c echo $path`
23239  fi
23240
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23251  fi
23252
23253
23254  windows_path="$new_path"
23255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23256    unix_path=`$CYGPATH -u "$windows_path"`
23257    new_path="$unix_path"
23258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23260    new_path="$unix_path"
23261  fi
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23271
23272  else
23273    # We're on a posix platform. Hooray! :)
23274    path="$BOOT_JDK"
23275    has_space=`$ECHO "$path" | $GREP " "`
23276    if test "x$has_space" != x; then
23277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23280    fi
23281
23282    # Use eval to expand a potential ~
23283    eval path="$path"
23284    if test ! -f "$path" && test ! -d "$path"; then
23285      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23286    fi
23287
23288    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23289  fi
23290
23291              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23292$as_echo_n "checking for Boot JDK... " >&6; }
23293              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23294$as_echo "$BOOT_JDK" >&6; }
23295              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23296$as_echo_n "checking Boot JDK version... " >&6; }
23297              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23299$as_echo "$BOOT_JDK_VERSION" >&6; }
23300            fi # end check jdk version
23301          fi # end check rt.jar
23302        fi # end check javac
23303      fi # end check java
23304    fi # end check boot jdk found
23305  fi
23306
23307
23308  if test "x$BOOT_JDK_FOUND" = xno; then
23309    # Now execute the test
23310
23311  if test "x$ProgramFiles" != x; then
23312    VIRTUAL_DIR="$ProgramFiles/Java"
23313
23314  windows_path="$VIRTUAL_DIR"
23315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23316    unix_path=`$CYGPATH -u "$windows_path"`
23317    VIRTUAL_DIR="$unix_path"
23318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23320    VIRTUAL_DIR="$unix_path"
23321  fi
23322
23323
23324  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23325  BOOT_JDK_SUFFIX=""
23326  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23327  if test "x$ALL_JDKS_FOUND" != x; then
23328    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23329
23330  if test "x$BOOT_JDK_FOUND" = xno; then
23331    # Now execute the test
23332
23333        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23334        if test -d "$BOOT_JDK"; then
23335          BOOT_JDK_FOUND=maybe
23336          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23337$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23338        fi
23339
23340
23341    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23342    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23343      # Do we have a bin/java?
23344      if test ! -x "$BOOT_JDK/bin/java"; then
23345        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23347        BOOT_JDK_FOUND=no
23348      else
23349        # Do we have a bin/javac?
23350        if test ! -x "$BOOT_JDK/bin/javac"; then
23351          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23353          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23354$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23355          BOOT_JDK_FOUND=no
23356        else
23357          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23358          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23361            BOOT_JDK_FOUND=no
23362          else
23363            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23365
23366            # Extra M4 quote needed to protect [] in grep expression.
23367            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23368            if test "x$FOUND_CORRECT_VERSION" = x; then
23369              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23371              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23372$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23373              BOOT_JDK_FOUND=no
23374            else
23375              # We're done! :-)
23376              BOOT_JDK_FOUND=yes
23377
23378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23379
23380  # Input might be given as Windows format, start by converting to
23381  # unix format.
23382  path="$BOOT_JDK"
23383  new_path=`$CYGPATH -u "$path"`
23384
23385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23388  # "foo.exe" is OK but "foo" is an error.
23389  #
23390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23391  # It is also a way to make sure we got the proper file name for the real test later on.
23392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23393  if test "x$test_shortpath" = x; then
23394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23396    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23397  fi
23398
23399  # Call helper function which possibly converts this using DOS-style short mode.
23400  # If so, the updated path is stored in $new_path.
23401
23402  input_path="$new_path"
23403  # Check if we need to convert this using DOS-style short mode. If the path
23404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23405  # take no chances and rewrite it.
23406  # Note: m4 eats our [], so we need to use [ and ] instead.
23407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23408  if test "x$has_forbidden_chars" != x; then
23409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23413      # Going to short mode and back again did indeed matter. Since short mode is
23414      # case insensitive, let's make it lowercase to improve readability.
23415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23416      # Now convert it back to Unix-stile (cygpath)
23417      input_path=`$CYGPATH -u "$shortmode_path"`
23418      new_path="$input_path"
23419    fi
23420  fi
23421
23422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23423  if test "x$test_cygdrive_prefix" = x; then
23424    # As a simple fix, exclude /usr/bin since it's not a real path.
23425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23427      # a path prefixed by /cygdrive for fixpath to work.
23428      new_path="$CYGWIN_ROOT_PATH$input_path"
23429    fi
23430  fi
23431
23432
23433  if test "x$path" != "x$new_path"; then
23434    BOOT_JDK="$new_path"
23435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23437  fi
23438
23439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23440
23441  path="$BOOT_JDK"
23442  has_colon=`$ECHO $path | $GREP ^.:`
23443  new_path="$path"
23444  if test "x$has_colon" = x; then
23445    # Not in mixed or Windows style, start by that.
23446    new_path=`cmd //c echo $path`
23447  fi
23448
23449
23450  input_path="$new_path"
23451  # Check if we need to convert this using DOS-style short mode. If the path
23452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23453  # take no chances and rewrite it.
23454  # Note: m4 eats our [], so we need to use [ and ] instead.
23455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23456  if test "x$has_forbidden_chars" != x; then
23457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23459  fi
23460
23461
23462  windows_path="$new_path"
23463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23464    unix_path=`$CYGPATH -u "$windows_path"`
23465    new_path="$unix_path"
23466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23468    new_path="$unix_path"
23469  fi
23470
23471  if test "x$path" != "x$new_path"; then
23472    BOOT_JDK="$new_path"
23473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23475  fi
23476
23477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23479
23480  else
23481    # We're on a posix platform. Hooray! :)
23482    path="$BOOT_JDK"
23483    has_space=`$ECHO "$path" | $GREP " "`
23484    if test "x$has_space" != x; then
23485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23487      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23488    fi
23489
23490    # Use eval to expand a potential ~
23491    eval path="$path"
23492    if test ! -f "$path" && test ! -d "$path"; then
23493      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23494    fi
23495
23496    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23497  fi
23498
23499              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23500$as_echo_n "checking for Boot JDK... " >&6; }
23501              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23502$as_echo "$BOOT_JDK" >&6; }
23503              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23504$as_echo_n "checking Boot JDK version... " >&6; }
23505              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23506              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23507$as_echo "$BOOT_JDK_VERSION" >&6; }
23508            fi # end check jdk version
23509          fi # end check rt.jar
23510        fi # end check javac
23511      fi # end check java
23512    fi # end check boot jdk found
23513  fi
23514
23515    done
23516  fi
23517
23518  fi
23519
23520
23521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23523      # Do we have a bin/java?
23524      if test ! -x "$BOOT_JDK/bin/java"; then
23525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23527        BOOT_JDK_FOUND=no
23528      else
23529        # Do we have a bin/javac?
23530        if test ! -x "$BOOT_JDK/bin/javac"; then
23531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23535          BOOT_JDK_FOUND=no
23536        else
23537          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23538          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23541            BOOT_JDK_FOUND=no
23542          else
23543            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23544            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23545
23546            # Extra M4 quote needed to protect [] in grep expression.
23547            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23548            if test "x$FOUND_CORRECT_VERSION" = x; then
23549              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23551              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23553              BOOT_JDK_FOUND=no
23554            else
23555              # We're done! :-)
23556              BOOT_JDK_FOUND=yes
23557
23558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23559
23560  # Input might be given as Windows format, start by converting to
23561  # unix format.
23562  path="$BOOT_JDK"
23563  new_path=`$CYGPATH -u "$path"`
23564
23565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23568  # "foo.exe" is OK but "foo" is an error.
23569  #
23570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23571  # It is also a way to make sure we got the proper file name for the real test later on.
23572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23573  if test "x$test_shortpath" = x; then
23574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23577  fi
23578
23579  # Call helper function which possibly converts this using DOS-style short mode.
23580  # If so, the updated path is stored in $new_path.
23581
23582  input_path="$new_path"
23583  # Check if we need to convert this using DOS-style short mode. If the path
23584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23585  # take no chances and rewrite it.
23586  # Note: m4 eats our [], so we need to use [ and ] instead.
23587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23588  if test "x$has_forbidden_chars" != x; then
23589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23593      # Going to short mode and back again did indeed matter. Since short mode is
23594      # case insensitive, let's make it lowercase to improve readability.
23595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23596      # Now convert it back to Unix-stile (cygpath)
23597      input_path=`$CYGPATH -u "$shortmode_path"`
23598      new_path="$input_path"
23599    fi
23600  fi
23601
23602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23603  if test "x$test_cygdrive_prefix" = x; then
23604    # As a simple fix, exclude /usr/bin since it's not a real path.
23605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23607      # a path prefixed by /cygdrive for fixpath to work.
23608      new_path="$CYGWIN_ROOT_PATH$input_path"
23609    fi
23610  fi
23611
23612
23613  if test "x$path" != "x$new_path"; then
23614    BOOT_JDK="$new_path"
23615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23617  fi
23618
23619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23620
23621  path="$BOOT_JDK"
23622  has_colon=`$ECHO $path | $GREP ^.:`
23623  new_path="$path"
23624  if test "x$has_colon" = x; then
23625    # Not in mixed or Windows style, start by that.
23626    new_path=`cmd //c echo $path`
23627  fi
23628
23629
23630  input_path="$new_path"
23631  # Check if we need to convert this using DOS-style short mode. If the path
23632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23633  # take no chances and rewrite it.
23634  # Note: m4 eats our [], so we need to use [ and ] instead.
23635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23636  if test "x$has_forbidden_chars" != x; then
23637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23639  fi
23640
23641
23642  windows_path="$new_path"
23643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23644    unix_path=`$CYGPATH -u "$windows_path"`
23645    new_path="$unix_path"
23646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23648    new_path="$unix_path"
23649  fi
23650
23651  if test "x$path" != "x$new_path"; then
23652    BOOT_JDK="$new_path"
23653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23655  fi
23656
23657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23659
23660  else
23661    # We're on a posix platform. Hooray! :)
23662    path="$BOOT_JDK"
23663    has_space=`$ECHO "$path" | $GREP " "`
23664    if test "x$has_space" != x; then
23665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23667      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23668    fi
23669
23670    # Use eval to expand a potential ~
23671    eval path="$path"
23672    if test ! -f "$path" && test ! -d "$path"; then
23673      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23674    fi
23675
23676    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23677  fi
23678
23679              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23680$as_echo_n "checking for Boot JDK... " >&6; }
23681              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23682$as_echo "$BOOT_JDK" >&6; }
23683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23684$as_echo_n "checking Boot JDK version... " >&6; }
23685              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23687$as_echo "$BOOT_JDK_VERSION" >&6; }
23688            fi # end check jdk version
23689          fi # end check rt.jar
23690        fi # end check javac
23691      fi # end check java
23692    fi # end check boot jdk found
23693  fi
23694
23695
23696  if test "x$BOOT_JDK_FOUND" = xno; then
23697    # Now execute the test
23698
23699  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23700  BOOT_JDK_SUFFIX=""
23701  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23702  if test "x$ALL_JDKS_FOUND" != x; then
23703    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23704
23705  if test "x$BOOT_JDK_FOUND" = xno; then
23706    # Now execute the test
23707
23708        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23709        if test -d "$BOOT_JDK"; then
23710          BOOT_JDK_FOUND=maybe
23711          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23712$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23713        fi
23714
23715
23716    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23717    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23718      # Do we have a bin/java?
23719      if test ! -x "$BOOT_JDK/bin/java"; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23722        BOOT_JDK_FOUND=no
23723      else
23724        # Do we have a bin/javac?
23725        if test ! -x "$BOOT_JDK/bin/javac"; then
23726          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23728          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23729$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23730          BOOT_JDK_FOUND=no
23731        else
23732          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23733          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23736            BOOT_JDK_FOUND=no
23737          else
23738            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23740
23741            # Extra M4 quote needed to protect [] in grep expression.
23742            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23743            if test "x$FOUND_CORRECT_VERSION" = x; then
23744              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23746              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23747$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23748              BOOT_JDK_FOUND=no
23749            else
23750              # We're done! :-)
23751              BOOT_JDK_FOUND=yes
23752
23753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23754
23755  # Input might be given as Windows format, start by converting to
23756  # unix format.
23757  path="$BOOT_JDK"
23758  new_path=`$CYGPATH -u "$path"`
23759
23760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23763  # "foo.exe" is OK but "foo" is an error.
23764  #
23765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23766  # It is also a way to make sure we got the proper file name for the real test later on.
23767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23768  if test "x$test_shortpath" = x; then
23769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23772  fi
23773
23774  # Call helper function which possibly converts this using DOS-style short mode.
23775  # If so, the updated path is stored in $new_path.
23776
23777  input_path="$new_path"
23778  # Check if we need to convert this using DOS-style short mode. If the path
23779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23780  # take no chances and rewrite it.
23781  # Note: m4 eats our [], so we need to use [ and ] instead.
23782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23783  if test "x$has_forbidden_chars" != x; then
23784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23788      # Going to short mode and back again did indeed matter. Since short mode is
23789      # case insensitive, let's make it lowercase to improve readability.
23790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23791      # Now convert it back to Unix-stile (cygpath)
23792      input_path=`$CYGPATH -u "$shortmode_path"`
23793      new_path="$input_path"
23794    fi
23795  fi
23796
23797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23798  if test "x$test_cygdrive_prefix" = x; then
23799    # As a simple fix, exclude /usr/bin since it's not a real path.
23800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23802      # a path prefixed by /cygdrive for fixpath to work.
23803      new_path="$CYGWIN_ROOT_PATH$input_path"
23804    fi
23805  fi
23806
23807
23808  if test "x$path" != "x$new_path"; then
23809    BOOT_JDK="$new_path"
23810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23812  fi
23813
23814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23815
23816  path="$BOOT_JDK"
23817  has_colon=`$ECHO $path | $GREP ^.:`
23818  new_path="$path"
23819  if test "x$has_colon" = x; then
23820    # Not in mixed or Windows style, start by that.
23821    new_path=`cmd //c echo $path`
23822  fi
23823
23824
23825  input_path="$new_path"
23826  # Check if we need to convert this using DOS-style short mode. If the path
23827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23828  # take no chances and rewrite it.
23829  # Note: m4 eats our [], so we need to use [ and ] instead.
23830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23831  if test "x$has_forbidden_chars" != x; then
23832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23834  fi
23835
23836
23837  windows_path="$new_path"
23838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23839    unix_path=`$CYGPATH -u "$windows_path"`
23840    new_path="$unix_path"
23841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23843    new_path="$unix_path"
23844  fi
23845
23846  if test "x$path" != "x$new_path"; then
23847    BOOT_JDK="$new_path"
23848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23850  fi
23851
23852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23854
23855  else
23856    # We're on a posix platform. Hooray! :)
23857    path="$BOOT_JDK"
23858    has_space=`$ECHO "$path" | $GREP " "`
23859    if test "x$has_space" != x; then
23860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23862      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23863    fi
23864
23865    # Use eval to expand a potential ~
23866    eval path="$path"
23867    if test ! -f "$path" && test ! -d "$path"; then
23868      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23869    fi
23870
23871    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23872  fi
23873
23874              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23875$as_echo_n "checking for Boot JDK... " >&6; }
23876              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23877$as_echo "$BOOT_JDK" >&6; }
23878              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23879$as_echo_n "checking Boot JDK version... " >&6; }
23880              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23881              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23882$as_echo "$BOOT_JDK_VERSION" >&6; }
23883            fi # end check jdk version
23884          fi # end check rt.jar
23885        fi # end check javac
23886      fi # end check java
23887    fi # end check boot jdk found
23888  fi
23889
23890    done
23891  fi
23892
23893
23894    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23895    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23896      # Do we have a bin/java?
23897      if test ! -x "$BOOT_JDK/bin/java"; then
23898        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23900        BOOT_JDK_FOUND=no
23901      else
23902        # Do we have a bin/javac?
23903        if test ! -x "$BOOT_JDK/bin/javac"; then
23904          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23906          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23907$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23908          BOOT_JDK_FOUND=no
23909        else
23910          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23911          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23912            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23914            BOOT_JDK_FOUND=no
23915          else
23916            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23917            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23918
23919            # Extra M4 quote needed to protect [] in grep expression.
23920            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23921            if test "x$FOUND_CORRECT_VERSION" = x; then
23922              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23924              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23925$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23926              BOOT_JDK_FOUND=no
23927            else
23928              # We're done! :-)
23929              BOOT_JDK_FOUND=yes
23930
23931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23932
23933  # Input might be given as Windows format, start by converting to
23934  # unix format.
23935  path="$BOOT_JDK"
23936  new_path=`$CYGPATH -u "$path"`
23937
23938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23941  # "foo.exe" is OK but "foo" is an error.
23942  #
23943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23944  # It is also a way to make sure we got the proper file name for the real test later on.
23945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23946  if test "x$test_shortpath" = x; then
23947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23949    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23950  fi
23951
23952  # Call helper function which possibly converts this using DOS-style short mode.
23953  # If so, the updated path is stored in $new_path.
23954
23955  input_path="$new_path"
23956  # Check if we need to convert this using DOS-style short mode. If the path
23957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23958  # take no chances and rewrite it.
23959  # Note: m4 eats our [], so we need to use [ and ] instead.
23960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23961  if test "x$has_forbidden_chars" != x; then
23962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23966      # Going to short mode and back again did indeed matter. Since short mode is
23967      # case insensitive, let's make it lowercase to improve readability.
23968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23969      # Now convert it back to Unix-stile (cygpath)
23970      input_path=`$CYGPATH -u "$shortmode_path"`
23971      new_path="$input_path"
23972    fi
23973  fi
23974
23975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23976  if test "x$test_cygdrive_prefix" = x; then
23977    # As a simple fix, exclude /usr/bin since it's not a real path.
23978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23980      # a path prefixed by /cygdrive for fixpath to work.
23981      new_path="$CYGWIN_ROOT_PATH$input_path"
23982    fi
23983  fi
23984
23985
23986  if test "x$path" != "x$new_path"; then
23987    BOOT_JDK="$new_path"
23988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23989$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23990  fi
23991
23992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23993
23994  path="$BOOT_JDK"
23995  has_colon=`$ECHO $path | $GREP ^.:`
23996  new_path="$path"
23997  if test "x$has_colon" = x; then
23998    # Not in mixed or Windows style, start by that.
23999    new_path=`cmd //c echo $path`
24000  fi
24001
24002
24003  input_path="$new_path"
24004  # Check if we need to convert this using DOS-style short mode. If the path
24005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24006  # take no chances and rewrite it.
24007  # Note: m4 eats our [], so we need to use [ and ] instead.
24008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24009  if test "x$has_forbidden_chars" != x; then
24010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24012  fi
24013
24014
24015  windows_path="$new_path"
24016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24017    unix_path=`$CYGPATH -u "$windows_path"`
24018    new_path="$unix_path"
24019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24021    new_path="$unix_path"
24022  fi
24023
24024  if test "x$path" != "x$new_path"; then
24025    BOOT_JDK="$new_path"
24026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24027$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24028  fi
24029
24030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24032
24033  else
24034    # We're on a posix platform. Hooray! :)
24035    path="$BOOT_JDK"
24036    has_space=`$ECHO "$path" | $GREP " "`
24037    if test "x$has_space" != x; then
24038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24040      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24041    fi
24042
24043    # Use eval to expand a potential ~
24044    eval path="$path"
24045    if test ! -f "$path" && test ! -d "$path"; then
24046      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24047    fi
24048
24049    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24050  fi
24051
24052              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24053$as_echo_n "checking for Boot JDK... " >&6; }
24054              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24055$as_echo "$BOOT_JDK" >&6; }
24056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24057$as_echo_n "checking Boot JDK version... " >&6; }
24058              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24059              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24060$as_echo "$BOOT_JDK_VERSION" >&6; }
24061            fi # end check jdk version
24062          fi # end check rt.jar
24063        fi # end check javac
24064      fi # end check java
24065    fi # end check boot jdk found
24066  fi
24067
24068  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24069
24070  if test "x$BOOT_JDK_FOUND" = xno; then
24071    # Now execute the test
24072
24073  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24074  BOOT_JDK_SUFFIX="/Contents/Home"
24075  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24076  if test "x$ALL_JDKS_FOUND" != x; then
24077    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24078
24079  if test "x$BOOT_JDK_FOUND" = xno; then
24080    # Now execute the test
24081
24082        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24083        if test -d "$BOOT_JDK"; then
24084          BOOT_JDK_FOUND=maybe
24085          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24086$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24087        fi
24088
24089
24090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24092      # Do we have a bin/java?
24093      if test ! -x "$BOOT_JDK/bin/java"; then
24094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24096        BOOT_JDK_FOUND=no
24097      else
24098        # Do we have a bin/javac?
24099        if test ! -x "$BOOT_JDK/bin/javac"; then
24100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24104          BOOT_JDK_FOUND=no
24105        else
24106          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24107          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24108            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24110            BOOT_JDK_FOUND=no
24111          else
24112            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24114
24115            # Extra M4 quote needed to protect [] in grep expression.
24116            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24117            if test "x$FOUND_CORRECT_VERSION" = x; then
24118              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24120              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24121$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24122              BOOT_JDK_FOUND=no
24123            else
24124              # We're done! :-)
24125              BOOT_JDK_FOUND=yes
24126
24127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24128
24129  # Input might be given as Windows format, start by converting to
24130  # unix format.
24131  path="$BOOT_JDK"
24132  new_path=`$CYGPATH -u "$path"`
24133
24134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24137  # "foo.exe" is OK but "foo" is an error.
24138  #
24139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24140  # It is also a way to make sure we got the proper file name for the real test later on.
24141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24142  if test "x$test_shortpath" = x; then
24143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24146  fi
24147
24148  # Call helper function which possibly converts this using DOS-style short mode.
24149  # If so, the updated path is stored in $new_path.
24150
24151  input_path="$new_path"
24152  # Check if we need to convert this using DOS-style short mode. If the path
24153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24154  # take no chances and rewrite it.
24155  # Note: m4 eats our [], so we need to use [ and ] instead.
24156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24157  if test "x$has_forbidden_chars" != x; then
24158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24162      # Going to short mode and back again did indeed matter. Since short mode is
24163      # case insensitive, let's make it lowercase to improve readability.
24164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24165      # Now convert it back to Unix-stile (cygpath)
24166      input_path=`$CYGPATH -u "$shortmode_path"`
24167      new_path="$input_path"
24168    fi
24169  fi
24170
24171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24172  if test "x$test_cygdrive_prefix" = x; then
24173    # As a simple fix, exclude /usr/bin since it's not a real path.
24174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24176      # a path prefixed by /cygdrive for fixpath to work.
24177      new_path="$CYGWIN_ROOT_PATH$input_path"
24178    fi
24179  fi
24180
24181
24182  if test "x$path" != "x$new_path"; then
24183    BOOT_JDK="$new_path"
24184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24186  fi
24187
24188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24189
24190  path="$BOOT_JDK"
24191  has_colon=`$ECHO $path | $GREP ^.:`
24192  new_path="$path"
24193  if test "x$has_colon" = x; then
24194    # Not in mixed or Windows style, start by that.
24195    new_path=`cmd //c echo $path`
24196  fi
24197
24198
24199  input_path="$new_path"
24200  # Check if we need to convert this using DOS-style short mode. If the path
24201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24202  # take no chances and rewrite it.
24203  # Note: m4 eats our [], so we need to use [ and ] instead.
24204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24205  if test "x$has_forbidden_chars" != x; then
24206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24208  fi
24209
24210
24211  windows_path="$new_path"
24212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24213    unix_path=`$CYGPATH -u "$windows_path"`
24214    new_path="$unix_path"
24215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24217    new_path="$unix_path"
24218  fi
24219
24220  if test "x$path" != "x$new_path"; then
24221    BOOT_JDK="$new_path"
24222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24224  fi
24225
24226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24228
24229  else
24230    # We're on a posix platform. Hooray! :)
24231    path="$BOOT_JDK"
24232    has_space=`$ECHO "$path" | $GREP " "`
24233    if test "x$has_space" != x; then
24234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24236      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24237    fi
24238
24239    # Use eval to expand a potential ~
24240    eval path="$path"
24241    if test ! -f "$path" && test ! -d "$path"; then
24242      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24243    fi
24244
24245    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24246  fi
24247
24248              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24249$as_echo_n "checking for Boot JDK... " >&6; }
24250              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24251$as_echo "$BOOT_JDK" >&6; }
24252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24253$as_echo_n "checking Boot JDK version... " >&6; }
24254              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24256$as_echo "$BOOT_JDK_VERSION" >&6; }
24257            fi # end check jdk version
24258          fi # end check rt.jar
24259        fi # end check javac
24260      fi # end check java
24261    fi # end check boot jdk found
24262  fi
24263
24264    done
24265  fi
24266
24267
24268    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24269    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24270      # Do we have a bin/java?
24271      if test ! -x "$BOOT_JDK/bin/java"; then
24272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24274        BOOT_JDK_FOUND=no
24275      else
24276        # Do we have a bin/javac?
24277        if test ! -x "$BOOT_JDK/bin/javac"; then
24278          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24280          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24281$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24282          BOOT_JDK_FOUND=no
24283        else
24284          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24285          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24288            BOOT_JDK_FOUND=no
24289          else
24290            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24292
24293            # Extra M4 quote needed to protect [] in grep expression.
24294            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24295            if test "x$FOUND_CORRECT_VERSION" = x; then
24296              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24298              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24300              BOOT_JDK_FOUND=no
24301            else
24302              # We're done! :-)
24303              BOOT_JDK_FOUND=yes
24304
24305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24306
24307  # Input might be given as Windows format, start by converting to
24308  # unix format.
24309  path="$BOOT_JDK"
24310  new_path=`$CYGPATH -u "$path"`
24311
24312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24315  # "foo.exe" is OK but "foo" is an error.
24316  #
24317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24318  # It is also a way to make sure we got the proper file name for the real test later on.
24319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24320  if test "x$test_shortpath" = x; then
24321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24323    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24324  fi
24325
24326  # Call helper function which possibly converts this using DOS-style short mode.
24327  # If so, the updated path is stored in $new_path.
24328
24329  input_path="$new_path"
24330  # Check if we need to convert this using DOS-style short mode. If the path
24331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24332  # take no chances and rewrite it.
24333  # Note: m4 eats our [], so we need to use [ and ] instead.
24334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24335  if test "x$has_forbidden_chars" != x; then
24336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24340      # Going to short mode and back again did indeed matter. Since short mode is
24341      # case insensitive, let's make it lowercase to improve readability.
24342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24343      # Now convert it back to Unix-stile (cygpath)
24344      input_path=`$CYGPATH -u "$shortmode_path"`
24345      new_path="$input_path"
24346    fi
24347  fi
24348
24349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24350  if test "x$test_cygdrive_prefix" = x; then
24351    # As a simple fix, exclude /usr/bin since it's not a real path.
24352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24354      # a path prefixed by /cygdrive for fixpath to work.
24355      new_path="$CYGWIN_ROOT_PATH$input_path"
24356    fi
24357  fi
24358
24359
24360  if test "x$path" != "x$new_path"; then
24361    BOOT_JDK="$new_path"
24362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24364  fi
24365
24366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24367
24368  path="$BOOT_JDK"
24369  has_colon=`$ECHO $path | $GREP ^.:`
24370  new_path="$path"
24371  if test "x$has_colon" = x; then
24372    # Not in mixed or Windows style, start by that.
24373    new_path=`cmd //c echo $path`
24374  fi
24375
24376
24377  input_path="$new_path"
24378  # Check if we need to convert this using DOS-style short mode. If the path
24379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24380  # take no chances and rewrite it.
24381  # Note: m4 eats our [], so we need to use [ and ] instead.
24382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24383  if test "x$has_forbidden_chars" != x; then
24384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24386  fi
24387
24388
24389  windows_path="$new_path"
24390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24391    unix_path=`$CYGPATH -u "$windows_path"`
24392    new_path="$unix_path"
24393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24395    new_path="$unix_path"
24396  fi
24397
24398  if test "x$path" != "x$new_path"; then
24399    BOOT_JDK="$new_path"
24400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24402  fi
24403
24404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24406
24407  else
24408    # We're on a posix platform. Hooray! :)
24409    path="$BOOT_JDK"
24410    has_space=`$ECHO "$path" | $GREP " "`
24411    if test "x$has_space" != x; then
24412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24414      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24415    fi
24416
24417    # Use eval to expand a potential ~
24418    eval path="$path"
24419    if test ! -f "$path" && test ! -d "$path"; then
24420      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24421    fi
24422
24423    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24424  fi
24425
24426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24427$as_echo_n "checking for Boot JDK... " >&6; }
24428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24429$as_echo "$BOOT_JDK" >&6; }
24430              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24431$as_echo_n "checking Boot JDK version... " >&6; }
24432              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24433              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24434$as_echo "$BOOT_JDK_VERSION" >&6; }
24435            fi # end check jdk version
24436          fi # end check rt.jar
24437        fi # end check javac
24438      fi # end check java
24439    fi # end check boot jdk found
24440  fi
24441
24442
24443  if test "x$BOOT_JDK_FOUND" = xno; then
24444    # Now execute the test
24445
24446  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24447  BOOT_JDK_SUFFIX="/Contents/Home"
24448  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24449  if test "x$ALL_JDKS_FOUND" != x; then
24450    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24451
24452  if test "x$BOOT_JDK_FOUND" = xno; then
24453    # Now execute the test
24454
24455        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24456        if test -d "$BOOT_JDK"; then
24457          BOOT_JDK_FOUND=maybe
24458          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24459$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24460        fi
24461
24462
24463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24465      # Do we have a bin/java?
24466      if test ! -x "$BOOT_JDK/bin/java"; then
24467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24469        BOOT_JDK_FOUND=no
24470      else
24471        # Do we have a bin/javac?
24472        if test ! -x "$BOOT_JDK/bin/javac"; then
24473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24477          BOOT_JDK_FOUND=no
24478        else
24479          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24480          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24481            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24483            BOOT_JDK_FOUND=no
24484          else
24485            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24486            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24487
24488            # Extra M4 quote needed to protect [] in grep expression.
24489            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24490            if test "x$FOUND_CORRECT_VERSION" = x; then
24491              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24493              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24494$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24495              BOOT_JDK_FOUND=no
24496            else
24497              # We're done! :-)
24498              BOOT_JDK_FOUND=yes
24499
24500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24501
24502  # Input might be given as Windows format, start by converting to
24503  # unix format.
24504  path="$BOOT_JDK"
24505  new_path=`$CYGPATH -u "$path"`
24506
24507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24510  # "foo.exe" is OK but "foo" is an error.
24511  #
24512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24513  # It is also a way to make sure we got the proper file name for the real test later on.
24514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24515  if test "x$test_shortpath" = x; then
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24518    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24519  fi
24520
24521  # Call helper function which possibly converts this using DOS-style short mode.
24522  # If so, the updated path is stored in $new_path.
24523
24524  input_path="$new_path"
24525  # Check if we need to convert this using DOS-style short mode. If the path
24526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24527  # take no chances and rewrite it.
24528  # Note: m4 eats our [], so we need to use [ and ] instead.
24529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24530  if test "x$has_forbidden_chars" != x; then
24531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24535      # Going to short mode and back again did indeed matter. Since short mode is
24536      # case insensitive, let's make it lowercase to improve readability.
24537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24538      # Now convert it back to Unix-stile (cygpath)
24539      input_path=`$CYGPATH -u "$shortmode_path"`
24540      new_path="$input_path"
24541    fi
24542  fi
24543
24544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24545  if test "x$test_cygdrive_prefix" = x; then
24546    # As a simple fix, exclude /usr/bin since it's not a real path.
24547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24549      # a path prefixed by /cygdrive for fixpath to work.
24550      new_path="$CYGWIN_ROOT_PATH$input_path"
24551    fi
24552  fi
24553
24554
24555  if test "x$path" != "x$new_path"; then
24556    BOOT_JDK="$new_path"
24557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24558$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24559  fi
24560
24561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24562
24563  path="$BOOT_JDK"
24564  has_colon=`$ECHO $path | $GREP ^.:`
24565  new_path="$path"
24566  if test "x$has_colon" = x; then
24567    # Not in mixed or Windows style, start by that.
24568    new_path=`cmd //c echo $path`
24569  fi
24570
24571
24572  input_path="$new_path"
24573  # Check if we need to convert this using DOS-style short mode. If the path
24574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24575  # take no chances and rewrite it.
24576  # Note: m4 eats our [], so we need to use [ and ] instead.
24577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24578  if test "x$has_forbidden_chars" != x; then
24579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24581  fi
24582
24583
24584  windows_path="$new_path"
24585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24586    unix_path=`$CYGPATH -u "$windows_path"`
24587    new_path="$unix_path"
24588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24590    new_path="$unix_path"
24591  fi
24592
24593  if test "x$path" != "x$new_path"; then
24594    BOOT_JDK="$new_path"
24595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24597  fi
24598
24599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24601
24602  else
24603    # We're on a posix platform. Hooray! :)
24604    path="$BOOT_JDK"
24605    has_space=`$ECHO "$path" | $GREP " "`
24606    if test "x$has_space" != x; then
24607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24609      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24610    fi
24611
24612    # Use eval to expand a potential ~
24613    eval path="$path"
24614    if test ! -f "$path" && test ! -d "$path"; then
24615      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24616    fi
24617
24618    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24619  fi
24620
24621              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24622$as_echo_n "checking for Boot JDK... " >&6; }
24623              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24624$as_echo "$BOOT_JDK" >&6; }
24625              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24626$as_echo_n "checking Boot JDK version... " >&6; }
24627              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24628              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24629$as_echo "$BOOT_JDK_VERSION" >&6; }
24630            fi # end check jdk version
24631          fi # end check rt.jar
24632        fi # end check javac
24633      fi # end check java
24634    fi # end check boot jdk found
24635  fi
24636
24637    done
24638  fi
24639
24640
24641    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24642    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24643      # Do we have a bin/java?
24644      if test ! -x "$BOOT_JDK/bin/java"; then
24645        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24647        BOOT_JDK_FOUND=no
24648      else
24649        # Do we have a bin/javac?
24650        if test ! -x "$BOOT_JDK/bin/javac"; then
24651          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24653          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24654$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24655          BOOT_JDK_FOUND=no
24656        else
24657          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24658          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24659            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24661            BOOT_JDK_FOUND=no
24662          else
24663            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24664            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24665
24666            # Extra M4 quote needed to protect [] in grep expression.
24667            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24668            if test "x$FOUND_CORRECT_VERSION" = x; then
24669              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24671              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24672$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24673              BOOT_JDK_FOUND=no
24674            else
24675              # We're done! :-)
24676              BOOT_JDK_FOUND=yes
24677
24678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24679
24680  # Input might be given as Windows format, start by converting to
24681  # unix format.
24682  path="$BOOT_JDK"
24683  new_path=`$CYGPATH -u "$path"`
24684
24685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24688  # "foo.exe" is OK but "foo" is an error.
24689  #
24690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24691  # It is also a way to make sure we got the proper file name for the real test later on.
24692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24693  if test "x$test_shortpath" = x; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24696    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24697  fi
24698
24699  # Call helper function which possibly converts this using DOS-style short mode.
24700  # If so, the updated path is stored in $new_path.
24701
24702  input_path="$new_path"
24703  # Check if we need to convert this using DOS-style short mode. If the path
24704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24705  # take no chances and rewrite it.
24706  # Note: m4 eats our [], so we need to use [ and ] instead.
24707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24708  if test "x$has_forbidden_chars" != x; then
24709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24713      # Going to short mode and back again did indeed matter. Since short mode is
24714      # case insensitive, let's make it lowercase to improve readability.
24715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24716      # Now convert it back to Unix-stile (cygpath)
24717      input_path=`$CYGPATH -u "$shortmode_path"`
24718      new_path="$input_path"
24719    fi
24720  fi
24721
24722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24723  if test "x$test_cygdrive_prefix" = x; then
24724    # As a simple fix, exclude /usr/bin since it's not a real path.
24725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24727      # a path prefixed by /cygdrive for fixpath to work.
24728      new_path="$CYGWIN_ROOT_PATH$input_path"
24729    fi
24730  fi
24731
24732
24733  if test "x$path" != "x$new_path"; then
24734    BOOT_JDK="$new_path"
24735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24737  fi
24738
24739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24740
24741  path="$BOOT_JDK"
24742  has_colon=`$ECHO $path | $GREP ^.:`
24743  new_path="$path"
24744  if test "x$has_colon" = x; then
24745    # Not in mixed or Windows style, start by that.
24746    new_path=`cmd //c echo $path`
24747  fi
24748
24749
24750  input_path="$new_path"
24751  # Check if we need to convert this using DOS-style short mode. If the path
24752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24753  # take no chances and rewrite it.
24754  # Note: m4 eats our [], so we need to use [ and ] instead.
24755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24756  if test "x$has_forbidden_chars" != x; then
24757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24759  fi
24760
24761
24762  windows_path="$new_path"
24763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24764    unix_path=`$CYGPATH -u "$windows_path"`
24765    new_path="$unix_path"
24766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24768    new_path="$unix_path"
24769  fi
24770
24771  if test "x$path" != "x$new_path"; then
24772    BOOT_JDK="$new_path"
24773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24775  fi
24776
24777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24779
24780  else
24781    # We're on a posix platform. Hooray! :)
24782    path="$BOOT_JDK"
24783    has_space=`$ECHO "$path" | $GREP " "`
24784    if test "x$has_space" != x; then
24785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24787      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24788    fi
24789
24790    # Use eval to expand a potential ~
24791    eval path="$path"
24792    if test ! -f "$path" && test ! -d "$path"; then
24793      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24794    fi
24795
24796    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24797  fi
24798
24799              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24800$as_echo_n "checking for Boot JDK... " >&6; }
24801              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24802$as_echo "$BOOT_JDK" >&6; }
24803              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24804$as_echo_n "checking Boot JDK version... " >&6; }
24805              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24806              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24807$as_echo "$BOOT_JDK_VERSION" >&6; }
24808            fi # end check jdk version
24809          fi # end check rt.jar
24810        fi # end check javac
24811      fi # end check java
24812    fi # end check boot jdk found
24813  fi
24814
24815  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24816
24817  if test "x$BOOT_JDK_FOUND" = xno; then
24818    # Now execute the test
24819
24820  BOOT_JDK_PREFIX="/usr/lib/jvm"
24821  BOOT_JDK_SUFFIX=""
24822  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24823  if test "x$ALL_JDKS_FOUND" != x; then
24824    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24825
24826  if test "x$BOOT_JDK_FOUND" = xno; then
24827    # Now execute the test
24828
24829        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24830        if test -d "$BOOT_JDK"; then
24831          BOOT_JDK_FOUND=maybe
24832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24833$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24834        fi
24835
24836
24837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24839      # Do we have a bin/java?
24840      if test ! -x "$BOOT_JDK/bin/java"; then
24841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24843        BOOT_JDK_FOUND=no
24844      else
24845        # Do we have a bin/javac?
24846        if test ! -x "$BOOT_JDK/bin/javac"; then
24847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24851          BOOT_JDK_FOUND=no
24852        else
24853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24857            BOOT_JDK_FOUND=no
24858          else
24859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24861
24862            # Extra M4 quote needed to protect [] in grep expression.
24863            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24864            if test "x$FOUND_CORRECT_VERSION" = x; then
24865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24869              BOOT_JDK_FOUND=no
24870            else
24871              # We're done! :-)
24872              BOOT_JDK_FOUND=yes
24873
24874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24875
24876  # Input might be given as Windows format, start by converting to
24877  # unix format.
24878  path="$BOOT_JDK"
24879  new_path=`$CYGPATH -u "$path"`
24880
24881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24884  # "foo.exe" is OK but "foo" is an error.
24885  #
24886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24887  # It is also a way to make sure we got the proper file name for the real test later on.
24888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24889  if test "x$test_shortpath" = x; then
24890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24893  fi
24894
24895  # Call helper function which possibly converts this using DOS-style short mode.
24896  # If so, the updated path is stored in $new_path.
24897
24898  input_path="$new_path"
24899  # Check if we need to convert this using DOS-style short mode. If the path
24900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24901  # take no chances and rewrite it.
24902  # Note: m4 eats our [], so we need to use [ and ] instead.
24903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24904  if test "x$has_forbidden_chars" != x; then
24905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24909      # Going to short mode and back again did indeed matter. Since short mode is
24910      # case insensitive, let's make it lowercase to improve readability.
24911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24912      # Now convert it back to Unix-stile (cygpath)
24913      input_path=`$CYGPATH -u "$shortmode_path"`
24914      new_path="$input_path"
24915    fi
24916  fi
24917
24918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24919  if test "x$test_cygdrive_prefix" = x; then
24920    # As a simple fix, exclude /usr/bin since it's not a real path.
24921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24923      # a path prefixed by /cygdrive for fixpath to work.
24924      new_path="$CYGWIN_ROOT_PATH$input_path"
24925    fi
24926  fi
24927
24928
24929  if test "x$path" != "x$new_path"; then
24930    BOOT_JDK="$new_path"
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24933  fi
24934
24935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24936
24937  path="$BOOT_JDK"
24938  has_colon=`$ECHO $path | $GREP ^.:`
24939  new_path="$path"
24940  if test "x$has_colon" = x; then
24941    # Not in mixed or Windows style, start by that.
24942    new_path=`cmd //c echo $path`
24943  fi
24944
24945
24946  input_path="$new_path"
24947  # Check if we need to convert this using DOS-style short mode. If the path
24948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24949  # take no chances and rewrite it.
24950  # Note: m4 eats our [], so we need to use [ and ] instead.
24951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24952  if test "x$has_forbidden_chars" != x; then
24953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24955  fi
24956
24957
24958  windows_path="$new_path"
24959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960    unix_path=`$CYGPATH -u "$windows_path"`
24961    new_path="$unix_path"
24962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24964    new_path="$unix_path"
24965  fi
24966
24967  if test "x$path" != "x$new_path"; then
24968    BOOT_JDK="$new_path"
24969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24971  fi
24972
24973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24975
24976  else
24977    # We're on a posix platform. Hooray! :)
24978    path="$BOOT_JDK"
24979    has_space=`$ECHO "$path" | $GREP " "`
24980    if test "x$has_space" != x; then
24981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24984    fi
24985
24986    # Use eval to expand a potential ~
24987    eval path="$path"
24988    if test ! -f "$path" && test ! -d "$path"; then
24989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24990    fi
24991
24992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24993  fi
24994
24995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24996$as_echo_n "checking for Boot JDK... " >&6; }
24997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24998$as_echo "$BOOT_JDK" >&6; }
24999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25000$as_echo_n "checking Boot JDK version... " >&6; }
25001              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25003$as_echo "$BOOT_JDK_VERSION" >&6; }
25004            fi # end check jdk version
25005          fi # end check rt.jar
25006        fi # end check javac
25007      fi # end check java
25008    fi # end check boot jdk found
25009  fi
25010
25011    done
25012  fi
25013
25014
25015    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25016    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25017      # Do we have a bin/java?
25018      if test ! -x "$BOOT_JDK/bin/java"; then
25019        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25021        BOOT_JDK_FOUND=no
25022      else
25023        # Do we have a bin/javac?
25024        if test ! -x "$BOOT_JDK/bin/javac"; then
25025          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25027          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25028$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25029          BOOT_JDK_FOUND=no
25030        else
25031          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25032          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25035            BOOT_JDK_FOUND=no
25036          else
25037            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25039
25040            # Extra M4 quote needed to protect [] in grep expression.
25041            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25042            if test "x$FOUND_CORRECT_VERSION" = x; then
25043              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25045              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25046$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25047              BOOT_JDK_FOUND=no
25048            else
25049              # We're done! :-)
25050              BOOT_JDK_FOUND=yes
25051
25052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25053
25054  # Input might be given as Windows format, start by converting to
25055  # unix format.
25056  path="$BOOT_JDK"
25057  new_path=`$CYGPATH -u "$path"`
25058
25059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25062  # "foo.exe" is OK but "foo" is an error.
25063  #
25064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25065  # It is also a way to make sure we got the proper file name for the real test later on.
25066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25067  if test "x$test_shortpath" = x; then
25068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25070    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25071  fi
25072
25073  # Call helper function which possibly converts this using DOS-style short mode.
25074  # If so, the updated path is stored in $new_path.
25075
25076  input_path="$new_path"
25077  # Check if we need to convert this using DOS-style short mode. If the path
25078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25079  # take no chances and rewrite it.
25080  # Note: m4 eats our [], so we need to use [ and ] instead.
25081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25082  if test "x$has_forbidden_chars" != x; then
25083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25087      # Going to short mode and back again did indeed matter. Since short mode is
25088      # case insensitive, let's make it lowercase to improve readability.
25089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25090      # Now convert it back to Unix-stile (cygpath)
25091      input_path=`$CYGPATH -u "$shortmode_path"`
25092      new_path="$input_path"
25093    fi
25094  fi
25095
25096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25097  if test "x$test_cygdrive_prefix" = x; then
25098    # As a simple fix, exclude /usr/bin since it's not a real path.
25099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25101      # a path prefixed by /cygdrive for fixpath to work.
25102      new_path="$CYGWIN_ROOT_PATH$input_path"
25103    fi
25104  fi
25105
25106
25107  if test "x$path" != "x$new_path"; then
25108    BOOT_JDK="$new_path"
25109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25111  fi
25112
25113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25114
25115  path="$BOOT_JDK"
25116  has_colon=`$ECHO $path | $GREP ^.:`
25117  new_path="$path"
25118  if test "x$has_colon" = x; then
25119    # Not in mixed or Windows style, start by that.
25120    new_path=`cmd //c echo $path`
25121  fi
25122
25123
25124  input_path="$new_path"
25125  # Check if we need to convert this using DOS-style short mode. If the path
25126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25127  # take no chances and rewrite it.
25128  # Note: m4 eats our [], so we need to use [ and ] instead.
25129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25130  if test "x$has_forbidden_chars" != x; then
25131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25133  fi
25134
25135
25136  windows_path="$new_path"
25137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25138    unix_path=`$CYGPATH -u "$windows_path"`
25139    new_path="$unix_path"
25140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25142    new_path="$unix_path"
25143  fi
25144
25145  if test "x$path" != "x$new_path"; then
25146    BOOT_JDK="$new_path"
25147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25149  fi
25150
25151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25153
25154  else
25155    # We're on a posix platform. Hooray! :)
25156    path="$BOOT_JDK"
25157    has_space=`$ECHO "$path" | $GREP " "`
25158    if test "x$has_space" != x; then
25159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25161      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25162    fi
25163
25164    # Use eval to expand a potential ~
25165    eval path="$path"
25166    if test ! -f "$path" && test ! -d "$path"; then
25167      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25168    fi
25169
25170    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25171  fi
25172
25173              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25174$as_echo_n "checking for Boot JDK... " >&6; }
25175              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25176$as_echo "$BOOT_JDK" >&6; }
25177              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25178$as_echo_n "checking Boot JDK version... " >&6; }
25179              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25180              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25181$as_echo "$BOOT_JDK_VERSION" >&6; }
25182            fi # end check jdk version
25183          fi # end check rt.jar
25184        fi # end check javac
25185      fi # end check java
25186    fi # end check boot jdk found
25187  fi
25188
25189  fi
25190
25191
25192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25194      # Do we have a bin/java?
25195      if test ! -x "$BOOT_JDK/bin/java"; then
25196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25198        BOOT_JDK_FOUND=no
25199      else
25200        # Do we have a bin/javac?
25201        if test ! -x "$BOOT_JDK/bin/javac"; then
25202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25206          BOOT_JDK_FOUND=no
25207        else
25208          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25209          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25210            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25212            BOOT_JDK_FOUND=no
25213          else
25214            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25216
25217            # Extra M4 quote needed to protect [] in grep expression.
25218            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25219            if test "x$FOUND_CORRECT_VERSION" = x; then
25220              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25222              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25223$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25224              BOOT_JDK_FOUND=no
25225            else
25226              # We're done! :-)
25227              BOOT_JDK_FOUND=yes
25228
25229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25230
25231  # Input might be given as Windows format, start by converting to
25232  # unix format.
25233  path="$BOOT_JDK"
25234  new_path=`$CYGPATH -u "$path"`
25235
25236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25239  # "foo.exe" is OK but "foo" is an error.
25240  #
25241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25242  # It is also a way to make sure we got the proper file name for the real test later on.
25243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25244  if test "x$test_shortpath" = x; then
25245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25248  fi
25249
25250  # Call helper function which possibly converts this using DOS-style short mode.
25251  # If so, the updated path is stored in $new_path.
25252
25253  input_path="$new_path"
25254  # Check if we need to convert this using DOS-style short mode. If the path
25255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25256  # take no chances and rewrite it.
25257  # Note: m4 eats our [], so we need to use [ and ] instead.
25258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25259  if test "x$has_forbidden_chars" != x; then
25260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25264      # Going to short mode and back again did indeed matter. Since short mode is
25265      # case insensitive, let's make it lowercase to improve readability.
25266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25267      # Now convert it back to Unix-stile (cygpath)
25268      input_path=`$CYGPATH -u "$shortmode_path"`
25269      new_path="$input_path"
25270    fi
25271  fi
25272
25273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25274  if test "x$test_cygdrive_prefix" = x; then
25275    # As a simple fix, exclude /usr/bin since it's not a real path.
25276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25278      # a path prefixed by /cygdrive for fixpath to work.
25279      new_path="$CYGWIN_ROOT_PATH$input_path"
25280    fi
25281  fi
25282
25283
25284  if test "x$path" != "x$new_path"; then
25285    BOOT_JDK="$new_path"
25286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25288  fi
25289
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291
25292  path="$BOOT_JDK"
25293  has_colon=`$ECHO $path | $GREP ^.:`
25294  new_path="$path"
25295  if test "x$has_colon" = x; then
25296    # Not in mixed or Windows style, start by that.
25297    new_path=`cmd //c echo $path`
25298  fi
25299
25300
25301  input_path="$new_path"
25302  # Check if we need to convert this using DOS-style short mode. If the path
25303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25304  # take no chances and rewrite it.
25305  # Note: m4 eats our [], so we need to use [ and ] instead.
25306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25307  if test "x$has_forbidden_chars" != x; then
25308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25310  fi
25311
25312
25313  windows_path="$new_path"
25314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25315    unix_path=`$CYGPATH -u "$windows_path"`
25316    new_path="$unix_path"
25317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25319    new_path="$unix_path"
25320  fi
25321
25322  if test "x$path" != "x$new_path"; then
25323    BOOT_JDK="$new_path"
25324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25326  fi
25327
25328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25330
25331  else
25332    # We're on a posix platform. Hooray! :)
25333    path="$BOOT_JDK"
25334    has_space=`$ECHO "$path" | $GREP " "`
25335    if test "x$has_space" != x; then
25336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25338      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25339    fi
25340
25341    # Use eval to expand a potential ~
25342    eval path="$path"
25343    if test ! -f "$path" && test ! -d "$path"; then
25344      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25345    fi
25346
25347    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25348  fi
25349
25350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25351$as_echo_n "checking for Boot JDK... " >&6; }
25352              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25353$as_echo "$BOOT_JDK" >&6; }
25354              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25355$as_echo_n "checking Boot JDK version... " >&6; }
25356              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25357              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25358$as_echo "$BOOT_JDK_VERSION" >&6; }
25359            fi # end check jdk version
25360          fi # end check rt.jar
25361        fi # end check javac
25362      fi # end check java
25363    fi # end check boot jdk found
25364  fi
25365
25366
25367  # If we haven't found anything yet, we've truly lost. Give up.
25368  if test "x$BOOT_JDK_FOUND" = xno; then
25369
25370  # Print a helpful message on how to acquire the necessary build dependency.
25371  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25372  MISSING_DEPENDENCY=openjdk
25373
25374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25375    cygwin_help $MISSING_DEPENDENCY
25376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25377    msys_help $MISSING_DEPENDENCY
25378  else
25379    PKGHANDLER_COMMAND=
25380
25381    case $PKGHANDLER in
25382      apt-get)
25383        apt_help     $MISSING_DEPENDENCY ;;
25384      yum)
25385        yum_help     $MISSING_DEPENDENCY ;;
25386      port)
25387        port_help    $MISSING_DEPENDENCY ;;
25388      pkgutil)
25389        pkgutil_help $MISSING_DEPENDENCY ;;
25390      pkgadd)
25391        pkgadd_help  $MISSING_DEPENDENCY ;;
25392    esac
25393
25394    if test "x$PKGHANDLER_COMMAND" != x; then
25395      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25396    fi
25397  fi
25398
25399    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25400$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25401    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25402$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25403    as_fn_error $? "Cannot continue" "$LINENO" 5
25404  fi
25405
25406  # Setup proper paths for what we found
25407  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25408  if test ! -f "$BOOT_RTJAR"; then
25409    # On MacOSX it is called classes.jar
25410    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25411    if test -f "$BOOT_RTJAR"; then
25412      # Remove the ..
25413      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25414    fi
25415  fi
25416  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25417  BOOT_JDK="$BOOT_JDK"
25418
25419
25420
25421
25422  # Setup tools from the Boot JDK.
25423
25424  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25425
25426  # Publish this variable in the help.
25427
25428
25429  if test "x$JAVA" = x; then
25430    # The variable is not set by user, try to locate tool using the code snippet
25431
25432      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25433$as_echo_n "checking for java in Boot JDK... " >&6; }
25434      JAVA=$BOOT_JDK/bin/java
25435      if test ! -x $JAVA; then
25436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25437$as_echo "not found" >&6; }
25438        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25439$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25440        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25441      fi
25442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25443$as_echo "ok" >&6; }
25444
25445
25446  else
25447    # The variable is set, but is it from the command line or the environment?
25448
25449    # Try to remove the string !JAVA! from our list.
25450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25452      # If it failed, the variable was not from the command line. Ignore it,
25453      # but warn the user (except for BASH, which is always set by the calling BASH).
25454      if test "xJAVA" != xBASH; then
25455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25456$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25457      fi
25458      # Try to locate tool using the code snippet
25459
25460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25461$as_echo_n "checking for java in Boot JDK... " >&6; }
25462      JAVA=$BOOT_JDK/bin/java
25463      if test ! -x $JAVA; then
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25465$as_echo "not found" >&6; }
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25467$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25468        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25469      fi
25470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25471$as_echo "ok" >&6; }
25472
25473
25474    else
25475      # If it succeeded, then it was overridden by the user. We will use it
25476      # for the tool.
25477
25478      # First remove it from the list of overridden variables, so we can test
25479      # for unknown variables in the end.
25480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25481
25482      # Check if the provided tool contains a complete path.
25483      tool_specified="$JAVA"
25484      tool_basename="${tool_specified##*/}"
25485      if test "x$tool_basename" = "x$tool_specified"; then
25486        # A command without a complete path is provided, search $PATH.
25487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25488$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25489        # Extract the first word of "$tool_basename", so it can be a program name with args.
25490set dummy $tool_basename; ac_word=$2
25491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25492$as_echo_n "checking for $ac_word... " >&6; }
25493if ${ac_cv_path_JAVA+:} false; then :
25494  $as_echo_n "(cached) " >&6
25495else
25496  case $JAVA in
25497  [\\/]* | ?:[\\/]*)
25498  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25499  ;;
25500  *)
25501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25502for as_dir in $PATH
25503do
25504  IFS=$as_save_IFS
25505  test -z "$as_dir" && as_dir=.
25506    for ac_exec_ext in '' $ac_executable_extensions; do
25507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25508    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25510    break 2
25511  fi
25512done
25513  done
25514IFS=$as_save_IFS
25515
25516  ;;
25517esac
25518fi
25519JAVA=$ac_cv_path_JAVA
25520if test -n "$JAVA"; then
25521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25522$as_echo "$JAVA" >&6; }
25523else
25524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25525$as_echo "no" >&6; }
25526fi
25527
25528
25529        if test "x$JAVA" = x; then
25530          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25531        fi
25532      else
25533        # Otherwise we believe it is a complete path. Use it as it is.
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25535$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25537$as_echo_n "checking for JAVA... " >&6; }
25538        if test ! -x "$tool_specified"; then
25539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25540$as_echo "not found" >&6; }
25541          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25542        fi
25543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25544$as_echo "$tool_specified" >&6; }
25545      fi
25546    fi
25547  fi
25548
25549
25550
25551  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25552
25553  # Publish this variable in the help.
25554
25555
25556  if test "x$JAVAC" = x; then
25557    # The variable is not set by user, try to locate tool using the code snippet
25558
25559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25560$as_echo_n "checking for javac in Boot JDK... " >&6; }
25561      JAVAC=$BOOT_JDK/bin/javac
25562      if test ! -x $JAVAC; then
25563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25564$as_echo "not found" >&6; }
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25566$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25567        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25568      fi
25569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25570$as_echo "ok" >&6; }
25571
25572
25573  else
25574    # The variable is set, but is it from the command line or the environment?
25575
25576    # Try to remove the string !JAVAC! from our list.
25577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25579      # If it failed, the variable was not from the command line. Ignore it,
25580      # but warn the user (except for BASH, which is always set by the calling BASH).
25581      if test "xJAVAC" != xBASH; then
25582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25583$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25584      fi
25585      # Try to locate tool using the code snippet
25586
25587      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25588$as_echo_n "checking for javac in Boot JDK... " >&6; }
25589      JAVAC=$BOOT_JDK/bin/javac
25590      if test ! -x $JAVAC; then
25591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25592$as_echo "not found" >&6; }
25593        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25594$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25595        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25596      fi
25597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25598$as_echo "ok" >&6; }
25599
25600
25601    else
25602      # If it succeeded, then it was overridden by the user. We will use it
25603      # for the tool.
25604
25605      # First remove it from the list of overridden variables, so we can test
25606      # for unknown variables in the end.
25607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25608
25609      # Check if the provided tool contains a complete path.
25610      tool_specified="$JAVAC"
25611      tool_basename="${tool_specified##*/}"
25612      if test "x$tool_basename" = "x$tool_specified"; then
25613        # A command without a complete path is provided, search $PATH.
25614        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25615$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25616        # Extract the first word of "$tool_basename", so it can be a program name with args.
25617set dummy $tool_basename; ac_word=$2
25618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25619$as_echo_n "checking for $ac_word... " >&6; }
25620if ${ac_cv_path_JAVAC+:} false; then :
25621  $as_echo_n "(cached) " >&6
25622else
25623  case $JAVAC in
25624  [\\/]* | ?:[\\/]*)
25625  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25626  ;;
25627  *)
25628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25629for as_dir in $PATH
25630do
25631  IFS=$as_save_IFS
25632  test -z "$as_dir" && as_dir=.
25633    for ac_exec_ext in '' $ac_executable_extensions; do
25634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25635    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25637    break 2
25638  fi
25639done
25640  done
25641IFS=$as_save_IFS
25642
25643  ;;
25644esac
25645fi
25646JAVAC=$ac_cv_path_JAVAC
25647if test -n "$JAVAC"; then
25648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25649$as_echo "$JAVAC" >&6; }
25650else
25651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25652$as_echo "no" >&6; }
25653fi
25654
25655
25656        if test "x$JAVAC" = x; then
25657          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25658        fi
25659      else
25660        # Otherwise we believe it is a complete path. Use it as it is.
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25662$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25664$as_echo_n "checking for JAVAC... " >&6; }
25665        if test ! -x "$tool_specified"; then
25666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25667$as_echo "not found" >&6; }
25668          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25669        fi
25670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25671$as_echo "$tool_specified" >&6; }
25672      fi
25673    fi
25674  fi
25675
25676
25677
25678  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25679
25680  # Publish this variable in the help.
25681
25682
25683  if test "x$JAVAH" = x; then
25684    # The variable is not set by user, try to locate tool using the code snippet
25685
25686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25687$as_echo_n "checking for javah in Boot JDK... " >&6; }
25688      JAVAH=$BOOT_JDK/bin/javah
25689      if test ! -x $JAVAH; then
25690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25691$as_echo "not found" >&6; }
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25693$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25694        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25695      fi
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25697$as_echo "ok" >&6; }
25698
25699
25700  else
25701    # The variable is set, but is it from the command line or the environment?
25702
25703    # Try to remove the string !JAVAH! from our list.
25704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25706      # If it failed, the variable was not from the command line. Ignore it,
25707      # but warn the user (except for BASH, which is always set by the calling BASH).
25708      if test "xJAVAH" != xBASH; then
25709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25710$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25711      fi
25712      # Try to locate tool using the code snippet
25713
25714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25715$as_echo_n "checking for javah in Boot JDK... " >&6; }
25716      JAVAH=$BOOT_JDK/bin/javah
25717      if test ! -x $JAVAH; then
25718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25719$as_echo "not found" >&6; }
25720        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25721$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25722        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25723      fi
25724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25725$as_echo "ok" >&6; }
25726
25727
25728    else
25729      # If it succeeded, then it was overridden by the user. We will use it
25730      # for the tool.
25731
25732      # First remove it from the list of overridden variables, so we can test
25733      # for unknown variables in the end.
25734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25735
25736      # Check if the provided tool contains a complete path.
25737      tool_specified="$JAVAH"
25738      tool_basename="${tool_specified##*/}"
25739      if test "x$tool_basename" = "x$tool_specified"; then
25740        # A command without a complete path is provided, search $PATH.
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25742$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25743        # Extract the first word of "$tool_basename", so it can be a program name with args.
25744set dummy $tool_basename; ac_word=$2
25745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25746$as_echo_n "checking for $ac_word... " >&6; }
25747if ${ac_cv_path_JAVAH+:} false; then :
25748  $as_echo_n "(cached) " >&6
25749else
25750  case $JAVAH in
25751  [\\/]* | ?:[\\/]*)
25752  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25753  ;;
25754  *)
25755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25756for as_dir in $PATH
25757do
25758  IFS=$as_save_IFS
25759  test -z "$as_dir" && as_dir=.
25760    for ac_exec_ext in '' $ac_executable_extensions; do
25761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25762    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25764    break 2
25765  fi
25766done
25767  done
25768IFS=$as_save_IFS
25769
25770  ;;
25771esac
25772fi
25773JAVAH=$ac_cv_path_JAVAH
25774if test -n "$JAVAH"; then
25775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25776$as_echo "$JAVAH" >&6; }
25777else
25778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25779$as_echo "no" >&6; }
25780fi
25781
25782
25783        if test "x$JAVAH" = x; then
25784          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25785        fi
25786      else
25787        # Otherwise we believe it is a complete path. Use it as it is.
25788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25789$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25791$as_echo_n "checking for JAVAH... " >&6; }
25792        if test ! -x "$tool_specified"; then
25793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25794$as_echo "not found" >&6; }
25795          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25796        fi
25797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25798$as_echo "$tool_specified" >&6; }
25799      fi
25800    fi
25801  fi
25802
25803
25804
25805  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25806
25807  # Publish this variable in the help.
25808
25809
25810  if test "x$JAR" = x; then
25811    # The variable is not set by user, try to locate tool using the code snippet
25812
25813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25814$as_echo_n "checking for jar in Boot JDK... " >&6; }
25815      JAR=$BOOT_JDK/bin/jar
25816      if test ! -x $JAR; then
25817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25818$as_echo "not found" >&6; }
25819        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25820$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25821        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25822      fi
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25824$as_echo "ok" >&6; }
25825
25826
25827  else
25828    # The variable is set, but is it from the command line or the environment?
25829
25830    # Try to remove the string !JAR! from our list.
25831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25833      # If it failed, the variable was not from the command line. Ignore it,
25834      # but warn the user (except for BASH, which is always set by the calling BASH).
25835      if test "xJAR" != xBASH; then
25836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25837$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25838      fi
25839      # Try to locate tool using the code snippet
25840
25841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25842$as_echo_n "checking for jar in Boot JDK... " >&6; }
25843      JAR=$BOOT_JDK/bin/jar
25844      if test ! -x $JAR; then
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25846$as_echo "not found" >&6; }
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25848$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25849        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25850      fi
25851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25852$as_echo "ok" >&6; }
25853
25854
25855    else
25856      # If it succeeded, then it was overridden by the user. We will use it
25857      # for the tool.
25858
25859      # First remove it from the list of overridden variables, so we can test
25860      # for unknown variables in the end.
25861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25862
25863      # Check if the provided tool contains a complete path.
25864      tool_specified="$JAR"
25865      tool_basename="${tool_specified##*/}"
25866      if test "x$tool_basename" = "x$tool_specified"; then
25867        # A command without a complete path is provided, search $PATH.
25868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25869$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25870        # Extract the first word of "$tool_basename", so it can be a program name with args.
25871set dummy $tool_basename; ac_word=$2
25872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25873$as_echo_n "checking for $ac_word... " >&6; }
25874if ${ac_cv_path_JAR+:} false; then :
25875  $as_echo_n "(cached) " >&6
25876else
25877  case $JAR in
25878  [\\/]* | ?:[\\/]*)
25879  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25880  ;;
25881  *)
25882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25883for as_dir in $PATH
25884do
25885  IFS=$as_save_IFS
25886  test -z "$as_dir" && as_dir=.
25887    for ac_exec_ext in '' $ac_executable_extensions; do
25888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25889    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25891    break 2
25892  fi
25893done
25894  done
25895IFS=$as_save_IFS
25896
25897  ;;
25898esac
25899fi
25900JAR=$ac_cv_path_JAR
25901if test -n "$JAR"; then
25902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25903$as_echo "$JAR" >&6; }
25904else
25905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25906$as_echo "no" >&6; }
25907fi
25908
25909
25910        if test "x$JAR" = x; then
25911          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25912        fi
25913      else
25914        # Otherwise we believe it is a complete path. Use it as it is.
25915        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25916$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25918$as_echo_n "checking for JAR... " >&6; }
25919        if test ! -x "$tool_specified"; then
25920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25921$as_echo "not found" >&6; }
25922          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25923        fi
25924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25925$as_echo "$tool_specified" >&6; }
25926      fi
25927    fi
25928  fi
25929
25930
25931
25932  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25933
25934  # Publish this variable in the help.
25935
25936
25937  if test "x$NATIVE2ASCII" = x; then
25938    # The variable is not set by user, try to locate tool using the code snippet
25939
25940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25941$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25942      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25943      if test ! -x $NATIVE2ASCII; then
25944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25945$as_echo "not found" >&6; }
25946        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25947$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25948        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25949      fi
25950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25951$as_echo "ok" >&6; }
25952
25953
25954  else
25955    # The variable is set, but is it from the command line or the environment?
25956
25957    # Try to remove the string !NATIVE2ASCII! from our list.
25958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25960      # If it failed, the variable was not from the command line. Ignore it,
25961      # but warn the user (except for BASH, which is always set by the calling BASH).
25962      if test "xNATIVE2ASCII" != xBASH; then
25963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25964$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25965      fi
25966      # Try to locate tool using the code snippet
25967
25968      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25969$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25970      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25971      if test ! -x $NATIVE2ASCII; then
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25973$as_echo "not found" >&6; }
25974        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25975$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25976        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25977      fi
25978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25979$as_echo "ok" >&6; }
25980
25981
25982    else
25983      # If it succeeded, then it was overridden by the user. We will use it
25984      # for the tool.
25985
25986      # First remove it from the list of overridden variables, so we can test
25987      # for unknown variables in the end.
25988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25989
25990      # Check if the provided tool contains a complete path.
25991      tool_specified="$NATIVE2ASCII"
25992      tool_basename="${tool_specified##*/}"
25993      if test "x$tool_basename" = "x$tool_specified"; then
25994        # A command without a complete path is provided, search $PATH.
25995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25996$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25997        # Extract the first word of "$tool_basename", so it can be a program name with args.
25998set dummy $tool_basename; ac_word=$2
25999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26000$as_echo_n "checking for $ac_word... " >&6; }
26001if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26002  $as_echo_n "(cached) " >&6
26003else
26004  case $NATIVE2ASCII in
26005  [\\/]* | ?:[\\/]*)
26006  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26007  ;;
26008  *)
26009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26010for as_dir in $PATH
26011do
26012  IFS=$as_save_IFS
26013  test -z "$as_dir" && as_dir=.
26014    for ac_exec_ext in '' $ac_executable_extensions; do
26015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26016    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26018    break 2
26019  fi
26020done
26021  done
26022IFS=$as_save_IFS
26023
26024  ;;
26025esac
26026fi
26027NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26028if test -n "$NATIVE2ASCII"; then
26029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26030$as_echo "$NATIVE2ASCII" >&6; }
26031else
26032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26033$as_echo "no" >&6; }
26034fi
26035
26036
26037        if test "x$NATIVE2ASCII" = x; then
26038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26039        fi
26040      else
26041        # Otherwise we believe it is a complete path. Use it as it is.
26042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26043$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26045$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26046        if test ! -x "$tool_specified"; then
26047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26048$as_echo "not found" >&6; }
26049          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26050        fi
26051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26052$as_echo "$tool_specified" >&6; }
26053      fi
26054    fi
26055  fi
26056
26057
26058
26059  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26060
26061  # Publish this variable in the help.
26062
26063
26064  if test "x$JARSIGNER" = x; then
26065    # The variable is not set by user, try to locate tool using the code snippet
26066
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26068$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26069      JARSIGNER=$BOOT_JDK/bin/jarsigner
26070      if test ! -x $JARSIGNER; then
26071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26072$as_echo "not found" >&6; }
26073        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26074$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26075        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26076      fi
26077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26078$as_echo "ok" >&6; }
26079
26080
26081  else
26082    # The variable is set, but is it from the command line or the environment?
26083
26084    # Try to remove the string !JARSIGNER! from our list.
26085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26087      # If it failed, the variable was not from the command line. Ignore it,
26088      # but warn the user (except for BASH, which is always set by the calling BASH).
26089      if test "xJARSIGNER" != xBASH; then
26090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26091$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26092      fi
26093      # Try to locate tool using the code snippet
26094
26095      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26096$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26097      JARSIGNER=$BOOT_JDK/bin/jarsigner
26098      if test ! -x $JARSIGNER; then
26099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26100$as_echo "not found" >&6; }
26101        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26102$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26103        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26104      fi
26105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26106$as_echo "ok" >&6; }
26107
26108
26109    else
26110      # If it succeeded, then it was overridden by the user. We will use it
26111      # for the tool.
26112
26113      # First remove it from the list of overridden variables, so we can test
26114      # for unknown variables in the end.
26115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26116
26117      # Check if the provided tool contains a complete path.
26118      tool_specified="$JARSIGNER"
26119      tool_basename="${tool_specified##*/}"
26120      if test "x$tool_basename" = "x$tool_specified"; then
26121        # A command without a complete path is provided, search $PATH.
26122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26123$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26124        # Extract the first word of "$tool_basename", so it can be a program name with args.
26125set dummy $tool_basename; ac_word=$2
26126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26127$as_echo_n "checking for $ac_word... " >&6; }
26128if ${ac_cv_path_JARSIGNER+:} false; then :
26129  $as_echo_n "(cached) " >&6
26130else
26131  case $JARSIGNER in
26132  [\\/]* | ?:[\\/]*)
26133  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26134  ;;
26135  *)
26136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26137for as_dir in $PATH
26138do
26139  IFS=$as_save_IFS
26140  test -z "$as_dir" && as_dir=.
26141    for ac_exec_ext in '' $ac_executable_extensions; do
26142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26143    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26145    break 2
26146  fi
26147done
26148  done
26149IFS=$as_save_IFS
26150
26151  ;;
26152esac
26153fi
26154JARSIGNER=$ac_cv_path_JARSIGNER
26155if test -n "$JARSIGNER"; then
26156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26157$as_echo "$JARSIGNER" >&6; }
26158else
26159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26160$as_echo "no" >&6; }
26161fi
26162
26163
26164        if test "x$JARSIGNER" = x; then
26165          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26166        fi
26167      else
26168        # Otherwise we believe it is a complete path. Use it as it is.
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26170$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26172$as_echo_n "checking for JARSIGNER... " >&6; }
26173        if test ! -x "$tool_specified"; then
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26175$as_echo "not found" >&6; }
26176          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26177        fi
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26179$as_echo "$tool_specified" >&6; }
26180      fi
26181    fi
26182  fi
26183
26184
26185
26186  # Finally, set some other options...
26187
26188  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26189  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26190
26191
26192
26193
26194  ##############################################################################
26195  #
26196  # Specify jvm options for anything that is run with the Boot JDK.
26197  # Not all JVM:s accept the same arguments on the command line.
26198  #
26199
26200# Check whether --with-boot-jdk-jvmargs was given.
26201if test "${with_boot_jdk_jvmargs+set}" = set; then :
26202  withval=$with_boot_jdk_jvmargs;
26203fi
26204
26205
26206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26207$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26208
26209  # Disable special log output when a debug build is used as Boot JDK...
26210
26211  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26212  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26213  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26214  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26215  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26216  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26217    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26218    JVM_ARG_OK=true
26219  else
26220    $ECHO "Arg failed:" >&5
26221    $ECHO "$OUTPUT" >&5
26222    JVM_ARG_OK=false
26223  fi
26224
26225
26226  # Apply user provided options.
26227
26228  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26229  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26230  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26231  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26232  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26233  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26234    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26235    JVM_ARG_OK=true
26236  else
26237    $ECHO "Arg failed:" >&5
26238    $ECHO "$OUTPUT" >&5
26239    JVM_ARG_OK=false
26240  fi
26241
26242
26243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26244$as_echo "$boot_jdk_jvmargs" >&6; }
26245
26246  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26247  JAVA_FLAGS=$boot_jdk_jvmargs
26248
26249
26250
26251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26252$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26253
26254  # Starting amount of heap memory.
26255
26256  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26257  $ECHO "Command: $JAVA -Xms64M -version" >&5
26258  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26259  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26260  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26261  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26262    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26263    JVM_ARG_OK=true
26264  else
26265    $ECHO "Arg failed:" >&5
26266    $ECHO "$OUTPUT" >&5
26267    JVM_ARG_OK=false
26268  fi
26269
26270
26271  # Maximum amount of heap memory.
26272  # Maximum stack size.
26273  if test "x$BUILD_NUM_BITS" = x32; then
26274    JVM_MAX_HEAP=1100M
26275    STACK_SIZE=768
26276  else
26277    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26278    # pointers are used. Apparently, we need to increase the heap and stack
26279    # space for the jvm. More specifically, when running javac to build huge
26280    # jdk batch
26281    JVM_MAX_HEAP=1600M
26282    STACK_SIZE=1536
26283  fi
26284
26285  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26286  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26287  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26288  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26289  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26290  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26291    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26292    JVM_ARG_OK=true
26293  else
26294    $ECHO "Arg failed:" >&5
26295    $ECHO "$OUTPUT" >&5
26296    JVM_ARG_OK=false
26297  fi
26298
26299
26300  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26301  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26302  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26303  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26304  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26305  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26306    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26307    JVM_ARG_OK=true
26308  else
26309    $ECHO "Arg failed:" >&5
26310    $ECHO "$OUTPUT" >&5
26311    JVM_ARG_OK=false
26312  fi
26313
26314
26315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26316$as_echo "$boot_jdk_jvmargs_big" >&6; }
26317
26318  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26319
26320
26321
26322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26323$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26324
26325  # Use serial gc for small short lived tools if possible
26326
26327  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26328  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26329  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26330  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26331  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26333    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26334    JVM_ARG_OK=true
26335  else
26336    $ECHO "Arg failed:" >&5
26337    $ECHO "$OUTPUT" >&5
26338    JVM_ARG_OK=false
26339  fi
26340
26341
26342  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26343  $ECHO "Command: $JAVA -Xms32M -version" >&5
26344  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26345  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26346  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26347  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26348    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26349    JVM_ARG_OK=true
26350  else
26351    $ECHO "Arg failed:" >&5
26352    $ECHO "$OUTPUT" >&5
26353    JVM_ARG_OK=false
26354  fi
26355
26356
26357  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26358  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26359  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26360  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26361  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26362  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26363    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26364    JVM_ARG_OK=true
26365  else
26366    $ECHO "Arg failed:" >&5
26367    $ECHO "$OUTPUT" >&5
26368    JVM_ARG_OK=false
26369  fi
26370
26371
26372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26373$as_echo "$boot_jdk_jvmargs_small" >&6; }
26374
26375  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26376
26377
26378
26379###############################################################################
26380#
26381# Configure the sources to use. We can add or override individual directories.
26382#
26383###############################################################################
26384
26385
26386  # Where are the sources. Any of these can be overridden
26387  # using --with-override-corba and the likes.
26388  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26389  CORBA_TOPDIR="$SRC_ROOT/corba"
26390  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26391  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26392  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26393  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26394  JDK_TOPDIR="$SRC_ROOT/jdk"
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405  ###############################################################################
26406  #
26407  # Pickup additional source for a component from outside of the source root
26408  # or override source for a component.
26409  #
26410
26411# Check whether --with-add-source-root was given.
26412if test "${with_add_source_root+set}" = set; then :
26413  withval=$with_add_source_root;
26414fi
26415
26416
26417
26418# Check whether --with-override-source-root was given.
26419if test "${with_override_source_root+set}" = set; then :
26420  withval=$with_override_source_root;
26421fi
26422
26423
26424
26425# Check whether --with-adds-and-overrides was given.
26426if test "${with_adds_and_overrides+set}" = set; then :
26427  withval=$with_adds_and_overrides;
26428fi
26429
26430
26431  if test "x$with_adds_and_overrides" != x; then
26432    with_add_source_root="$with_adds_and_overrides/adds"
26433    with_override_source_root="$with_adds_and_overrides/overrides"
26434  fi
26435
26436  if test "x$with_add_source_root" != x; then
26437    if ! test -d $with_add_source_root; then
26438      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26439    fi
26440    CURDIR="$PWD"
26441    cd "$with_add_source_root"
26442    ADD_SRC_ROOT="`pwd`"
26443    cd "$CURDIR"
26444    # Verify that the addon source root does not have any root makefiles.
26445    # If it does, then it is usually an error, prevent this.
26446    if test -f $with_add_source_root/langtools/make/Makefile; then
26447      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
26448    fi
26449    if test -f $with_add_source_root/corba/make/Makefile; then
26450      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
26451    fi
26452    if test -f $with_add_source_root/jaxp/make/Makefile; then
26453      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
26454    fi
26455    if test -f $with_add_source_root/jaxws/make/Makefile; then
26456      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
26457    fi
26458    if test -f $with_add_source_root/hotspot/make/Makefile; then
26459      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
26460    fi
26461    if test -f $with_add_source_root/nashorn/make/Makefile; then
26462      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
26463    fi
26464    if test -f $with_add_source_root/jdk/make/Makefile; then
26465      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
26466    fi
26467  fi
26468
26469
26470  if test "x$with_override_source_root" != x; then
26471    if ! test -d $with_override_source_root; then
26472      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26473    fi
26474    CURDIR="$PWD"
26475    cd "$with_override_source_root"
26476    OVERRIDE_SRC_ROOT="`pwd`"
26477    cd "$CURDIR"
26478    if test -f $with_override_source_root/langtools/make/Makefile; then
26479      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
26480    fi
26481    if test -f $with_override_source_root/corba/make/Makefile; then
26482      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
26483    fi
26484    if test -f $with_override_source_root/jaxp/make/Makefile; then
26485      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
26486    fi
26487    if test -f $with_override_source_root/jaxws/make/Makefile; then
26488      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
26489    fi
26490    if test -f $with_override_source_root/hotspot/make/Makefile; then
26491      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
26492    fi
26493    if test -f $with_override_source_root/nashorn/make/Makefile; then
26494      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
26495    fi
26496    if test -f $with_override_source_root/jdk/make/Makefile; then
26497      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
26498    fi
26499  fi
26500
26501
26502  ###############################################################################
26503  #
26504  # Override a repo completely, this is used for example when you have 3 small
26505  # development sandboxes of the langtools sources and want to avoid having 3 full
26506  # OpenJDK sources checked out on disk.
26507  #
26508  # Assuming that the 3 langtools sandboxes are located here:
26509  # /home/fredrik/sandbox1/langtools
26510  # /home/fredrik/sandbox2/langtools
26511  # /home/fredrik/sandbox3/langtools
26512  #
26513  # From the source root you create build subdirs manually:
26514  #     mkdir -p build1 build2 build3
26515  # in each build directory run:
26516  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26517  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26518  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26519  #
26520
26521
26522# Check whether --with-override-langtools was given.
26523if test "${with_override_langtools+set}" = set; then :
26524  withval=$with_override_langtools;
26525fi
26526
26527
26528
26529# Check whether --with-override-corba was given.
26530if test "${with_override_corba+set}" = set; then :
26531  withval=$with_override_corba;
26532fi
26533
26534
26535
26536# Check whether --with-override-jaxp was given.
26537if test "${with_override_jaxp+set}" = set; then :
26538  withval=$with_override_jaxp;
26539fi
26540
26541
26542
26543# Check whether --with-override-jaxws was given.
26544if test "${with_override_jaxws+set}" = set; then :
26545  withval=$with_override_jaxws;
26546fi
26547
26548
26549
26550# Check whether --with-override-hotspot was given.
26551if test "${with_override_hotspot+set}" = set; then :
26552  withval=$with_override_hotspot;
26553fi
26554
26555
26556
26557# Check whether --with-override-nashorn was given.
26558if test "${with_override_nashorn+set}" = set; then :
26559  withval=$with_override_nashorn;
26560fi
26561
26562
26563
26564# Check whether --with-override-jdk was given.
26565if test "${with_override_jdk+set}" = set; then :
26566  withval=$with_override_jdk;
26567fi
26568
26569
26570  if test "x$with_override_langtools" != x; then
26571    CURDIR="$PWD"
26572    cd "$with_override_langtools"
26573    LANGTOOLS_TOPDIR="`pwd`"
26574    cd "$CURDIR"
26575    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26576      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26577    fi
26578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26579$as_echo_n "checking if langtools should be overridden... " >&6; }
26580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26581$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26582  fi
26583  if test "x$with_override_corba" != x; then
26584    CURDIR="$PWD"
26585    cd "$with_override_corba"
26586    CORBA_TOPDIR="`pwd`"
26587    cd "$CURDIR"
26588    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26589      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26590    fi
26591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26592$as_echo_n "checking if corba should be overridden... " >&6; }
26593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26594$as_echo "yes with $CORBA_TOPDIR" >&6; }
26595  fi
26596  if test "x$with_override_jaxp" != x; then
26597    CURDIR="$PWD"
26598    cd "$with_override_jaxp"
26599    JAXP_TOPDIR="`pwd`"
26600    cd "$CURDIR"
26601    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26602      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26603    fi
26604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26605$as_echo_n "checking if jaxp should be overridden... " >&6; }
26606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26607$as_echo "yes with $JAXP_TOPDIR" >&6; }
26608  fi
26609  if test "x$with_override_jaxws" != x; then
26610    CURDIR="$PWD"
26611    cd "$with_override_jaxws"
26612    JAXWS_TOPDIR="`pwd`"
26613    cd "$CURDIR"
26614    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26615      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26616    fi
26617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26618$as_echo_n "checking if jaxws should be overridden... " >&6; }
26619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26620$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26621  fi
26622  if test "x$with_override_hotspot" != x; then
26623    CURDIR="$PWD"
26624    cd "$with_override_hotspot"
26625    HOTSPOT_TOPDIR="`pwd`"
26626    cd "$CURDIR"
26627    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26628      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26629    fi
26630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26631$as_echo_n "checking if hotspot should be overridden... " >&6; }
26632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26633$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26634  fi
26635  if test "x$with_override_nashorn" != x; then
26636    CURDIR="$PWD"
26637    cd "$with_override_nashorn"
26638    NASHORN_TOPDIR="`pwd`"
26639    cd "$CURDIR"
26640    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26641      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26642    fi
26643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26644$as_echo_n "checking if nashorn should be overridden... " >&6; }
26645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26646$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26647  fi
26648  if test "x$with_override_jdk" != x; then
26649    CURDIR="$PWD"
26650    cd "$with_override_jdk"
26651    JDK_TOPDIR="`pwd`"
26652    cd "$CURDIR"
26653    if ! test -f $JDK_TOPDIR/make/Makefile; then
26654      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26655    fi
26656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26657$as_echo_n "checking if JDK should be overridden... " >&6; }
26658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26659$as_echo "yes with $JDK_TOPDIR" >&6; }
26660  fi
26661
26662
26663  BUILD_OUTPUT="$OUTPUT_ROOT"
26664
26665
26666  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26667  BUILD_HOTSPOT=true
26668
26669
26670
26671# Check whether --with-import-hotspot was given.
26672if test "${with_import_hotspot+set}" = set; then :
26673  withval=$with_import_hotspot;
26674fi
26675
26676  if test "x$with_import_hotspot" != x; then
26677    CURDIR="$PWD"
26678    cd "$with_import_hotspot"
26679    HOTSPOT_DIST="`pwd`"
26680    cd "$CURDIR"
26681    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26682      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26683    fi
26684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26685$as_echo_n "checking if hotspot should be imported... " >&6; }
26686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26687$as_echo "yes from $HOTSPOT_DIST" >&6; }
26688    BUILD_HOTSPOT=false
26689  fi
26690
26691  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26692
26693
26694###############################################################################
26695#
26696# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26697# native code.
26698#
26699###############################################################################
26700
26701# First determine the toolchain type (compiler family)
26702
26703
26704# Check whether --with-toolchain-type was given.
26705if test "${with_toolchain_type+set}" = set; then :
26706  withval=$with_toolchain_type;
26707fi
26708
26709
26710  # Use indirect variable referencing
26711  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26712  VALID_TOOLCHAINS=${!toolchain_var_name}
26713
26714  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26715    if test -n "$XCODEBUILD"; then
26716      # On Mac OS X, default toolchain to clang after Xcode 5
26717      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26718      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26719      if test $? -ne 0; then
26720        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26721      fi
26722      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26723          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26724          $CUT -f 1 -d .`
26725      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26726$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26727      if test $XCODE_MAJOR_VERSION -ge 5; then
26728          DEFAULT_TOOLCHAIN="clang"
26729      else
26730          DEFAULT_TOOLCHAIN="gcc"
26731      fi
26732    else
26733      # If Xcode is not installed, but the command line tools are
26734      # then we can't run xcodebuild. On these systems we should
26735      # default to clang
26736      DEFAULT_TOOLCHAIN="clang"
26737    fi
26738  else
26739    # First toolchain type in the list is the default
26740    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26741  fi
26742
26743  if test "x$with_toolchain_type" = xlist; then
26744    # List all toolchains
26745    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26746$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26747    for toolchain in $VALID_TOOLCHAINS; do
26748      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26749      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26750      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26751    done
26752
26753    exit 0
26754  elif test "x$with_toolchain_type" != x; then
26755    # User override; check that it is valid
26756    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26757      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26758$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26759      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26760$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26761      as_fn_error $? "Cannot continue." "$LINENO" 5
26762    fi
26763    TOOLCHAIN_TYPE=$with_toolchain_type
26764  else
26765    # No flag given, use default
26766    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26767  fi
26768
26769
26770  TOOLCHAIN_CC_BINARY_clang="clang"
26771  TOOLCHAIN_CC_BINARY_gcc="gcc"
26772  TOOLCHAIN_CC_BINARY_microsoft="cl"
26773  TOOLCHAIN_CC_BINARY_solstudio="cc"
26774  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26775
26776  TOOLCHAIN_CXX_BINARY_clang="clang++"
26777  TOOLCHAIN_CXX_BINARY_gcc="g++"
26778  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26779  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26780  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26781
26782  # Use indirect variable referencing
26783  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26784  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26785  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26786  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26787  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26788  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26789
26790
26791  # Define filename patterns
26792  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26793    LIBRARY_PREFIX=
26794    SHARED_LIBRARY_SUFFIX='.dll'
26795    STATIC_LIBRARY_SUFFIX='.lib'
26796    SHARED_LIBRARY='$1.dll'
26797    STATIC_LIBRARY='$1.lib'
26798    OBJ_SUFFIX='.obj'
26799    EXE_SUFFIX='.exe'
26800  else
26801    LIBRARY_PREFIX=lib
26802    SHARED_LIBRARY_SUFFIX='.so'
26803    STATIC_LIBRARY_SUFFIX='.a'
26804    SHARED_LIBRARY='lib$1.so'
26805    STATIC_LIBRARY='lib$1.a'
26806    OBJ_SUFFIX='.o'
26807    EXE_SUFFIX=''
26808    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26809      SHARED_LIBRARY='lib$1.dylib'
26810      SHARED_LIBRARY_SUFFIX='.dylib'
26811    fi
26812  fi
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26824    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26825$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26826  else
26827    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26828$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26829  fi
26830
26831
26832# Then detect the actual binaries needed
26833
26834  # FIXME: Is this needed?
26835  ac_ext=cpp
26836ac_cpp='$CXXCPP $CPPFLAGS'
26837ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26838ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26839ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26840
26841
26842  # Store the CFLAGS etc passed to the configure script.
26843  ORG_CFLAGS="$CFLAGS"
26844  ORG_CXXFLAGS="$CXXFLAGS"
26845  ORG_OBJCFLAGS="$OBJCFLAGS"
26846
26847  # On Windows, we need to detect the visual studio installation first.
26848  # This will change the PATH, but we need to keep that new PATH even
26849  # after toolchain detection is done, since the compiler (on x86) uses
26850  # it for DLL resolution in runtime.
26851  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26852
26853  # Store path to cygwin link.exe to help excluding it when searching for
26854  # VS linker. This must be done before changing the PATH when looking for VS.
26855  # Extract the first word of "link", so it can be a program name with args.
26856set dummy link; ac_word=$2
26857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26858$as_echo_n "checking for $ac_word... " >&6; }
26859if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26860  $as_echo_n "(cached) " >&6
26861else
26862  case $CYGWIN_LINK in
26863  [\\/]* | ?:[\\/]*)
26864  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26865  ;;
26866  *)
26867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26868for as_dir in $PATH
26869do
26870  IFS=$as_save_IFS
26871  test -z "$as_dir" && as_dir=.
26872    for ac_exec_ext in '' $ac_executable_extensions; do
26873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26874    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26876    break 2
26877  fi
26878done
26879  done
26880IFS=$as_save_IFS
26881
26882  ;;
26883esac
26884fi
26885CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26886if test -n "$CYGWIN_LINK"; then
26887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26888$as_echo "$CYGWIN_LINK" >&6; }
26889else
26890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26891$as_echo "no" >&6; }
26892fi
26893
26894
26895  if test "x$CYGWIN_LINK" != x; then
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26897$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26898    "$CYGWIN_LINK" --version > /dev/null
26899    if test $? -eq 0 ; then
26900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26901$as_echo "yes" >&6; }
26902    else
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26904$as_echo "no" >&6; }
26905      # This might be the VS linker. Don't exclude it later on.
26906      CYGWIN_LINK=""
26907    fi
26908  fi
26909
26910  # First-hand choice is to locate and run the vsvars bat file.
26911
26912  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26913    VCVARSFILE="vc/bin/vcvars32.bat"
26914  else
26915    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26916  fi
26917
26918  VS_ENV_CMD=""
26919  VS_ENV_ARGS=""
26920  if test "x$with_toolsdir" != x; then
26921
26922  if test "x$VS_ENV_CMD" = x; then
26923    VS100BASE="$with_toolsdir/../.."
26924    METHOD="--with-tools-dir"
26925
26926  windows_path="$VS100BASE"
26927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928    unix_path=`$CYGPATH -u "$windows_path"`
26929    VS100BASE="$unix_path"
26930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26932    VS100BASE="$unix_path"
26933  fi
26934
26935    if test -d "$VS100BASE"; then
26936      if test -f "$VS100BASE/$VCVARSFILE"; then
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26938$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26939        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26940      else
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26942$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26944$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26945      fi
26946    fi
26947  fi
26948
26949  fi
26950
26951  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26952    # Having specified an argument which is incorrect will produce an instant failure;
26953    # we should not go on looking
26954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26955$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26956    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26957$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26958    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26959  fi
26960
26961  if test "x$VS100COMNTOOLS" != x; then
26962
26963  if test "x$VS_ENV_CMD" = x; then
26964    VS100BASE="$VS100COMNTOOLS/../.."
26965    METHOD="VS100COMNTOOLS variable"
26966
26967  windows_path="$VS100BASE"
26968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969    unix_path=`$CYGPATH -u "$windows_path"`
26970    VS100BASE="$unix_path"
26971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26973    VS100BASE="$unix_path"
26974  fi
26975
26976    if test -d "$VS100BASE"; then
26977      if test -f "$VS100BASE/$VCVARSFILE"; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26979$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26980        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26981      else
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26983$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26985$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26986      fi
26987    fi
26988  fi
26989
26990  fi
26991  if test "x$PROGRAMFILES" != x; then
26992
26993  if test "x$VS_ENV_CMD" = x; then
26994    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26995    METHOD="well-known name"
26996
26997  windows_path="$VS100BASE"
26998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999    unix_path=`$CYGPATH -u "$windows_path"`
27000    VS100BASE="$unix_path"
27001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27003    VS100BASE="$unix_path"
27004  fi
27005
27006    if test -d "$VS100BASE"; then
27007      if test -f "$VS100BASE/$VCVARSFILE"; then
27008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27009$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27010        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27011      else
27012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27013$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27015$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27016      fi
27017    fi
27018  fi
27019
27020  fi
27021
27022  if test "x$VS_ENV_CMD" = x; then
27023    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27024    METHOD="well-known name"
27025
27026  windows_path="$VS100BASE"
27027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27028    unix_path=`$CYGPATH -u "$windows_path"`
27029    VS100BASE="$unix_path"
27030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27032    VS100BASE="$unix_path"
27033  fi
27034
27035    if test -d "$VS100BASE"; then
27036      if test -f "$VS100BASE/$VCVARSFILE"; then
27037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27038$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27039        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27040      else
27041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27042$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27044$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27045      fi
27046    fi
27047  fi
27048
27049
27050  if test "x$VS_ENV_CMD" = x; then
27051    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27052    METHOD="well-known name"
27053
27054  windows_path="$VS100BASE"
27055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27056    unix_path=`$CYGPATH -u "$windows_path"`
27057    VS100BASE="$unix_path"
27058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27060    VS100BASE="$unix_path"
27061  fi
27062
27063    if test -d "$VS100BASE"; then
27064      if test -f "$VS100BASE/$VCVARSFILE"; then
27065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27066$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27067        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27068      else
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27070$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27072$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27073      fi
27074    fi
27075  fi
27076
27077
27078  if test "x$ProgramW6432" != x; then
27079
27080  if test "x$VS_ENV_CMD" = x; then
27081    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27082    METHOD="well-known name"
27083
27084  windows_path="$WIN_SDK_BASE"
27085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27086    unix_path=`$CYGPATH -u "$windows_path"`
27087    WIN_SDK_BASE="$unix_path"
27088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27090    WIN_SDK_BASE="$unix_path"
27091  fi
27092
27093    if test -d "$WIN_SDK_BASE"; then
27094      # There have been cases of partial or broken SDK installations. A missing
27095      # lib dir is not going to work.
27096      if test ! -d "$WIN_SDK_BASE/../lib"; then
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27100$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27101      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27104        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27105        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27106          VS_ENV_ARGS="/x86"
27107        else
27108          VS_ENV_ARGS="/x64"
27109        fi
27110      else
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27114$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27115      fi
27116    fi
27117  fi
27118
27119  fi
27120  if test "x$PROGRAMW6432" != x; then
27121
27122  if test "x$VS_ENV_CMD" = x; then
27123    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27124    METHOD="well-known name"
27125
27126  windows_path="$WIN_SDK_BASE"
27127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27128    unix_path=`$CYGPATH -u "$windows_path"`
27129    WIN_SDK_BASE="$unix_path"
27130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27132    WIN_SDK_BASE="$unix_path"
27133  fi
27134
27135    if test -d "$WIN_SDK_BASE"; then
27136      # There have been cases of partial or broken SDK installations. A missing
27137      # lib dir is not going to work.
27138      if test ! -d "$WIN_SDK_BASE/../lib"; then
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27142$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27143      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27146        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27147        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27148          VS_ENV_ARGS="/x86"
27149        else
27150          VS_ENV_ARGS="/x64"
27151        fi
27152      else
27153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27156$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27157      fi
27158    fi
27159  fi
27160
27161  fi
27162  if test "x$PROGRAMFILES" != x; then
27163
27164  if test "x$VS_ENV_CMD" = x; then
27165    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27166    METHOD="well-known name"
27167
27168  windows_path="$WIN_SDK_BASE"
27169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27170    unix_path=`$CYGPATH -u "$windows_path"`
27171    WIN_SDK_BASE="$unix_path"
27172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27174    WIN_SDK_BASE="$unix_path"
27175  fi
27176
27177    if test -d "$WIN_SDK_BASE"; then
27178      # There have been cases of partial or broken SDK installations. A missing
27179      # lib dir is not going to work.
27180      if test ! -d "$WIN_SDK_BASE/../lib"; then
27181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27182$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27184$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27185      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27187$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27188        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27189        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27190          VS_ENV_ARGS="/x86"
27191        else
27192          VS_ENV_ARGS="/x64"
27193        fi
27194      else
27195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27196$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27198$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27199      fi
27200    fi
27201  fi
27202
27203  fi
27204
27205  if test "x$VS_ENV_CMD" = x; then
27206    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27207    METHOD="well-known name"
27208
27209  windows_path="$WIN_SDK_BASE"
27210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27211    unix_path=`$CYGPATH -u "$windows_path"`
27212    WIN_SDK_BASE="$unix_path"
27213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27215    WIN_SDK_BASE="$unix_path"
27216  fi
27217
27218    if test -d "$WIN_SDK_BASE"; then
27219      # There have been cases of partial or broken SDK installations. A missing
27220      # lib dir is not going to work.
27221      if test ! -d "$WIN_SDK_BASE/../lib"; then
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27224        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27225$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27226      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27228$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27229        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27230        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27231          VS_ENV_ARGS="/x86"
27232        else
27233          VS_ENV_ARGS="/x64"
27234        fi
27235      else
27236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27238        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27239$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27240      fi
27241    fi
27242  fi
27243
27244
27245  if test "x$VS_ENV_CMD" = x; then
27246    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27247    METHOD="well-known name"
27248
27249  windows_path="$WIN_SDK_BASE"
27250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27251    unix_path=`$CYGPATH -u "$windows_path"`
27252    WIN_SDK_BASE="$unix_path"
27253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27255    WIN_SDK_BASE="$unix_path"
27256  fi
27257
27258    if test -d "$WIN_SDK_BASE"; then
27259      # There have been cases of partial or broken SDK installations. A missing
27260      # lib dir is not going to work.
27261      if test ! -d "$WIN_SDK_BASE/../lib"; then
27262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27265$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27266      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27267        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27268$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27269        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27270        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27271          VS_ENV_ARGS="/x86"
27272        else
27273          VS_ENV_ARGS="/x64"
27274        fi
27275      else
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27279$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27280      fi
27281    fi
27282  fi
27283
27284
27285  if test "x$VS_ENV_CMD" != x; then
27286    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27287
27288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27289
27290  # First separate the path from the arguments. This will split at the first
27291  # space.
27292  complete="$VS_ENV_CMD"
27293  path="${complete%% *}"
27294  tmp="$complete EOL"
27295  arguments="${tmp#* }"
27296
27297  # Input might be given as Windows format, start by converting to
27298  # unix format.
27299  new_path=`$CYGPATH -u "$path"`
27300
27301  # Now try to locate executable using which
27302  new_path=`$WHICH "$new_path" 2> /dev/null`
27303  # bat and cmd files are not always considered executable in cygwin causing which
27304  # to not find them
27305  if test "x$new_path" = x \
27306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27308    new_path=`$CYGPATH -u "$path"`
27309  fi
27310  if test "x$new_path" = x; then
27311    # Oops. Which didn't find the executable.
27312    # The splitting of arguments from the executable at a space might have been incorrect,
27313    # since paths with space are more likely in Windows. Give it another try with the whole
27314    # argument.
27315    path="$complete"
27316    arguments="EOL"
27317    new_path=`$CYGPATH -u "$path"`
27318    new_path=`$WHICH "$new_path" 2> /dev/null`
27319    # bat and cmd files are not always considered executable in cygwin causing which
27320    # to not find them
27321    if test "x$new_path" = x \
27322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27324      new_path=`$CYGPATH -u "$path"`
27325    fi
27326    if test "x$new_path" = x; then
27327      # It's still not found. Now this is an unrecoverable error.
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27329$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27330      has_space=`$ECHO "$complete" | $GREP " "`
27331      if test "x$has_space" != x; then
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27334      fi
27335      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27336    fi
27337  fi
27338
27339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27342  # "foo.exe" is OK but "foo" is an error.
27343  #
27344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27345  # It is also a way to make sure we got the proper file name for the real test later on.
27346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27347  if test "x$test_shortpath" = x; then
27348    # Short path failed, file does not exist as specified.
27349    # Try adding .exe or .cmd
27350    if test -f "${new_path}.exe"; then
27351      input_to_shortpath="${new_path}.exe"
27352    elif test -f "${new_path}.cmd"; then
27353      input_to_shortpath="${new_path}.cmd"
27354    else
27355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27356$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27359      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27360    fi
27361  else
27362    input_to_shortpath="$new_path"
27363  fi
27364
27365  # Call helper function which possibly converts this using DOS-style short mode.
27366  # If so, the updated path is stored in $new_path.
27367  new_path="$input_to_shortpath"
27368
27369  input_path="$input_to_shortpath"
27370  # Check if we need to convert this using DOS-style short mode. If the path
27371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27372  # take no chances and rewrite it.
27373  # Note: m4 eats our [], so we need to use [ and ] instead.
27374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27375  if test "x$has_forbidden_chars" != x; then
27376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27380      # Going to short mode and back again did indeed matter. Since short mode is
27381      # case insensitive, let's make it lowercase to improve readability.
27382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27383      # Now convert it back to Unix-stile (cygpath)
27384      input_path=`$CYGPATH -u "$shortmode_path"`
27385      new_path="$input_path"
27386    fi
27387  fi
27388
27389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27390  if test "x$test_cygdrive_prefix" = x; then
27391    # As a simple fix, exclude /usr/bin since it's not a real path.
27392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27394      # a path prefixed by /cygdrive for fixpath to work.
27395      new_path="$CYGWIN_ROOT_PATH$input_path"
27396    fi
27397  fi
27398
27399  # remove trailing .exe if any
27400  new_path="${new_path/%.exe/}"
27401
27402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27403
27404  # First separate the path from the arguments. This will split at the first
27405  # space.
27406  complete="$VS_ENV_CMD"
27407  path="${complete%% *}"
27408  tmp="$complete EOL"
27409  arguments="${tmp#* }"
27410
27411  # Input might be given as Windows format, start by converting to
27412  # unix format.
27413  new_path="$path"
27414
27415  windows_path="$new_path"
27416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27417    unix_path=`$CYGPATH -u "$windows_path"`
27418    new_path="$unix_path"
27419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27421    new_path="$unix_path"
27422  fi
27423
27424
27425  # Now try to locate executable using which
27426  new_path=`$WHICH "$new_path" 2> /dev/null`
27427
27428  if test "x$new_path" = x; then
27429    # Oops. Which didn't find the executable.
27430    # The splitting of arguments from the executable at a space might have been incorrect,
27431    # since paths with space are more likely in Windows. Give it another try with the whole
27432    # argument.
27433    path="$complete"
27434    arguments="EOL"
27435    new_path="$path"
27436
27437  windows_path="$new_path"
27438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27439    unix_path=`$CYGPATH -u "$windows_path"`
27440    new_path="$unix_path"
27441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27443    new_path="$unix_path"
27444  fi
27445
27446
27447    new_path=`$WHICH "$new_path" 2> /dev/null`
27448
27449    if test "x$new_path" = x; then
27450      # It's still not found. Now this is an unrecoverable error.
27451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27452$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27453      has_space=`$ECHO "$complete" | $GREP " "`
27454      if test "x$has_space" != x; then
27455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27457      fi
27458      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27459    fi
27460  fi
27461
27462  # Now new_path has a complete unix path to the binary
27463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27464    # Keep paths in /bin as-is, but remove trailing .exe if any
27465    new_path="${new_path/%.exe/}"
27466    # Do not save /bin paths to all_fixpath_prefixes!
27467  else
27468    # Not in mixed or Windows style, start by that.
27469    new_path=`cmd //c echo $new_path`
27470
27471  input_path="$new_path"
27472  # Check if we need to convert this using DOS-style short mode. If the path
27473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27474  # take no chances and rewrite it.
27475  # Note: m4 eats our [], so we need to use [ and ] instead.
27476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27477  if test "x$has_forbidden_chars" != x; then
27478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27480  fi
27481
27482    # Output is in $new_path
27483
27484  windows_path="$new_path"
27485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27486    unix_path=`$CYGPATH -u "$windows_path"`
27487    new_path="$unix_path"
27488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27490    new_path="$unix_path"
27491  fi
27492
27493    # remove trailing .exe if any
27494    new_path="${new_path/%.exe/}"
27495
27496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27498  fi
27499
27500  else
27501    # We're on a posix platform. Hooray! :)
27502    # First separate the path from the arguments. This will split at the first
27503    # space.
27504    complete="$VS_ENV_CMD"
27505    path="${complete%% *}"
27506    tmp="$complete EOL"
27507    arguments="${tmp#* }"
27508
27509    # Cannot rely on the command "which" here since it doesn't always work.
27510    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27511    if test -z "$is_absolute_path"; then
27512      # Path to executable is not absolute. Find it.
27513      IFS_save="$IFS"
27514      IFS=:
27515      for p in $PATH; do
27516        if test -f "$p/$path" && test -x "$p/$path"; then
27517          new_path="$p/$path"
27518          break
27519        fi
27520      done
27521      IFS="$IFS_save"
27522    else
27523      # This is an absolute path, we can use it without further modifications.
27524      new_path="$path"
27525    fi
27526
27527    if test "x$new_path" = x; then
27528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27529$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27530      has_space=`$ECHO "$complete" | $GREP " "`
27531      if test "x$has_space" != x; then
27532        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27533$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27534      fi
27535      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27536    fi
27537  fi
27538
27539  # Now join together the path and the arguments once again
27540  if test "x$arguments" != xEOL; then
27541    new_complete="$new_path ${arguments% *}"
27542  else
27543    new_complete="$new_path"
27544  fi
27545
27546  if test "x$complete" != "x$new_complete"; then
27547    VS_ENV_CMD="$new_complete"
27548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27549$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27550  fi
27551
27552
27553    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27554    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27555$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27556
27557    # We need to create a couple of temporary files.
27558    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27559    $MKDIR -p $VS_ENV_TMP_DIR
27560
27561    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27562    # Instead create a shell script which will set the relevant variables when run.
27563    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27564
27565  unix_path="$WINPATH_VS_ENV_CMD"
27566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27567    windows_path=`$CYGPATH -m "$unix_path"`
27568    WINPATH_VS_ENV_CMD="$windows_path"
27569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27570    windows_path=`cmd //c echo $unix_path`
27571    WINPATH_VS_ENV_CMD="$windows_path"
27572  fi
27573
27574    WINPATH_BASH="$BASH"
27575
27576  unix_path="$WINPATH_BASH"
27577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27578    windows_path=`$CYGPATH -m "$unix_path"`
27579    WINPATH_BASH="$windows_path"
27580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27581    windows_path=`cmd //c echo $unix_path`
27582    WINPATH_BASH="$windows_path"
27583  fi
27584
27585
27586    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27587    # script (executable by bash) that will setup the important variables.
27588    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27589    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27590    # This will end up something like:
27591    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27592    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27593    # These will end up something like:
27594    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27595    # The trailing space for everyone except PATH is no typo, but is needed due
27596    # to trailing \ in the Windows paths. These will be stripped later.
27597    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27598    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27599    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27600    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27601    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27602    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27603
27604    # Now execute the newly created bat file.
27605    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27606    # Change directory so we don't need to mess with Windows paths in redirects.
27607    cd $VS_ENV_TMP_DIR
27608    cmd /c extract-vs-env.bat | $CAT
27609    cd $CURDIR
27610
27611    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27612      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27613$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27614      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27615$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27616      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27617$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27618      as_fn_error $? "Cannot continue" "$LINENO" 5
27619    fi
27620
27621    # Now set all paths and other env variables. This will allow the rest of
27622    # the configure script to find and run the compiler in the proper way.
27623    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27624$as_echo "$as_me: Setting extracted environment variables" >&6;}
27625    . $VS_ENV_TMP_DIR/set-vs-env.sh
27626    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27627    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27628  else
27629    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27630    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27631$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27632  fi
27633
27634  # At this point, we should have correct variables in the environment, or we can't continue.
27635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27636$as_echo_n "checking for Visual Studio variables... " >&6; }
27637
27638  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27639    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27641$as_echo "present but broken" >&6; }
27642      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27643    else
27644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27645$as_echo "ok" >&6; }
27646      # Remove any trailing "\" and " " from the variables.
27647      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27648      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27649      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27650      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27651      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27652      # Remove any paths containing # (typically F#) as that messes up make. This
27653      # is needed if visual studio was installed with F# support.
27654      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27655
27656
27657
27658
27659    fi
27660  else
27661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27662$as_echo "not found" >&6; }
27663
27664    if test "x$VS_ENV_CMD" = x; then
27665      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27666$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27667      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27668$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27669    else
27670      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27671$as_echo "$as_me: Running the extraction script failed." >&6;}
27672    fi
27673    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27674$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27675    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27676$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27677    as_fn_error $? "Cannot continue" "$LINENO" 5
27678  fi
27679
27680    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27681    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27682    PATH="$VS_PATH"
27683    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27684    export INCLUDE="$VS_INCLUDE"
27685    export LIB="$VS_LIB"
27686  fi
27687
27688  # autoconf magic only relies on PATH, so update it if tools dir is specified
27689  OLD_PATH="$PATH"
27690
27691  # For solaris we really need solaris tools, and not the GNU equivalent.
27692  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27693  # so add that to path before starting to probe.
27694  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27695  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27696    PATH="/usr/ccs/bin:$PATH"
27697  fi
27698
27699  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27700  # override all other locations.
27701  if test "x$TOOLCHAIN_PATH" != x; then
27702    PATH=$TOOLCHAIN_PATH:$PATH
27703  fi
27704
27705
27706  #
27707  # Setup the compilers (CC and CXX)
27708  #
27709
27710  COMPILER_NAME=C
27711  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27712
27713  if test "x$CC" != x; then
27714    # User has supplied compiler name already, always let that override.
27715    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27716$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27717    if test "x`basename $CC`" = "x$CC"; then
27718      # A command without a complete path is provided, search $PATH.
27719
27720      for ac_prog in $CC
27721do
27722  # Extract the first word of "$ac_prog", so it can be a program name with args.
27723set dummy $ac_prog; ac_word=$2
27724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27725$as_echo_n "checking for $ac_word... " >&6; }
27726if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27727  $as_echo_n "(cached) " >&6
27728else
27729  case $POTENTIAL_CC in
27730  [\\/]* | ?:[\\/]*)
27731  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27732  ;;
27733  *)
27734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27735for as_dir in $PATH
27736do
27737  IFS=$as_save_IFS
27738  test -z "$as_dir" && as_dir=.
27739    for ac_exec_ext in '' $ac_executable_extensions; do
27740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27741    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27743    break 2
27744  fi
27745done
27746  done
27747IFS=$as_save_IFS
27748
27749  ;;
27750esac
27751fi
27752POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27753if test -n "$POTENTIAL_CC"; then
27754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27755$as_echo "$POTENTIAL_CC" >&6; }
27756else
27757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27758$as_echo "no" >&6; }
27759fi
27760
27761
27762  test -n "$POTENTIAL_CC" && break
27763done
27764
27765      if test "x$POTENTIAL_CC" != x; then
27766        CC=$POTENTIAL_CC
27767      else
27768        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27769      fi
27770    else
27771      # Otherwise it might already be a complete path
27772      if test ! -x "$CC"; then
27773        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27774      fi
27775    fi
27776  else
27777    # No user supplied value. Locate compiler ourselves.
27778
27779    # If we are cross compiling, assume cross compilation tools follows the
27780    # cross compilation standard where they are prefixed with the autoconf
27781    # standard name for the target. For example the binary
27782    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27783    # If we are not cross compiling, then the default compiler name will be
27784    # used.
27785
27786    CC=
27787    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27788    # before checking the rest of the PATH.
27789    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27790    # step, this should not be necessary.
27791    if test -n "$TOOLCHAIN_PATH"; then
27792      PATH_save="$PATH"
27793      PATH="$TOOLCHAIN_PATH"
27794      for ac_prog in $SEARCH_LIST
27795do
27796  # Extract the first word of "$ac_prog", so it can be a program name with args.
27797set dummy $ac_prog; ac_word=$2
27798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27799$as_echo_n "checking for $ac_word... " >&6; }
27800if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27801  $as_echo_n "(cached) " >&6
27802else
27803  case $TOOLCHAIN_PATH_CC in
27804  [\\/]* | ?:[\\/]*)
27805  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27806  ;;
27807  *)
27808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27809for as_dir in $PATH
27810do
27811  IFS=$as_save_IFS
27812  test -z "$as_dir" && as_dir=.
27813    for ac_exec_ext in '' $ac_executable_extensions; do
27814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27815    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27817    break 2
27818  fi
27819done
27820  done
27821IFS=$as_save_IFS
27822
27823  ;;
27824esac
27825fi
27826TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27827if test -n "$TOOLCHAIN_PATH_CC"; then
27828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27829$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27830else
27831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27832$as_echo "no" >&6; }
27833fi
27834
27835
27836  test -n "$TOOLCHAIN_PATH_CC" && break
27837done
27838
27839      CC=$TOOLCHAIN_PATH_CC
27840      PATH="$PATH_save"
27841    fi
27842
27843    # AC_PATH_PROGS can't be run multiple times with the same variable,
27844    # so create a new name for this run.
27845    if test "x$CC" = x; then
27846      for ac_prog in $SEARCH_LIST
27847do
27848  # Extract the first word of "$ac_prog", so it can be a program name with args.
27849set dummy $ac_prog; ac_word=$2
27850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27851$as_echo_n "checking for $ac_word... " >&6; }
27852if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27853  $as_echo_n "(cached) " >&6
27854else
27855  case $POTENTIAL_CC in
27856  [\\/]* | ?:[\\/]*)
27857  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27858  ;;
27859  *)
27860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27861for as_dir in $PATH
27862do
27863  IFS=$as_save_IFS
27864  test -z "$as_dir" && as_dir=.
27865    for ac_exec_ext in '' $ac_executable_extensions; do
27866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27867    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27869    break 2
27870  fi
27871done
27872  done
27873IFS=$as_save_IFS
27874
27875  ;;
27876esac
27877fi
27878POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27879if test -n "$POTENTIAL_CC"; then
27880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27881$as_echo "$POTENTIAL_CC" >&6; }
27882else
27883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27884$as_echo "no" >&6; }
27885fi
27886
27887
27888  test -n "$POTENTIAL_CC" && break
27889done
27890
27891      CC=$POTENTIAL_CC
27892    fi
27893
27894    if test "x$CC" = x; then
27895
27896  # Print a helpful message on how to acquire the necessary build dependency.
27897  # devkit is the help tag: freetype, cups, pulse, alsa etc
27898  MISSING_DEPENDENCY=devkit
27899
27900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27901    cygwin_help $MISSING_DEPENDENCY
27902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27903    msys_help $MISSING_DEPENDENCY
27904  else
27905    PKGHANDLER_COMMAND=
27906
27907    case $PKGHANDLER in
27908      apt-get)
27909        apt_help     $MISSING_DEPENDENCY ;;
27910      yum)
27911        yum_help     $MISSING_DEPENDENCY ;;
27912      port)
27913        port_help    $MISSING_DEPENDENCY ;;
27914      pkgutil)
27915        pkgutil_help $MISSING_DEPENDENCY ;;
27916      pkgadd)
27917        pkgadd_help  $MISSING_DEPENDENCY ;;
27918    esac
27919
27920    if test "x$PKGHANDLER_COMMAND" != x; then
27921      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27922    fi
27923  fi
27924
27925      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27926    fi
27927  fi
27928
27929  # Now we have a compiler binary in CC. Make sure it's okay.
27930
27931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27932
27933  # First separate the path from the arguments. This will split at the first
27934  # space.
27935  complete="$CC"
27936  path="${complete%% *}"
27937  tmp="$complete EOL"
27938  arguments="${tmp#* }"
27939
27940  # Input might be given as Windows format, start by converting to
27941  # unix format.
27942  new_path=`$CYGPATH -u "$path"`
27943
27944  # Now try to locate executable using which
27945  new_path=`$WHICH "$new_path" 2> /dev/null`
27946  # bat and cmd files are not always considered executable in cygwin causing which
27947  # to not find them
27948  if test "x$new_path" = x \
27949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27951    new_path=`$CYGPATH -u "$path"`
27952  fi
27953  if test "x$new_path" = x; then
27954    # Oops. Which didn't find the executable.
27955    # The splitting of arguments from the executable at a space might have been incorrect,
27956    # since paths with space are more likely in Windows. Give it another try with the whole
27957    # argument.
27958    path="$complete"
27959    arguments="EOL"
27960    new_path=`$CYGPATH -u "$path"`
27961    new_path=`$WHICH "$new_path" 2> /dev/null`
27962    # bat and cmd files are not always considered executable in cygwin causing which
27963    # to not find them
27964    if test "x$new_path" = x \
27965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27967      new_path=`$CYGPATH -u "$path"`
27968    fi
27969    if test "x$new_path" = x; then
27970      # It's still not found. Now this is an unrecoverable error.
27971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27972$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27973      has_space=`$ECHO "$complete" | $GREP " "`
27974      if test "x$has_space" != x; then
27975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27977      fi
27978      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27979    fi
27980  fi
27981
27982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27985  # "foo.exe" is OK but "foo" is an error.
27986  #
27987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27988  # It is also a way to make sure we got the proper file name for the real test later on.
27989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27990  if test "x$test_shortpath" = x; then
27991    # Short path failed, file does not exist as specified.
27992    # Try adding .exe or .cmd
27993    if test -f "${new_path}.exe"; then
27994      input_to_shortpath="${new_path}.exe"
27995    elif test -f "${new_path}.cmd"; then
27996      input_to_shortpath="${new_path}.cmd"
27997    else
27998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27999$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28002      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28003    fi
28004  else
28005    input_to_shortpath="$new_path"
28006  fi
28007
28008  # Call helper function which possibly converts this using DOS-style short mode.
28009  # If so, the updated path is stored in $new_path.
28010  new_path="$input_to_shortpath"
28011
28012  input_path="$input_to_shortpath"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28023      # Going to short mode and back again did indeed matter. Since short mode is
28024      # case insensitive, let's make it lowercase to improve readability.
28025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28026      # Now convert it back to Unix-stile (cygpath)
28027      input_path=`$CYGPATH -u "$shortmode_path"`
28028      new_path="$input_path"
28029    fi
28030  fi
28031
28032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28033  if test "x$test_cygdrive_prefix" = x; then
28034    # As a simple fix, exclude /usr/bin since it's not a real path.
28035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28037      # a path prefixed by /cygdrive for fixpath to work.
28038      new_path="$CYGWIN_ROOT_PATH$input_path"
28039    fi
28040  fi
28041
28042  # remove trailing .exe if any
28043  new_path="${new_path/%.exe/}"
28044
28045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28046
28047  # First separate the path from the arguments. This will split at the first
28048  # space.
28049  complete="$CC"
28050  path="${complete%% *}"
28051  tmp="$complete EOL"
28052  arguments="${tmp#* }"
28053
28054  # Input might be given as Windows format, start by converting to
28055  # unix format.
28056  new_path="$path"
28057
28058  windows_path="$new_path"
28059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28060    unix_path=`$CYGPATH -u "$windows_path"`
28061    new_path="$unix_path"
28062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28064    new_path="$unix_path"
28065  fi
28066
28067
28068  # Now try to locate executable using which
28069  new_path=`$WHICH "$new_path" 2> /dev/null`
28070
28071  if test "x$new_path" = x; then
28072    # Oops. Which didn't find the executable.
28073    # The splitting of arguments from the executable at a space might have been incorrect,
28074    # since paths with space are more likely in Windows. Give it another try with the whole
28075    # argument.
28076    path="$complete"
28077    arguments="EOL"
28078    new_path="$path"
28079
28080  windows_path="$new_path"
28081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28082    unix_path=`$CYGPATH -u "$windows_path"`
28083    new_path="$unix_path"
28084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28086    new_path="$unix_path"
28087  fi
28088
28089
28090    new_path=`$WHICH "$new_path" 2> /dev/null`
28091
28092    if test "x$new_path" = x; then
28093      # It's still not found. Now this is an unrecoverable error.
28094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28095$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28096      has_space=`$ECHO "$complete" | $GREP " "`
28097      if test "x$has_space" != x; then
28098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28100      fi
28101      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28102    fi
28103  fi
28104
28105  # Now new_path has a complete unix path to the binary
28106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28107    # Keep paths in /bin as-is, but remove trailing .exe if any
28108    new_path="${new_path/%.exe/}"
28109    # Do not save /bin paths to all_fixpath_prefixes!
28110  else
28111    # Not in mixed or Windows style, start by that.
28112    new_path=`cmd //c echo $new_path`
28113
28114  input_path="$new_path"
28115  # Check if we need to convert this using DOS-style short mode. If the path
28116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28117  # take no chances and rewrite it.
28118  # Note: m4 eats our [], so we need to use [ and ] instead.
28119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28120  if test "x$has_forbidden_chars" != x; then
28121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28123  fi
28124
28125    # Output is in $new_path
28126
28127  windows_path="$new_path"
28128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28129    unix_path=`$CYGPATH -u "$windows_path"`
28130    new_path="$unix_path"
28131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28133    new_path="$unix_path"
28134  fi
28135
28136    # remove trailing .exe if any
28137    new_path="${new_path/%.exe/}"
28138
28139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28141  fi
28142
28143  else
28144    # We're on a posix platform. Hooray! :)
28145    # First separate the path from the arguments. This will split at the first
28146    # space.
28147    complete="$CC"
28148    path="${complete%% *}"
28149    tmp="$complete EOL"
28150    arguments="${tmp#* }"
28151
28152    # Cannot rely on the command "which" here since it doesn't always work.
28153    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28154    if test -z "$is_absolute_path"; then
28155      # Path to executable is not absolute. Find it.
28156      IFS_save="$IFS"
28157      IFS=:
28158      for p in $PATH; do
28159        if test -f "$p/$path" && test -x "$p/$path"; then
28160          new_path="$p/$path"
28161          break
28162        fi
28163      done
28164      IFS="$IFS_save"
28165    else
28166      # This is an absolute path, we can use it without further modifications.
28167      new_path="$path"
28168    fi
28169
28170    if test "x$new_path" = x; then
28171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28172$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28173      has_space=`$ECHO "$complete" | $GREP " "`
28174      if test "x$has_space" != x; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28177      fi
28178      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28179    fi
28180  fi
28181
28182  # Now join together the path and the arguments once again
28183  if test "x$arguments" != xEOL; then
28184    new_complete="$new_path ${arguments% *}"
28185  else
28186    new_complete="$new_path"
28187  fi
28188
28189  if test "x$complete" != "x$new_complete"; then
28190    CC="$new_complete"
28191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28192$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28193  fi
28194
28195  TEST_COMPILER="$CC"
28196  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28197  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28198  if test "x$OPENJDK_BUILD_OS" != xaix; then
28199    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28201$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28202
28203  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28204    # Follow a chain of symbolic links. Use readlink
28205    # where it exists, else fall back to horribly
28206    # complicated shell code.
28207    if test "x$READLINK_TESTED" != yes; then
28208      # On MacOSX there is a readlink tool with a different
28209      # purpose than the GNU readlink tool. Check the found readlink.
28210      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28211      if test "x$ISGNU" = x; then
28212        # A readlink that we do not know how to use.
28213        # Are there other non-GNU readlinks out there?
28214        READLINK_TESTED=yes
28215        READLINK=
28216      fi
28217    fi
28218
28219    if test "x$READLINK" != x; then
28220      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28221    else
28222      # Save the current directory for restoring afterwards
28223      STARTDIR=$PWD
28224      COUNTER=0
28225      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28226      sym_link_file=`$BASENAME $TEST_COMPILER`
28227      cd $sym_link_dir
28228      # Use -P flag to resolve symlinks in directories.
28229      cd `$THEPWDCMD -P`
28230      sym_link_dir=`$THEPWDCMD -P`
28231      # Resolve file symlinks
28232      while test $COUNTER -lt 20; do
28233        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28234        if test "x$ISLINK" == x; then
28235          # This is not a symbolic link! We are done!
28236          break
28237        fi
28238        # Again resolve directory symlinks since the target of the just found
28239        # link could be in a different directory
28240        cd `$DIRNAME $ISLINK`
28241        sym_link_dir=`$THEPWDCMD -P`
28242        sym_link_file=`$BASENAME $ISLINK`
28243        let COUNTER=COUNTER+1
28244      done
28245      cd $STARTDIR
28246      TEST_COMPILER=$sym_link_dir/$sym_link_file
28247    fi
28248  fi
28249
28250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28251$as_echo "$TEST_COMPILER" >&6; }
28252  fi
28253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28254$as_echo_n "checking if CC is disguised ccache... " >&6; }
28255
28256  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28257  if test "x$COMPILER_BASENAME" = "xccache"; then
28258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28259$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28260    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28261    # We want to control ccache invocation ourselves, so ignore this cc and try
28262    # searching again.
28263
28264    # Remove the path to the fake ccache cc from the PATH
28265    RETRY_COMPILER_SAVED_PATH="$PATH"
28266    COMPILER_DIRNAME=`$DIRNAME $CC`
28267    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28268
28269    # Try again looking for our compiler
28270    if test -n "$ac_tool_prefix"; then
28271  for ac_prog in $TOOLCHAIN_CC_BINARY
28272  do
28273    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28274set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28276$as_echo_n "checking for $ac_word... " >&6; }
28277if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28278  $as_echo_n "(cached) " >&6
28279else
28280  if test -n "$PROPER_COMPILER_CC"; then
28281  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28282else
28283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28284for as_dir in $PATH
28285do
28286  IFS=$as_save_IFS
28287  test -z "$as_dir" && as_dir=.
28288    for ac_exec_ext in '' $ac_executable_extensions; do
28289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28290    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28292    break 2
28293  fi
28294done
28295  done
28296IFS=$as_save_IFS
28297
28298fi
28299fi
28300PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28301if test -n "$PROPER_COMPILER_CC"; then
28302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28303$as_echo "$PROPER_COMPILER_CC" >&6; }
28304else
28305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28306$as_echo "no" >&6; }
28307fi
28308
28309
28310    test -n "$PROPER_COMPILER_CC" && break
28311  done
28312fi
28313if test -z "$PROPER_COMPILER_CC"; then
28314  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28315  for ac_prog in $TOOLCHAIN_CC_BINARY
28316do
28317  # Extract the first word of "$ac_prog", so it can be a program name with args.
28318set dummy $ac_prog; ac_word=$2
28319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28320$as_echo_n "checking for $ac_word... " >&6; }
28321if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28322  $as_echo_n "(cached) " >&6
28323else
28324  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28325  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28326else
28327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28328for as_dir in $PATH
28329do
28330  IFS=$as_save_IFS
28331  test -z "$as_dir" && as_dir=.
28332    for ac_exec_ext in '' $ac_executable_extensions; do
28333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28334    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28336    break 2
28337  fi
28338done
28339  done
28340IFS=$as_save_IFS
28341
28342fi
28343fi
28344ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28345if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28347$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28348else
28349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28350$as_echo "no" >&6; }
28351fi
28352
28353
28354  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28355done
28356
28357  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28358    PROPER_COMPILER_CC=""
28359  else
28360    case $cross_compiling:$ac_tool_warned in
28361yes:)
28362{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28363$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28364ac_tool_warned=yes ;;
28365esac
28366    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28367  fi
28368fi
28369
28370
28371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28372
28373  # First separate the path from the arguments. This will split at the first
28374  # space.
28375  complete="$PROPER_COMPILER_CC"
28376  path="${complete%% *}"
28377  tmp="$complete EOL"
28378  arguments="${tmp#* }"
28379
28380  # Input might be given as Windows format, start by converting to
28381  # unix format.
28382  new_path=`$CYGPATH -u "$path"`
28383
28384  # Now try to locate executable using which
28385  new_path=`$WHICH "$new_path" 2> /dev/null`
28386  # bat and cmd files are not always considered executable in cygwin causing which
28387  # to not find them
28388  if test "x$new_path" = x \
28389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28391    new_path=`$CYGPATH -u "$path"`
28392  fi
28393  if test "x$new_path" = x; then
28394    # Oops. Which didn't find the executable.
28395    # The splitting of arguments from the executable at a space might have been incorrect,
28396    # since paths with space are more likely in Windows. Give it another try with the whole
28397    # argument.
28398    path="$complete"
28399    arguments="EOL"
28400    new_path=`$CYGPATH -u "$path"`
28401    new_path=`$WHICH "$new_path" 2> /dev/null`
28402    # bat and cmd files are not always considered executable in cygwin causing which
28403    # to not find them
28404    if test "x$new_path" = x \
28405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28407      new_path=`$CYGPATH -u "$path"`
28408    fi
28409    if test "x$new_path" = x; then
28410      # It's still not found. Now this is an unrecoverable error.
28411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28412$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28413      has_space=`$ECHO "$complete" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28417      fi
28418      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28419    fi
28420  fi
28421
28422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28425  # "foo.exe" is OK but "foo" is an error.
28426  #
28427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28428  # It is also a way to make sure we got the proper file name for the real test later on.
28429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28430  if test "x$test_shortpath" = x; then
28431    # Short path failed, file does not exist as specified.
28432    # Try adding .exe or .cmd
28433    if test -f "${new_path}.exe"; then
28434      input_to_shortpath="${new_path}.exe"
28435    elif test -f "${new_path}.cmd"; then
28436      input_to_shortpath="${new_path}.cmd"
28437    else
28438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28439$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28442      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28443    fi
28444  else
28445    input_to_shortpath="$new_path"
28446  fi
28447
28448  # Call helper function which possibly converts this using DOS-style short mode.
28449  # If so, the updated path is stored in $new_path.
28450  new_path="$input_to_shortpath"
28451
28452  input_path="$input_to_shortpath"
28453  # Check if we need to convert this using DOS-style short mode. If the path
28454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28455  # take no chances and rewrite it.
28456  # Note: m4 eats our [], so we need to use [ and ] instead.
28457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28458  if test "x$has_forbidden_chars" != x; then
28459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28463      # Going to short mode and back again did indeed matter. Since short mode is
28464      # case insensitive, let's make it lowercase to improve readability.
28465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28466      # Now convert it back to Unix-stile (cygpath)
28467      input_path=`$CYGPATH -u "$shortmode_path"`
28468      new_path="$input_path"
28469    fi
28470  fi
28471
28472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28473  if test "x$test_cygdrive_prefix" = x; then
28474    # As a simple fix, exclude /usr/bin since it's not a real path.
28475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28477      # a path prefixed by /cygdrive for fixpath to work.
28478      new_path="$CYGWIN_ROOT_PATH$input_path"
28479    fi
28480  fi
28481
28482  # remove trailing .exe if any
28483  new_path="${new_path/%.exe/}"
28484
28485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28486
28487  # First separate the path from the arguments. This will split at the first
28488  # space.
28489  complete="$PROPER_COMPILER_CC"
28490  path="${complete%% *}"
28491  tmp="$complete EOL"
28492  arguments="${tmp#* }"
28493
28494  # Input might be given as Windows format, start by converting to
28495  # unix format.
28496  new_path="$path"
28497
28498  windows_path="$new_path"
28499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28500    unix_path=`$CYGPATH -u "$windows_path"`
28501    new_path="$unix_path"
28502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28504    new_path="$unix_path"
28505  fi
28506
28507
28508  # Now try to locate executable using which
28509  new_path=`$WHICH "$new_path" 2> /dev/null`
28510
28511  if test "x$new_path" = x; then
28512    # Oops. Which didn't find the executable.
28513    # The splitting of arguments from the executable at a space might have been incorrect,
28514    # since paths with space are more likely in Windows. Give it another try with the whole
28515    # argument.
28516    path="$complete"
28517    arguments="EOL"
28518    new_path="$path"
28519
28520  windows_path="$new_path"
28521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28522    unix_path=`$CYGPATH -u "$windows_path"`
28523    new_path="$unix_path"
28524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28526    new_path="$unix_path"
28527  fi
28528
28529
28530    new_path=`$WHICH "$new_path" 2> /dev/null`
28531
28532    if test "x$new_path" = x; then
28533      # It's still not found. Now this is an unrecoverable error.
28534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28535$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28536      has_space=`$ECHO "$complete" | $GREP " "`
28537      if test "x$has_space" != x; then
28538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28540      fi
28541      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28542    fi
28543  fi
28544
28545  # Now new_path has a complete unix path to the binary
28546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28547    # Keep paths in /bin as-is, but remove trailing .exe if any
28548    new_path="${new_path/%.exe/}"
28549    # Do not save /bin paths to all_fixpath_prefixes!
28550  else
28551    # Not in mixed or Windows style, start by that.
28552    new_path=`cmd //c echo $new_path`
28553
28554  input_path="$new_path"
28555  # Check if we need to convert this using DOS-style short mode. If the path
28556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28557  # take no chances and rewrite it.
28558  # Note: m4 eats our [], so we need to use [ and ] instead.
28559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28560  if test "x$has_forbidden_chars" != x; then
28561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28563  fi
28564
28565    # Output is in $new_path
28566
28567  windows_path="$new_path"
28568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28569    unix_path=`$CYGPATH -u "$windows_path"`
28570    new_path="$unix_path"
28571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28573    new_path="$unix_path"
28574  fi
28575
28576    # remove trailing .exe if any
28577    new_path="${new_path/%.exe/}"
28578
28579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28581  fi
28582
28583  else
28584    # We're on a posix platform. Hooray! :)
28585    # First separate the path from the arguments. This will split at the first
28586    # space.
28587    complete="$PROPER_COMPILER_CC"
28588    path="${complete%% *}"
28589    tmp="$complete EOL"
28590    arguments="${tmp#* }"
28591
28592    # Cannot rely on the command "which" here since it doesn't always work.
28593    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28594    if test -z "$is_absolute_path"; then
28595      # Path to executable is not absolute. Find it.
28596      IFS_save="$IFS"
28597      IFS=:
28598      for p in $PATH; do
28599        if test -f "$p/$path" && test -x "$p/$path"; then
28600          new_path="$p/$path"
28601          break
28602        fi
28603      done
28604      IFS="$IFS_save"
28605    else
28606      # This is an absolute path, we can use it without further modifications.
28607      new_path="$path"
28608    fi
28609
28610    if test "x$new_path" = x; then
28611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28612$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28613      has_space=`$ECHO "$complete" | $GREP " "`
28614      if test "x$has_space" != x; then
28615        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28617      fi
28618      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28619    fi
28620  fi
28621
28622  # Now join together the path and the arguments once again
28623  if test "x$arguments" != xEOL; then
28624    new_complete="$new_path ${arguments% *}"
28625  else
28626    new_complete="$new_path"
28627  fi
28628
28629  if test "x$complete" != "x$new_complete"; then
28630    PROPER_COMPILER_CC="$new_complete"
28631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28632$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28633  fi
28634
28635    PATH="$RETRY_COMPILER_SAVED_PATH"
28636
28637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28638$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28639
28640  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28641    # Follow a chain of symbolic links. Use readlink
28642    # where it exists, else fall back to horribly
28643    # complicated shell code.
28644    if test "x$READLINK_TESTED" != yes; then
28645      # On MacOSX there is a readlink tool with a different
28646      # purpose than the GNU readlink tool. Check the found readlink.
28647      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28648      if test "x$ISGNU" = x; then
28649        # A readlink that we do not know how to use.
28650        # Are there other non-GNU readlinks out there?
28651        READLINK_TESTED=yes
28652        READLINK=
28653      fi
28654    fi
28655
28656    if test "x$READLINK" != x; then
28657      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28658    else
28659      # Save the current directory for restoring afterwards
28660      STARTDIR=$PWD
28661      COUNTER=0
28662      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28663      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28664      cd $sym_link_dir
28665      # Use -P flag to resolve symlinks in directories.
28666      cd `$THEPWDCMD -P`
28667      sym_link_dir=`$THEPWDCMD -P`
28668      # Resolve file symlinks
28669      while test $COUNTER -lt 20; do
28670        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28671        if test "x$ISLINK" == x; then
28672          # This is not a symbolic link! We are done!
28673          break
28674        fi
28675        # Again resolve directory symlinks since the target of the just found
28676        # link could be in a different directory
28677        cd `$DIRNAME $ISLINK`
28678        sym_link_dir=`$THEPWDCMD -P`
28679        sym_link_file=`$BASENAME $ISLINK`
28680        let COUNTER=COUNTER+1
28681      done
28682      cd $STARTDIR
28683      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28684    fi
28685  fi
28686
28687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28688$as_echo "$PROPER_COMPILER_CC" >&6; }
28689    CC="$PROPER_COMPILER_CC"
28690  else
28691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28692$as_echo "no, keeping CC" >&6; }
28693  fi
28694
28695
28696  COMPILER=$CC
28697  COMPILER_NAME=$COMPILER_NAME
28698
28699  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28700    # cc -V output typically looks like
28701    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28702    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28703    # Check that this is likely to be the Solaris Studio cc.
28704    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28705    if test $? -ne 0; then
28706      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28707      { $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
28708$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28709      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28710$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28711      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28712$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28713      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28714    fi
28715    # Remove usage instructions (if present), and
28716    # collapse compiler output into a single line
28717    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28718        $SED -e 's/ *[Uu]sage:.*//'`
28719    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28720        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28721  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28722    # xlc -qversion output typically looks like
28723    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28724    #     Version: 11.01.0000.0015
28725    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28726    # Check that this is likely to be the IBM XL C compiler.
28727    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28728    if test $? -ne 0; then
28729      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28730      { $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
28731$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28732      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28733$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28734      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28735$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28736      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28737    fi
28738    # Collapse compiler output into a single line
28739    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28740    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28741        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28742  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28743    # There is no specific version flag, but all output starts with a version string.
28744    # First line typically looks something like:
28745    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28746    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28747    # Check that this is likely to be Microsoft CL.EXE.
28748    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28749    if test $? -ne 0; then
28750      { $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
28751$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28752      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28753$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28754      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28755    fi
28756    # Collapse compiler output into a single line
28757    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28758    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28759        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28760  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28761    # gcc --version output typically looks like
28762    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28763    #     Copyright (C) 2013 Free Software Foundation, Inc.
28764    #     This is free software; see the source for copying conditions.  There is NO
28765    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28766    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28767    # Check that this is likely to be GCC.
28768    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28769    if test $? -ne 0; then
28770      { $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
28771$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28772      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28773$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28774      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28775    fi
28776    # Remove Copyright and legalese from version string, and
28777    # collapse into a single line
28778    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28779        $SED -e 's/ *Copyright .*//'`
28780    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28781        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28782  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28783    # clang --version output typically looks like
28784    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28785    #    clang version 3.3 (tags/RELEASE_33/final)
28786    # or
28787    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28788    #    Target: x86_64-pc-linux-gnu
28789    #    Thread model: posix
28790    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28791    # Check that this is likely to be clang
28792    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28793    if test $? -ne 0; then
28794      { $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
28795$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28796      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28797$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28798      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28799    fi
28800    # Collapse compiler output into a single line
28801    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28802    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28803        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28804  else
28805      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28806  fi
28807  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28808  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28809  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28810  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28811
28812  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28813$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28814
28815
28816  # Now that we have resolved CC ourself, let autoconf have its go at it
28817  ac_ext=c
28818ac_cpp='$CPP $CPPFLAGS'
28819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28821ac_compiler_gnu=$ac_cv_c_compiler_gnu
28822if test -n "$ac_tool_prefix"; then
28823  for ac_prog in $CC
28824  do
28825    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28826set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28828$as_echo_n "checking for $ac_word... " >&6; }
28829if ${ac_cv_prog_CC+:} false; then :
28830  $as_echo_n "(cached) " >&6
28831else
28832  if test -n "$CC"; then
28833  ac_cv_prog_CC="$CC" # Let the user override the test.
28834else
28835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28836for as_dir in $PATH
28837do
28838  IFS=$as_save_IFS
28839  test -z "$as_dir" && as_dir=.
28840    for ac_exec_ext in '' $ac_executable_extensions; do
28841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28842    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28844    break 2
28845  fi
28846done
28847  done
28848IFS=$as_save_IFS
28849
28850fi
28851fi
28852CC=$ac_cv_prog_CC
28853if test -n "$CC"; then
28854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28855$as_echo "$CC" >&6; }
28856else
28857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28858$as_echo "no" >&6; }
28859fi
28860
28861
28862    test -n "$CC" && break
28863  done
28864fi
28865if test -z "$CC"; then
28866  ac_ct_CC=$CC
28867  for ac_prog in $CC
28868do
28869  # Extract the first word of "$ac_prog", so it can be a program name with args.
28870set dummy $ac_prog; ac_word=$2
28871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28872$as_echo_n "checking for $ac_word... " >&6; }
28873if ${ac_cv_prog_ac_ct_CC+:} false; then :
28874  $as_echo_n "(cached) " >&6
28875else
28876  if test -n "$ac_ct_CC"; then
28877  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28878else
28879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28880for as_dir in $PATH
28881do
28882  IFS=$as_save_IFS
28883  test -z "$as_dir" && as_dir=.
28884    for ac_exec_ext in '' $ac_executable_extensions; do
28885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28886    ac_cv_prog_ac_ct_CC="$ac_prog"
28887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28888    break 2
28889  fi
28890done
28891  done
28892IFS=$as_save_IFS
28893
28894fi
28895fi
28896ac_ct_CC=$ac_cv_prog_ac_ct_CC
28897if test -n "$ac_ct_CC"; then
28898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28899$as_echo "$ac_ct_CC" >&6; }
28900else
28901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28902$as_echo "no" >&6; }
28903fi
28904
28905
28906  test -n "$ac_ct_CC" && break
28907done
28908
28909  if test "x$ac_ct_CC" = x; then
28910    CC=""
28911  else
28912    case $cross_compiling:$ac_tool_warned in
28913yes:)
28914{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28915$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28916ac_tool_warned=yes ;;
28917esac
28918    CC=$ac_ct_CC
28919  fi
28920fi
28921
28922
28923test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28925as_fn_error $? "no acceptable C compiler found in \$PATH
28926See \`config.log' for more details" "$LINENO" 5; }
28927
28928# Provide some information about the compiler.
28929$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28930set X $ac_compile
28931ac_compiler=$2
28932for ac_option in --version -v -V -qversion; do
28933  { { ac_try="$ac_compiler $ac_option >&5"
28934case "(($ac_try" in
28935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28936  *) ac_try_echo=$ac_try;;
28937esac
28938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28939$as_echo "$ac_try_echo"; } >&5
28940  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28941  ac_status=$?
28942  if test -s conftest.err; then
28943    sed '10a\
28944... rest of stderr output deleted ...
28945         10q' conftest.err >conftest.er1
28946    cat conftest.er1 >&5
28947  fi
28948  rm -f conftest.er1 conftest.err
28949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28950  test $ac_status = 0; }
28951done
28952
28953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28954/* end confdefs.h.  */
28955
28956int
28957main ()
28958{
28959
28960  ;
28961  return 0;
28962}
28963_ACEOF
28964ac_clean_files_save=$ac_clean_files
28965ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28966# Try to create an executable without -o first, disregard a.out.
28967# It will help us diagnose broken compilers, and finding out an intuition
28968# of exeext.
28969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28970$as_echo_n "checking whether the C compiler works... " >&6; }
28971ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28972
28973# The possible output files:
28974ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28975
28976ac_rmfiles=
28977for ac_file in $ac_files
28978do
28979  case $ac_file in
28980    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28981    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28982  esac
28983done
28984rm -f $ac_rmfiles
28985
28986if { { ac_try="$ac_link_default"
28987case "(($ac_try" in
28988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28989  *) ac_try_echo=$ac_try;;
28990esac
28991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28992$as_echo "$ac_try_echo"; } >&5
28993  (eval "$ac_link_default") 2>&5
28994  ac_status=$?
28995  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28996  test $ac_status = 0; }; then :
28997  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28998# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28999# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29000# so that the user can short-circuit this test for compilers unknown to
29001# Autoconf.
29002for ac_file in $ac_files ''
29003do
29004  test -f "$ac_file" || continue
29005  case $ac_file in
29006    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29007	;;
29008    [ab].out )
29009	# We found the default executable, but exeext='' is most
29010	# certainly right.
29011	break;;
29012    *.* )
29013	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29014	then :; else
29015	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29016	fi
29017	# We set ac_cv_exeext here because the later test for it is not
29018	# safe: cross compilers may not add the suffix if given an `-o'
29019	# argument, so we may need to know it at that point already.
29020	# Even if this section looks crufty: it has the advantage of
29021	# actually working.
29022	break;;
29023    * )
29024	break;;
29025  esac
29026done
29027test "$ac_cv_exeext" = no && ac_cv_exeext=
29028
29029else
29030  ac_file=''
29031fi
29032if test -z "$ac_file"; then :
29033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29034$as_echo "no" >&6; }
29035$as_echo "$as_me: failed program was:" >&5
29036sed 's/^/| /' conftest.$ac_ext >&5
29037
29038{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29040as_fn_error 77 "C compiler cannot create executables
29041See \`config.log' for more details" "$LINENO" 5; }
29042else
29043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29044$as_echo "yes" >&6; }
29045fi
29046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29047$as_echo_n "checking for C compiler default output file name... " >&6; }
29048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29049$as_echo "$ac_file" >&6; }
29050ac_exeext=$ac_cv_exeext
29051
29052rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29053ac_clean_files=$ac_clean_files_save
29054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29055$as_echo_n "checking for suffix of executables... " >&6; }
29056if { { ac_try="$ac_link"
29057case "(($ac_try" in
29058  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29059  *) ac_try_echo=$ac_try;;
29060esac
29061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29062$as_echo "$ac_try_echo"; } >&5
29063  (eval "$ac_link") 2>&5
29064  ac_status=$?
29065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29066  test $ac_status = 0; }; then :
29067  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29068# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29069# work properly (i.e., refer to `conftest.exe'), while it won't with
29070# `rm'.
29071for ac_file in conftest.exe conftest conftest.*; do
29072  test -f "$ac_file" || continue
29073  case $ac_file in
29074    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29075    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29076	  break;;
29077    * ) break;;
29078  esac
29079done
29080else
29081  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29083as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29084See \`config.log' for more details" "$LINENO" 5; }
29085fi
29086rm -f conftest conftest$ac_cv_exeext
29087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29088$as_echo "$ac_cv_exeext" >&6; }
29089
29090rm -f conftest.$ac_ext
29091EXEEXT=$ac_cv_exeext
29092ac_exeext=$EXEEXT
29093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29094/* end confdefs.h.  */
29095#include <stdio.h>
29096int
29097main ()
29098{
29099FILE *f = fopen ("conftest.out", "w");
29100 return ferror (f) || fclose (f) != 0;
29101
29102  ;
29103  return 0;
29104}
29105_ACEOF
29106ac_clean_files="$ac_clean_files conftest.out"
29107# Check that the compiler produces executables we can run.  If not, either
29108# the compiler is broken, or we cross compile.
29109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29110$as_echo_n "checking whether we are cross compiling... " >&6; }
29111if test "$cross_compiling" != yes; then
29112  { { ac_try="$ac_link"
29113case "(($ac_try" in
29114  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29115  *) ac_try_echo=$ac_try;;
29116esac
29117eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29118$as_echo "$ac_try_echo"; } >&5
29119  (eval "$ac_link") 2>&5
29120  ac_status=$?
29121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29122  test $ac_status = 0; }
29123  if { ac_try='./conftest$ac_cv_exeext'
29124  { { case "(($ac_try" in
29125  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29126  *) ac_try_echo=$ac_try;;
29127esac
29128eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29129$as_echo "$ac_try_echo"; } >&5
29130  (eval "$ac_try") 2>&5
29131  ac_status=$?
29132  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29133  test $ac_status = 0; }; }; then
29134    cross_compiling=no
29135  else
29136    if test "$cross_compiling" = maybe; then
29137	cross_compiling=yes
29138    else
29139	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29141as_fn_error $? "cannot run C compiled programs.
29142If you meant to cross compile, use \`--host'.
29143See \`config.log' for more details" "$LINENO" 5; }
29144    fi
29145  fi
29146fi
29147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29148$as_echo "$cross_compiling" >&6; }
29149
29150rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29151ac_clean_files=$ac_clean_files_save
29152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29153$as_echo_n "checking for suffix of object files... " >&6; }
29154if ${ac_cv_objext+:} false; then :
29155  $as_echo_n "(cached) " >&6
29156else
29157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29158/* end confdefs.h.  */
29159
29160int
29161main ()
29162{
29163
29164  ;
29165  return 0;
29166}
29167_ACEOF
29168rm -f conftest.o conftest.obj
29169if { { ac_try="$ac_compile"
29170case "(($ac_try" in
29171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29172  *) ac_try_echo=$ac_try;;
29173esac
29174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29175$as_echo "$ac_try_echo"; } >&5
29176  (eval "$ac_compile") 2>&5
29177  ac_status=$?
29178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29179  test $ac_status = 0; }; then :
29180  for ac_file in conftest.o conftest.obj conftest.*; do
29181  test -f "$ac_file" || continue;
29182  case $ac_file in
29183    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29184    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29185       break;;
29186  esac
29187done
29188else
29189  $as_echo "$as_me: failed program was:" >&5
29190sed 's/^/| /' conftest.$ac_ext >&5
29191
29192{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29194as_fn_error $? "cannot compute suffix of object files: cannot compile
29195See \`config.log' for more details" "$LINENO" 5; }
29196fi
29197rm -f conftest.$ac_cv_objext conftest.$ac_ext
29198fi
29199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29200$as_echo "$ac_cv_objext" >&6; }
29201OBJEXT=$ac_cv_objext
29202ac_objext=$OBJEXT
29203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29204$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29205if ${ac_cv_c_compiler_gnu+:} false; then :
29206  $as_echo_n "(cached) " >&6
29207else
29208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29209/* end confdefs.h.  */
29210
29211int
29212main ()
29213{
29214#ifndef __GNUC__
29215       choke me
29216#endif
29217
29218  ;
29219  return 0;
29220}
29221_ACEOF
29222if ac_fn_c_try_compile "$LINENO"; then :
29223  ac_compiler_gnu=yes
29224else
29225  ac_compiler_gnu=no
29226fi
29227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29228ac_cv_c_compiler_gnu=$ac_compiler_gnu
29229
29230fi
29231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29232$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29233if test $ac_compiler_gnu = yes; then
29234  GCC=yes
29235else
29236  GCC=
29237fi
29238ac_test_CFLAGS=${CFLAGS+set}
29239ac_save_CFLAGS=$CFLAGS
29240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29241$as_echo_n "checking whether $CC accepts -g... " >&6; }
29242if ${ac_cv_prog_cc_g+:} false; then :
29243  $as_echo_n "(cached) " >&6
29244else
29245  ac_save_c_werror_flag=$ac_c_werror_flag
29246   ac_c_werror_flag=yes
29247   ac_cv_prog_cc_g=no
29248   CFLAGS="-g"
29249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29250/* end confdefs.h.  */
29251
29252int
29253main ()
29254{
29255
29256  ;
29257  return 0;
29258}
29259_ACEOF
29260if ac_fn_c_try_compile "$LINENO"; then :
29261  ac_cv_prog_cc_g=yes
29262else
29263  CFLAGS=""
29264      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29265/* end confdefs.h.  */
29266
29267int
29268main ()
29269{
29270
29271  ;
29272  return 0;
29273}
29274_ACEOF
29275if ac_fn_c_try_compile "$LINENO"; then :
29276
29277else
29278  ac_c_werror_flag=$ac_save_c_werror_flag
29279	 CFLAGS="-g"
29280	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29281/* end confdefs.h.  */
29282
29283int
29284main ()
29285{
29286
29287  ;
29288  return 0;
29289}
29290_ACEOF
29291if ac_fn_c_try_compile "$LINENO"; then :
29292  ac_cv_prog_cc_g=yes
29293fi
29294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29295fi
29296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29297fi
29298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29299   ac_c_werror_flag=$ac_save_c_werror_flag
29300fi
29301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29302$as_echo "$ac_cv_prog_cc_g" >&6; }
29303if test "$ac_test_CFLAGS" = set; then
29304  CFLAGS=$ac_save_CFLAGS
29305elif test $ac_cv_prog_cc_g = yes; then
29306  if test "$GCC" = yes; then
29307    CFLAGS="-g -O2"
29308  else
29309    CFLAGS="-g"
29310  fi
29311else
29312  if test "$GCC" = yes; then
29313    CFLAGS="-O2"
29314  else
29315    CFLAGS=
29316  fi
29317fi
29318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29319$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29320if ${ac_cv_prog_cc_c89+:} false; then :
29321  $as_echo_n "(cached) " >&6
29322else
29323  ac_cv_prog_cc_c89=no
29324ac_save_CC=$CC
29325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29326/* end confdefs.h.  */
29327#include <stdarg.h>
29328#include <stdio.h>
29329struct stat;
29330/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29331struct buf { int x; };
29332FILE * (*rcsopen) (struct buf *, struct stat *, int);
29333static char *e (p, i)
29334     char **p;
29335     int i;
29336{
29337  return p[i];
29338}
29339static char *f (char * (*g) (char **, int), char **p, ...)
29340{
29341  char *s;
29342  va_list v;
29343  va_start (v,p);
29344  s = g (p, va_arg (v,int));
29345  va_end (v);
29346  return s;
29347}
29348
29349/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29350   function prototypes and stuff, but not '\xHH' hex character constants.
29351   These don't provoke an error unfortunately, instead are silently treated
29352   as 'x'.  The following induces an error, until -std is added to get
29353   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29354   array size at least.  It's necessary to write '\x00'==0 to get something
29355   that's true only with -std.  */
29356int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29357
29358/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29359   inside strings and character constants.  */
29360#define FOO(x) 'x'
29361int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29362
29363int test (int i, double x);
29364struct s1 {int (*f) (int a);};
29365struct s2 {int (*f) (double a);};
29366int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29367int argc;
29368char **argv;
29369int
29370main ()
29371{
29372return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29373  ;
29374  return 0;
29375}
29376_ACEOF
29377for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29378	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29379do
29380  CC="$ac_save_CC $ac_arg"
29381  if ac_fn_c_try_compile "$LINENO"; then :
29382  ac_cv_prog_cc_c89=$ac_arg
29383fi
29384rm -f core conftest.err conftest.$ac_objext
29385  test "x$ac_cv_prog_cc_c89" != "xno" && break
29386done
29387rm -f conftest.$ac_ext
29388CC=$ac_save_CC
29389
29390fi
29391# AC_CACHE_VAL
29392case "x$ac_cv_prog_cc_c89" in
29393  x)
29394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29395$as_echo "none needed" >&6; } ;;
29396  xno)
29397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29398$as_echo "unsupported" >&6; } ;;
29399  *)
29400    CC="$CC $ac_cv_prog_cc_c89"
29401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29402$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29403esac
29404if test "x$ac_cv_prog_cc_c89" != xno; then :
29405
29406fi
29407
29408ac_ext=cpp
29409ac_cpp='$CXXCPP $CPPFLAGS'
29410ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29411ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29412ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29413
29414
29415
29416  COMPILER_NAME=C++
29417  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29418
29419  if test "x$CXX" != x; then
29420    # User has supplied compiler name already, always let that override.
29421    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29422$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29423    if test "x`basename $CXX`" = "x$CXX"; then
29424      # A command without a complete path is provided, search $PATH.
29425
29426      for ac_prog in $CXX
29427do
29428  # Extract the first word of "$ac_prog", so it can be a program name with args.
29429set dummy $ac_prog; ac_word=$2
29430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29431$as_echo_n "checking for $ac_word... " >&6; }
29432if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29433  $as_echo_n "(cached) " >&6
29434else
29435  case $POTENTIAL_CXX in
29436  [\\/]* | ?:[\\/]*)
29437  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29438  ;;
29439  *)
29440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29441for as_dir in $PATH
29442do
29443  IFS=$as_save_IFS
29444  test -z "$as_dir" && as_dir=.
29445    for ac_exec_ext in '' $ac_executable_extensions; do
29446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29447    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29449    break 2
29450  fi
29451done
29452  done
29453IFS=$as_save_IFS
29454
29455  ;;
29456esac
29457fi
29458POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29459if test -n "$POTENTIAL_CXX"; then
29460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29461$as_echo "$POTENTIAL_CXX" >&6; }
29462else
29463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29464$as_echo "no" >&6; }
29465fi
29466
29467
29468  test -n "$POTENTIAL_CXX" && break
29469done
29470
29471      if test "x$POTENTIAL_CXX" != x; then
29472        CXX=$POTENTIAL_CXX
29473      else
29474        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29475      fi
29476    else
29477      # Otherwise it might already be a complete path
29478      if test ! -x "$CXX"; then
29479        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29480      fi
29481    fi
29482  else
29483    # No user supplied value. Locate compiler ourselves.
29484
29485    # If we are cross compiling, assume cross compilation tools follows the
29486    # cross compilation standard where they are prefixed with the autoconf
29487    # standard name for the target. For example the binary
29488    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29489    # If we are not cross compiling, then the default compiler name will be
29490    # used.
29491
29492    CXX=
29493    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29494    # before checking the rest of the PATH.
29495    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29496    # step, this should not be necessary.
29497    if test -n "$TOOLCHAIN_PATH"; then
29498      PATH_save="$PATH"
29499      PATH="$TOOLCHAIN_PATH"
29500      for ac_prog in $SEARCH_LIST
29501do
29502  # Extract the first word of "$ac_prog", so it can be a program name with args.
29503set dummy $ac_prog; ac_word=$2
29504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29505$as_echo_n "checking for $ac_word... " >&6; }
29506if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29507  $as_echo_n "(cached) " >&6
29508else
29509  case $TOOLCHAIN_PATH_CXX in
29510  [\\/]* | ?:[\\/]*)
29511  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29512  ;;
29513  *)
29514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29515for as_dir in $PATH
29516do
29517  IFS=$as_save_IFS
29518  test -z "$as_dir" && as_dir=.
29519    for ac_exec_ext in '' $ac_executable_extensions; do
29520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29521    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29523    break 2
29524  fi
29525done
29526  done
29527IFS=$as_save_IFS
29528
29529  ;;
29530esac
29531fi
29532TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29533if test -n "$TOOLCHAIN_PATH_CXX"; then
29534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29535$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29536else
29537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29538$as_echo "no" >&6; }
29539fi
29540
29541
29542  test -n "$TOOLCHAIN_PATH_CXX" && break
29543done
29544
29545      CXX=$TOOLCHAIN_PATH_CXX
29546      PATH="$PATH_save"
29547    fi
29548
29549    # AC_PATH_PROGS can't be run multiple times with the same variable,
29550    # so create a new name for this run.
29551    if test "x$CXX" = x; then
29552      for ac_prog in $SEARCH_LIST
29553do
29554  # Extract the first word of "$ac_prog", so it can be a program name with args.
29555set dummy $ac_prog; ac_word=$2
29556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29557$as_echo_n "checking for $ac_word... " >&6; }
29558if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29559  $as_echo_n "(cached) " >&6
29560else
29561  case $POTENTIAL_CXX in
29562  [\\/]* | ?:[\\/]*)
29563  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29564  ;;
29565  *)
29566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29567for as_dir in $PATH
29568do
29569  IFS=$as_save_IFS
29570  test -z "$as_dir" && as_dir=.
29571    for ac_exec_ext in '' $ac_executable_extensions; do
29572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29573    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29575    break 2
29576  fi
29577done
29578  done
29579IFS=$as_save_IFS
29580
29581  ;;
29582esac
29583fi
29584POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29585if test -n "$POTENTIAL_CXX"; then
29586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29587$as_echo "$POTENTIAL_CXX" >&6; }
29588else
29589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29590$as_echo "no" >&6; }
29591fi
29592
29593
29594  test -n "$POTENTIAL_CXX" && break
29595done
29596
29597      CXX=$POTENTIAL_CXX
29598    fi
29599
29600    if test "x$CXX" = x; then
29601
29602  # Print a helpful message on how to acquire the necessary build dependency.
29603  # devkit is the help tag: freetype, cups, pulse, alsa etc
29604  MISSING_DEPENDENCY=devkit
29605
29606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29607    cygwin_help $MISSING_DEPENDENCY
29608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29609    msys_help $MISSING_DEPENDENCY
29610  else
29611    PKGHANDLER_COMMAND=
29612
29613    case $PKGHANDLER in
29614      apt-get)
29615        apt_help     $MISSING_DEPENDENCY ;;
29616      yum)
29617        yum_help     $MISSING_DEPENDENCY ;;
29618      port)
29619        port_help    $MISSING_DEPENDENCY ;;
29620      pkgutil)
29621        pkgutil_help $MISSING_DEPENDENCY ;;
29622      pkgadd)
29623        pkgadd_help  $MISSING_DEPENDENCY ;;
29624    esac
29625
29626    if test "x$PKGHANDLER_COMMAND" != x; then
29627      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29628    fi
29629  fi
29630
29631      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29632    fi
29633  fi
29634
29635  # Now we have a compiler binary in CXX. Make sure it's okay.
29636
29637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29638
29639  # First separate the path from the arguments. This will split at the first
29640  # space.
29641  complete="$CXX"
29642  path="${complete%% *}"
29643  tmp="$complete EOL"
29644  arguments="${tmp#* }"
29645
29646  # Input might be given as Windows format, start by converting to
29647  # unix format.
29648  new_path=`$CYGPATH -u "$path"`
29649
29650  # Now try to locate executable using which
29651  new_path=`$WHICH "$new_path" 2> /dev/null`
29652  # bat and cmd files are not always considered executable in cygwin causing which
29653  # to not find them
29654  if test "x$new_path" = x \
29655      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29656      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29657    new_path=`$CYGPATH -u "$path"`
29658  fi
29659  if test "x$new_path" = x; then
29660    # Oops. Which didn't find the executable.
29661    # The splitting of arguments from the executable at a space might have been incorrect,
29662    # since paths with space are more likely in Windows. Give it another try with the whole
29663    # argument.
29664    path="$complete"
29665    arguments="EOL"
29666    new_path=`$CYGPATH -u "$path"`
29667    new_path=`$WHICH "$new_path" 2> /dev/null`
29668    # bat and cmd files are not always considered executable in cygwin causing which
29669    # to not find them
29670    if test "x$new_path" = x \
29671        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29672        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29673      new_path=`$CYGPATH -u "$path"`
29674    fi
29675    if test "x$new_path" = x; then
29676      # It's still not found. Now this is an unrecoverable error.
29677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29678$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29679      has_space=`$ECHO "$complete" | $GREP " "`
29680      if test "x$has_space" != x; then
29681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29683      fi
29684      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29685    fi
29686  fi
29687
29688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29691  # "foo.exe" is OK but "foo" is an error.
29692  #
29693  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29694  # It is also a way to make sure we got the proper file name for the real test later on.
29695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29696  if test "x$test_shortpath" = x; then
29697    # Short path failed, file does not exist as specified.
29698    # Try adding .exe or .cmd
29699    if test -f "${new_path}.exe"; then
29700      input_to_shortpath="${new_path}.exe"
29701    elif test -f "${new_path}.cmd"; then
29702      input_to_shortpath="${new_path}.cmd"
29703    else
29704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29705$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29708      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29709    fi
29710  else
29711    input_to_shortpath="$new_path"
29712  fi
29713
29714  # Call helper function which possibly converts this using DOS-style short mode.
29715  # If so, the updated path is stored in $new_path.
29716  new_path="$input_to_shortpath"
29717
29718  input_path="$input_to_shortpath"
29719  # Check if we need to convert this using DOS-style short mode. If the path
29720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29721  # take no chances and rewrite it.
29722  # Note: m4 eats our [], so we need to use [ and ] instead.
29723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29724  if test "x$has_forbidden_chars" != x; then
29725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29729      # Going to short mode and back again did indeed matter. Since short mode is
29730      # case insensitive, let's make it lowercase to improve readability.
29731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29732      # Now convert it back to Unix-stile (cygpath)
29733      input_path=`$CYGPATH -u "$shortmode_path"`
29734      new_path="$input_path"
29735    fi
29736  fi
29737
29738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29739  if test "x$test_cygdrive_prefix" = x; then
29740    # As a simple fix, exclude /usr/bin since it's not a real path.
29741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29743      # a path prefixed by /cygdrive for fixpath to work.
29744      new_path="$CYGWIN_ROOT_PATH$input_path"
29745    fi
29746  fi
29747
29748  # remove trailing .exe if any
29749  new_path="${new_path/%.exe/}"
29750
29751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29752
29753  # First separate the path from the arguments. This will split at the first
29754  # space.
29755  complete="$CXX"
29756  path="${complete%% *}"
29757  tmp="$complete EOL"
29758  arguments="${tmp#* }"
29759
29760  # Input might be given as Windows format, start by converting to
29761  # unix format.
29762  new_path="$path"
29763
29764  windows_path="$new_path"
29765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29766    unix_path=`$CYGPATH -u "$windows_path"`
29767    new_path="$unix_path"
29768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29770    new_path="$unix_path"
29771  fi
29772
29773
29774  # Now try to locate executable using which
29775  new_path=`$WHICH "$new_path" 2> /dev/null`
29776
29777  if test "x$new_path" = x; then
29778    # Oops. Which didn't find the executable.
29779    # The splitting of arguments from the executable at a space might have been incorrect,
29780    # since paths with space are more likely in Windows. Give it another try with the whole
29781    # argument.
29782    path="$complete"
29783    arguments="EOL"
29784    new_path="$path"
29785
29786  windows_path="$new_path"
29787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29788    unix_path=`$CYGPATH -u "$windows_path"`
29789    new_path="$unix_path"
29790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29792    new_path="$unix_path"
29793  fi
29794
29795
29796    new_path=`$WHICH "$new_path" 2> /dev/null`
29797
29798    if test "x$new_path" = x; then
29799      # It's still not found. Now this is an unrecoverable error.
29800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29801$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29802      has_space=`$ECHO "$complete" | $GREP " "`
29803      if test "x$has_space" != x; then
29804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29806      fi
29807      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29808    fi
29809  fi
29810
29811  # Now new_path has a complete unix path to the binary
29812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29813    # Keep paths in /bin as-is, but remove trailing .exe if any
29814    new_path="${new_path/%.exe/}"
29815    # Do not save /bin paths to all_fixpath_prefixes!
29816  else
29817    # Not in mixed or Windows style, start by that.
29818    new_path=`cmd //c echo $new_path`
29819
29820  input_path="$new_path"
29821  # Check if we need to convert this using DOS-style short mode. If the path
29822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29823  # take no chances and rewrite it.
29824  # Note: m4 eats our [], so we need to use [ and ] instead.
29825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29826  if test "x$has_forbidden_chars" != x; then
29827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29829  fi
29830
29831    # Output is in $new_path
29832
29833  windows_path="$new_path"
29834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29835    unix_path=`$CYGPATH -u "$windows_path"`
29836    new_path="$unix_path"
29837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29839    new_path="$unix_path"
29840  fi
29841
29842    # remove trailing .exe if any
29843    new_path="${new_path/%.exe/}"
29844
29845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29847  fi
29848
29849  else
29850    # We're on a posix platform. Hooray! :)
29851    # First separate the path from the arguments. This will split at the first
29852    # space.
29853    complete="$CXX"
29854    path="${complete%% *}"
29855    tmp="$complete EOL"
29856    arguments="${tmp#* }"
29857
29858    # Cannot rely on the command "which" here since it doesn't always work.
29859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29860    if test -z "$is_absolute_path"; then
29861      # Path to executable is not absolute. Find it.
29862      IFS_save="$IFS"
29863      IFS=:
29864      for p in $PATH; do
29865        if test -f "$p/$path" && test -x "$p/$path"; then
29866          new_path="$p/$path"
29867          break
29868        fi
29869      done
29870      IFS="$IFS_save"
29871    else
29872      # This is an absolute path, we can use it without further modifications.
29873      new_path="$path"
29874    fi
29875
29876    if test "x$new_path" = x; then
29877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29878$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29879      has_space=`$ECHO "$complete" | $GREP " "`
29880      if test "x$has_space" != x; then
29881        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29883      fi
29884      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29885    fi
29886  fi
29887
29888  # Now join together the path and the arguments once again
29889  if test "x$arguments" != xEOL; then
29890    new_complete="$new_path ${arguments% *}"
29891  else
29892    new_complete="$new_path"
29893  fi
29894
29895  if test "x$complete" != "x$new_complete"; then
29896    CXX="$new_complete"
29897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29898$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29899  fi
29900
29901  TEST_COMPILER="$CXX"
29902  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29903  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29904  if test "x$OPENJDK_BUILD_OS" != xaix; then
29905    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29907$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29908
29909  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29910    # Follow a chain of symbolic links. Use readlink
29911    # where it exists, else fall back to horribly
29912    # complicated shell code.
29913    if test "x$READLINK_TESTED" != yes; then
29914      # On MacOSX there is a readlink tool with a different
29915      # purpose than the GNU readlink tool. Check the found readlink.
29916      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29917      if test "x$ISGNU" = x; then
29918        # A readlink that we do not know how to use.
29919        # Are there other non-GNU readlinks out there?
29920        READLINK_TESTED=yes
29921        READLINK=
29922      fi
29923    fi
29924
29925    if test "x$READLINK" != x; then
29926      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29927    else
29928      # Save the current directory for restoring afterwards
29929      STARTDIR=$PWD
29930      COUNTER=0
29931      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29932      sym_link_file=`$BASENAME $TEST_COMPILER`
29933      cd $sym_link_dir
29934      # Use -P flag to resolve symlinks in directories.
29935      cd `$THEPWDCMD -P`
29936      sym_link_dir=`$THEPWDCMD -P`
29937      # Resolve file symlinks
29938      while test $COUNTER -lt 20; do
29939        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29940        if test "x$ISLINK" == x; then
29941          # This is not a symbolic link! We are done!
29942          break
29943        fi
29944        # Again resolve directory symlinks since the target of the just found
29945        # link could be in a different directory
29946        cd `$DIRNAME $ISLINK`
29947        sym_link_dir=`$THEPWDCMD -P`
29948        sym_link_file=`$BASENAME $ISLINK`
29949        let COUNTER=COUNTER+1
29950      done
29951      cd $STARTDIR
29952      TEST_COMPILER=$sym_link_dir/$sym_link_file
29953    fi
29954  fi
29955
29956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29957$as_echo "$TEST_COMPILER" >&6; }
29958  fi
29959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29960$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29961
29962  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29963  if test "x$COMPILER_BASENAME" = "xccache"; then
29964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29965$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29966    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29967    # We want to control ccache invocation ourselves, so ignore this cc and try
29968    # searching again.
29969
29970    # Remove the path to the fake ccache cc from the PATH
29971    RETRY_COMPILER_SAVED_PATH="$PATH"
29972    COMPILER_DIRNAME=`$DIRNAME $CXX`
29973    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29974
29975    # Try again looking for our compiler
29976    if test -n "$ac_tool_prefix"; then
29977  for ac_prog in $TOOLCHAIN_CXX_BINARY
29978  do
29979    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29982$as_echo_n "checking for $ac_word... " >&6; }
29983if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29984  $as_echo_n "(cached) " >&6
29985else
29986  if test -n "$PROPER_COMPILER_CXX"; then
29987  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29988else
29989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29990for as_dir in $PATH
29991do
29992  IFS=$as_save_IFS
29993  test -z "$as_dir" && as_dir=.
29994    for ac_exec_ext in '' $ac_executable_extensions; do
29995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29996    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29998    break 2
29999  fi
30000done
30001  done
30002IFS=$as_save_IFS
30003
30004fi
30005fi
30006PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30007if test -n "$PROPER_COMPILER_CXX"; then
30008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30009$as_echo "$PROPER_COMPILER_CXX" >&6; }
30010else
30011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30012$as_echo "no" >&6; }
30013fi
30014
30015
30016    test -n "$PROPER_COMPILER_CXX" && break
30017  done
30018fi
30019if test -z "$PROPER_COMPILER_CXX"; then
30020  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30021  for ac_prog in $TOOLCHAIN_CXX_BINARY
30022do
30023  # Extract the first word of "$ac_prog", so it can be a program name with args.
30024set dummy $ac_prog; ac_word=$2
30025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30026$as_echo_n "checking for $ac_word... " >&6; }
30027if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30028  $as_echo_n "(cached) " >&6
30029else
30030  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30031  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30032else
30033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30034for as_dir in $PATH
30035do
30036  IFS=$as_save_IFS
30037  test -z "$as_dir" && as_dir=.
30038    for ac_exec_ext in '' $ac_executable_extensions; do
30039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30040    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30042    break 2
30043  fi
30044done
30045  done
30046IFS=$as_save_IFS
30047
30048fi
30049fi
30050ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30051if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30053$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30054else
30055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30056$as_echo "no" >&6; }
30057fi
30058
30059
30060  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30061done
30062
30063  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30064    PROPER_COMPILER_CXX=""
30065  else
30066    case $cross_compiling:$ac_tool_warned in
30067yes:)
30068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30070ac_tool_warned=yes ;;
30071esac
30072    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30073  fi
30074fi
30075
30076
30077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30078
30079  # First separate the path from the arguments. This will split at the first
30080  # space.
30081  complete="$PROPER_COMPILER_CXX"
30082  path="${complete%% *}"
30083  tmp="$complete EOL"
30084  arguments="${tmp#* }"
30085
30086  # Input might be given as Windows format, start by converting to
30087  # unix format.
30088  new_path=`$CYGPATH -u "$path"`
30089
30090  # Now try to locate executable using which
30091  new_path=`$WHICH "$new_path" 2> /dev/null`
30092  # bat and cmd files are not always considered executable in cygwin causing which
30093  # to not find them
30094  if test "x$new_path" = x \
30095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30097    new_path=`$CYGPATH -u "$path"`
30098  fi
30099  if test "x$new_path" = x; then
30100    # Oops. Which didn't find the executable.
30101    # The splitting of arguments from the executable at a space might have been incorrect,
30102    # since paths with space are more likely in Windows. Give it another try with the whole
30103    # argument.
30104    path="$complete"
30105    arguments="EOL"
30106    new_path=`$CYGPATH -u "$path"`
30107    new_path=`$WHICH "$new_path" 2> /dev/null`
30108    # bat and cmd files are not always considered executable in cygwin causing which
30109    # to not find them
30110    if test "x$new_path" = x \
30111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30113      new_path=`$CYGPATH -u "$path"`
30114    fi
30115    if test "x$new_path" = x; then
30116      # It's still not found. Now this is an unrecoverable error.
30117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30118$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30119      has_space=`$ECHO "$complete" | $GREP " "`
30120      if test "x$has_space" != x; then
30121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30123      fi
30124      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30125    fi
30126  fi
30127
30128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30131  # "foo.exe" is OK but "foo" is an error.
30132  #
30133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30134  # It is also a way to make sure we got the proper file name for the real test later on.
30135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30136  if test "x$test_shortpath" = x; then
30137    # Short path failed, file does not exist as specified.
30138    # Try adding .exe or .cmd
30139    if test -f "${new_path}.exe"; then
30140      input_to_shortpath="${new_path}.exe"
30141    elif test -f "${new_path}.cmd"; then
30142      input_to_shortpath="${new_path}.cmd"
30143    else
30144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30145$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30148      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30149    fi
30150  else
30151    input_to_shortpath="$new_path"
30152  fi
30153
30154  # Call helper function which possibly converts this using DOS-style short mode.
30155  # If so, the updated path is stored in $new_path.
30156  new_path="$input_to_shortpath"
30157
30158  input_path="$input_to_shortpath"
30159  # Check if we need to convert this using DOS-style short mode. If the path
30160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30161  # take no chances and rewrite it.
30162  # Note: m4 eats our [], so we need to use [ and ] instead.
30163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30164  if test "x$has_forbidden_chars" != x; then
30165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30169      # Going to short mode and back again did indeed matter. Since short mode is
30170      # case insensitive, let's make it lowercase to improve readability.
30171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30172      # Now convert it back to Unix-stile (cygpath)
30173      input_path=`$CYGPATH -u "$shortmode_path"`
30174      new_path="$input_path"
30175    fi
30176  fi
30177
30178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30179  if test "x$test_cygdrive_prefix" = x; then
30180    # As a simple fix, exclude /usr/bin since it's not a real path.
30181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30183      # a path prefixed by /cygdrive for fixpath to work.
30184      new_path="$CYGWIN_ROOT_PATH$input_path"
30185    fi
30186  fi
30187
30188  # remove trailing .exe if any
30189  new_path="${new_path/%.exe/}"
30190
30191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30192
30193  # First separate the path from the arguments. This will split at the first
30194  # space.
30195  complete="$PROPER_COMPILER_CXX"
30196  path="${complete%% *}"
30197  tmp="$complete EOL"
30198  arguments="${tmp#* }"
30199
30200  # Input might be given as Windows format, start by converting to
30201  # unix format.
30202  new_path="$path"
30203
30204  windows_path="$new_path"
30205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30206    unix_path=`$CYGPATH -u "$windows_path"`
30207    new_path="$unix_path"
30208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30210    new_path="$unix_path"
30211  fi
30212
30213
30214  # Now try to locate executable using which
30215  new_path=`$WHICH "$new_path" 2> /dev/null`
30216
30217  if test "x$new_path" = x; then
30218    # Oops. Which didn't find the executable.
30219    # The splitting of arguments from the executable at a space might have been incorrect,
30220    # since paths with space are more likely in Windows. Give it another try with the whole
30221    # argument.
30222    path="$complete"
30223    arguments="EOL"
30224    new_path="$path"
30225
30226  windows_path="$new_path"
30227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30228    unix_path=`$CYGPATH -u "$windows_path"`
30229    new_path="$unix_path"
30230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30232    new_path="$unix_path"
30233  fi
30234
30235
30236    new_path=`$WHICH "$new_path" 2> /dev/null`
30237
30238    if test "x$new_path" = x; then
30239      # It's still not found. Now this is an unrecoverable error.
30240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30241$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30242      has_space=`$ECHO "$complete" | $GREP " "`
30243      if test "x$has_space" != x; then
30244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30246      fi
30247      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30248    fi
30249  fi
30250
30251  # Now new_path has a complete unix path to the binary
30252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30253    # Keep paths in /bin as-is, but remove trailing .exe if any
30254    new_path="${new_path/%.exe/}"
30255    # Do not save /bin paths to all_fixpath_prefixes!
30256  else
30257    # Not in mixed or Windows style, start by that.
30258    new_path=`cmd //c echo $new_path`
30259
30260  input_path="$new_path"
30261  # Check if we need to convert this using DOS-style short mode. If the path
30262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30263  # take no chances and rewrite it.
30264  # Note: m4 eats our [], so we need to use [ and ] instead.
30265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30266  if test "x$has_forbidden_chars" != x; then
30267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30269  fi
30270
30271    # Output is in $new_path
30272
30273  windows_path="$new_path"
30274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30275    unix_path=`$CYGPATH -u "$windows_path"`
30276    new_path="$unix_path"
30277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30279    new_path="$unix_path"
30280  fi
30281
30282    # remove trailing .exe if any
30283    new_path="${new_path/%.exe/}"
30284
30285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30287  fi
30288
30289  else
30290    # We're on a posix platform. Hooray! :)
30291    # First separate the path from the arguments. This will split at the first
30292    # space.
30293    complete="$PROPER_COMPILER_CXX"
30294    path="${complete%% *}"
30295    tmp="$complete EOL"
30296    arguments="${tmp#* }"
30297
30298    # Cannot rely on the command "which" here since it doesn't always work.
30299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30300    if test -z "$is_absolute_path"; then
30301      # Path to executable is not absolute. Find it.
30302      IFS_save="$IFS"
30303      IFS=:
30304      for p in $PATH; do
30305        if test -f "$p/$path" && test -x "$p/$path"; then
30306          new_path="$p/$path"
30307          break
30308        fi
30309      done
30310      IFS="$IFS_save"
30311    else
30312      # This is an absolute path, we can use it without further modifications.
30313      new_path="$path"
30314    fi
30315
30316    if test "x$new_path" = x; then
30317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30318$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30319      has_space=`$ECHO "$complete" | $GREP " "`
30320      if test "x$has_space" != x; then
30321        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30323      fi
30324      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30325    fi
30326  fi
30327
30328  # Now join together the path and the arguments once again
30329  if test "x$arguments" != xEOL; then
30330    new_complete="$new_path ${arguments% *}"
30331  else
30332    new_complete="$new_path"
30333  fi
30334
30335  if test "x$complete" != "x$new_complete"; then
30336    PROPER_COMPILER_CXX="$new_complete"
30337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30338$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30339  fi
30340
30341    PATH="$RETRY_COMPILER_SAVED_PATH"
30342
30343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30344$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30345
30346  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30347    # Follow a chain of symbolic links. Use readlink
30348    # where it exists, else fall back to horribly
30349    # complicated shell code.
30350    if test "x$READLINK_TESTED" != yes; then
30351      # On MacOSX there is a readlink tool with a different
30352      # purpose than the GNU readlink tool. Check the found readlink.
30353      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30354      if test "x$ISGNU" = x; then
30355        # A readlink that we do not know how to use.
30356        # Are there other non-GNU readlinks out there?
30357        READLINK_TESTED=yes
30358        READLINK=
30359      fi
30360    fi
30361
30362    if test "x$READLINK" != x; then
30363      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30364    else
30365      # Save the current directory for restoring afterwards
30366      STARTDIR=$PWD
30367      COUNTER=0
30368      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30369      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30370      cd $sym_link_dir
30371      # Use -P flag to resolve symlinks in directories.
30372      cd `$THEPWDCMD -P`
30373      sym_link_dir=`$THEPWDCMD -P`
30374      # Resolve file symlinks
30375      while test $COUNTER -lt 20; do
30376        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30377        if test "x$ISLINK" == x; then
30378          # This is not a symbolic link! We are done!
30379          break
30380        fi
30381        # Again resolve directory symlinks since the target of the just found
30382        # link could be in a different directory
30383        cd `$DIRNAME $ISLINK`
30384        sym_link_dir=`$THEPWDCMD -P`
30385        sym_link_file=`$BASENAME $ISLINK`
30386        let COUNTER=COUNTER+1
30387      done
30388      cd $STARTDIR
30389      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30390    fi
30391  fi
30392
30393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30394$as_echo "$PROPER_COMPILER_CXX" >&6; }
30395    CXX="$PROPER_COMPILER_CXX"
30396  else
30397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30398$as_echo "no, keeping CXX" >&6; }
30399  fi
30400
30401
30402  COMPILER=$CXX
30403  COMPILER_NAME=$COMPILER_NAME
30404
30405  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30406    # cc -V output typically looks like
30407    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30408    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30409    # Check that this is likely to be the Solaris Studio cc.
30410    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30411    if test $? -ne 0; then
30412      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30413      { $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
30414$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30415      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30416$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30417      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30418$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30419      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30420    fi
30421    # Remove usage instructions (if present), and
30422    # collapse compiler output into a single line
30423    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30424        $SED -e 's/ *[Uu]sage:.*//'`
30425    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30426        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30427  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30428    # xlc -qversion output typically looks like
30429    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30430    #     Version: 11.01.0000.0015
30431    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30432    # Check that this is likely to be the IBM XL C compiler.
30433    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30434    if test $? -ne 0; then
30435      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30436      { $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
30437$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30438      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30439$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30440      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30441$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30442      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30443    fi
30444    # Collapse compiler output into a single line
30445    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30446    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30447        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30448  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30449    # There is no specific version flag, but all output starts with a version string.
30450    # First line typically looks something like:
30451    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30452    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30453    # Check that this is likely to be Microsoft CL.EXE.
30454    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30455    if test $? -ne 0; then
30456      { $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
30457$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30458      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30459$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30460      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30461    fi
30462    # Collapse compiler output into a single line
30463    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30464    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30465        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30466  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30467    # gcc --version output typically looks like
30468    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30469    #     Copyright (C) 2013 Free Software Foundation, Inc.
30470    #     This is free software; see the source for copying conditions.  There is NO
30471    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30472    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30473    # Check that this is likely to be GCC.
30474    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30475    if test $? -ne 0; then
30476      { $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
30477$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30478      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30479$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30480      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30481    fi
30482    # Remove Copyright and legalese from version string, and
30483    # collapse into a single line
30484    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30485        $SED -e 's/ *Copyright .*//'`
30486    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30487        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30488  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30489    # clang --version output typically looks like
30490    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30491    #    clang version 3.3 (tags/RELEASE_33/final)
30492    # or
30493    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30494    #    Target: x86_64-pc-linux-gnu
30495    #    Thread model: posix
30496    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30497    # Check that this is likely to be clang
30498    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30499    if test $? -ne 0; then
30500      { $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
30501$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30502      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30503$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30504      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30505    fi
30506    # Collapse compiler output into a single line
30507    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30508    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30509        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30510  else
30511      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30512  fi
30513  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30514  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30515  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30516  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30517
30518  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30519$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30520
30521
30522  # Now that we have resolved CXX ourself, let autoconf have its go at it
30523  ac_ext=cpp
30524ac_cpp='$CXXCPP $CPPFLAGS'
30525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30528if test -z "$CXX"; then
30529  if test -n "$CCC"; then
30530    CXX=$CCC
30531  else
30532    if test -n "$ac_tool_prefix"; then
30533  for ac_prog in $CXX
30534  do
30535    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30536set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30538$as_echo_n "checking for $ac_word... " >&6; }
30539if ${ac_cv_prog_CXX+:} false; then :
30540  $as_echo_n "(cached) " >&6
30541else
30542  if test -n "$CXX"; then
30543  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30544else
30545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30546for as_dir in $PATH
30547do
30548  IFS=$as_save_IFS
30549  test -z "$as_dir" && as_dir=.
30550    for ac_exec_ext in '' $ac_executable_extensions; do
30551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30552    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30554    break 2
30555  fi
30556done
30557  done
30558IFS=$as_save_IFS
30559
30560fi
30561fi
30562CXX=$ac_cv_prog_CXX
30563if test -n "$CXX"; then
30564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30565$as_echo "$CXX" >&6; }
30566else
30567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30568$as_echo "no" >&6; }
30569fi
30570
30571
30572    test -n "$CXX" && break
30573  done
30574fi
30575if test -z "$CXX"; then
30576  ac_ct_CXX=$CXX
30577  for ac_prog in $CXX
30578do
30579  # Extract the first word of "$ac_prog", so it can be a program name with args.
30580set dummy $ac_prog; ac_word=$2
30581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30582$as_echo_n "checking for $ac_word... " >&6; }
30583if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30584  $as_echo_n "(cached) " >&6
30585else
30586  if test -n "$ac_ct_CXX"; then
30587  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30588else
30589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30590for as_dir in $PATH
30591do
30592  IFS=$as_save_IFS
30593  test -z "$as_dir" && as_dir=.
30594    for ac_exec_ext in '' $ac_executable_extensions; do
30595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30596    ac_cv_prog_ac_ct_CXX="$ac_prog"
30597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30598    break 2
30599  fi
30600done
30601  done
30602IFS=$as_save_IFS
30603
30604fi
30605fi
30606ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30607if test -n "$ac_ct_CXX"; then
30608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30609$as_echo "$ac_ct_CXX" >&6; }
30610else
30611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30612$as_echo "no" >&6; }
30613fi
30614
30615
30616  test -n "$ac_ct_CXX" && break
30617done
30618
30619  if test "x$ac_ct_CXX" = x; then
30620    CXX="g++"
30621  else
30622    case $cross_compiling:$ac_tool_warned in
30623yes:)
30624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30626ac_tool_warned=yes ;;
30627esac
30628    CXX=$ac_ct_CXX
30629  fi
30630fi
30631
30632  fi
30633fi
30634# Provide some information about the compiler.
30635$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30636set X $ac_compile
30637ac_compiler=$2
30638for ac_option in --version -v -V -qversion; do
30639  { { ac_try="$ac_compiler $ac_option >&5"
30640case "(($ac_try" in
30641  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30642  *) ac_try_echo=$ac_try;;
30643esac
30644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30645$as_echo "$ac_try_echo"; } >&5
30646  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30647  ac_status=$?
30648  if test -s conftest.err; then
30649    sed '10a\
30650... rest of stderr output deleted ...
30651         10q' conftest.err >conftest.er1
30652    cat conftest.er1 >&5
30653  fi
30654  rm -f conftest.er1 conftest.err
30655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30656  test $ac_status = 0; }
30657done
30658
30659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30660$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30661if ${ac_cv_cxx_compiler_gnu+:} false; then :
30662  $as_echo_n "(cached) " >&6
30663else
30664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30665/* end confdefs.h.  */
30666
30667int
30668main ()
30669{
30670#ifndef __GNUC__
30671       choke me
30672#endif
30673
30674  ;
30675  return 0;
30676}
30677_ACEOF
30678if ac_fn_cxx_try_compile "$LINENO"; then :
30679  ac_compiler_gnu=yes
30680else
30681  ac_compiler_gnu=no
30682fi
30683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30684ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30685
30686fi
30687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30688$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30689if test $ac_compiler_gnu = yes; then
30690  GXX=yes
30691else
30692  GXX=
30693fi
30694ac_test_CXXFLAGS=${CXXFLAGS+set}
30695ac_save_CXXFLAGS=$CXXFLAGS
30696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30697$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30698if ${ac_cv_prog_cxx_g+:} false; then :
30699  $as_echo_n "(cached) " >&6
30700else
30701  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30702   ac_cxx_werror_flag=yes
30703   ac_cv_prog_cxx_g=no
30704   CXXFLAGS="-g"
30705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30706/* end confdefs.h.  */
30707
30708int
30709main ()
30710{
30711
30712  ;
30713  return 0;
30714}
30715_ACEOF
30716if ac_fn_cxx_try_compile "$LINENO"; then :
30717  ac_cv_prog_cxx_g=yes
30718else
30719  CXXFLAGS=""
30720      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30721/* end confdefs.h.  */
30722
30723int
30724main ()
30725{
30726
30727  ;
30728  return 0;
30729}
30730_ACEOF
30731if ac_fn_cxx_try_compile "$LINENO"; then :
30732
30733else
30734  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30735	 CXXFLAGS="-g"
30736	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30737/* end confdefs.h.  */
30738
30739int
30740main ()
30741{
30742
30743  ;
30744  return 0;
30745}
30746_ACEOF
30747if ac_fn_cxx_try_compile "$LINENO"; then :
30748  ac_cv_prog_cxx_g=yes
30749fi
30750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30751fi
30752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30753fi
30754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30755   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30756fi
30757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30758$as_echo "$ac_cv_prog_cxx_g" >&6; }
30759if test "$ac_test_CXXFLAGS" = set; then
30760  CXXFLAGS=$ac_save_CXXFLAGS
30761elif test $ac_cv_prog_cxx_g = yes; then
30762  if test "$GXX" = yes; then
30763    CXXFLAGS="-g -O2"
30764  else
30765    CXXFLAGS="-g"
30766  fi
30767else
30768  if test "$GXX" = yes; then
30769    CXXFLAGS="-O2"
30770  else
30771    CXXFLAGS=
30772  fi
30773fi
30774ac_ext=cpp
30775ac_cpp='$CXXCPP $CPPFLAGS'
30776ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30777ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30778ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30779
30780
30781  #
30782  # Setup the preprocessor (CPP and CXXCPP)
30783  #
30784  ac_ext=c
30785ac_cpp='$CPP $CPPFLAGS'
30786ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30787ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30788ac_compiler_gnu=$ac_cv_c_compiler_gnu
30789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30790$as_echo_n "checking how to run the C preprocessor... " >&6; }
30791# On Suns, sometimes $CPP names a directory.
30792if test -n "$CPP" && test -d "$CPP"; then
30793  CPP=
30794fi
30795if test -z "$CPP"; then
30796  if ${ac_cv_prog_CPP+:} false; then :
30797  $as_echo_n "(cached) " >&6
30798else
30799      # Double quotes because CPP needs to be expanded
30800    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30801    do
30802      ac_preproc_ok=false
30803for ac_c_preproc_warn_flag in '' yes
30804do
30805  # Use a header file that comes with gcc, so configuring glibc
30806  # with a fresh cross-compiler works.
30807  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30808  # <limits.h> exists even on freestanding compilers.
30809  # On the NeXT, cc -E runs the code through the compiler's parser,
30810  # not just through cpp. "Syntax error" is here to catch this case.
30811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30812/* end confdefs.h.  */
30813#ifdef __STDC__
30814# include <limits.h>
30815#else
30816# include <assert.h>
30817#endif
30818		     Syntax error
30819_ACEOF
30820if ac_fn_c_try_cpp "$LINENO"; then :
30821
30822else
30823  # Broken: fails on valid input.
30824continue
30825fi
30826rm -f conftest.err conftest.i conftest.$ac_ext
30827
30828  # OK, works on sane cases.  Now check whether nonexistent headers
30829  # can be detected and how.
30830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831/* end confdefs.h.  */
30832#include <ac_nonexistent.h>
30833_ACEOF
30834if ac_fn_c_try_cpp "$LINENO"; then :
30835  # Broken: success on invalid input.
30836continue
30837else
30838  # Passes both tests.
30839ac_preproc_ok=:
30840break
30841fi
30842rm -f conftest.err conftest.i conftest.$ac_ext
30843
30844done
30845# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30846rm -f conftest.i conftest.err conftest.$ac_ext
30847if $ac_preproc_ok; then :
30848  break
30849fi
30850
30851    done
30852    ac_cv_prog_CPP=$CPP
30853
30854fi
30855  CPP=$ac_cv_prog_CPP
30856else
30857  ac_cv_prog_CPP=$CPP
30858fi
30859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30860$as_echo "$CPP" >&6; }
30861ac_preproc_ok=false
30862for ac_c_preproc_warn_flag in '' yes
30863do
30864  # Use a header file that comes with gcc, so configuring glibc
30865  # with a fresh cross-compiler works.
30866  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30867  # <limits.h> exists even on freestanding compilers.
30868  # On the NeXT, cc -E runs the code through the compiler's parser,
30869  # not just through cpp. "Syntax error" is here to catch this case.
30870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30871/* end confdefs.h.  */
30872#ifdef __STDC__
30873# include <limits.h>
30874#else
30875# include <assert.h>
30876#endif
30877		     Syntax error
30878_ACEOF
30879if ac_fn_c_try_cpp "$LINENO"; then :
30880
30881else
30882  # Broken: fails on valid input.
30883continue
30884fi
30885rm -f conftest.err conftest.i conftest.$ac_ext
30886
30887  # OK, works on sane cases.  Now check whether nonexistent headers
30888  # can be detected and how.
30889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30890/* end confdefs.h.  */
30891#include <ac_nonexistent.h>
30892_ACEOF
30893if ac_fn_c_try_cpp "$LINENO"; then :
30894  # Broken: success on invalid input.
30895continue
30896else
30897  # Passes both tests.
30898ac_preproc_ok=:
30899break
30900fi
30901rm -f conftest.err conftest.i conftest.$ac_ext
30902
30903done
30904# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30905rm -f conftest.i conftest.err conftest.$ac_ext
30906if $ac_preproc_ok; then :
30907
30908else
30909  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30911as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30912See \`config.log' for more details" "$LINENO" 5; }
30913fi
30914
30915ac_ext=cpp
30916ac_cpp='$CXXCPP $CPPFLAGS'
30917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30920
30921
30922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30923
30924  # First separate the path from the arguments. This will split at the first
30925  # space.
30926  complete="$CPP"
30927  path="${complete%% *}"
30928  tmp="$complete EOL"
30929  arguments="${tmp#* }"
30930
30931  # Input might be given as Windows format, start by converting to
30932  # unix format.
30933  new_path=`$CYGPATH -u "$path"`
30934
30935  # Now try to locate executable using which
30936  new_path=`$WHICH "$new_path" 2> /dev/null`
30937  # bat and cmd files are not always considered executable in cygwin causing which
30938  # to not find them
30939  if test "x$new_path" = x \
30940      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30941      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30942    new_path=`$CYGPATH -u "$path"`
30943  fi
30944  if test "x$new_path" = x; then
30945    # Oops. Which didn't find the executable.
30946    # The splitting of arguments from the executable at a space might have been incorrect,
30947    # since paths with space are more likely in Windows. Give it another try with the whole
30948    # argument.
30949    path="$complete"
30950    arguments="EOL"
30951    new_path=`$CYGPATH -u "$path"`
30952    new_path=`$WHICH "$new_path" 2> /dev/null`
30953    # bat and cmd files are not always considered executable in cygwin causing which
30954    # to not find them
30955    if test "x$new_path" = x \
30956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30958      new_path=`$CYGPATH -u "$path"`
30959    fi
30960    if test "x$new_path" = x; then
30961      # It's still not found. Now this is an unrecoverable error.
30962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30963$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30964      has_space=`$ECHO "$complete" | $GREP " "`
30965      if test "x$has_space" != x; then
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30968      fi
30969      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30970    fi
30971  fi
30972
30973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30976  # "foo.exe" is OK but "foo" is an error.
30977  #
30978  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30979  # It is also a way to make sure we got the proper file name for the real test later on.
30980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30981  if test "x$test_shortpath" = x; then
30982    # Short path failed, file does not exist as specified.
30983    # Try adding .exe or .cmd
30984    if test -f "${new_path}.exe"; then
30985      input_to_shortpath="${new_path}.exe"
30986    elif test -f "${new_path}.cmd"; then
30987      input_to_shortpath="${new_path}.cmd"
30988    else
30989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30990$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30993      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30994    fi
30995  else
30996    input_to_shortpath="$new_path"
30997  fi
30998
30999  # Call helper function which possibly converts this using DOS-style short mode.
31000  # If so, the updated path is stored in $new_path.
31001  new_path="$input_to_shortpath"
31002
31003  input_path="$input_to_shortpath"
31004  # Check if we need to convert this using DOS-style short mode. If the path
31005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31006  # take no chances and rewrite it.
31007  # Note: m4 eats our [], so we need to use [ and ] instead.
31008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31009  if test "x$has_forbidden_chars" != x; then
31010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31014      # Going to short mode and back again did indeed matter. Since short mode is
31015      # case insensitive, let's make it lowercase to improve readability.
31016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31017      # Now convert it back to Unix-stile (cygpath)
31018      input_path=`$CYGPATH -u "$shortmode_path"`
31019      new_path="$input_path"
31020    fi
31021  fi
31022
31023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31024  if test "x$test_cygdrive_prefix" = x; then
31025    # As a simple fix, exclude /usr/bin since it's not a real path.
31026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31028      # a path prefixed by /cygdrive for fixpath to work.
31029      new_path="$CYGWIN_ROOT_PATH$input_path"
31030    fi
31031  fi
31032
31033  # remove trailing .exe if any
31034  new_path="${new_path/%.exe/}"
31035
31036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31037
31038  # First separate the path from the arguments. This will split at the first
31039  # space.
31040  complete="$CPP"
31041  path="${complete%% *}"
31042  tmp="$complete EOL"
31043  arguments="${tmp#* }"
31044
31045  # Input might be given as Windows format, start by converting to
31046  # unix format.
31047  new_path="$path"
31048
31049  windows_path="$new_path"
31050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31051    unix_path=`$CYGPATH -u "$windows_path"`
31052    new_path="$unix_path"
31053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31055    new_path="$unix_path"
31056  fi
31057
31058
31059  # Now try to locate executable using which
31060  new_path=`$WHICH "$new_path" 2> /dev/null`
31061
31062  if test "x$new_path" = x; then
31063    # Oops. Which didn't find the executable.
31064    # The splitting of arguments from the executable at a space might have been incorrect,
31065    # since paths with space are more likely in Windows. Give it another try with the whole
31066    # argument.
31067    path="$complete"
31068    arguments="EOL"
31069    new_path="$path"
31070
31071  windows_path="$new_path"
31072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31073    unix_path=`$CYGPATH -u "$windows_path"`
31074    new_path="$unix_path"
31075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31077    new_path="$unix_path"
31078  fi
31079
31080
31081    new_path=`$WHICH "$new_path" 2> /dev/null`
31082
31083    if test "x$new_path" = x; then
31084      # It's still not found. Now this is an unrecoverable error.
31085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31086$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31087      has_space=`$ECHO "$complete" | $GREP " "`
31088      if test "x$has_space" != x; then
31089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31091      fi
31092      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31093    fi
31094  fi
31095
31096  # Now new_path has a complete unix path to the binary
31097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31098    # Keep paths in /bin as-is, but remove trailing .exe if any
31099    new_path="${new_path/%.exe/}"
31100    # Do not save /bin paths to all_fixpath_prefixes!
31101  else
31102    # Not in mixed or Windows style, start by that.
31103    new_path=`cmd //c echo $new_path`
31104
31105  input_path="$new_path"
31106  # Check if we need to convert this using DOS-style short mode. If the path
31107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31108  # take no chances and rewrite it.
31109  # Note: m4 eats our [], so we need to use [ and ] instead.
31110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31111  if test "x$has_forbidden_chars" != x; then
31112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31114  fi
31115
31116    # Output is in $new_path
31117
31118  windows_path="$new_path"
31119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31120    unix_path=`$CYGPATH -u "$windows_path"`
31121    new_path="$unix_path"
31122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31124    new_path="$unix_path"
31125  fi
31126
31127    # remove trailing .exe if any
31128    new_path="${new_path/%.exe/}"
31129
31130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31132  fi
31133
31134  else
31135    # We're on a posix platform. Hooray! :)
31136    # First separate the path from the arguments. This will split at the first
31137    # space.
31138    complete="$CPP"
31139    path="${complete%% *}"
31140    tmp="$complete EOL"
31141    arguments="${tmp#* }"
31142
31143    # Cannot rely on the command "which" here since it doesn't always work.
31144    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31145    if test -z "$is_absolute_path"; then
31146      # Path to executable is not absolute. Find it.
31147      IFS_save="$IFS"
31148      IFS=:
31149      for p in $PATH; do
31150        if test -f "$p/$path" && test -x "$p/$path"; then
31151          new_path="$p/$path"
31152          break
31153        fi
31154      done
31155      IFS="$IFS_save"
31156    else
31157      # This is an absolute path, we can use it without further modifications.
31158      new_path="$path"
31159    fi
31160
31161    if test "x$new_path" = x; then
31162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31163$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31164      has_space=`$ECHO "$complete" | $GREP " "`
31165      if test "x$has_space" != x; then
31166        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31168      fi
31169      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31170    fi
31171  fi
31172
31173  # Now join together the path and the arguments once again
31174  if test "x$arguments" != xEOL; then
31175    new_complete="$new_path ${arguments% *}"
31176  else
31177    new_complete="$new_path"
31178  fi
31179
31180  if test "x$complete" != "x$new_complete"; then
31181    CPP="$new_complete"
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31183$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31184  fi
31185
31186  ac_ext=cpp
31187ac_cpp='$CXXCPP $CPPFLAGS'
31188ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31189ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31190ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31192$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31193if test -z "$CXXCPP"; then
31194  if ${ac_cv_prog_CXXCPP+:} false; then :
31195  $as_echo_n "(cached) " >&6
31196else
31197      # Double quotes because CXXCPP needs to be expanded
31198    for CXXCPP in "$CXX -E" "/lib/cpp"
31199    do
31200      ac_preproc_ok=false
31201for ac_cxx_preproc_warn_flag in '' yes
31202do
31203  # Use a header file that comes with gcc, so configuring glibc
31204  # with a fresh cross-compiler works.
31205  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31206  # <limits.h> exists even on freestanding compilers.
31207  # On the NeXT, cc -E runs the code through the compiler's parser,
31208  # not just through cpp. "Syntax error" is here to catch this case.
31209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31210/* end confdefs.h.  */
31211#ifdef __STDC__
31212# include <limits.h>
31213#else
31214# include <assert.h>
31215#endif
31216		     Syntax error
31217_ACEOF
31218if ac_fn_cxx_try_cpp "$LINENO"; then :
31219
31220else
31221  # Broken: fails on valid input.
31222continue
31223fi
31224rm -f conftest.err conftest.i conftest.$ac_ext
31225
31226  # OK, works on sane cases.  Now check whether nonexistent headers
31227  # can be detected and how.
31228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31229/* end confdefs.h.  */
31230#include <ac_nonexistent.h>
31231_ACEOF
31232if ac_fn_cxx_try_cpp "$LINENO"; then :
31233  # Broken: success on invalid input.
31234continue
31235else
31236  # Passes both tests.
31237ac_preproc_ok=:
31238break
31239fi
31240rm -f conftest.err conftest.i conftest.$ac_ext
31241
31242done
31243# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31244rm -f conftest.i conftest.err conftest.$ac_ext
31245if $ac_preproc_ok; then :
31246  break
31247fi
31248
31249    done
31250    ac_cv_prog_CXXCPP=$CXXCPP
31251
31252fi
31253  CXXCPP=$ac_cv_prog_CXXCPP
31254else
31255  ac_cv_prog_CXXCPP=$CXXCPP
31256fi
31257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31258$as_echo "$CXXCPP" >&6; }
31259ac_preproc_ok=false
31260for ac_cxx_preproc_warn_flag in '' yes
31261do
31262  # Use a header file that comes with gcc, so configuring glibc
31263  # with a fresh cross-compiler works.
31264  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31265  # <limits.h> exists even on freestanding compilers.
31266  # On the NeXT, cc -E runs the code through the compiler's parser,
31267  # not just through cpp. "Syntax error" is here to catch this case.
31268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31269/* end confdefs.h.  */
31270#ifdef __STDC__
31271# include <limits.h>
31272#else
31273# include <assert.h>
31274#endif
31275		     Syntax error
31276_ACEOF
31277if ac_fn_cxx_try_cpp "$LINENO"; then :
31278
31279else
31280  # Broken: fails on valid input.
31281continue
31282fi
31283rm -f conftest.err conftest.i conftest.$ac_ext
31284
31285  # OK, works on sane cases.  Now check whether nonexistent headers
31286  # can be detected and how.
31287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31288/* end confdefs.h.  */
31289#include <ac_nonexistent.h>
31290_ACEOF
31291if ac_fn_cxx_try_cpp "$LINENO"; then :
31292  # Broken: success on invalid input.
31293continue
31294else
31295  # Passes both tests.
31296ac_preproc_ok=:
31297break
31298fi
31299rm -f conftest.err conftest.i conftest.$ac_ext
31300
31301done
31302# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31303rm -f conftest.i conftest.err conftest.$ac_ext
31304if $ac_preproc_ok; then :
31305
31306else
31307  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31309as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31310See \`config.log' for more details" "$LINENO" 5; }
31311fi
31312
31313ac_ext=cpp
31314ac_cpp='$CXXCPP $CPPFLAGS'
31315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31318
31319
31320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31321
31322  # First separate the path from the arguments. This will split at the first
31323  # space.
31324  complete="$CXXCPP"
31325  path="${complete%% *}"
31326  tmp="$complete EOL"
31327  arguments="${tmp#* }"
31328
31329  # Input might be given as Windows format, start by converting to
31330  # unix format.
31331  new_path=`$CYGPATH -u "$path"`
31332
31333  # Now try to locate executable using which
31334  new_path=`$WHICH "$new_path" 2> /dev/null`
31335  # bat and cmd files are not always considered executable in cygwin causing which
31336  # to not find them
31337  if test "x$new_path" = x \
31338      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31339      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31340    new_path=`$CYGPATH -u "$path"`
31341  fi
31342  if test "x$new_path" = x; then
31343    # Oops. Which didn't find the executable.
31344    # The splitting of arguments from the executable at a space might have been incorrect,
31345    # since paths with space are more likely in Windows. Give it another try with the whole
31346    # argument.
31347    path="$complete"
31348    arguments="EOL"
31349    new_path=`$CYGPATH -u "$path"`
31350    new_path=`$WHICH "$new_path" 2> /dev/null`
31351    # bat and cmd files are not always considered executable in cygwin causing which
31352    # to not find them
31353    if test "x$new_path" = x \
31354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31356      new_path=`$CYGPATH -u "$path"`
31357    fi
31358    if test "x$new_path" = x; then
31359      # It's still not found. Now this is an unrecoverable error.
31360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31361$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31362      has_space=`$ECHO "$complete" | $GREP " "`
31363      if test "x$has_space" != x; then
31364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31366      fi
31367      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31368    fi
31369  fi
31370
31371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31374  # "foo.exe" is OK but "foo" is an error.
31375  #
31376  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31377  # It is also a way to make sure we got the proper file name for the real test later on.
31378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31379  if test "x$test_shortpath" = x; then
31380    # Short path failed, file does not exist as specified.
31381    # Try adding .exe or .cmd
31382    if test -f "${new_path}.exe"; then
31383      input_to_shortpath="${new_path}.exe"
31384    elif test -f "${new_path}.cmd"; then
31385      input_to_shortpath="${new_path}.cmd"
31386    else
31387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31388$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31389      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31391      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31392    fi
31393  else
31394    input_to_shortpath="$new_path"
31395  fi
31396
31397  # Call helper function which possibly converts this using DOS-style short mode.
31398  # If so, the updated path is stored in $new_path.
31399  new_path="$input_to_shortpath"
31400
31401  input_path="$input_to_shortpath"
31402  # Check if we need to convert this using DOS-style short mode. If the path
31403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31404  # take no chances and rewrite it.
31405  # Note: m4 eats our [], so we need to use [ and ] instead.
31406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31407  if test "x$has_forbidden_chars" != x; then
31408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31412      # Going to short mode and back again did indeed matter. Since short mode is
31413      # case insensitive, let's make it lowercase to improve readability.
31414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31415      # Now convert it back to Unix-stile (cygpath)
31416      input_path=`$CYGPATH -u "$shortmode_path"`
31417      new_path="$input_path"
31418    fi
31419  fi
31420
31421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31422  if test "x$test_cygdrive_prefix" = x; then
31423    # As a simple fix, exclude /usr/bin since it's not a real path.
31424    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31426      # a path prefixed by /cygdrive for fixpath to work.
31427      new_path="$CYGWIN_ROOT_PATH$input_path"
31428    fi
31429  fi
31430
31431  # remove trailing .exe if any
31432  new_path="${new_path/%.exe/}"
31433
31434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31435
31436  # First separate the path from the arguments. This will split at the first
31437  # space.
31438  complete="$CXXCPP"
31439  path="${complete%% *}"
31440  tmp="$complete EOL"
31441  arguments="${tmp#* }"
31442
31443  # Input might be given as Windows format, start by converting to
31444  # unix format.
31445  new_path="$path"
31446
31447  windows_path="$new_path"
31448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31449    unix_path=`$CYGPATH -u "$windows_path"`
31450    new_path="$unix_path"
31451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31453    new_path="$unix_path"
31454  fi
31455
31456
31457  # Now try to locate executable using which
31458  new_path=`$WHICH "$new_path" 2> /dev/null`
31459
31460  if test "x$new_path" = x; then
31461    # Oops. Which didn't find the executable.
31462    # The splitting of arguments from the executable at a space might have been incorrect,
31463    # since paths with space are more likely in Windows. Give it another try with the whole
31464    # argument.
31465    path="$complete"
31466    arguments="EOL"
31467    new_path="$path"
31468
31469  windows_path="$new_path"
31470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31471    unix_path=`$CYGPATH -u "$windows_path"`
31472    new_path="$unix_path"
31473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31475    new_path="$unix_path"
31476  fi
31477
31478
31479    new_path=`$WHICH "$new_path" 2> /dev/null`
31480
31481    if test "x$new_path" = x; then
31482      # It's still not found. Now this is an unrecoverable error.
31483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31484$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31485      has_space=`$ECHO "$complete" | $GREP " "`
31486      if test "x$has_space" != x; then
31487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31489      fi
31490      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31491    fi
31492  fi
31493
31494  # Now new_path has a complete unix path to the binary
31495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31496    # Keep paths in /bin as-is, but remove trailing .exe if any
31497    new_path="${new_path/%.exe/}"
31498    # Do not save /bin paths to all_fixpath_prefixes!
31499  else
31500    # Not in mixed or Windows style, start by that.
31501    new_path=`cmd //c echo $new_path`
31502
31503  input_path="$new_path"
31504  # Check if we need to convert this using DOS-style short mode. If the path
31505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31506  # take no chances and rewrite it.
31507  # Note: m4 eats our [], so we need to use [ and ] instead.
31508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31509  if test "x$has_forbidden_chars" != x; then
31510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31512  fi
31513
31514    # Output is in $new_path
31515
31516  windows_path="$new_path"
31517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31518    unix_path=`$CYGPATH -u "$windows_path"`
31519    new_path="$unix_path"
31520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31522    new_path="$unix_path"
31523  fi
31524
31525    # remove trailing .exe if any
31526    new_path="${new_path/%.exe/}"
31527
31528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31530  fi
31531
31532  else
31533    # We're on a posix platform. Hooray! :)
31534    # First separate the path from the arguments. This will split at the first
31535    # space.
31536    complete="$CXXCPP"
31537    path="${complete%% *}"
31538    tmp="$complete EOL"
31539    arguments="${tmp#* }"
31540
31541    # Cannot rely on the command "which" here since it doesn't always work.
31542    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31543    if test -z "$is_absolute_path"; then
31544      # Path to executable is not absolute. Find it.
31545      IFS_save="$IFS"
31546      IFS=:
31547      for p in $PATH; do
31548        if test -f "$p/$path" && test -x "$p/$path"; then
31549          new_path="$p/$path"
31550          break
31551        fi
31552      done
31553      IFS="$IFS_save"
31554    else
31555      # This is an absolute path, we can use it without further modifications.
31556      new_path="$path"
31557    fi
31558
31559    if test "x$new_path" = x; then
31560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31561$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31562      has_space=`$ECHO "$complete" | $GREP " "`
31563      if test "x$has_space" != x; then
31564        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31566      fi
31567      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31568    fi
31569  fi
31570
31571  # Now join together the path and the arguments once again
31572  if test "x$arguments" != xEOL; then
31573    new_complete="$new_path ${arguments% *}"
31574  else
31575    new_complete="$new_path"
31576  fi
31577
31578  if test "x$complete" != "x$new_complete"; then
31579    CXXCPP="$new_complete"
31580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31581$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31582  fi
31583
31584
31585  #
31586  # Setup the linker (LD)
31587  #
31588  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31589    # In the Microsoft toolchain we have a separate LD command "link".
31590    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31591    # a cygwin program for something completely different.
31592    # Extract the first word of "link", so it can be a program name with args.
31593set dummy link; ac_word=$2
31594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31595$as_echo_n "checking for $ac_word... " >&6; }
31596if ${ac_cv_prog_LD+:} false; then :
31597  $as_echo_n "(cached) " >&6
31598else
31599  if test -n "$LD"; then
31600  ac_cv_prog_LD="$LD" # Let the user override the test.
31601else
31602  ac_prog_rejected=no
31603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31604for as_dir in $PATH
31605do
31606  IFS=$as_save_IFS
31607  test -z "$as_dir" && as_dir=.
31608    for ac_exec_ext in '' $ac_executable_extensions; do
31609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31610    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31611       ac_prog_rejected=yes
31612       continue
31613     fi
31614    ac_cv_prog_LD="link"
31615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31616    break 2
31617  fi
31618done
31619  done
31620IFS=$as_save_IFS
31621
31622if test $ac_prog_rejected = yes; then
31623  # We found a bogon in the path, so make sure we never use it.
31624  set dummy $ac_cv_prog_LD
31625  shift
31626  if test $# != 0; then
31627    # We chose a different compiler from the bogus one.
31628    # However, it has the same basename, so the bogon will be chosen
31629    # first if we set LD to just the basename; use the full file name.
31630    shift
31631    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31632  fi
31633fi
31634fi
31635fi
31636LD=$ac_cv_prog_LD
31637if test -n "$LD"; then
31638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31639$as_echo "$LD" >&6; }
31640else
31641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31642$as_echo "no" >&6; }
31643fi
31644
31645
31646
31647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31648
31649  # First separate the path from the arguments. This will split at the first
31650  # space.
31651  complete="$LD"
31652  path="${complete%% *}"
31653  tmp="$complete EOL"
31654  arguments="${tmp#* }"
31655
31656  # Input might be given as Windows format, start by converting to
31657  # unix format.
31658  new_path=`$CYGPATH -u "$path"`
31659
31660  # Now try to locate executable using which
31661  new_path=`$WHICH "$new_path" 2> /dev/null`
31662  # bat and cmd files are not always considered executable in cygwin causing which
31663  # to not find them
31664  if test "x$new_path" = x \
31665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31667    new_path=`$CYGPATH -u "$path"`
31668  fi
31669  if test "x$new_path" = x; then
31670    # Oops. Which didn't find the executable.
31671    # The splitting of arguments from the executable at a space might have been incorrect,
31672    # since paths with space are more likely in Windows. Give it another try with the whole
31673    # argument.
31674    path="$complete"
31675    arguments="EOL"
31676    new_path=`$CYGPATH -u "$path"`
31677    new_path=`$WHICH "$new_path" 2> /dev/null`
31678    # bat and cmd files are not always considered executable in cygwin causing which
31679    # to not find them
31680    if test "x$new_path" = x \
31681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31683      new_path=`$CYGPATH -u "$path"`
31684    fi
31685    if test "x$new_path" = x; then
31686      # It's still not found. Now this is an unrecoverable error.
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31688$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31689      has_space=`$ECHO "$complete" | $GREP " "`
31690      if test "x$has_space" != x; then
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31693      fi
31694      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31695    fi
31696  fi
31697
31698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31701  # "foo.exe" is OK but "foo" is an error.
31702  #
31703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31704  # It is also a way to make sure we got the proper file name for the real test later on.
31705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31706  if test "x$test_shortpath" = x; then
31707    # Short path failed, file does not exist as specified.
31708    # Try adding .exe or .cmd
31709    if test -f "${new_path}.exe"; then
31710      input_to_shortpath="${new_path}.exe"
31711    elif test -f "${new_path}.cmd"; then
31712      input_to_shortpath="${new_path}.cmd"
31713    else
31714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31715$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31718      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31719    fi
31720  else
31721    input_to_shortpath="$new_path"
31722  fi
31723
31724  # Call helper function which possibly converts this using DOS-style short mode.
31725  # If so, the updated path is stored in $new_path.
31726  new_path="$input_to_shortpath"
31727
31728  input_path="$input_to_shortpath"
31729  # Check if we need to convert this using DOS-style short mode. If the path
31730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31731  # take no chances and rewrite it.
31732  # Note: m4 eats our [], so we need to use [ and ] instead.
31733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31734  if test "x$has_forbidden_chars" != x; then
31735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31739      # Going to short mode and back again did indeed matter. Since short mode is
31740      # case insensitive, let's make it lowercase to improve readability.
31741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31742      # Now convert it back to Unix-stile (cygpath)
31743      input_path=`$CYGPATH -u "$shortmode_path"`
31744      new_path="$input_path"
31745    fi
31746  fi
31747
31748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31749  if test "x$test_cygdrive_prefix" = x; then
31750    # As a simple fix, exclude /usr/bin since it's not a real path.
31751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31753      # a path prefixed by /cygdrive for fixpath to work.
31754      new_path="$CYGWIN_ROOT_PATH$input_path"
31755    fi
31756  fi
31757
31758  # remove trailing .exe if any
31759  new_path="${new_path/%.exe/}"
31760
31761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31762
31763  # First separate the path from the arguments. This will split at the first
31764  # space.
31765  complete="$LD"
31766  path="${complete%% *}"
31767  tmp="$complete EOL"
31768  arguments="${tmp#* }"
31769
31770  # Input might be given as Windows format, start by converting to
31771  # unix format.
31772  new_path="$path"
31773
31774  windows_path="$new_path"
31775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31776    unix_path=`$CYGPATH -u "$windows_path"`
31777    new_path="$unix_path"
31778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31780    new_path="$unix_path"
31781  fi
31782
31783
31784  # Now try to locate executable using which
31785  new_path=`$WHICH "$new_path" 2> /dev/null`
31786
31787  if test "x$new_path" = x; then
31788    # Oops. Which didn't find the executable.
31789    # The splitting of arguments from the executable at a space might have been incorrect,
31790    # since paths with space are more likely in Windows. Give it another try with the whole
31791    # argument.
31792    path="$complete"
31793    arguments="EOL"
31794    new_path="$path"
31795
31796  windows_path="$new_path"
31797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31798    unix_path=`$CYGPATH -u "$windows_path"`
31799    new_path="$unix_path"
31800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31802    new_path="$unix_path"
31803  fi
31804
31805
31806    new_path=`$WHICH "$new_path" 2> /dev/null`
31807
31808    if test "x$new_path" = x; then
31809      # It's still not found. Now this is an unrecoverable error.
31810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31811$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31812      has_space=`$ECHO "$complete" | $GREP " "`
31813      if test "x$has_space" != x; then
31814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31816      fi
31817      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31818    fi
31819  fi
31820
31821  # Now new_path has a complete unix path to the binary
31822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31823    # Keep paths in /bin as-is, but remove trailing .exe if any
31824    new_path="${new_path/%.exe/}"
31825    # Do not save /bin paths to all_fixpath_prefixes!
31826  else
31827    # Not in mixed or Windows style, start by that.
31828    new_path=`cmd //c echo $new_path`
31829
31830  input_path="$new_path"
31831  # Check if we need to convert this using DOS-style short mode. If the path
31832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31833  # take no chances and rewrite it.
31834  # Note: m4 eats our [], so we need to use [ and ] instead.
31835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31836  if test "x$has_forbidden_chars" != x; then
31837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31839  fi
31840
31841    # Output is in $new_path
31842
31843  windows_path="$new_path"
31844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31845    unix_path=`$CYGPATH -u "$windows_path"`
31846    new_path="$unix_path"
31847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31849    new_path="$unix_path"
31850  fi
31851
31852    # remove trailing .exe if any
31853    new_path="${new_path/%.exe/}"
31854
31855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31857  fi
31858
31859  else
31860    # We're on a posix platform. Hooray! :)
31861    # First separate the path from the arguments. This will split at the first
31862    # space.
31863    complete="$LD"
31864    path="${complete%% *}"
31865    tmp="$complete EOL"
31866    arguments="${tmp#* }"
31867
31868    # Cannot rely on the command "which" here since it doesn't always work.
31869    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31870    if test -z "$is_absolute_path"; then
31871      # Path to executable is not absolute. Find it.
31872      IFS_save="$IFS"
31873      IFS=:
31874      for p in $PATH; do
31875        if test -f "$p/$path" && test -x "$p/$path"; then
31876          new_path="$p/$path"
31877          break
31878        fi
31879      done
31880      IFS="$IFS_save"
31881    else
31882      # This is an absolute path, we can use it without further modifications.
31883      new_path="$path"
31884    fi
31885
31886    if test "x$new_path" = x; then
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31888$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31889      has_space=`$ECHO "$complete" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31893      fi
31894      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31895    fi
31896  fi
31897
31898  # Now join together the path and the arguments once again
31899  if test "x$arguments" != xEOL; then
31900    new_complete="$new_path ${arguments% *}"
31901  else
31902    new_complete="$new_path"
31903  fi
31904
31905  if test "x$complete" != "x$new_complete"; then
31906    LD="$new_complete"
31907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31908$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31909  fi
31910
31911    # Verify that we indeed succeeded with this trick.
31912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31913$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31914    "$LD" --version > /dev/null
31915    if test $? -eq 0 ; then
31916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31917$as_echo "no" >&6; }
31918      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31919    else
31920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31921$as_echo "yes" >&6; }
31922    fi
31923    LDCXX="$LD"
31924  else
31925    # All other toolchains use the compiler to link.
31926    LD="$CC"
31927    LDCXX="$CXX"
31928  fi
31929
31930  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31931
31932
31933  #
31934  # Setup the assembler (AS)
31935  #
31936  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31937    # FIXME: should this really be solaris, or solstudio?
31938
31939
31940  # Publish this variable in the help.
31941
31942
31943  if test "x$AS" = x; then
31944    # The variable is not set by user, try to locate tool using the code snippet
31945    for ac_prog in as
31946do
31947  # Extract the first word of "$ac_prog", so it can be a program name with args.
31948set dummy $ac_prog; ac_word=$2
31949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31950$as_echo_n "checking for $ac_word... " >&6; }
31951if ${ac_cv_path_AS+:} false; then :
31952  $as_echo_n "(cached) " >&6
31953else
31954  case $AS in
31955  [\\/]* | ?:[\\/]*)
31956  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31957  ;;
31958  *)
31959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31960for as_dir in $PATH
31961do
31962  IFS=$as_save_IFS
31963  test -z "$as_dir" && as_dir=.
31964    for ac_exec_ext in '' $ac_executable_extensions; do
31965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31966    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31968    break 2
31969  fi
31970done
31971  done
31972IFS=$as_save_IFS
31973
31974  ;;
31975esac
31976fi
31977AS=$ac_cv_path_AS
31978if test -n "$AS"; then
31979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31980$as_echo "$AS" >&6; }
31981else
31982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31983$as_echo "no" >&6; }
31984fi
31985
31986
31987  test -n "$AS" && break
31988done
31989
31990  else
31991    # The variable is set, but is it from the command line or the environment?
31992
31993    # Try to remove the string !AS! from our list.
31994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31996      # If it failed, the variable was not from the command line. Ignore it,
31997      # but warn the user (except for BASH, which is always set by the calling BASH).
31998      if test "xAS" != xBASH; then
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32000$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32001      fi
32002      # Try to locate tool using the code snippet
32003      for ac_prog in as
32004do
32005  # Extract the first word of "$ac_prog", so it can be a program name with args.
32006set dummy $ac_prog; ac_word=$2
32007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32008$as_echo_n "checking for $ac_word... " >&6; }
32009if ${ac_cv_path_AS+:} false; then :
32010  $as_echo_n "(cached) " >&6
32011else
32012  case $AS in
32013  [\\/]* | ?:[\\/]*)
32014  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32015  ;;
32016  *)
32017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32018for as_dir in $PATH
32019do
32020  IFS=$as_save_IFS
32021  test -z "$as_dir" && as_dir=.
32022    for ac_exec_ext in '' $ac_executable_extensions; do
32023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32024    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32026    break 2
32027  fi
32028done
32029  done
32030IFS=$as_save_IFS
32031
32032  ;;
32033esac
32034fi
32035AS=$ac_cv_path_AS
32036if test -n "$AS"; then
32037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32038$as_echo "$AS" >&6; }
32039else
32040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32041$as_echo "no" >&6; }
32042fi
32043
32044
32045  test -n "$AS" && break
32046done
32047
32048    else
32049      # If it succeeded, then it was overridden by the user. We will use it
32050      # for the tool.
32051
32052      # First remove it from the list of overridden variables, so we can test
32053      # for unknown variables in the end.
32054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32055
32056      # Check if the provided tool contains a complete path.
32057      tool_specified="$AS"
32058      tool_basename="${tool_specified##*/}"
32059      if test "x$tool_basename" = "x$tool_specified"; then
32060        # A command without a complete path is provided, search $PATH.
32061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32062$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32063        # Extract the first word of "$tool_basename", so it can be a program name with args.
32064set dummy $tool_basename; ac_word=$2
32065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32066$as_echo_n "checking for $ac_word... " >&6; }
32067if ${ac_cv_path_AS+:} false; then :
32068  $as_echo_n "(cached) " >&6
32069else
32070  case $AS in
32071  [\\/]* | ?:[\\/]*)
32072  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32073  ;;
32074  *)
32075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32076for as_dir in $PATH
32077do
32078  IFS=$as_save_IFS
32079  test -z "$as_dir" && as_dir=.
32080    for ac_exec_ext in '' $ac_executable_extensions; do
32081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32082    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32084    break 2
32085  fi
32086done
32087  done
32088IFS=$as_save_IFS
32089
32090  ;;
32091esac
32092fi
32093AS=$ac_cv_path_AS
32094if test -n "$AS"; then
32095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32096$as_echo "$AS" >&6; }
32097else
32098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32099$as_echo "no" >&6; }
32100fi
32101
32102
32103        if test "x$AS" = x; then
32104          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32105        fi
32106      else
32107        # Otherwise we believe it is a complete path. Use it as it is.
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32109$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32111$as_echo_n "checking for AS... " >&6; }
32112        if test ! -x "$tool_specified"; then
32113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32114$as_echo "not found" >&6; }
32115          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32116        fi
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32118$as_echo "$tool_specified" >&6; }
32119      fi
32120    fi
32121  fi
32122
32123
32124
32125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32126
32127  # First separate the path from the arguments. This will split at the first
32128  # space.
32129  complete="$AS"
32130  path="${complete%% *}"
32131  tmp="$complete EOL"
32132  arguments="${tmp#* }"
32133
32134  # Input might be given as Windows format, start by converting to
32135  # unix format.
32136  new_path=`$CYGPATH -u "$path"`
32137
32138  # Now try to locate executable using which
32139  new_path=`$WHICH "$new_path" 2> /dev/null`
32140  # bat and cmd files are not always considered executable in cygwin causing which
32141  # to not find them
32142  if test "x$new_path" = x \
32143      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32144      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32145    new_path=`$CYGPATH -u "$path"`
32146  fi
32147  if test "x$new_path" = x; then
32148    # Oops. Which didn't find the executable.
32149    # The splitting of arguments from the executable at a space might have been incorrect,
32150    # since paths with space are more likely in Windows. Give it another try with the whole
32151    # argument.
32152    path="$complete"
32153    arguments="EOL"
32154    new_path=`$CYGPATH -u "$path"`
32155    new_path=`$WHICH "$new_path" 2> /dev/null`
32156    # bat and cmd files are not always considered executable in cygwin causing which
32157    # to not find them
32158    if test "x$new_path" = x \
32159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32161      new_path=`$CYGPATH -u "$path"`
32162    fi
32163    if test "x$new_path" = x; then
32164      # It's still not found. Now this is an unrecoverable error.
32165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32166$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32167      has_space=`$ECHO "$complete" | $GREP " "`
32168      if test "x$has_space" != x; then
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32171      fi
32172      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32173    fi
32174  fi
32175
32176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32179  # "foo.exe" is OK but "foo" is an error.
32180  #
32181  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32182  # It is also a way to make sure we got the proper file name for the real test later on.
32183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32184  if test "x$test_shortpath" = x; then
32185    # Short path failed, file does not exist as specified.
32186    # Try adding .exe or .cmd
32187    if test -f "${new_path}.exe"; then
32188      input_to_shortpath="${new_path}.exe"
32189    elif test -f "${new_path}.cmd"; then
32190      input_to_shortpath="${new_path}.cmd"
32191    else
32192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32193$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32194      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32195$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32196      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32197    fi
32198  else
32199    input_to_shortpath="$new_path"
32200  fi
32201
32202  # Call helper function which possibly converts this using DOS-style short mode.
32203  # If so, the updated path is stored in $new_path.
32204  new_path="$input_to_shortpath"
32205
32206  input_path="$input_to_shortpath"
32207  # Check if we need to convert this using DOS-style short mode. If the path
32208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32209  # take no chances and rewrite it.
32210  # Note: m4 eats our [], so we need to use [ and ] instead.
32211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32212  if test "x$has_forbidden_chars" != x; then
32213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32217      # Going to short mode and back again did indeed matter. Since short mode is
32218      # case insensitive, let's make it lowercase to improve readability.
32219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32220      # Now convert it back to Unix-stile (cygpath)
32221      input_path=`$CYGPATH -u "$shortmode_path"`
32222      new_path="$input_path"
32223    fi
32224  fi
32225
32226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32227  if test "x$test_cygdrive_prefix" = x; then
32228    # As a simple fix, exclude /usr/bin since it's not a real path.
32229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32231      # a path prefixed by /cygdrive for fixpath to work.
32232      new_path="$CYGWIN_ROOT_PATH$input_path"
32233    fi
32234  fi
32235
32236  # remove trailing .exe if any
32237  new_path="${new_path/%.exe/}"
32238
32239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32240
32241  # First separate the path from the arguments. This will split at the first
32242  # space.
32243  complete="$AS"
32244  path="${complete%% *}"
32245  tmp="$complete EOL"
32246  arguments="${tmp#* }"
32247
32248  # Input might be given as Windows format, start by converting to
32249  # unix format.
32250  new_path="$path"
32251
32252  windows_path="$new_path"
32253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32254    unix_path=`$CYGPATH -u "$windows_path"`
32255    new_path="$unix_path"
32256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32258    new_path="$unix_path"
32259  fi
32260
32261
32262  # Now try to locate executable using which
32263  new_path=`$WHICH "$new_path" 2> /dev/null`
32264
32265  if test "x$new_path" = x; then
32266    # Oops. Which didn't find the executable.
32267    # The splitting of arguments from the executable at a space might have been incorrect,
32268    # since paths with space are more likely in Windows. Give it another try with the whole
32269    # argument.
32270    path="$complete"
32271    arguments="EOL"
32272    new_path="$path"
32273
32274  windows_path="$new_path"
32275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32276    unix_path=`$CYGPATH -u "$windows_path"`
32277    new_path="$unix_path"
32278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32280    new_path="$unix_path"
32281  fi
32282
32283
32284    new_path=`$WHICH "$new_path" 2> /dev/null`
32285
32286    if test "x$new_path" = x; then
32287      # It's still not found. Now this is an unrecoverable error.
32288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32289$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32290      has_space=`$ECHO "$complete" | $GREP " "`
32291      if test "x$has_space" != x; then
32292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32294      fi
32295      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32296    fi
32297  fi
32298
32299  # Now new_path has a complete unix path to the binary
32300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32301    # Keep paths in /bin as-is, but remove trailing .exe if any
32302    new_path="${new_path/%.exe/}"
32303    # Do not save /bin paths to all_fixpath_prefixes!
32304  else
32305    # Not in mixed or Windows style, start by that.
32306    new_path=`cmd //c echo $new_path`
32307
32308  input_path="$new_path"
32309  # Check if we need to convert this using DOS-style short mode. If the path
32310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32311  # take no chances and rewrite it.
32312  # Note: m4 eats our [], so we need to use [ and ] instead.
32313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32314  if test "x$has_forbidden_chars" != x; then
32315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32317  fi
32318
32319    # Output is in $new_path
32320
32321  windows_path="$new_path"
32322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32323    unix_path=`$CYGPATH -u "$windows_path"`
32324    new_path="$unix_path"
32325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32327    new_path="$unix_path"
32328  fi
32329
32330    # remove trailing .exe if any
32331    new_path="${new_path/%.exe/}"
32332
32333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32335  fi
32336
32337  else
32338    # We're on a posix platform. Hooray! :)
32339    # First separate the path from the arguments. This will split at the first
32340    # space.
32341    complete="$AS"
32342    path="${complete%% *}"
32343    tmp="$complete EOL"
32344    arguments="${tmp#* }"
32345
32346    # Cannot rely on the command "which" here since it doesn't always work.
32347    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32348    if test -z "$is_absolute_path"; then
32349      # Path to executable is not absolute. Find it.
32350      IFS_save="$IFS"
32351      IFS=:
32352      for p in $PATH; do
32353        if test -f "$p/$path" && test -x "$p/$path"; then
32354          new_path="$p/$path"
32355          break
32356        fi
32357      done
32358      IFS="$IFS_save"
32359    else
32360      # This is an absolute path, we can use it without further modifications.
32361      new_path="$path"
32362    fi
32363
32364    if test "x$new_path" = x; then
32365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32366$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32367      has_space=`$ECHO "$complete" | $GREP " "`
32368      if test "x$has_space" != x; then
32369        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32371      fi
32372      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32373    fi
32374  fi
32375
32376  # Now join together the path and the arguments once again
32377  if test "x$arguments" != xEOL; then
32378    new_complete="$new_path ${arguments% *}"
32379  else
32380    new_complete="$new_path"
32381  fi
32382
32383  if test "x$complete" != "x$new_complete"; then
32384    AS="$new_complete"
32385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32386$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32387  fi
32388
32389  else
32390    # FIXME: is this correct for microsoft?
32391    AS="$CC -c"
32392  fi
32393
32394
32395  #
32396  # Setup the archiver (AR)
32397  #
32398  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32399    # The corresponding ar tool is lib.exe (used to create static libraries)
32400    # Extract the first word of "lib", so it can be a program name with args.
32401set dummy lib; ac_word=$2
32402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32403$as_echo_n "checking for $ac_word... " >&6; }
32404if ${ac_cv_prog_AR+:} false; then :
32405  $as_echo_n "(cached) " >&6
32406else
32407  if test -n "$AR"; then
32408  ac_cv_prog_AR="$AR" # Let the user override the test.
32409else
32410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32411for as_dir in $PATH
32412do
32413  IFS=$as_save_IFS
32414  test -z "$as_dir" && as_dir=.
32415    for ac_exec_ext in '' $ac_executable_extensions; do
32416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32417    ac_cv_prog_AR="lib"
32418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32419    break 2
32420  fi
32421done
32422  done
32423IFS=$as_save_IFS
32424
32425fi
32426fi
32427AR=$ac_cv_prog_AR
32428if test -n "$AR"; then
32429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32430$as_echo "$AR" >&6; }
32431else
32432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32433$as_echo "no" >&6; }
32434fi
32435
32436
32437  else
32438
32439
32440  # Publish this variable in the help.
32441
32442
32443  if test "x$AR" = x; then
32444    # The variable is not set by user, try to locate tool using the code snippet
32445    if test -n "$ac_tool_prefix"; then
32446  for ac_prog in ar
32447  do
32448    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32451$as_echo_n "checking for $ac_word... " >&6; }
32452if ${ac_cv_prog_AR+:} false; then :
32453  $as_echo_n "(cached) " >&6
32454else
32455  if test -n "$AR"; then
32456  ac_cv_prog_AR="$AR" # Let the user override the test.
32457else
32458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32459for as_dir in $PATH
32460do
32461  IFS=$as_save_IFS
32462  test -z "$as_dir" && as_dir=.
32463    for ac_exec_ext in '' $ac_executable_extensions; do
32464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32465    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32467    break 2
32468  fi
32469done
32470  done
32471IFS=$as_save_IFS
32472
32473fi
32474fi
32475AR=$ac_cv_prog_AR
32476if test -n "$AR"; then
32477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32478$as_echo "$AR" >&6; }
32479else
32480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32481$as_echo "no" >&6; }
32482fi
32483
32484
32485    test -n "$AR" && break
32486  done
32487fi
32488if test -z "$AR"; then
32489  ac_ct_AR=$AR
32490  for ac_prog in ar
32491do
32492  # Extract the first word of "$ac_prog", so it can be a program name with args.
32493set dummy $ac_prog; ac_word=$2
32494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32495$as_echo_n "checking for $ac_word... " >&6; }
32496if ${ac_cv_prog_ac_ct_AR+:} false; then :
32497  $as_echo_n "(cached) " >&6
32498else
32499  if test -n "$ac_ct_AR"; then
32500  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32501else
32502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32503for as_dir in $PATH
32504do
32505  IFS=$as_save_IFS
32506  test -z "$as_dir" && as_dir=.
32507    for ac_exec_ext in '' $ac_executable_extensions; do
32508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32509    ac_cv_prog_ac_ct_AR="$ac_prog"
32510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32511    break 2
32512  fi
32513done
32514  done
32515IFS=$as_save_IFS
32516
32517fi
32518fi
32519ac_ct_AR=$ac_cv_prog_ac_ct_AR
32520if test -n "$ac_ct_AR"; then
32521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32522$as_echo "$ac_ct_AR" >&6; }
32523else
32524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32525$as_echo "no" >&6; }
32526fi
32527
32528
32529  test -n "$ac_ct_AR" && break
32530done
32531
32532  if test "x$ac_ct_AR" = x; then
32533    AR=""
32534  else
32535    case $cross_compiling:$ac_tool_warned in
32536yes:)
32537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32539ac_tool_warned=yes ;;
32540esac
32541    AR=$ac_ct_AR
32542  fi
32543fi
32544
32545  else
32546    # The variable is set, but is it from the command line or the environment?
32547
32548    # Try to remove the string !AR! from our list.
32549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32551      # If it failed, the variable was not from the command line. Ignore it,
32552      # but warn the user (except for BASH, which is always set by the calling BASH).
32553      if test "xAR" != xBASH; then
32554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32555$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32556      fi
32557      # Try to locate tool using the code snippet
32558      if test -n "$ac_tool_prefix"; then
32559  for ac_prog in ar
32560  do
32561    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32564$as_echo_n "checking for $ac_word... " >&6; }
32565if ${ac_cv_prog_AR+:} false; then :
32566  $as_echo_n "(cached) " >&6
32567else
32568  if test -n "$AR"; then
32569  ac_cv_prog_AR="$AR" # Let the user override the test.
32570else
32571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32572for as_dir in $PATH
32573do
32574  IFS=$as_save_IFS
32575  test -z "$as_dir" && as_dir=.
32576    for ac_exec_ext in '' $ac_executable_extensions; do
32577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32578    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32580    break 2
32581  fi
32582done
32583  done
32584IFS=$as_save_IFS
32585
32586fi
32587fi
32588AR=$ac_cv_prog_AR
32589if test -n "$AR"; then
32590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32591$as_echo "$AR" >&6; }
32592else
32593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32594$as_echo "no" >&6; }
32595fi
32596
32597
32598    test -n "$AR" && break
32599  done
32600fi
32601if test -z "$AR"; then
32602  ac_ct_AR=$AR
32603  for ac_prog in ar
32604do
32605  # Extract the first word of "$ac_prog", so it can be a program name with args.
32606set dummy $ac_prog; ac_word=$2
32607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32608$as_echo_n "checking for $ac_word... " >&6; }
32609if ${ac_cv_prog_ac_ct_AR+:} false; then :
32610  $as_echo_n "(cached) " >&6
32611else
32612  if test -n "$ac_ct_AR"; then
32613  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32614else
32615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32616for as_dir in $PATH
32617do
32618  IFS=$as_save_IFS
32619  test -z "$as_dir" && as_dir=.
32620    for ac_exec_ext in '' $ac_executable_extensions; do
32621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32622    ac_cv_prog_ac_ct_AR="$ac_prog"
32623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32624    break 2
32625  fi
32626done
32627  done
32628IFS=$as_save_IFS
32629
32630fi
32631fi
32632ac_ct_AR=$ac_cv_prog_ac_ct_AR
32633if test -n "$ac_ct_AR"; then
32634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32635$as_echo "$ac_ct_AR" >&6; }
32636else
32637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32638$as_echo "no" >&6; }
32639fi
32640
32641
32642  test -n "$ac_ct_AR" && break
32643done
32644
32645  if test "x$ac_ct_AR" = x; then
32646    AR=""
32647  else
32648    case $cross_compiling:$ac_tool_warned in
32649yes:)
32650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32652ac_tool_warned=yes ;;
32653esac
32654    AR=$ac_ct_AR
32655  fi
32656fi
32657
32658    else
32659      # If it succeeded, then it was overridden by the user. We will use it
32660      # for the tool.
32661
32662      # First remove it from the list of overridden variables, so we can test
32663      # for unknown variables in the end.
32664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32665
32666      # Check if the provided tool contains a complete path.
32667      tool_specified="$AR"
32668      tool_basename="${tool_specified##*/}"
32669      if test "x$tool_basename" = "x$tool_specified"; then
32670        # A command without a complete path is provided, search $PATH.
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32672$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32673        # Extract the first word of "$tool_basename", so it can be a program name with args.
32674set dummy $tool_basename; ac_word=$2
32675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32676$as_echo_n "checking for $ac_word... " >&6; }
32677if ${ac_cv_path_AR+:} false; then :
32678  $as_echo_n "(cached) " >&6
32679else
32680  case $AR in
32681  [\\/]* | ?:[\\/]*)
32682  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32683  ;;
32684  *)
32685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32686for as_dir in $PATH
32687do
32688  IFS=$as_save_IFS
32689  test -z "$as_dir" && as_dir=.
32690    for ac_exec_ext in '' $ac_executable_extensions; do
32691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32692    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32694    break 2
32695  fi
32696done
32697  done
32698IFS=$as_save_IFS
32699
32700  ;;
32701esac
32702fi
32703AR=$ac_cv_path_AR
32704if test -n "$AR"; then
32705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32706$as_echo "$AR" >&6; }
32707else
32708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32709$as_echo "no" >&6; }
32710fi
32711
32712
32713        if test "x$AR" = x; then
32714          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32715        fi
32716      else
32717        # Otherwise we believe it is a complete path. Use it as it is.
32718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32719$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32721$as_echo_n "checking for AR... " >&6; }
32722        if test ! -x "$tool_specified"; then
32723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32724$as_echo "not found" >&6; }
32725          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32726        fi
32727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32728$as_echo "$tool_specified" >&6; }
32729      fi
32730    fi
32731  fi
32732
32733
32734  fi
32735
32736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32737
32738  # First separate the path from the arguments. This will split at the first
32739  # space.
32740  complete="$AR"
32741  path="${complete%% *}"
32742  tmp="$complete EOL"
32743  arguments="${tmp#* }"
32744
32745  # Input might be given as Windows format, start by converting to
32746  # unix format.
32747  new_path=`$CYGPATH -u "$path"`
32748
32749  # Now try to locate executable using which
32750  new_path=`$WHICH "$new_path" 2> /dev/null`
32751  # bat and cmd files are not always considered executable in cygwin causing which
32752  # to not find them
32753  if test "x$new_path" = x \
32754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32756    new_path=`$CYGPATH -u "$path"`
32757  fi
32758  if test "x$new_path" = x; then
32759    # Oops. Which didn't find the executable.
32760    # The splitting of arguments from the executable at a space might have been incorrect,
32761    # since paths with space are more likely in Windows. Give it another try with the whole
32762    # argument.
32763    path="$complete"
32764    arguments="EOL"
32765    new_path=`$CYGPATH -u "$path"`
32766    new_path=`$WHICH "$new_path" 2> /dev/null`
32767    # bat and cmd files are not always considered executable in cygwin causing which
32768    # to not find them
32769    if test "x$new_path" = x \
32770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32772      new_path=`$CYGPATH -u "$path"`
32773    fi
32774    if test "x$new_path" = x; then
32775      # It's still not found. Now this is an unrecoverable error.
32776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32777$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32778      has_space=`$ECHO "$complete" | $GREP " "`
32779      if test "x$has_space" != x; then
32780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32782      fi
32783      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32784    fi
32785  fi
32786
32787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32790  # "foo.exe" is OK but "foo" is an error.
32791  #
32792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32793  # It is also a way to make sure we got the proper file name for the real test later on.
32794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32795  if test "x$test_shortpath" = x; then
32796    # Short path failed, file does not exist as specified.
32797    # Try adding .exe or .cmd
32798    if test -f "${new_path}.exe"; then
32799      input_to_shortpath="${new_path}.exe"
32800    elif test -f "${new_path}.cmd"; then
32801      input_to_shortpath="${new_path}.cmd"
32802    else
32803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32804$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32808    fi
32809  else
32810    input_to_shortpath="$new_path"
32811  fi
32812
32813  # Call helper function which possibly converts this using DOS-style short mode.
32814  # If so, the updated path is stored in $new_path.
32815  new_path="$input_to_shortpath"
32816
32817  input_path="$input_to_shortpath"
32818  # Check if we need to convert this using DOS-style short mode. If the path
32819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32820  # take no chances and rewrite it.
32821  # Note: m4 eats our [], so we need to use [ and ] instead.
32822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32823  if test "x$has_forbidden_chars" != x; then
32824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32828      # Going to short mode and back again did indeed matter. Since short mode is
32829      # case insensitive, let's make it lowercase to improve readability.
32830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32831      # Now convert it back to Unix-stile (cygpath)
32832      input_path=`$CYGPATH -u "$shortmode_path"`
32833      new_path="$input_path"
32834    fi
32835  fi
32836
32837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32838  if test "x$test_cygdrive_prefix" = x; then
32839    # As a simple fix, exclude /usr/bin since it's not a real path.
32840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32842      # a path prefixed by /cygdrive for fixpath to work.
32843      new_path="$CYGWIN_ROOT_PATH$input_path"
32844    fi
32845  fi
32846
32847  # remove trailing .exe if any
32848  new_path="${new_path/%.exe/}"
32849
32850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32851
32852  # First separate the path from the arguments. This will split at the first
32853  # space.
32854  complete="$AR"
32855  path="${complete%% *}"
32856  tmp="$complete EOL"
32857  arguments="${tmp#* }"
32858
32859  # Input might be given as Windows format, start by converting to
32860  # unix format.
32861  new_path="$path"
32862
32863  windows_path="$new_path"
32864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32865    unix_path=`$CYGPATH -u "$windows_path"`
32866    new_path="$unix_path"
32867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32869    new_path="$unix_path"
32870  fi
32871
32872
32873  # Now try to locate executable using which
32874  new_path=`$WHICH "$new_path" 2> /dev/null`
32875
32876  if test "x$new_path" = x; then
32877    # Oops. Which didn't find the executable.
32878    # The splitting of arguments from the executable at a space might have been incorrect,
32879    # since paths with space are more likely in Windows. Give it another try with the whole
32880    # argument.
32881    path="$complete"
32882    arguments="EOL"
32883    new_path="$path"
32884
32885  windows_path="$new_path"
32886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32887    unix_path=`$CYGPATH -u "$windows_path"`
32888    new_path="$unix_path"
32889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32891    new_path="$unix_path"
32892  fi
32893
32894
32895    new_path=`$WHICH "$new_path" 2> /dev/null`
32896
32897    if test "x$new_path" = x; then
32898      # It's still not found. Now this is an unrecoverable error.
32899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32900$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32901      has_space=`$ECHO "$complete" | $GREP " "`
32902      if test "x$has_space" != x; then
32903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32905      fi
32906      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32907    fi
32908  fi
32909
32910  # Now new_path has a complete unix path to the binary
32911  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32912    # Keep paths in /bin as-is, but remove trailing .exe if any
32913    new_path="${new_path/%.exe/}"
32914    # Do not save /bin paths to all_fixpath_prefixes!
32915  else
32916    # Not in mixed or Windows style, start by that.
32917    new_path=`cmd //c echo $new_path`
32918
32919  input_path="$new_path"
32920  # Check if we need to convert this using DOS-style short mode. If the path
32921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32922  # take no chances and rewrite it.
32923  # Note: m4 eats our [], so we need to use [ and ] instead.
32924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32925  if test "x$has_forbidden_chars" != x; then
32926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32928  fi
32929
32930    # Output is in $new_path
32931
32932  windows_path="$new_path"
32933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32934    unix_path=`$CYGPATH -u "$windows_path"`
32935    new_path="$unix_path"
32936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32938    new_path="$unix_path"
32939  fi
32940
32941    # remove trailing .exe if any
32942    new_path="${new_path/%.exe/}"
32943
32944    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32945    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32946  fi
32947
32948  else
32949    # We're on a posix platform. Hooray! :)
32950    # First separate the path from the arguments. This will split at the first
32951    # space.
32952    complete="$AR"
32953    path="${complete%% *}"
32954    tmp="$complete EOL"
32955    arguments="${tmp#* }"
32956
32957    # Cannot rely on the command "which" here since it doesn't always work.
32958    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32959    if test -z "$is_absolute_path"; then
32960      # Path to executable is not absolute. Find it.
32961      IFS_save="$IFS"
32962      IFS=:
32963      for p in $PATH; do
32964        if test -f "$p/$path" && test -x "$p/$path"; then
32965          new_path="$p/$path"
32966          break
32967        fi
32968      done
32969      IFS="$IFS_save"
32970    else
32971      # This is an absolute path, we can use it without further modifications.
32972      new_path="$path"
32973    fi
32974
32975    if test "x$new_path" = x; then
32976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32977$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32978      has_space=`$ECHO "$complete" | $GREP " "`
32979      if test "x$has_space" != x; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32982      fi
32983      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32984    fi
32985  fi
32986
32987  # Now join together the path and the arguments once again
32988  if test "x$arguments" != xEOL; then
32989    new_complete="$new_path ${arguments% *}"
32990  else
32991    new_complete="$new_path"
32992  fi
32993
32994  if test "x$complete" != "x$new_complete"; then
32995    AR="$new_complete"
32996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32997$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32998  fi
32999
33000
33001
33002  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33003    ac_ext=m
33004ac_cpp='$OBJCPP $CPPFLAGS'
33005ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33006ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33007ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33008if test -n "$ac_tool_prefix"; then
33009  for ac_prog in gcc objcc objc cc CC
33010  do
33011    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33014$as_echo_n "checking for $ac_word... " >&6; }
33015if ${ac_cv_prog_OBJC+:} false; then :
33016  $as_echo_n "(cached) " >&6
33017else
33018  if test -n "$OBJC"; then
33019  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33020else
33021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33022for as_dir in $PATH
33023do
33024  IFS=$as_save_IFS
33025  test -z "$as_dir" && as_dir=.
33026    for ac_exec_ext in '' $ac_executable_extensions; do
33027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33028    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33030    break 2
33031  fi
33032done
33033  done
33034IFS=$as_save_IFS
33035
33036fi
33037fi
33038OBJC=$ac_cv_prog_OBJC
33039if test -n "$OBJC"; then
33040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33041$as_echo "$OBJC" >&6; }
33042else
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33044$as_echo "no" >&6; }
33045fi
33046
33047
33048    test -n "$OBJC" && break
33049  done
33050fi
33051if test -z "$OBJC"; then
33052  ac_ct_OBJC=$OBJC
33053  for ac_prog in gcc objcc objc cc CC
33054do
33055  # Extract the first word of "$ac_prog", so it can be a program name with args.
33056set dummy $ac_prog; ac_word=$2
33057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33058$as_echo_n "checking for $ac_word... " >&6; }
33059if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33060  $as_echo_n "(cached) " >&6
33061else
33062  if test -n "$ac_ct_OBJC"; then
33063  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33064else
33065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33066for as_dir in $PATH
33067do
33068  IFS=$as_save_IFS
33069  test -z "$as_dir" && as_dir=.
33070    for ac_exec_ext in '' $ac_executable_extensions; do
33071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33072    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33074    break 2
33075  fi
33076done
33077  done
33078IFS=$as_save_IFS
33079
33080fi
33081fi
33082ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33083if test -n "$ac_ct_OBJC"; then
33084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33085$as_echo "$ac_ct_OBJC" >&6; }
33086else
33087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33088$as_echo "no" >&6; }
33089fi
33090
33091
33092  test -n "$ac_ct_OBJC" && break
33093done
33094
33095  if test "x$ac_ct_OBJC" = x; then
33096    OBJC="gcc"
33097  else
33098    case $cross_compiling:$ac_tool_warned in
33099yes:)
33100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33102ac_tool_warned=yes ;;
33103esac
33104    OBJC=$ac_ct_OBJC
33105  fi
33106fi
33107
33108# Provide some information about the compiler.
33109$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33110set X $ac_compile
33111ac_compiler=$2
33112for ac_option in --version -v -V -qversion; do
33113  { { ac_try="$ac_compiler $ac_option >&5"
33114case "(($ac_try" in
33115  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33116  *) ac_try_echo=$ac_try;;
33117esac
33118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33119$as_echo "$ac_try_echo"; } >&5
33120  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33121  ac_status=$?
33122  if test -s conftest.err; then
33123    sed '10a\
33124... rest of stderr output deleted ...
33125         10q' conftest.err >conftest.er1
33126    cat conftest.er1 >&5
33127  fi
33128  rm -f conftest.er1 conftest.err
33129  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33130  test $ac_status = 0; }
33131done
33132
33133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33134$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33135if ${ac_cv_objc_compiler_gnu+:} false; then :
33136  $as_echo_n "(cached) " >&6
33137else
33138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33139/* end confdefs.h.  */
33140
33141int
33142main ()
33143{
33144#ifndef __GNUC__
33145       choke me
33146#endif
33147
33148  ;
33149  return 0;
33150}
33151_ACEOF
33152if ac_fn_objc_try_compile "$LINENO"; then :
33153  ac_compiler_gnu=yes
33154else
33155  ac_compiler_gnu=no
33156fi
33157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33158ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33159
33160fi
33161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33162$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33163if test $ac_compiler_gnu = yes; then
33164  GOBJC=yes
33165else
33166  GOBJC=
33167fi
33168ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33169ac_save_OBJCFLAGS=$OBJCFLAGS
33170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33171$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33172if ${ac_cv_prog_objc_g+:} false; then :
33173  $as_echo_n "(cached) " >&6
33174else
33175  ac_save_objc_werror_flag=$ac_objc_werror_flag
33176   ac_objc_werror_flag=yes
33177   ac_cv_prog_objc_g=no
33178   OBJCFLAGS="-g"
33179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33180/* end confdefs.h.  */
33181
33182int
33183main ()
33184{
33185
33186  ;
33187  return 0;
33188}
33189_ACEOF
33190if ac_fn_objc_try_compile "$LINENO"; then :
33191  ac_cv_prog_objc_g=yes
33192else
33193  OBJCFLAGS=""
33194      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33195/* end confdefs.h.  */
33196
33197int
33198main ()
33199{
33200
33201  ;
33202  return 0;
33203}
33204_ACEOF
33205if ac_fn_objc_try_compile "$LINENO"; then :
33206
33207else
33208  ac_objc_werror_flag=$ac_save_objc_werror_flag
33209	 OBJCFLAGS="-g"
33210	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33211/* end confdefs.h.  */
33212
33213int
33214main ()
33215{
33216
33217  ;
33218  return 0;
33219}
33220_ACEOF
33221if ac_fn_objc_try_compile "$LINENO"; then :
33222  ac_cv_prog_objc_g=yes
33223fi
33224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33225fi
33226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33227fi
33228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33229   ac_objc_werror_flag=$ac_save_objc_werror_flag
33230fi
33231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33232$as_echo "$ac_cv_prog_objc_g" >&6; }
33233if test "$ac_test_OBJCFLAGS" = set; then
33234  OBJCFLAGS=$ac_save_OBJCFLAGS
33235elif test $ac_cv_prog_objc_g = yes; then
33236  if test "$GOBJC" = yes; then
33237    OBJCFLAGS="-g -O2"
33238  else
33239    OBJCFLAGS="-g"
33240  fi
33241else
33242  if test "$GOBJC" = yes; then
33243    OBJCFLAGS="-O2"
33244  else
33245    OBJCFLAGS=
33246  fi
33247fi
33248ac_ext=cpp
33249ac_cpp='$CXXCPP $CPPFLAGS'
33250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33253
33254
33255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33256
33257  # First separate the path from the arguments. This will split at the first
33258  # space.
33259  complete="$OBJC"
33260  path="${complete%% *}"
33261  tmp="$complete EOL"
33262  arguments="${tmp#* }"
33263
33264  # Input might be given as Windows format, start by converting to
33265  # unix format.
33266  new_path=`$CYGPATH -u "$path"`
33267
33268  # Now try to locate executable using which
33269  new_path=`$WHICH "$new_path" 2> /dev/null`
33270  # bat and cmd files are not always considered executable in cygwin causing which
33271  # to not find them
33272  if test "x$new_path" = x \
33273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33275    new_path=`$CYGPATH -u "$path"`
33276  fi
33277  if test "x$new_path" = x; then
33278    # Oops. Which didn't find the executable.
33279    # The splitting of arguments from the executable at a space might have been incorrect,
33280    # since paths with space are more likely in Windows. Give it another try with the whole
33281    # argument.
33282    path="$complete"
33283    arguments="EOL"
33284    new_path=`$CYGPATH -u "$path"`
33285    new_path=`$WHICH "$new_path" 2> /dev/null`
33286    # bat and cmd files are not always considered executable in cygwin causing which
33287    # to not find them
33288    if test "x$new_path" = x \
33289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33291      new_path=`$CYGPATH -u "$path"`
33292    fi
33293    if test "x$new_path" = x; then
33294      # It's still not found. Now this is an unrecoverable error.
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33296$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33297      has_space=`$ECHO "$complete" | $GREP " "`
33298      if test "x$has_space" != x; then
33299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33301      fi
33302      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33303    fi
33304  fi
33305
33306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33309  # "foo.exe" is OK but "foo" is an error.
33310  #
33311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33312  # It is also a way to make sure we got the proper file name for the real test later on.
33313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33314  if test "x$test_shortpath" = x; then
33315    # Short path failed, file does not exist as specified.
33316    # Try adding .exe or .cmd
33317    if test -f "${new_path}.exe"; then
33318      input_to_shortpath="${new_path}.exe"
33319    elif test -f "${new_path}.cmd"; then
33320      input_to_shortpath="${new_path}.cmd"
33321    else
33322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33323$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33326      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33327    fi
33328  else
33329    input_to_shortpath="$new_path"
33330  fi
33331
33332  # Call helper function which possibly converts this using DOS-style short mode.
33333  # If so, the updated path is stored in $new_path.
33334  new_path="$input_to_shortpath"
33335
33336  input_path="$input_to_shortpath"
33337  # Check if we need to convert this using DOS-style short mode. If the path
33338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33339  # take no chances and rewrite it.
33340  # Note: m4 eats our [], so we need to use [ and ] instead.
33341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33342  if test "x$has_forbidden_chars" != x; then
33343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33347      # Going to short mode and back again did indeed matter. Since short mode is
33348      # case insensitive, let's make it lowercase to improve readability.
33349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33350      # Now convert it back to Unix-stile (cygpath)
33351      input_path=`$CYGPATH -u "$shortmode_path"`
33352      new_path="$input_path"
33353    fi
33354  fi
33355
33356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33357  if test "x$test_cygdrive_prefix" = x; then
33358    # As a simple fix, exclude /usr/bin since it's not a real path.
33359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33361      # a path prefixed by /cygdrive for fixpath to work.
33362      new_path="$CYGWIN_ROOT_PATH$input_path"
33363    fi
33364  fi
33365
33366  # remove trailing .exe if any
33367  new_path="${new_path/%.exe/}"
33368
33369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33370
33371  # First separate the path from the arguments. This will split at the first
33372  # space.
33373  complete="$OBJC"
33374  path="${complete%% *}"
33375  tmp="$complete EOL"
33376  arguments="${tmp#* }"
33377
33378  # Input might be given as Windows format, start by converting to
33379  # unix format.
33380  new_path="$path"
33381
33382  windows_path="$new_path"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    unix_path=`$CYGPATH -u "$windows_path"`
33385    new_path="$unix_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33388    new_path="$unix_path"
33389  fi
33390
33391
33392  # Now try to locate executable using which
33393  new_path=`$WHICH "$new_path" 2> /dev/null`
33394
33395  if test "x$new_path" = x; then
33396    # Oops. Which didn't find the executable.
33397    # The splitting of arguments from the executable at a space might have been incorrect,
33398    # since paths with space are more likely in Windows. Give it another try with the whole
33399    # argument.
33400    path="$complete"
33401    arguments="EOL"
33402    new_path="$path"
33403
33404  windows_path="$new_path"
33405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33406    unix_path=`$CYGPATH -u "$windows_path"`
33407    new_path="$unix_path"
33408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33410    new_path="$unix_path"
33411  fi
33412
33413
33414    new_path=`$WHICH "$new_path" 2> /dev/null`
33415
33416    if test "x$new_path" = x; then
33417      # It's still not found. Now this is an unrecoverable error.
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33419$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33420      has_space=`$ECHO "$complete" | $GREP " "`
33421      if test "x$has_space" != x; then
33422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33424      fi
33425      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33426    fi
33427  fi
33428
33429  # Now new_path has a complete unix path to the binary
33430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33431    # Keep paths in /bin as-is, but remove trailing .exe if any
33432    new_path="${new_path/%.exe/}"
33433    # Do not save /bin paths to all_fixpath_prefixes!
33434  else
33435    # Not in mixed or Windows style, start by that.
33436    new_path=`cmd //c echo $new_path`
33437
33438  input_path="$new_path"
33439  # Check if we need to convert this using DOS-style short mode. If the path
33440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33441  # take no chances and rewrite it.
33442  # Note: m4 eats our [], so we need to use [ and ] instead.
33443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33444  if test "x$has_forbidden_chars" != x; then
33445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33447  fi
33448
33449    # Output is in $new_path
33450
33451  windows_path="$new_path"
33452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33453    unix_path=`$CYGPATH -u "$windows_path"`
33454    new_path="$unix_path"
33455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33457    new_path="$unix_path"
33458  fi
33459
33460    # remove trailing .exe if any
33461    new_path="${new_path/%.exe/}"
33462
33463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33465  fi
33466
33467  else
33468    # We're on a posix platform. Hooray! :)
33469    # First separate the path from the arguments. This will split at the first
33470    # space.
33471    complete="$OBJC"
33472    path="${complete%% *}"
33473    tmp="$complete EOL"
33474    arguments="${tmp#* }"
33475
33476    # Cannot rely on the command "which" here since it doesn't always work.
33477    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33478    if test -z "$is_absolute_path"; then
33479      # Path to executable is not absolute. Find it.
33480      IFS_save="$IFS"
33481      IFS=:
33482      for p in $PATH; do
33483        if test -f "$p/$path" && test -x "$p/$path"; then
33484          new_path="$p/$path"
33485          break
33486        fi
33487      done
33488      IFS="$IFS_save"
33489    else
33490      # This is an absolute path, we can use it without further modifications.
33491      new_path="$path"
33492    fi
33493
33494    if test "x$new_path" = x; then
33495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33496$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33497      has_space=`$ECHO "$complete" | $GREP " "`
33498      if test "x$has_space" != x; then
33499        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33501      fi
33502      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33503    fi
33504  fi
33505
33506  # Now join together the path and the arguments once again
33507  if test "x$arguments" != xEOL; then
33508    new_complete="$new_path ${arguments% *}"
33509  else
33510    new_complete="$new_path"
33511  fi
33512
33513  if test "x$complete" != "x$new_complete"; then
33514    OBJC="$new_complete"
33515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33516$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33517  fi
33518
33519
33520
33521  # Publish this variable in the help.
33522
33523
33524  if test "x$LIPO" = x; then
33525    # The variable is not set by user, try to locate tool using the code snippet
33526    for ac_prog in lipo
33527do
33528  # Extract the first word of "$ac_prog", so it can be a program name with args.
33529set dummy $ac_prog; ac_word=$2
33530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33531$as_echo_n "checking for $ac_word... " >&6; }
33532if ${ac_cv_path_LIPO+:} false; then :
33533  $as_echo_n "(cached) " >&6
33534else
33535  case $LIPO in
33536  [\\/]* | ?:[\\/]*)
33537  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33538  ;;
33539  *)
33540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33541for as_dir in $PATH
33542do
33543  IFS=$as_save_IFS
33544  test -z "$as_dir" && as_dir=.
33545    for ac_exec_ext in '' $ac_executable_extensions; do
33546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33547    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33549    break 2
33550  fi
33551done
33552  done
33553IFS=$as_save_IFS
33554
33555  ;;
33556esac
33557fi
33558LIPO=$ac_cv_path_LIPO
33559if test -n "$LIPO"; then
33560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33561$as_echo "$LIPO" >&6; }
33562else
33563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33564$as_echo "no" >&6; }
33565fi
33566
33567
33568  test -n "$LIPO" && break
33569done
33570
33571  else
33572    # The variable is set, but is it from the command line or the environment?
33573
33574    # Try to remove the string !LIPO! from our list.
33575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33577      # If it failed, the variable was not from the command line. Ignore it,
33578      # but warn the user (except for BASH, which is always set by the calling BASH).
33579      if test "xLIPO" != xBASH; then
33580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33581$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33582      fi
33583      # Try to locate tool using the code snippet
33584      for ac_prog in lipo
33585do
33586  # Extract the first word of "$ac_prog", so it can be a program name with args.
33587set dummy $ac_prog; ac_word=$2
33588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33589$as_echo_n "checking for $ac_word... " >&6; }
33590if ${ac_cv_path_LIPO+:} false; then :
33591  $as_echo_n "(cached) " >&6
33592else
33593  case $LIPO in
33594  [\\/]* | ?:[\\/]*)
33595  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33596  ;;
33597  *)
33598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33599for as_dir in $PATH
33600do
33601  IFS=$as_save_IFS
33602  test -z "$as_dir" && as_dir=.
33603    for ac_exec_ext in '' $ac_executable_extensions; do
33604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33605    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33607    break 2
33608  fi
33609done
33610  done
33611IFS=$as_save_IFS
33612
33613  ;;
33614esac
33615fi
33616LIPO=$ac_cv_path_LIPO
33617if test -n "$LIPO"; then
33618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33619$as_echo "$LIPO" >&6; }
33620else
33621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33622$as_echo "no" >&6; }
33623fi
33624
33625
33626  test -n "$LIPO" && break
33627done
33628
33629    else
33630      # If it succeeded, then it was overridden by the user. We will use it
33631      # for the tool.
33632
33633      # First remove it from the list of overridden variables, so we can test
33634      # for unknown variables in the end.
33635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33636
33637      # Check if the provided tool contains a complete path.
33638      tool_specified="$LIPO"
33639      tool_basename="${tool_specified##*/}"
33640      if test "x$tool_basename" = "x$tool_specified"; then
33641        # A command without a complete path is provided, search $PATH.
33642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33643$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33644        # Extract the first word of "$tool_basename", so it can be a program name with args.
33645set dummy $tool_basename; ac_word=$2
33646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33647$as_echo_n "checking for $ac_word... " >&6; }
33648if ${ac_cv_path_LIPO+:} false; then :
33649  $as_echo_n "(cached) " >&6
33650else
33651  case $LIPO in
33652  [\\/]* | ?:[\\/]*)
33653  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33654  ;;
33655  *)
33656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33657for as_dir in $PATH
33658do
33659  IFS=$as_save_IFS
33660  test -z "$as_dir" && as_dir=.
33661    for ac_exec_ext in '' $ac_executable_extensions; do
33662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33663    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33665    break 2
33666  fi
33667done
33668  done
33669IFS=$as_save_IFS
33670
33671  ;;
33672esac
33673fi
33674LIPO=$ac_cv_path_LIPO
33675if test -n "$LIPO"; then
33676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33677$as_echo "$LIPO" >&6; }
33678else
33679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33680$as_echo "no" >&6; }
33681fi
33682
33683
33684        if test "x$LIPO" = x; then
33685          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33686        fi
33687      else
33688        # Otherwise we believe it is a complete path. Use it as it is.
33689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33690$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33692$as_echo_n "checking for LIPO... " >&6; }
33693        if test ! -x "$tool_specified"; then
33694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33695$as_echo "not found" >&6; }
33696          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33697        fi
33698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33699$as_echo "$tool_specified" >&6; }
33700      fi
33701    fi
33702  fi
33703
33704
33705
33706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33707
33708  # First separate the path from the arguments. This will split at the first
33709  # space.
33710  complete="$LIPO"
33711  path="${complete%% *}"
33712  tmp="$complete EOL"
33713  arguments="${tmp#* }"
33714
33715  # Input might be given as Windows format, start by converting to
33716  # unix format.
33717  new_path=`$CYGPATH -u "$path"`
33718
33719  # Now try to locate executable using which
33720  new_path=`$WHICH "$new_path" 2> /dev/null`
33721  # bat and cmd files are not always considered executable in cygwin causing which
33722  # to not find them
33723  if test "x$new_path" = x \
33724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33726    new_path=`$CYGPATH -u "$path"`
33727  fi
33728  if test "x$new_path" = x; then
33729    # Oops. Which didn't find the executable.
33730    # The splitting of arguments from the executable at a space might have been incorrect,
33731    # since paths with space are more likely in Windows. Give it another try with the whole
33732    # argument.
33733    path="$complete"
33734    arguments="EOL"
33735    new_path=`$CYGPATH -u "$path"`
33736    new_path=`$WHICH "$new_path" 2> /dev/null`
33737    # bat and cmd files are not always considered executable in cygwin causing which
33738    # to not find them
33739    if test "x$new_path" = x \
33740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33742      new_path=`$CYGPATH -u "$path"`
33743    fi
33744    if test "x$new_path" = x; then
33745      # It's still not found. Now this is an unrecoverable error.
33746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33747$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33748      has_space=`$ECHO "$complete" | $GREP " "`
33749      if test "x$has_space" != x; then
33750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33752      fi
33753      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33754    fi
33755  fi
33756
33757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33760  # "foo.exe" is OK but "foo" is an error.
33761  #
33762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33763  # It is also a way to make sure we got the proper file name for the real test later on.
33764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33765  if test "x$test_shortpath" = x; then
33766    # Short path failed, file does not exist as specified.
33767    # Try adding .exe or .cmd
33768    if test -f "${new_path}.exe"; then
33769      input_to_shortpath="${new_path}.exe"
33770    elif test -f "${new_path}.cmd"; then
33771      input_to_shortpath="${new_path}.cmd"
33772    else
33773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33774$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33777      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33778    fi
33779  else
33780    input_to_shortpath="$new_path"
33781  fi
33782
33783  # Call helper function which possibly converts this using DOS-style short mode.
33784  # If so, the updated path is stored in $new_path.
33785  new_path="$input_to_shortpath"
33786
33787  input_path="$input_to_shortpath"
33788  # Check if we need to convert this using DOS-style short mode. If the path
33789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33790  # take no chances and rewrite it.
33791  # Note: m4 eats our [], so we need to use [ and ] instead.
33792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33793  if test "x$has_forbidden_chars" != x; then
33794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33798      # Going to short mode and back again did indeed matter. Since short mode is
33799      # case insensitive, let's make it lowercase to improve readability.
33800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33801      # Now convert it back to Unix-stile (cygpath)
33802      input_path=`$CYGPATH -u "$shortmode_path"`
33803      new_path="$input_path"
33804    fi
33805  fi
33806
33807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33808  if test "x$test_cygdrive_prefix" = x; then
33809    # As a simple fix, exclude /usr/bin since it's not a real path.
33810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33812      # a path prefixed by /cygdrive for fixpath to work.
33813      new_path="$CYGWIN_ROOT_PATH$input_path"
33814    fi
33815  fi
33816
33817  # remove trailing .exe if any
33818  new_path="${new_path/%.exe/}"
33819
33820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33821
33822  # First separate the path from the arguments. This will split at the first
33823  # space.
33824  complete="$LIPO"
33825  path="${complete%% *}"
33826  tmp="$complete EOL"
33827  arguments="${tmp#* }"
33828
33829  # Input might be given as Windows format, start by converting to
33830  # unix format.
33831  new_path="$path"
33832
33833  windows_path="$new_path"
33834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33835    unix_path=`$CYGPATH -u "$windows_path"`
33836    new_path="$unix_path"
33837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33839    new_path="$unix_path"
33840  fi
33841
33842
33843  # Now try to locate executable using which
33844  new_path=`$WHICH "$new_path" 2> /dev/null`
33845
33846  if test "x$new_path" = x; then
33847    # Oops. Which didn't find the executable.
33848    # The splitting of arguments from the executable at a space might have been incorrect,
33849    # since paths with space are more likely in Windows. Give it another try with the whole
33850    # argument.
33851    path="$complete"
33852    arguments="EOL"
33853    new_path="$path"
33854
33855  windows_path="$new_path"
33856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33857    unix_path=`$CYGPATH -u "$windows_path"`
33858    new_path="$unix_path"
33859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33861    new_path="$unix_path"
33862  fi
33863
33864
33865    new_path=`$WHICH "$new_path" 2> /dev/null`
33866
33867    if test "x$new_path" = x; then
33868      # It's still not found. Now this is an unrecoverable error.
33869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33870$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33871      has_space=`$ECHO "$complete" | $GREP " "`
33872      if test "x$has_space" != x; then
33873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33875      fi
33876      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33877    fi
33878  fi
33879
33880  # Now new_path has a complete unix path to the binary
33881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33882    # Keep paths in /bin as-is, but remove trailing .exe if any
33883    new_path="${new_path/%.exe/}"
33884    # Do not save /bin paths to all_fixpath_prefixes!
33885  else
33886    # Not in mixed or Windows style, start by that.
33887    new_path=`cmd //c echo $new_path`
33888
33889  input_path="$new_path"
33890  # Check if we need to convert this using DOS-style short mode. If the path
33891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33892  # take no chances and rewrite it.
33893  # Note: m4 eats our [], so we need to use [ and ] instead.
33894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33895  if test "x$has_forbidden_chars" != x; then
33896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33898  fi
33899
33900    # Output is in $new_path
33901
33902  windows_path="$new_path"
33903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904    unix_path=`$CYGPATH -u "$windows_path"`
33905    new_path="$unix_path"
33906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33908    new_path="$unix_path"
33909  fi
33910
33911    # remove trailing .exe if any
33912    new_path="${new_path/%.exe/}"
33913
33914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33916  fi
33917
33918  else
33919    # We're on a posix platform. Hooray! :)
33920    # First separate the path from the arguments. This will split at the first
33921    # space.
33922    complete="$LIPO"
33923    path="${complete%% *}"
33924    tmp="$complete EOL"
33925    arguments="${tmp#* }"
33926
33927    # Cannot rely on the command "which" here since it doesn't always work.
33928    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33929    if test -z "$is_absolute_path"; then
33930      # Path to executable is not absolute. Find it.
33931      IFS_save="$IFS"
33932      IFS=:
33933      for p in $PATH; do
33934        if test -f "$p/$path" && test -x "$p/$path"; then
33935          new_path="$p/$path"
33936          break
33937        fi
33938      done
33939      IFS="$IFS_save"
33940    else
33941      # This is an absolute path, we can use it without further modifications.
33942      new_path="$path"
33943    fi
33944
33945    if test "x$new_path" = x; then
33946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33947$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33948      has_space=`$ECHO "$complete" | $GREP " "`
33949      if test "x$has_space" != x; then
33950        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33952      fi
33953      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33954    fi
33955  fi
33956
33957  # Now join together the path and the arguments once again
33958  if test "x$arguments" != xEOL; then
33959    new_complete="$new_path ${arguments% *}"
33960  else
33961    new_complete="$new_path"
33962  fi
33963
33964  if test "x$complete" != "x$new_complete"; then
33965    LIPO="$new_complete"
33966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33967$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33968  fi
33969
33970  else
33971    OBJC=
33972  fi
33973
33974  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33975    # Extract the first word of "mt", so it can be a program name with args.
33976set dummy mt; ac_word=$2
33977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33978$as_echo_n "checking for $ac_word... " >&6; }
33979if ${ac_cv_prog_MT+:} false; then :
33980  $as_echo_n "(cached) " >&6
33981else
33982  if test -n "$MT"; then
33983  ac_cv_prog_MT="$MT" # Let the user override the test.
33984else
33985  ac_prog_rejected=no
33986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33987for as_dir in $PATH
33988do
33989  IFS=$as_save_IFS
33990  test -z "$as_dir" && as_dir=.
33991    for ac_exec_ext in '' $ac_executable_extensions; do
33992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33993    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33994       ac_prog_rejected=yes
33995       continue
33996     fi
33997    ac_cv_prog_MT="mt"
33998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33999    break 2
34000  fi
34001done
34002  done
34003IFS=$as_save_IFS
34004
34005if test $ac_prog_rejected = yes; then
34006  # We found a bogon in the path, so make sure we never use it.
34007  set dummy $ac_cv_prog_MT
34008  shift
34009  if test $# != 0; then
34010    # We chose a different compiler from the bogus one.
34011    # However, it has the same basename, so the bogon will be chosen
34012    # first if we set MT to just the basename; use the full file name.
34013    shift
34014    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34015  fi
34016fi
34017fi
34018fi
34019MT=$ac_cv_prog_MT
34020if test -n "$MT"; then
34021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34022$as_echo "$MT" >&6; }
34023else
34024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34025$as_echo "no" >&6; }
34026fi
34027
34028
34029
34030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34031
34032  # First separate the path from the arguments. This will split at the first
34033  # space.
34034  complete="$MT"
34035  path="${complete%% *}"
34036  tmp="$complete EOL"
34037  arguments="${tmp#* }"
34038
34039  # Input might be given as Windows format, start by converting to
34040  # unix format.
34041  new_path=`$CYGPATH -u "$path"`
34042
34043  # Now try to locate executable using which
34044  new_path=`$WHICH "$new_path" 2> /dev/null`
34045  # bat and cmd files are not always considered executable in cygwin causing which
34046  # to not find them
34047  if test "x$new_path" = x \
34048      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34049      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34050    new_path=`$CYGPATH -u "$path"`
34051  fi
34052  if test "x$new_path" = x; then
34053    # Oops. Which didn't find the executable.
34054    # The splitting of arguments from the executable at a space might have been incorrect,
34055    # since paths with space are more likely in Windows. Give it another try with the whole
34056    # argument.
34057    path="$complete"
34058    arguments="EOL"
34059    new_path=`$CYGPATH -u "$path"`
34060    new_path=`$WHICH "$new_path" 2> /dev/null`
34061    # bat and cmd files are not always considered executable in cygwin causing which
34062    # to not find them
34063    if test "x$new_path" = x \
34064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34066      new_path=`$CYGPATH -u "$path"`
34067    fi
34068    if test "x$new_path" = x; then
34069      # It's still not found. Now this is an unrecoverable error.
34070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34071$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34072      has_space=`$ECHO "$complete" | $GREP " "`
34073      if test "x$has_space" != x; then
34074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34076      fi
34077      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34078    fi
34079  fi
34080
34081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34084  # "foo.exe" is OK but "foo" is an error.
34085  #
34086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34087  # It is also a way to make sure we got the proper file name for the real test later on.
34088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34089  if test "x$test_shortpath" = x; then
34090    # Short path failed, file does not exist as specified.
34091    # Try adding .exe or .cmd
34092    if test -f "${new_path}.exe"; then
34093      input_to_shortpath="${new_path}.exe"
34094    elif test -f "${new_path}.cmd"; then
34095      input_to_shortpath="${new_path}.cmd"
34096    else
34097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34098$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34101      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34102    fi
34103  else
34104    input_to_shortpath="$new_path"
34105  fi
34106
34107  # Call helper function which possibly converts this using DOS-style short mode.
34108  # If so, the updated path is stored in $new_path.
34109  new_path="$input_to_shortpath"
34110
34111  input_path="$input_to_shortpath"
34112  # Check if we need to convert this using DOS-style short mode. If the path
34113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34114  # take no chances and rewrite it.
34115  # Note: m4 eats our [], so we need to use [ and ] instead.
34116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34117  if test "x$has_forbidden_chars" != x; then
34118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34122      # Going to short mode and back again did indeed matter. Since short mode is
34123      # case insensitive, let's make it lowercase to improve readability.
34124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34125      # Now convert it back to Unix-stile (cygpath)
34126      input_path=`$CYGPATH -u "$shortmode_path"`
34127      new_path="$input_path"
34128    fi
34129  fi
34130
34131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34132  if test "x$test_cygdrive_prefix" = x; then
34133    # As a simple fix, exclude /usr/bin since it's not a real path.
34134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34136      # a path prefixed by /cygdrive for fixpath to work.
34137      new_path="$CYGWIN_ROOT_PATH$input_path"
34138    fi
34139  fi
34140
34141  # remove trailing .exe if any
34142  new_path="${new_path/%.exe/}"
34143
34144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34145
34146  # First separate the path from the arguments. This will split at the first
34147  # space.
34148  complete="$MT"
34149  path="${complete%% *}"
34150  tmp="$complete EOL"
34151  arguments="${tmp#* }"
34152
34153  # Input might be given as Windows format, start by converting to
34154  # unix format.
34155  new_path="$path"
34156
34157  windows_path="$new_path"
34158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34159    unix_path=`$CYGPATH -u "$windows_path"`
34160    new_path="$unix_path"
34161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34163    new_path="$unix_path"
34164  fi
34165
34166
34167  # Now try to locate executable using which
34168  new_path=`$WHICH "$new_path" 2> /dev/null`
34169
34170  if test "x$new_path" = x; then
34171    # Oops. Which didn't find the executable.
34172    # The splitting of arguments from the executable at a space might have been incorrect,
34173    # since paths with space are more likely in Windows. Give it another try with the whole
34174    # argument.
34175    path="$complete"
34176    arguments="EOL"
34177    new_path="$path"
34178
34179  windows_path="$new_path"
34180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34181    unix_path=`$CYGPATH -u "$windows_path"`
34182    new_path="$unix_path"
34183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34185    new_path="$unix_path"
34186  fi
34187
34188
34189    new_path=`$WHICH "$new_path" 2> /dev/null`
34190
34191    if test "x$new_path" = x; then
34192      # It's still not found. Now this is an unrecoverable error.
34193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34194$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34195      has_space=`$ECHO "$complete" | $GREP " "`
34196      if test "x$has_space" != x; then
34197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34199      fi
34200      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34201    fi
34202  fi
34203
34204  # Now new_path has a complete unix path to the binary
34205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34206    # Keep paths in /bin as-is, but remove trailing .exe if any
34207    new_path="${new_path/%.exe/}"
34208    # Do not save /bin paths to all_fixpath_prefixes!
34209  else
34210    # Not in mixed or Windows style, start by that.
34211    new_path=`cmd //c echo $new_path`
34212
34213  input_path="$new_path"
34214  # Check if we need to convert this using DOS-style short mode. If the path
34215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34216  # take no chances and rewrite it.
34217  # Note: m4 eats our [], so we need to use [ and ] instead.
34218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34219  if test "x$has_forbidden_chars" != x; then
34220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34222  fi
34223
34224    # Output is in $new_path
34225
34226  windows_path="$new_path"
34227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34228    unix_path=`$CYGPATH -u "$windows_path"`
34229    new_path="$unix_path"
34230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34232    new_path="$unix_path"
34233  fi
34234
34235    # remove trailing .exe if any
34236    new_path="${new_path/%.exe/}"
34237
34238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34240  fi
34241
34242  else
34243    # We're on a posix platform. Hooray! :)
34244    # First separate the path from the arguments. This will split at the first
34245    # space.
34246    complete="$MT"
34247    path="${complete%% *}"
34248    tmp="$complete EOL"
34249    arguments="${tmp#* }"
34250
34251    # Cannot rely on the command "which" here since it doesn't always work.
34252    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34253    if test -z "$is_absolute_path"; then
34254      # Path to executable is not absolute. Find it.
34255      IFS_save="$IFS"
34256      IFS=:
34257      for p in $PATH; do
34258        if test -f "$p/$path" && test -x "$p/$path"; then
34259          new_path="$p/$path"
34260          break
34261        fi
34262      done
34263      IFS="$IFS_save"
34264    else
34265      # This is an absolute path, we can use it without further modifications.
34266      new_path="$path"
34267    fi
34268
34269    if test "x$new_path" = x; then
34270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34271$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34272      has_space=`$ECHO "$complete" | $GREP " "`
34273      if test "x$has_space" != x; then
34274        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34276      fi
34277      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34278    fi
34279  fi
34280
34281  # Now join together the path and the arguments once again
34282  if test "x$arguments" != xEOL; then
34283    new_complete="$new_path ${arguments% *}"
34284  else
34285    new_complete="$new_path"
34286  fi
34287
34288  if test "x$complete" != "x$new_complete"; then
34289    MT="$new_complete"
34290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34291$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34292  fi
34293
34294    # Setup the resource compiler (RC)
34295    # Extract the first word of "rc", so it can be a program name with args.
34296set dummy rc; ac_word=$2
34297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34298$as_echo_n "checking for $ac_word... " >&6; }
34299if ${ac_cv_prog_RC+:} false; then :
34300  $as_echo_n "(cached) " >&6
34301else
34302  if test -n "$RC"; then
34303  ac_cv_prog_RC="$RC" # Let the user override the test.
34304else
34305  ac_prog_rejected=no
34306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34307for as_dir in $PATH
34308do
34309  IFS=$as_save_IFS
34310  test -z "$as_dir" && as_dir=.
34311    for ac_exec_ext in '' $ac_executable_extensions; do
34312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34313    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34314       ac_prog_rejected=yes
34315       continue
34316     fi
34317    ac_cv_prog_RC="rc"
34318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34319    break 2
34320  fi
34321done
34322  done
34323IFS=$as_save_IFS
34324
34325if test $ac_prog_rejected = yes; then
34326  # We found a bogon in the path, so make sure we never use it.
34327  set dummy $ac_cv_prog_RC
34328  shift
34329  if test $# != 0; then
34330    # We chose a different compiler from the bogus one.
34331    # However, it has the same basename, so the bogon will be chosen
34332    # first if we set RC to just the basename; use the full file name.
34333    shift
34334    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34335  fi
34336fi
34337fi
34338fi
34339RC=$ac_cv_prog_RC
34340if test -n "$RC"; then
34341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34342$as_echo "$RC" >&6; }
34343else
34344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34345$as_echo "no" >&6; }
34346fi
34347
34348
34349
34350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34351
34352  # First separate the path from the arguments. This will split at the first
34353  # space.
34354  complete="$RC"
34355  path="${complete%% *}"
34356  tmp="$complete EOL"
34357  arguments="${tmp#* }"
34358
34359  # Input might be given as Windows format, start by converting to
34360  # unix format.
34361  new_path=`$CYGPATH -u "$path"`
34362
34363  # Now try to locate executable using which
34364  new_path=`$WHICH "$new_path" 2> /dev/null`
34365  # bat and cmd files are not always considered executable in cygwin causing which
34366  # to not find them
34367  if test "x$new_path" = x \
34368      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34369      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34370    new_path=`$CYGPATH -u "$path"`
34371  fi
34372  if test "x$new_path" = x; then
34373    # Oops. Which didn't find the executable.
34374    # The splitting of arguments from the executable at a space might have been incorrect,
34375    # since paths with space are more likely in Windows. Give it another try with the whole
34376    # argument.
34377    path="$complete"
34378    arguments="EOL"
34379    new_path=`$CYGPATH -u "$path"`
34380    new_path=`$WHICH "$new_path" 2> /dev/null`
34381    # bat and cmd files are not always considered executable in cygwin causing which
34382    # to not find them
34383    if test "x$new_path" = x \
34384        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34385        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34386      new_path=`$CYGPATH -u "$path"`
34387    fi
34388    if test "x$new_path" = x; then
34389      # It's still not found. Now this is an unrecoverable error.
34390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34391$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34392      has_space=`$ECHO "$complete" | $GREP " "`
34393      if test "x$has_space" != x; then
34394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34396      fi
34397      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34398    fi
34399  fi
34400
34401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34404  # "foo.exe" is OK but "foo" is an error.
34405  #
34406  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34407  # It is also a way to make sure we got the proper file name for the real test later on.
34408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34409  if test "x$test_shortpath" = x; then
34410    # Short path failed, file does not exist as specified.
34411    # Try adding .exe or .cmd
34412    if test -f "${new_path}.exe"; then
34413      input_to_shortpath="${new_path}.exe"
34414    elif test -f "${new_path}.cmd"; then
34415      input_to_shortpath="${new_path}.cmd"
34416    else
34417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34418$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34419      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34420$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34421      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34422    fi
34423  else
34424    input_to_shortpath="$new_path"
34425  fi
34426
34427  # Call helper function which possibly converts this using DOS-style short mode.
34428  # If so, the updated path is stored in $new_path.
34429  new_path="$input_to_shortpath"
34430
34431  input_path="$input_to_shortpath"
34432  # Check if we need to convert this using DOS-style short mode. If the path
34433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34434  # take no chances and rewrite it.
34435  # Note: m4 eats our [], so we need to use [ and ] instead.
34436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34437  if test "x$has_forbidden_chars" != x; then
34438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34442      # Going to short mode and back again did indeed matter. Since short mode is
34443      # case insensitive, let's make it lowercase to improve readability.
34444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34445      # Now convert it back to Unix-stile (cygpath)
34446      input_path=`$CYGPATH -u "$shortmode_path"`
34447      new_path="$input_path"
34448    fi
34449  fi
34450
34451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34452  if test "x$test_cygdrive_prefix" = x; then
34453    # As a simple fix, exclude /usr/bin since it's not a real path.
34454    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34456      # a path prefixed by /cygdrive for fixpath to work.
34457      new_path="$CYGWIN_ROOT_PATH$input_path"
34458    fi
34459  fi
34460
34461  # remove trailing .exe if any
34462  new_path="${new_path/%.exe/}"
34463
34464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34465
34466  # First separate the path from the arguments. This will split at the first
34467  # space.
34468  complete="$RC"
34469  path="${complete%% *}"
34470  tmp="$complete EOL"
34471  arguments="${tmp#* }"
34472
34473  # Input might be given as Windows format, start by converting to
34474  # unix format.
34475  new_path="$path"
34476
34477  windows_path="$new_path"
34478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34479    unix_path=`$CYGPATH -u "$windows_path"`
34480    new_path="$unix_path"
34481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34483    new_path="$unix_path"
34484  fi
34485
34486
34487  # Now try to locate executable using which
34488  new_path=`$WHICH "$new_path" 2> /dev/null`
34489
34490  if test "x$new_path" = x; then
34491    # Oops. Which didn't find the executable.
34492    # The splitting of arguments from the executable at a space might have been incorrect,
34493    # since paths with space are more likely in Windows. Give it another try with the whole
34494    # argument.
34495    path="$complete"
34496    arguments="EOL"
34497    new_path="$path"
34498
34499  windows_path="$new_path"
34500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34501    unix_path=`$CYGPATH -u "$windows_path"`
34502    new_path="$unix_path"
34503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34505    new_path="$unix_path"
34506  fi
34507
34508
34509    new_path=`$WHICH "$new_path" 2> /dev/null`
34510
34511    if test "x$new_path" = x; then
34512      # It's still not found. Now this is an unrecoverable error.
34513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34514$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34515      has_space=`$ECHO "$complete" | $GREP " "`
34516      if test "x$has_space" != x; then
34517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34519      fi
34520      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34521    fi
34522  fi
34523
34524  # Now new_path has a complete unix path to the binary
34525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34526    # Keep paths in /bin as-is, but remove trailing .exe if any
34527    new_path="${new_path/%.exe/}"
34528    # Do not save /bin paths to all_fixpath_prefixes!
34529  else
34530    # Not in mixed or Windows style, start by that.
34531    new_path=`cmd //c echo $new_path`
34532
34533  input_path="$new_path"
34534  # Check if we need to convert this using DOS-style short mode. If the path
34535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34536  # take no chances and rewrite it.
34537  # Note: m4 eats our [], so we need to use [ and ] instead.
34538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34539  if test "x$has_forbidden_chars" != x; then
34540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34542  fi
34543
34544    # Output is in $new_path
34545
34546  windows_path="$new_path"
34547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34548    unix_path=`$CYGPATH -u "$windows_path"`
34549    new_path="$unix_path"
34550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34552    new_path="$unix_path"
34553  fi
34554
34555    # remove trailing .exe if any
34556    new_path="${new_path/%.exe/}"
34557
34558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34560  fi
34561
34562  else
34563    # We're on a posix platform. Hooray! :)
34564    # First separate the path from the arguments. This will split at the first
34565    # space.
34566    complete="$RC"
34567    path="${complete%% *}"
34568    tmp="$complete EOL"
34569    arguments="${tmp#* }"
34570
34571    # Cannot rely on the command "which" here since it doesn't always work.
34572    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34573    if test -z "$is_absolute_path"; then
34574      # Path to executable is not absolute. Find it.
34575      IFS_save="$IFS"
34576      IFS=:
34577      for p in $PATH; do
34578        if test -f "$p/$path" && test -x "$p/$path"; then
34579          new_path="$p/$path"
34580          break
34581        fi
34582      done
34583      IFS="$IFS_save"
34584    else
34585      # This is an absolute path, we can use it without further modifications.
34586      new_path="$path"
34587    fi
34588
34589    if test "x$new_path" = x; then
34590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34591$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34592      has_space=`$ECHO "$complete" | $GREP " "`
34593      if test "x$has_space" != x; then
34594        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34596      fi
34597      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34598    fi
34599  fi
34600
34601  # Now join together the path and the arguments once again
34602  if test "x$arguments" != xEOL; then
34603    new_complete="$new_path ${arguments% *}"
34604  else
34605    new_complete="$new_path"
34606  fi
34607
34608  if test "x$complete" != "x$new_complete"; then
34609    RC="$new_complete"
34610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34611$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34612  fi
34613
34614    # Extract the first word of "dumpbin", so it can be a program name with args.
34615set dummy dumpbin; ac_word=$2
34616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34617$as_echo_n "checking for $ac_word... " >&6; }
34618if ${ac_cv_prog_DUMPBIN+:} false; then :
34619  $as_echo_n "(cached) " >&6
34620else
34621  if test -n "$DUMPBIN"; then
34622  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34623else
34624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34625for as_dir in $PATH
34626do
34627  IFS=$as_save_IFS
34628  test -z "$as_dir" && as_dir=.
34629    for ac_exec_ext in '' $ac_executable_extensions; do
34630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34631    ac_cv_prog_DUMPBIN="dumpbin"
34632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34633    break 2
34634  fi
34635done
34636  done
34637IFS=$as_save_IFS
34638
34639fi
34640fi
34641DUMPBIN=$ac_cv_prog_DUMPBIN
34642if test -n "$DUMPBIN"; then
34643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34644$as_echo "$DUMPBIN" >&6; }
34645else
34646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34647$as_echo "no" >&6; }
34648fi
34649
34650
34651
34652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34653
34654  # First separate the path from the arguments. This will split at the first
34655  # space.
34656  complete="$DUMPBIN"
34657  path="${complete%% *}"
34658  tmp="$complete EOL"
34659  arguments="${tmp#* }"
34660
34661  # Input might be given as Windows format, start by converting to
34662  # unix format.
34663  new_path=`$CYGPATH -u "$path"`
34664
34665  # Now try to locate executable using which
34666  new_path=`$WHICH "$new_path" 2> /dev/null`
34667  # bat and cmd files are not always considered executable in cygwin causing which
34668  # to not find them
34669  if test "x$new_path" = x \
34670      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34671      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34672    new_path=`$CYGPATH -u "$path"`
34673  fi
34674  if test "x$new_path" = x; then
34675    # Oops. Which didn't find the executable.
34676    # The splitting of arguments from the executable at a space might have been incorrect,
34677    # since paths with space are more likely in Windows. Give it another try with the whole
34678    # argument.
34679    path="$complete"
34680    arguments="EOL"
34681    new_path=`$CYGPATH -u "$path"`
34682    new_path=`$WHICH "$new_path" 2> /dev/null`
34683    # bat and cmd files are not always considered executable in cygwin causing which
34684    # to not find them
34685    if test "x$new_path" = x \
34686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34688      new_path=`$CYGPATH -u "$path"`
34689    fi
34690    if test "x$new_path" = x; then
34691      # It's still not found. Now this is an unrecoverable error.
34692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34693$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34694      has_space=`$ECHO "$complete" | $GREP " "`
34695      if test "x$has_space" != x; then
34696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34698      fi
34699      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34700    fi
34701  fi
34702
34703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34706  # "foo.exe" is OK but "foo" is an error.
34707  #
34708  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34709  # It is also a way to make sure we got the proper file name for the real test later on.
34710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34711  if test "x$test_shortpath" = x; then
34712    # Short path failed, file does not exist as specified.
34713    # Try adding .exe or .cmd
34714    if test -f "${new_path}.exe"; then
34715      input_to_shortpath="${new_path}.exe"
34716    elif test -f "${new_path}.cmd"; then
34717      input_to_shortpath="${new_path}.cmd"
34718    else
34719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34720$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34723      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34724    fi
34725  else
34726    input_to_shortpath="$new_path"
34727  fi
34728
34729  # Call helper function which possibly converts this using DOS-style short mode.
34730  # If so, the updated path is stored in $new_path.
34731  new_path="$input_to_shortpath"
34732
34733  input_path="$input_to_shortpath"
34734  # Check if we need to convert this using DOS-style short mode. If the path
34735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34736  # take no chances and rewrite it.
34737  # Note: m4 eats our [], so we need to use [ and ] instead.
34738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34739  if test "x$has_forbidden_chars" != x; then
34740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34744      # Going to short mode and back again did indeed matter. Since short mode is
34745      # case insensitive, let's make it lowercase to improve readability.
34746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34747      # Now convert it back to Unix-stile (cygpath)
34748      input_path=`$CYGPATH -u "$shortmode_path"`
34749      new_path="$input_path"
34750    fi
34751  fi
34752
34753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34754  if test "x$test_cygdrive_prefix" = x; then
34755    # As a simple fix, exclude /usr/bin since it's not a real path.
34756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34758      # a path prefixed by /cygdrive for fixpath to work.
34759      new_path="$CYGWIN_ROOT_PATH$input_path"
34760    fi
34761  fi
34762
34763  # remove trailing .exe if any
34764  new_path="${new_path/%.exe/}"
34765
34766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34767
34768  # First separate the path from the arguments. This will split at the first
34769  # space.
34770  complete="$DUMPBIN"
34771  path="${complete%% *}"
34772  tmp="$complete EOL"
34773  arguments="${tmp#* }"
34774
34775  # Input might be given as Windows format, start by converting to
34776  # unix format.
34777  new_path="$path"
34778
34779  windows_path="$new_path"
34780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34781    unix_path=`$CYGPATH -u "$windows_path"`
34782    new_path="$unix_path"
34783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34785    new_path="$unix_path"
34786  fi
34787
34788
34789  # Now try to locate executable using which
34790  new_path=`$WHICH "$new_path" 2> /dev/null`
34791
34792  if test "x$new_path" = x; then
34793    # Oops. Which didn't find the executable.
34794    # The splitting of arguments from the executable at a space might have been incorrect,
34795    # since paths with space are more likely in Windows. Give it another try with the whole
34796    # argument.
34797    path="$complete"
34798    arguments="EOL"
34799    new_path="$path"
34800
34801  windows_path="$new_path"
34802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34803    unix_path=`$CYGPATH -u "$windows_path"`
34804    new_path="$unix_path"
34805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34807    new_path="$unix_path"
34808  fi
34809
34810
34811    new_path=`$WHICH "$new_path" 2> /dev/null`
34812
34813    if test "x$new_path" = x; then
34814      # It's still not found. Now this is an unrecoverable error.
34815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34816$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34817      has_space=`$ECHO "$complete" | $GREP " "`
34818      if test "x$has_space" != x; then
34819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34821      fi
34822      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34823    fi
34824  fi
34825
34826  # Now new_path has a complete unix path to the binary
34827  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34828    # Keep paths in /bin as-is, but remove trailing .exe if any
34829    new_path="${new_path/%.exe/}"
34830    # Do not save /bin paths to all_fixpath_prefixes!
34831  else
34832    # Not in mixed or Windows style, start by that.
34833    new_path=`cmd //c echo $new_path`
34834
34835  input_path="$new_path"
34836  # Check if we need to convert this using DOS-style short mode. If the path
34837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34838  # take no chances and rewrite it.
34839  # Note: m4 eats our [], so we need to use [ and ] instead.
34840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34841  if test "x$has_forbidden_chars" != x; then
34842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34844  fi
34845
34846    # Output is in $new_path
34847
34848  windows_path="$new_path"
34849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34850    unix_path=`$CYGPATH -u "$windows_path"`
34851    new_path="$unix_path"
34852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34854    new_path="$unix_path"
34855  fi
34856
34857    # remove trailing .exe if any
34858    new_path="${new_path/%.exe/}"
34859
34860    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34861    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34862  fi
34863
34864  else
34865    # We're on a posix platform. Hooray! :)
34866    # First separate the path from the arguments. This will split at the first
34867    # space.
34868    complete="$DUMPBIN"
34869    path="${complete%% *}"
34870    tmp="$complete EOL"
34871    arguments="${tmp#* }"
34872
34873    # Cannot rely on the command "which" here since it doesn't always work.
34874    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34875    if test -z "$is_absolute_path"; then
34876      # Path to executable is not absolute. Find it.
34877      IFS_save="$IFS"
34878      IFS=:
34879      for p in $PATH; do
34880        if test -f "$p/$path" && test -x "$p/$path"; then
34881          new_path="$p/$path"
34882          break
34883        fi
34884      done
34885      IFS="$IFS_save"
34886    else
34887      # This is an absolute path, we can use it without further modifications.
34888      new_path="$path"
34889    fi
34890
34891    if test "x$new_path" = x; then
34892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34893$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34894      has_space=`$ECHO "$complete" | $GREP " "`
34895      if test "x$has_space" != x; then
34896        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34897$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34898      fi
34899      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34900    fi
34901  fi
34902
34903  # Now join together the path and the arguments once again
34904  if test "x$arguments" != xEOL; then
34905    new_complete="$new_path ${arguments% *}"
34906  else
34907    new_complete="$new_path"
34908  fi
34909
34910  if test "x$complete" != "x$new_complete"; then
34911    DUMPBIN="$new_complete"
34912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34913$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34914  fi
34915
34916  fi
34917
34918  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34919
34920
34921  # Publish this variable in the help.
34922
34923
34924  if test "x$STRIP" = x; then
34925    # The variable is not set by user, try to locate tool using the code snippet
34926    for ac_prog in strip
34927do
34928  # Extract the first word of "$ac_prog", so it can be a program name with args.
34929set dummy $ac_prog; ac_word=$2
34930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34931$as_echo_n "checking for $ac_word... " >&6; }
34932if ${ac_cv_path_STRIP+:} false; then :
34933  $as_echo_n "(cached) " >&6
34934else
34935  case $STRIP in
34936  [\\/]* | ?:[\\/]*)
34937  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34938  ;;
34939  *)
34940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34941for as_dir in $PATH
34942do
34943  IFS=$as_save_IFS
34944  test -z "$as_dir" && as_dir=.
34945    for ac_exec_ext in '' $ac_executable_extensions; do
34946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34947    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34949    break 2
34950  fi
34951done
34952  done
34953IFS=$as_save_IFS
34954
34955  ;;
34956esac
34957fi
34958STRIP=$ac_cv_path_STRIP
34959if test -n "$STRIP"; then
34960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34961$as_echo "$STRIP" >&6; }
34962else
34963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34964$as_echo "no" >&6; }
34965fi
34966
34967
34968  test -n "$STRIP" && break
34969done
34970
34971  else
34972    # The variable is set, but is it from the command line or the environment?
34973
34974    # Try to remove the string !STRIP! from our list.
34975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34977      # If it failed, the variable was not from the command line. Ignore it,
34978      # but warn the user (except for BASH, which is always set by the calling BASH).
34979      if test "xSTRIP" != xBASH; then
34980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34981$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34982      fi
34983      # Try to locate tool using the code snippet
34984      for ac_prog in strip
34985do
34986  # Extract the first word of "$ac_prog", so it can be a program name with args.
34987set dummy $ac_prog; ac_word=$2
34988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34989$as_echo_n "checking for $ac_word... " >&6; }
34990if ${ac_cv_path_STRIP+:} false; then :
34991  $as_echo_n "(cached) " >&6
34992else
34993  case $STRIP in
34994  [\\/]* | ?:[\\/]*)
34995  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34996  ;;
34997  *)
34998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34999for as_dir in $PATH
35000do
35001  IFS=$as_save_IFS
35002  test -z "$as_dir" && as_dir=.
35003    for ac_exec_ext in '' $ac_executable_extensions; do
35004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35005    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35007    break 2
35008  fi
35009done
35010  done
35011IFS=$as_save_IFS
35012
35013  ;;
35014esac
35015fi
35016STRIP=$ac_cv_path_STRIP
35017if test -n "$STRIP"; then
35018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35019$as_echo "$STRIP" >&6; }
35020else
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35022$as_echo "no" >&6; }
35023fi
35024
35025
35026  test -n "$STRIP" && break
35027done
35028
35029    else
35030      # If it succeeded, then it was overridden by the user. We will use it
35031      # for the tool.
35032
35033      # First remove it from the list of overridden variables, so we can test
35034      # for unknown variables in the end.
35035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35036
35037      # Check if the provided tool contains a complete path.
35038      tool_specified="$STRIP"
35039      tool_basename="${tool_specified##*/}"
35040      if test "x$tool_basename" = "x$tool_specified"; then
35041        # A command without a complete path is provided, search $PATH.
35042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35043$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35044        # Extract the first word of "$tool_basename", so it can be a program name with args.
35045set dummy $tool_basename; ac_word=$2
35046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35047$as_echo_n "checking for $ac_word... " >&6; }
35048if ${ac_cv_path_STRIP+:} false; then :
35049  $as_echo_n "(cached) " >&6
35050else
35051  case $STRIP in
35052  [\\/]* | ?:[\\/]*)
35053  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35054  ;;
35055  *)
35056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35057for as_dir in $PATH
35058do
35059  IFS=$as_save_IFS
35060  test -z "$as_dir" && as_dir=.
35061    for ac_exec_ext in '' $ac_executable_extensions; do
35062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35063    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35065    break 2
35066  fi
35067done
35068  done
35069IFS=$as_save_IFS
35070
35071  ;;
35072esac
35073fi
35074STRIP=$ac_cv_path_STRIP
35075if test -n "$STRIP"; then
35076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35077$as_echo "$STRIP" >&6; }
35078else
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35080$as_echo "no" >&6; }
35081fi
35082
35083
35084        if test "x$STRIP" = x; then
35085          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35086        fi
35087      else
35088        # Otherwise we believe it is a complete path. Use it as it is.
35089        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35090$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35092$as_echo_n "checking for STRIP... " >&6; }
35093        if test ! -x "$tool_specified"; then
35094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35095$as_echo "not found" >&6; }
35096          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35097        fi
35098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35099$as_echo "$tool_specified" >&6; }
35100      fi
35101    fi
35102  fi
35103
35104
35105
35106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35107
35108  # First separate the path from the arguments. This will split at the first
35109  # space.
35110  complete="$STRIP"
35111  path="${complete%% *}"
35112  tmp="$complete EOL"
35113  arguments="${tmp#* }"
35114
35115  # Input might be given as Windows format, start by converting to
35116  # unix format.
35117  new_path=`$CYGPATH -u "$path"`
35118
35119  # Now try to locate executable using which
35120  new_path=`$WHICH "$new_path" 2> /dev/null`
35121  # bat and cmd files are not always considered executable in cygwin causing which
35122  # to not find them
35123  if test "x$new_path" = x \
35124      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35125      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35126    new_path=`$CYGPATH -u "$path"`
35127  fi
35128  if test "x$new_path" = x; then
35129    # Oops. Which didn't find the executable.
35130    # The splitting of arguments from the executable at a space might have been incorrect,
35131    # since paths with space are more likely in Windows. Give it another try with the whole
35132    # argument.
35133    path="$complete"
35134    arguments="EOL"
35135    new_path=`$CYGPATH -u "$path"`
35136    new_path=`$WHICH "$new_path" 2> /dev/null`
35137    # bat and cmd files are not always considered executable in cygwin causing which
35138    # to not find them
35139    if test "x$new_path" = x \
35140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35142      new_path=`$CYGPATH -u "$path"`
35143    fi
35144    if test "x$new_path" = x; then
35145      # It's still not found. Now this is an unrecoverable error.
35146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35147$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35148      has_space=`$ECHO "$complete" | $GREP " "`
35149      if test "x$has_space" != x; then
35150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35152      fi
35153      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35154    fi
35155  fi
35156
35157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35160  # "foo.exe" is OK but "foo" is an error.
35161  #
35162  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35163  # It is also a way to make sure we got the proper file name for the real test later on.
35164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35165  if test "x$test_shortpath" = x; then
35166    # Short path failed, file does not exist as specified.
35167    # Try adding .exe or .cmd
35168    if test -f "${new_path}.exe"; then
35169      input_to_shortpath="${new_path}.exe"
35170    elif test -f "${new_path}.cmd"; then
35171      input_to_shortpath="${new_path}.cmd"
35172    else
35173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35174$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35177      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35178    fi
35179  else
35180    input_to_shortpath="$new_path"
35181  fi
35182
35183  # Call helper function which possibly converts this using DOS-style short mode.
35184  # If so, the updated path is stored in $new_path.
35185  new_path="$input_to_shortpath"
35186
35187  input_path="$input_to_shortpath"
35188  # Check if we need to convert this using DOS-style short mode. If the path
35189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35190  # take no chances and rewrite it.
35191  # Note: m4 eats our [], so we need to use [ and ] instead.
35192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35193  if test "x$has_forbidden_chars" != x; then
35194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35198      # Going to short mode and back again did indeed matter. Since short mode is
35199      # case insensitive, let's make it lowercase to improve readability.
35200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35201      # Now convert it back to Unix-stile (cygpath)
35202      input_path=`$CYGPATH -u "$shortmode_path"`
35203      new_path="$input_path"
35204    fi
35205  fi
35206
35207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35208  if test "x$test_cygdrive_prefix" = x; then
35209    # As a simple fix, exclude /usr/bin since it's not a real path.
35210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35212      # a path prefixed by /cygdrive for fixpath to work.
35213      new_path="$CYGWIN_ROOT_PATH$input_path"
35214    fi
35215  fi
35216
35217  # remove trailing .exe if any
35218  new_path="${new_path/%.exe/}"
35219
35220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35221
35222  # First separate the path from the arguments. This will split at the first
35223  # space.
35224  complete="$STRIP"
35225  path="${complete%% *}"
35226  tmp="$complete EOL"
35227  arguments="${tmp#* }"
35228
35229  # Input might be given as Windows format, start by converting to
35230  # unix format.
35231  new_path="$path"
35232
35233  windows_path="$new_path"
35234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35235    unix_path=`$CYGPATH -u "$windows_path"`
35236    new_path="$unix_path"
35237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35239    new_path="$unix_path"
35240  fi
35241
35242
35243  # Now try to locate executable using which
35244  new_path=`$WHICH "$new_path" 2> /dev/null`
35245
35246  if test "x$new_path" = x; then
35247    # Oops. Which didn't find the executable.
35248    # The splitting of arguments from the executable at a space might have been incorrect,
35249    # since paths with space are more likely in Windows. Give it another try with the whole
35250    # argument.
35251    path="$complete"
35252    arguments="EOL"
35253    new_path="$path"
35254
35255  windows_path="$new_path"
35256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35257    unix_path=`$CYGPATH -u "$windows_path"`
35258    new_path="$unix_path"
35259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35261    new_path="$unix_path"
35262  fi
35263
35264
35265    new_path=`$WHICH "$new_path" 2> /dev/null`
35266
35267    if test "x$new_path" = x; then
35268      # It's still not found. Now this is an unrecoverable error.
35269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35270$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35271      has_space=`$ECHO "$complete" | $GREP " "`
35272      if test "x$has_space" != x; then
35273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35275      fi
35276      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35277    fi
35278  fi
35279
35280  # Now new_path has a complete unix path to the binary
35281  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35282    # Keep paths in /bin as-is, but remove trailing .exe if any
35283    new_path="${new_path/%.exe/}"
35284    # Do not save /bin paths to all_fixpath_prefixes!
35285  else
35286    # Not in mixed or Windows style, start by that.
35287    new_path=`cmd //c echo $new_path`
35288
35289  input_path="$new_path"
35290  # Check if we need to convert this using DOS-style short mode. If the path
35291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35292  # take no chances and rewrite it.
35293  # Note: m4 eats our [], so we need to use [ and ] instead.
35294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35295  if test "x$has_forbidden_chars" != x; then
35296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35298  fi
35299
35300    # Output is in $new_path
35301
35302  windows_path="$new_path"
35303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35304    unix_path=`$CYGPATH -u "$windows_path"`
35305    new_path="$unix_path"
35306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35308    new_path="$unix_path"
35309  fi
35310
35311    # remove trailing .exe if any
35312    new_path="${new_path/%.exe/}"
35313
35314    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35315    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35316  fi
35317
35318  else
35319    # We're on a posix platform. Hooray! :)
35320    # First separate the path from the arguments. This will split at the first
35321    # space.
35322    complete="$STRIP"
35323    path="${complete%% *}"
35324    tmp="$complete EOL"
35325    arguments="${tmp#* }"
35326
35327    # Cannot rely on the command "which" here since it doesn't always work.
35328    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35329    if test -z "$is_absolute_path"; then
35330      # Path to executable is not absolute. Find it.
35331      IFS_save="$IFS"
35332      IFS=:
35333      for p in $PATH; do
35334        if test -f "$p/$path" && test -x "$p/$path"; then
35335          new_path="$p/$path"
35336          break
35337        fi
35338      done
35339      IFS="$IFS_save"
35340    else
35341      # This is an absolute path, we can use it without further modifications.
35342      new_path="$path"
35343    fi
35344
35345    if test "x$new_path" = x; then
35346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35347$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35348      has_space=`$ECHO "$complete" | $GREP " "`
35349      if test "x$has_space" != x; then
35350        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35351$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35352      fi
35353      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35354    fi
35355  fi
35356
35357  # Now join together the path and the arguments once again
35358  if test "x$arguments" != xEOL; then
35359    new_complete="$new_path ${arguments% *}"
35360  else
35361    new_complete="$new_path"
35362  fi
35363
35364  if test "x$complete" != "x$new_complete"; then
35365    STRIP="$new_complete"
35366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35367$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35368  fi
35369
35370
35371
35372  # Publish this variable in the help.
35373
35374
35375  if test "x$NM" = x; then
35376    # The variable is not set by user, try to locate tool using the code snippet
35377    for ac_prog in nm
35378do
35379  # Extract the first word of "$ac_prog", so it can be a program name with args.
35380set dummy $ac_prog; ac_word=$2
35381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35382$as_echo_n "checking for $ac_word... " >&6; }
35383if ${ac_cv_path_NM+:} false; then :
35384  $as_echo_n "(cached) " >&6
35385else
35386  case $NM in
35387  [\\/]* | ?:[\\/]*)
35388  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35389  ;;
35390  *)
35391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35392for as_dir in $PATH
35393do
35394  IFS=$as_save_IFS
35395  test -z "$as_dir" && as_dir=.
35396    for ac_exec_ext in '' $ac_executable_extensions; do
35397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35398    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35400    break 2
35401  fi
35402done
35403  done
35404IFS=$as_save_IFS
35405
35406  ;;
35407esac
35408fi
35409NM=$ac_cv_path_NM
35410if test -n "$NM"; then
35411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35412$as_echo "$NM" >&6; }
35413else
35414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35415$as_echo "no" >&6; }
35416fi
35417
35418
35419  test -n "$NM" && break
35420done
35421
35422  else
35423    # The variable is set, but is it from the command line or the environment?
35424
35425    # Try to remove the string !NM! from our list.
35426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35428      # If it failed, the variable was not from the command line. Ignore it,
35429      # but warn the user (except for BASH, which is always set by the calling BASH).
35430      if test "xNM" != xBASH; then
35431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35432$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35433      fi
35434      # Try to locate tool using the code snippet
35435      for ac_prog in nm
35436do
35437  # Extract the first word of "$ac_prog", so it can be a program name with args.
35438set dummy $ac_prog; ac_word=$2
35439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35440$as_echo_n "checking for $ac_word... " >&6; }
35441if ${ac_cv_path_NM+:} false; then :
35442  $as_echo_n "(cached) " >&6
35443else
35444  case $NM in
35445  [\\/]* | ?:[\\/]*)
35446  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35447  ;;
35448  *)
35449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35450for as_dir in $PATH
35451do
35452  IFS=$as_save_IFS
35453  test -z "$as_dir" && as_dir=.
35454    for ac_exec_ext in '' $ac_executable_extensions; do
35455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35456    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35458    break 2
35459  fi
35460done
35461  done
35462IFS=$as_save_IFS
35463
35464  ;;
35465esac
35466fi
35467NM=$ac_cv_path_NM
35468if test -n "$NM"; then
35469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35470$as_echo "$NM" >&6; }
35471else
35472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35473$as_echo "no" >&6; }
35474fi
35475
35476
35477  test -n "$NM" && break
35478done
35479
35480    else
35481      # If it succeeded, then it was overridden by the user. We will use it
35482      # for the tool.
35483
35484      # First remove it from the list of overridden variables, so we can test
35485      # for unknown variables in the end.
35486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35487
35488      # Check if the provided tool contains a complete path.
35489      tool_specified="$NM"
35490      tool_basename="${tool_specified##*/}"
35491      if test "x$tool_basename" = "x$tool_specified"; then
35492        # A command without a complete path is provided, search $PATH.
35493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35494$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35495        # Extract the first word of "$tool_basename", so it can be a program name with args.
35496set dummy $tool_basename; ac_word=$2
35497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35498$as_echo_n "checking for $ac_word... " >&6; }
35499if ${ac_cv_path_NM+:} false; then :
35500  $as_echo_n "(cached) " >&6
35501else
35502  case $NM in
35503  [\\/]* | ?:[\\/]*)
35504  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35505  ;;
35506  *)
35507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35508for as_dir in $PATH
35509do
35510  IFS=$as_save_IFS
35511  test -z "$as_dir" && as_dir=.
35512    for ac_exec_ext in '' $ac_executable_extensions; do
35513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35514    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35516    break 2
35517  fi
35518done
35519  done
35520IFS=$as_save_IFS
35521
35522  ;;
35523esac
35524fi
35525NM=$ac_cv_path_NM
35526if test -n "$NM"; then
35527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35528$as_echo "$NM" >&6; }
35529else
35530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35531$as_echo "no" >&6; }
35532fi
35533
35534
35535        if test "x$NM" = x; then
35536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35537        fi
35538      else
35539        # Otherwise we believe it is a complete path. Use it as it is.
35540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35541$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35543$as_echo_n "checking for NM... " >&6; }
35544        if test ! -x "$tool_specified"; then
35545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35546$as_echo "not found" >&6; }
35547          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35548        fi
35549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35550$as_echo "$tool_specified" >&6; }
35551      fi
35552    fi
35553  fi
35554
35555
35556
35557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35558
35559  # First separate the path from the arguments. This will split at the first
35560  # space.
35561  complete="$NM"
35562  path="${complete%% *}"
35563  tmp="$complete EOL"
35564  arguments="${tmp#* }"
35565
35566  # Input might be given as Windows format, start by converting to
35567  # unix format.
35568  new_path=`$CYGPATH -u "$path"`
35569
35570  # Now try to locate executable using which
35571  new_path=`$WHICH "$new_path" 2> /dev/null`
35572  # bat and cmd files are not always considered executable in cygwin causing which
35573  # to not find them
35574  if test "x$new_path" = x \
35575      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35576      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35577    new_path=`$CYGPATH -u "$path"`
35578  fi
35579  if test "x$new_path" = x; then
35580    # Oops. Which didn't find the executable.
35581    # The splitting of arguments from the executable at a space might have been incorrect,
35582    # since paths with space are more likely in Windows. Give it another try with the whole
35583    # argument.
35584    path="$complete"
35585    arguments="EOL"
35586    new_path=`$CYGPATH -u "$path"`
35587    new_path=`$WHICH "$new_path" 2> /dev/null`
35588    # bat and cmd files are not always considered executable in cygwin causing which
35589    # to not find them
35590    if test "x$new_path" = x \
35591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35593      new_path=`$CYGPATH -u "$path"`
35594    fi
35595    if test "x$new_path" = x; then
35596      # It's still not found. Now this is an unrecoverable error.
35597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35598$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35599      has_space=`$ECHO "$complete" | $GREP " "`
35600      if test "x$has_space" != x; then
35601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35603      fi
35604      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35605    fi
35606  fi
35607
35608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35611  # "foo.exe" is OK but "foo" is an error.
35612  #
35613  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35614  # It is also a way to make sure we got the proper file name for the real test later on.
35615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35616  if test "x$test_shortpath" = x; then
35617    # Short path failed, file does not exist as specified.
35618    # Try adding .exe or .cmd
35619    if test -f "${new_path}.exe"; then
35620      input_to_shortpath="${new_path}.exe"
35621    elif test -f "${new_path}.cmd"; then
35622      input_to_shortpath="${new_path}.cmd"
35623    else
35624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35625$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35626      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35627$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35628      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35629    fi
35630  else
35631    input_to_shortpath="$new_path"
35632  fi
35633
35634  # Call helper function which possibly converts this using DOS-style short mode.
35635  # If so, the updated path is stored in $new_path.
35636  new_path="$input_to_shortpath"
35637
35638  input_path="$input_to_shortpath"
35639  # Check if we need to convert this using DOS-style short mode. If the path
35640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35641  # take no chances and rewrite it.
35642  # Note: m4 eats our [], so we need to use [ and ] instead.
35643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35644  if test "x$has_forbidden_chars" != x; then
35645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35649      # Going to short mode and back again did indeed matter. Since short mode is
35650      # case insensitive, let's make it lowercase to improve readability.
35651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35652      # Now convert it back to Unix-stile (cygpath)
35653      input_path=`$CYGPATH -u "$shortmode_path"`
35654      new_path="$input_path"
35655    fi
35656  fi
35657
35658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35659  if test "x$test_cygdrive_prefix" = x; then
35660    # As a simple fix, exclude /usr/bin since it's not a real path.
35661    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35663      # a path prefixed by /cygdrive for fixpath to work.
35664      new_path="$CYGWIN_ROOT_PATH$input_path"
35665    fi
35666  fi
35667
35668  # remove trailing .exe if any
35669  new_path="${new_path/%.exe/}"
35670
35671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35672
35673  # First separate the path from the arguments. This will split at the first
35674  # space.
35675  complete="$NM"
35676  path="${complete%% *}"
35677  tmp="$complete EOL"
35678  arguments="${tmp#* }"
35679
35680  # Input might be given as Windows format, start by converting to
35681  # unix format.
35682  new_path="$path"
35683
35684  windows_path="$new_path"
35685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35686    unix_path=`$CYGPATH -u "$windows_path"`
35687    new_path="$unix_path"
35688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35690    new_path="$unix_path"
35691  fi
35692
35693
35694  # Now try to locate executable using which
35695  new_path=`$WHICH "$new_path" 2> /dev/null`
35696
35697  if test "x$new_path" = x; then
35698    # Oops. Which didn't find the executable.
35699    # The splitting of arguments from the executable at a space might have been incorrect,
35700    # since paths with space are more likely in Windows. Give it another try with the whole
35701    # argument.
35702    path="$complete"
35703    arguments="EOL"
35704    new_path="$path"
35705
35706  windows_path="$new_path"
35707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35708    unix_path=`$CYGPATH -u "$windows_path"`
35709    new_path="$unix_path"
35710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35712    new_path="$unix_path"
35713  fi
35714
35715
35716    new_path=`$WHICH "$new_path" 2> /dev/null`
35717
35718    if test "x$new_path" = x; then
35719      # It's still not found. Now this is an unrecoverable error.
35720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35721$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35722      has_space=`$ECHO "$complete" | $GREP " "`
35723      if test "x$has_space" != x; then
35724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35726      fi
35727      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35728    fi
35729  fi
35730
35731  # Now new_path has a complete unix path to the binary
35732  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35733    # Keep paths in /bin as-is, but remove trailing .exe if any
35734    new_path="${new_path/%.exe/}"
35735    # Do not save /bin paths to all_fixpath_prefixes!
35736  else
35737    # Not in mixed or Windows style, start by that.
35738    new_path=`cmd //c echo $new_path`
35739
35740  input_path="$new_path"
35741  # Check if we need to convert this using DOS-style short mode. If the path
35742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35743  # take no chances and rewrite it.
35744  # Note: m4 eats our [], so we need to use [ and ] instead.
35745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35746  if test "x$has_forbidden_chars" != x; then
35747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35749  fi
35750
35751    # Output is in $new_path
35752
35753  windows_path="$new_path"
35754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35755    unix_path=`$CYGPATH -u "$windows_path"`
35756    new_path="$unix_path"
35757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35759    new_path="$unix_path"
35760  fi
35761
35762    # remove trailing .exe if any
35763    new_path="${new_path/%.exe/}"
35764
35765    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35766    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35767  fi
35768
35769  else
35770    # We're on a posix platform. Hooray! :)
35771    # First separate the path from the arguments. This will split at the first
35772    # space.
35773    complete="$NM"
35774    path="${complete%% *}"
35775    tmp="$complete EOL"
35776    arguments="${tmp#* }"
35777
35778    # Cannot rely on the command "which" here since it doesn't always work.
35779    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35780    if test -z "$is_absolute_path"; then
35781      # Path to executable is not absolute. Find it.
35782      IFS_save="$IFS"
35783      IFS=:
35784      for p in $PATH; do
35785        if test -f "$p/$path" && test -x "$p/$path"; then
35786          new_path="$p/$path"
35787          break
35788        fi
35789      done
35790      IFS="$IFS_save"
35791    else
35792      # This is an absolute path, we can use it without further modifications.
35793      new_path="$path"
35794    fi
35795
35796    if test "x$new_path" = x; then
35797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35798$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35799      has_space=`$ECHO "$complete" | $GREP " "`
35800      if test "x$has_space" != x; then
35801        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35802$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35803      fi
35804      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35805    fi
35806  fi
35807
35808  # Now join together the path and the arguments once again
35809  if test "x$arguments" != xEOL; then
35810    new_complete="$new_path ${arguments% *}"
35811  else
35812    new_complete="$new_path"
35813  fi
35814
35815  if test "x$complete" != "x$new_complete"; then
35816    NM="$new_complete"
35817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35818$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35819  fi
35820
35821
35822
35823  # Publish this variable in the help.
35824
35825
35826  if test "x$GNM" = x; then
35827    # The variable is not set by user, try to locate tool using the code snippet
35828    for ac_prog in gnm
35829do
35830  # Extract the first word of "$ac_prog", so it can be a program name with args.
35831set dummy $ac_prog; ac_word=$2
35832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35833$as_echo_n "checking for $ac_word... " >&6; }
35834if ${ac_cv_path_GNM+:} false; then :
35835  $as_echo_n "(cached) " >&6
35836else
35837  case $GNM in
35838  [\\/]* | ?:[\\/]*)
35839  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35840  ;;
35841  *)
35842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35843for as_dir in $PATH
35844do
35845  IFS=$as_save_IFS
35846  test -z "$as_dir" && as_dir=.
35847    for ac_exec_ext in '' $ac_executable_extensions; do
35848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35849    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35851    break 2
35852  fi
35853done
35854  done
35855IFS=$as_save_IFS
35856
35857  ;;
35858esac
35859fi
35860GNM=$ac_cv_path_GNM
35861if test -n "$GNM"; then
35862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35863$as_echo "$GNM" >&6; }
35864else
35865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35866$as_echo "no" >&6; }
35867fi
35868
35869
35870  test -n "$GNM" && break
35871done
35872
35873  else
35874    # The variable is set, but is it from the command line or the environment?
35875
35876    # Try to remove the string !GNM! from our list.
35877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35879      # If it failed, the variable was not from the command line. Ignore it,
35880      # but warn the user (except for BASH, which is always set by the calling BASH).
35881      if test "xGNM" != xBASH; then
35882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35883$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35884      fi
35885      # Try to locate tool using the code snippet
35886      for ac_prog in gnm
35887do
35888  # Extract the first word of "$ac_prog", so it can be a program name with args.
35889set dummy $ac_prog; ac_word=$2
35890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35891$as_echo_n "checking for $ac_word... " >&6; }
35892if ${ac_cv_path_GNM+:} false; then :
35893  $as_echo_n "(cached) " >&6
35894else
35895  case $GNM in
35896  [\\/]* | ?:[\\/]*)
35897  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35898  ;;
35899  *)
35900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35901for as_dir in $PATH
35902do
35903  IFS=$as_save_IFS
35904  test -z "$as_dir" && as_dir=.
35905    for ac_exec_ext in '' $ac_executable_extensions; do
35906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35907    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35909    break 2
35910  fi
35911done
35912  done
35913IFS=$as_save_IFS
35914
35915  ;;
35916esac
35917fi
35918GNM=$ac_cv_path_GNM
35919if test -n "$GNM"; then
35920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35921$as_echo "$GNM" >&6; }
35922else
35923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35924$as_echo "no" >&6; }
35925fi
35926
35927
35928  test -n "$GNM" && break
35929done
35930
35931    else
35932      # If it succeeded, then it was overridden by the user. We will use it
35933      # for the tool.
35934
35935      # First remove it from the list of overridden variables, so we can test
35936      # for unknown variables in the end.
35937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35938
35939      # Check if the provided tool contains a complete path.
35940      tool_specified="$GNM"
35941      tool_basename="${tool_specified##*/}"
35942      if test "x$tool_basename" = "x$tool_specified"; then
35943        # A command without a complete path is provided, search $PATH.
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35945$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35946        # Extract the first word of "$tool_basename", so it can be a program name with args.
35947set dummy $tool_basename; ac_word=$2
35948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35949$as_echo_n "checking for $ac_word... " >&6; }
35950if ${ac_cv_path_GNM+:} false; then :
35951  $as_echo_n "(cached) " >&6
35952else
35953  case $GNM in
35954  [\\/]* | ?:[\\/]*)
35955  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35956  ;;
35957  *)
35958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35959for as_dir in $PATH
35960do
35961  IFS=$as_save_IFS
35962  test -z "$as_dir" && as_dir=.
35963    for ac_exec_ext in '' $ac_executable_extensions; do
35964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35965    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35967    break 2
35968  fi
35969done
35970  done
35971IFS=$as_save_IFS
35972
35973  ;;
35974esac
35975fi
35976GNM=$ac_cv_path_GNM
35977if test -n "$GNM"; then
35978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35979$as_echo "$GNM" >&6; }
35980else
35981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35982$as_echo "no" >&6; }
35983fi
35984
35985
35986        if test "x$GNM" = x; then
35987          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35988        fi
35989      else
35990        # Otherwise we believe it is a complete path. Use it as it is.
35991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35992$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35994$as_echo_n "checking for GNM... " >&6; }
35995        if test ! -x "$tool_specified"; then
35996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35997$as_echo "not found" >&6; }
35998          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35999        fi
36000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36001$as_echo "$tool_specified" >&6; }
36002      fi
36003    fi
36004  fi
36005
36006
36007
36008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36009
36010  # First separate the path from the arguments. This will split at the first
36011  # space.
36012  complete="$GNM"
36013  path="${complete%% *}"
36014  tmp="$complete EOL"
36015  arguments="${tmp#* }"
36016
36017  # Input might be given as Windows format, start by converting to
36018  # unix format.
36019  new_path=`$CYGPATH -u "$path"`
36020
36021  # Now try to locate executable using which
36022  new_path=`$WHICH "$new_path" 2> /dev/null`
36023  # bat and cmd files are not always considered executable in cygwin causing which
36024  # to not find them
36025  if test "x$new_path" = x \
36026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36028    new_path=`$CYGPATH -u "$path"`
36029  fi
36030  if test "x$new_path" = x; then
36031    # Oops. Which didn't find the executable.
36032    # The splitting of arguments from the executable at a space might have been incorrect,
36033    # since paths with space are more likely in Windows. Give it another try with the whole
36034    # argument.
36035    path="$complete"
36036    arguments="EOL"
36037    new_path=`$CYGPATH -u "$path"`
36038    new_path=`$WHICH "$new_path" 2> /dev/null`
36039    # bat and cmd files are not always considered executable in cygwin causing which
36040    # to not find them
36041    if test "x$new_path" = x \
36042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36044      new_path=`$CYGPATH -u "$path"`
36045    fi
36046    if test "x$new_path" = x; then
36047      # It's still not found. Now this is an unrecoverable error.
36048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36049$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36050      has_space=`$ECHO "$complete" | $GREP " "`
36051      if test "x$has_space" != x; then
36052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36054      fi
36055      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36056    fi
36057  fi
36058
36059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36062  # "foo.exe" is OK but "foo" is an error.
36063  #
36064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36065  # It is also a way to make sure we got the proper file name for the real test later on.
36066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36067  if test "x$test_shortpath" = x; then
36068    # Short path failed, file does not exist as specified.
36069    # Try adding .exe or .cmd
36070    if test -f "${new_path}.exe"; then
36071      input_to_shortpath="${new_path}.exe"
36072    elif test -f "${new_path}.cmd"; then
36073      input_to_shortpath="${new_path}.cmd"
36074    else
36075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36076$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36079      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36080    fi
36081  else
36082    input_to_shortpath="$new_path"
36083  fi
36084
36085  # Call helper function which possibly converts this using DOS-style short mode.
36086  # If so, the updated path is stored in $new_path.
36087  new_path="$input_to_shortpath"
36088
36089  input_path="$input_to_shortpath"
36090  # Check if we need to convert this using DOS-style short mode. If the path
36091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36092  # take no chances and rewrite it.
36093  # Note: m4 eats our [], so we need to use [ and ] instead.
36094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36095  if test "x$has_forbidden_chars" != x; then
36096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36100      # Going to short mode and back again did indeed matter. Since short mode is
36101      # case insensitive, let's make it lowercase to improve readability.
36102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36103      # Now convert it back to Unix-stile (cygpath)
36104      input_path=`$CYGPATH -u "$shortmode_path"`
36105      new_path="$input_path"
36106    fi
36107  fi
36108
36109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36110  if test "x$test_cygdrive_prefix" = x; then
36111    # As a simple fix, exclude /usr/bin since it's not a real path.
36112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36114      # a path prefixed by /cygdrive for fixpath to work.
36115      new_path="$CYGWIN_ROOT_PATH$input_path"
36116    fi
36117  fi
36118
36119  # remove trailing .exe if any
36120  new_path="${new_path/%.exe/}"
36121
36122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36123
36124  # First separate the path from the arguments. This will split at the first
36125  # space.
36126  complete="$GNM"
36127  path="${complete%% *}"
36128  tmp="$complete EOL"
36129  arguments="${tmp#* }"
36130
36131  # Input might be given as Windows format, start by converting to
36132  # unix format.
36133  new_path="$path"
36134
36135  windows_path="$new_path"
36136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36137    unix_path=`$CYGPATH -u "$windows_path"`
36138    new_path="$unix_path"
36139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36141    new_path="$unix_path"
36142  fi
36143
36144
36145  # Now try to locate executable using which
36146  new_path=`$WHICH "$new_path" 2> /dev/null`
36147
36148  if test "x$new_path" = x; then
36149    # Oops. Which didn't find the executable.
36150    # The splitting of arguments from the executable at a space might have been incorrect,
36151    # since paths with space are more likely in Windows. Give it another try with the whole
36152    # argument.
36153    path="$complete"
36154    arguments="EOL"
36155    new_path="$path"
36156
36157  windows_path="$new_path"
36158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36159    unix_path=`$CYGPATH -u "$windows_path"`
36160    new_path="$unix_path"
36161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36163    new_path="$unix_path"
36164  fi
36165
36166
36167    new_path=`$WHICH "$new_path" 2> /dev/null`
36168
36169    if test "x$new_path" = x; then
36170      # It's still not found. Now this is an unrecoverable error.
36171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36172$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36173      has_space=`$ECHO "$complete" | $GREP " "`
36174      if test "x$has_space" != x; then
36175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36177      fi
36178      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36179    fi
36180  fi
36181
36182  # Now new_path has a complete unix path to the binary
36183  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36184    # Keep paths in /bin as-is, but remove trailing .exe if any
36185    new_path="${new_path/%.exe/}"
36186    # Do not save /bin paths to all_fixpath_prefixes!
36187  else
36188    # Not in mixed or Windows style, start by that.
36189    new_path=`cmd //c echo $new_path`
36190
36191  input_path="$new_path"
36192  # Check if we need to convert this using DOS-style short mode. If the path
36193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36194  # take no chances and rewrite it.
36195  # Note: m4 eats our [], so we need to use [ and ] instead.
36196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36197  if test "x$has_forbidden_chars" != x; then
36198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36200  fi
36201
36202    # Output is in $new_path
36203
36204  windows_path="$new_path"
36205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36206    unix_path=`$CYGPATH -u "$windows_path"`
36207    new_path="$unix_path"
36208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36210    new_path="$unix_path"
36211  fi
36212
36213    # remove trailing .exe if any
36214    new_path="${new_path/%.exe/}"
36215
36216    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36217    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36218  fi
36219
36220  else
36221    # We're on a posix platform. Hooray! :)
36222    # First separate the path from the arguments. This will split at the first
36223    # space.
36224    complete="$GNM"
36225    path="${complete%% *}"
36226    tmp="$complete EOL"
36227    arguments="${tmp#* }"
36228
36229    # Cannot rely on the command "which" here since it doesn't always work.
36230    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36231    if test -z "$is_absolute_path"; then
36232      # Path to executable is not absolute. Find it.
36233      IFS_save="$IFS"
36234      IFS=:
36235      for p in $PATH; do
36236        if test -f "$p/$path" && test -x "$p/$path"; then
36237          new_path="$p/$path"
36238          break
36239        fi
36240      done
36241      IFS="$IFS_save"
36242    else
36243      # This is an absolute path, we can use it without further modifications.
36244      new_path="$path"
36245    fi
36246
36247    if test "x$new_path" = x; then
36248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36249$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36250      has_space=`$ECHO "$complete" | $GREP " "`
36251      if test "x$has_space" != x; then
36252        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36253$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36254      fi
36255      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36256    fi
36257  fi
36258
36259  # Now join together the path and the arguments once again
36260  if test "x$arguments" != xEOL; then
36261    new_complete="$new_path ${arguments% *}"
36262  else
36263    new_complete="$new_path"
36264  fi
36265
36266  if test "x$complete" != "x$new_complete"; then
36267    GNM="$new_complete"
36268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36269$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36270  fi
36271
36272
36273
36274
36275  # Publish this variable in the help.
36276
36277
36278  if test "x$MCS" = x; then
36279    # The variable is not set by user, try to locate tool using the code snippet
36280    for ac_prog in mcs
36281do
36282  # Extract the first word of "$ac_prog", so it can be a program name with args.
36283set dummy $ac_prog; ac_word=$2
36284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36285$as_echo_n "checking for $ac_word... " >&6; }
36286if ${ac_cv_path_MCS+:} false; then :
36287  $as_echo_n "(cached) " >&6
36288else
36289  case $MCS in
36290  [\\/]* | ?:[\\/]*)
36291  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36292  ;;
36293  *)
36294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36295for as_dir in $PATH
36296do
36297  IFS=$as_save_IFS
36298  test -z "$as_dir" && as_dir=.
36299    for ac_exec_ext in '' $ac_executable_extensions; do
36300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36301    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36303    break 2
36304  fi
36305done
36306  done
36307IFS=$as_save_IFS
36308
36309  ;;
36310esac
36311fi
36312MCS=$ac_cv_path_MCS
36313if test -n "$MCS"; then
36314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36315$as_echo "$MCS" >&6; }
36316else
36317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36318$as_echo "no" >&6; }
36319fi
36320
36321
36322  test -n "$MCS" && break
36323done
36324
36325  else
36326    # The variable is set, but is it from the command line or the environment?
36327
36328    # Try to remove the string !MCS! from our list.
36329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36331      # If it failed, the variable was not from the command line. Ignore it,
36332      # but warn the user (except for BASH, which is always set by the calling BASH).
36333      if test "xMCS" != xBASH; then
36334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36335$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36336      fi
36337      # Try to locate tool using the code snippet
36338      for ac_prog in mcs
36339do
36340  # Extract the first word of "$ac_prog", so it can be a program name with args.
36341set dummy $ac_prog; ac_word=$2
36342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36343$as_echo_n "checking for $ac_word... " >&6; }
36344if ${ac_cv_path_MCS+:} false; then :
36345  $as_echo_n "(cached) " >&6
36346else
36347  case $MCS in
36348  [\\/]* | ?:[\\/]*)
36349  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36350  ;;
36351  *)
36352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36353for as_dir in $PATH
36354do
36355  IFS=$as_save_IFS
36356  test -z "$as_dir" && as_dir=.
36357    for ac_exec_ext in '' $ac_executable_extensions; do
36358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36359    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36361    break 2
36362  fi
36363done
36364  done
36365IFS=$as_save_IFS
36366
36367  ;;
36368esac
36369fi
36370MCS=$ac_cv_path_MCS
36371if test -n "$MCS"; then
36372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36373$as_echo "$MCS" >&6; }
36374else
36375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36376$as_echo "no" >&6; }
36377fi
36378
36379
36380  test -n "$MCS" && break
36381done
36382
36383    else
36384      # If it succeeded, then it was overridden by the user. We will use it
36385      # for the tool.
36386
36387      # First remove it from the list of overridden variables, so we can test
36388      # for unknown variables in the end.
36389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36390
36391      # Check if the provided tool contains a complete path.
36392      tool_specified="$MCS"
36393      tool_basename="${tool_specified##*/}"
36394      if test "x$tool_basename" = "x$tool_specified"; then
36395        # A command without a complete path is provided, search $PATH.
36396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36397$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36398        # Extract the first word of "$tool_basename", so it can be a program name with args.
36399set dummy $tool_basename; ac_word=$2
36400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36401$as_echo_n "checking for $ac_word... " >&6; }
36402if ${ac_cv_path_MCS+:} false; then :
36403  $as_echo_n "(cached) " >&6
36404else
36405  case $MCS in
36406  [\\/]* | ?:[\\/]*)
36407  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36408  ;;
36409  *)
36410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36411for as_dir in $PATH
36412do
36413  IFS=$as_save_IFS
36414  test -z "$as_dir" && as_dir=.
36415    for ac_exec_ext in '' $ac_executable_extensions; do
36416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36417    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36419    break 2
36420  fi
36421done
36422  done
36423IFS=$as_save_IFS
36424
36425  ;;
36426esac
36427fi
36428MCS=$ac_cv_path_MCS
36429if test -n "$MCS"; then
36430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36431$as_echo "$MCS" >&6; }
36432else
36433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36434$as_echo "no" >&6; }
36435fi
36436
36437
36438        if test "x$MCS" = x; then
36439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36440        fi
36441      else
36442        # Otherwise we believe it is a complete path. Use it as it is.
36443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36444$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36446$as_echo_n "checking for MCS... " >&6; }
36447        if test ! -x "$tool_specified"; then
36448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36449$as_echo "not found" >&6; }
36450          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36451        fi
36452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36453$as_echo "$tool_specified" >&6; }
36454      fi
36455    fi
36456  fi
36457
36458
36459
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461
36462  # First separate the path from the arguments. This will split at the first
36463  # space.
36464  complete="$MCS"
36465  path="${complete%% *}"
36466  tmp="$complete EOL"
36467  arguments="${tmp#* }"
36468
36469  # Input might be given as Windows format, start by converting to
36470  # unix format.
36471  new_path=`$CYGPATH -u "$path"`
36472
36473  # Now try to locate executable using which
36474  new_path=`$WHICH "$new_path" 2> /dev/null`
36475  # bat and cmd files are not always considered executable in cygwin causing which
36476  # to not find them
36477  if test "x$new_path" = x \
36478      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36479      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36480    new_path=`$CYGPATH -u "$path"`
36481  fi
36482  if test "x$new_path" = x; then
36483    # Oops. Which didn't find the executable.
36484    # The splitting of arguments from the executable at a space might have been incorrect,
36485    # since paths with space are more likely in Windows. Give it another try with the whole
36486    # argument.
36487    path="$complete"
36488    arguments="EOL"
36489    new_path=`$CYGPATH -u "$path"`
36490    new_path=`$WHICH "$new_path" 2> /dev/null`
36491    # bat and cmd files are not always considered executable in cygwin causing which
36492    # to not find them
36493    if test "x$new_path" = x \
36494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36496      new_path=`$CYGPATH -u "$path"`
36497    fi
36498    if test "x$new_path" = x; then
36499      # It's still not found. Now this is an unrecoverable error.
36500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36501$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36502      has_space=`$ECHO "$complete" | $GREP " "`
36503      if test "x$has_space" != x; then
36504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36506      fi
36507      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36508    fi
36509  fi
36510
36511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36514  # "foo.exe" is OK but "foo" is an error.
36515  #
36516  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36517  # It is also a way to make sure we got the proper file name for the real test later on.
36518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36519  if test "x$test_shortpath" = x; then
36520    # Short path failed, file does not exist as specified.
36521    # Try adding .exe or .cmd
36522    if test -f "${new_path}.exe"; then
36523      input_to_shortpath="${new_path}.exe"
36524    elif test -f "${new_path}.cmd"; then
36525      input_to_shortpath="${new_path}.cmd"
36526    else
36527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36528$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36531      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36532    fi
36533  else
36534    input_to_shortpath="$new_path"
36535  fi
36536
36537  # Call helper function which possibly converts this using DOS-style short mode.
36538  # If so, the updated path is stored in $new_path.
36539  new_path="$input_to_shortpath"
36540
36541  input_path="$input_to_shortpath"
36542  # Check if we need to convert this using DOS-style short mode. If the path
36543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36544  # take no chances and rewrite it.
36545  # Note: m4 eats our [], so we need to use [ and ] instead.
36546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36547  if test "x$has_forbidden_chars" != x; then
36548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36552      # Going to short mode and back again did indeed matter. Since short mode is
36553      # case insensitive, let's make it lowercase to improve readability.
36554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36555      # Now convert it back to Unix-stile (cygpath)
36556      input_path=`$CYGPATH -u "$shortmode_path"`
36557      new_path="$input_path"
36558    fi
36559  fi
36560
36561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36562  if test "x$test_cygdrive_prefix" = x; then
36563    # As a simple fix, exclude /usr/bin since it's not a real path.
36564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36566      # a path prefixed by /cygdrive for fixpath to work.
36567      new_path="$CYGWIN_ROOT_PATH$input_path"
36568    fi
36569  fi
36570
36571  # remove trailing .exe if any
36572  new_path="${new_path/%.exe/}"
36573
36574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36575
36576  # First separate the path from the arguments. This will split at the first
36577  # space.
36578  complete="$MCS"
36579  path="${complete%% *}"
36580  tmp="$complete EOL"
36581  arguments="${tmp#* }"
36582
36583  # Input might be given as Windows format, start by converting to
36584  # unix format.
36585  new_path="$path"
36586
36587  windows_path="$new_path"
36588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36589    unix_path=`$CYGPATH -u "$windows_path"`
36590    new_path="$unix_path"
36591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36593    new_path="$unix_path"
36594  fi
36595
36596
36597  # Now try to locate executable using which
36598  new_path=`$WHICH "$new_path" 2> /dev/null`
36599
36600  if test "x$new_path" = x; then
36601    # Oops. Which didn't find the executable.
36602    # The splitting of arguments from the executable at a space might have been incorrect,
36603    # since paths with space are more likely in Windows. Give it another try with the whole
36604    # argument.
36605    path="$complete"
36606    arguments="EOL"
36607    new_path="$path"
36608
36609  windows_path="$new_path"
36610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36611    unix_path=`$CYGPATH -u "$windows_path"`
36612    new_path="$unix_path"
36613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36615    new_path="$unix_path"
36616  fi
36617
36618
36619    new_path=`$WHICH "$new_path" 2> /dev/null`
36620
36621    if test "x$new_path" = x; then
36622      # It's still not found. Now this is an unrecoverable error.
36623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36624$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36625      has_space=`$ECHO "$complete" | $GREP " "`
36626      if test "x$has_space" != x; then
36627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36629      fi
36630      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36631    fi
36632  fi
36633
36634  # Now new_path has a complete unix path to the binary
36635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36636    # Keep paths in /bin as-is, but remove trailing .exe if any
36637    new_path="${new_path/%.exe/}"
36638    # Do not save /bin paths to all_fixpath_prefixes!
36639  else
36640    # Not in mixed or Windows style, start by that.
36641    new_path=`cmd //c echo $new_path`
36642
36643  input_path="$new_path"
36644  # Check if we need to convert this using DOS-style short mode. If the path
36645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36646  # take no chances and rewrite it.
36647  # Note: m4 eats our [], so we need to use [ and ] instead.
36648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36649  if test "x$has_forbidden_chars" != x; then
36650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36652  fi
36653
36654    # Output is in $new_path
36655
36656  windows_path="$new_path"
36657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36658    unix_path=`$CYGPATH -u "$windows_path"`
36659    new_path="$unix_path"
36660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36662    new_path="$unix_path"
36663  fi
36664
36665    # remove trailing .exe if any
36666    new_path="${new_path/%.exe/}"
36667
36668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36670  fi
36671
36672  else
36673    # We're on a posix platform. Hooray! :)
36674    # First separate the path from the arguments. This will split at the first
36675    # space.
36676    complete="$MCS"
36677    path="${complete%% *}"
36678    tmp="$complete EOL"
36679    arguments="${tmp#* }"
36680
36681    # Cannot rely on the command "which" here since it doesn't always work.
36682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36683    if test -z "$is_absolute_path"; then
36684      # Path to executable is not absolute. Find it.
36685      IFS_save="$IFS"
36686      IFS=:
36687      for p in $PATH; do
36688        if test -f "$p/$path" && test -x "$p/$path"; then
36689          new_path="$p/$path"
36690          break
36691        fi
36692      done
36693      IFS="$IFS_save"
36694    else
36695      # This is an absolute path, we can use it without further modifications.
36696      new_path="$path"
36697    fi
36698
36699    if test "x$new_path" = x; then
36700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36701$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36702      has_space=`$ECHO "$complete" | $GREP " "`
36703      if test "x$has_space" != x; then
36704        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36706      fi
36707      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36708    fi
36709  fi
36710
36711  # Now join together the path and the arguments once again
36712  if test "x$arguments" != xEOL; then
36713    new_complete="$new_path ${arguments% *}"
36714  else
36715    new_complete="$new_path"
36716  fi
36717
36718  if test "x$complete" != "x$new_complete"; then
36719    MCS="$new_complete"
36720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36721$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36722  fi
36723
36724  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36725    # FIXME: we should unify this with the solaris case above.
36726
36727
36728  # Publish this variable in the help.
36729
36730
36731  if test "x$STRIP" = x; then
36732    # The variable is not set by user, try to locate tool using the code snippet
36733    if test -n "$ac_tool_prefix"; then
36734  for ac_prog in strip
36735  do
36736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36739$as_echo_n "checking for $ac_word... " >&6; }
36740if ${ac_cv_prog_STRIP+:} false; then :
36741  $as_echo_n "(cached) " >&6
36742else
36743  if test -n "$STRIP"; then
36744  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36745else
36746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36747for as_dir in $PATH
36748do
36749  IFS=$as_save_IFS
36750  test -z "$as_dir" && as_dir=.
36751    for ac_exec_ext in '' $ac_executable_extensions; do
36752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36753    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36755    break 2
36756  fi
36757done
36758  done
36759IFS=$as_save_IFS
36760
36761fi
36762fi
36763STRIP=$ac_cv_prog_STRIP
36764if test -n "$STRIP"; then
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36766$as_echo "$STRIP" >&6; }
36767else
36768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36769$as_echo "no" >&6; }
36770fi
36771
36772
36773    test -n "$STRIP" && break
36774  done
36775fi
36776if test -z "$STRIP"; then
36777  ac_ct_STRIP=$STRIP
36778  for ac_prog in strip
36779do
36780  # Extract the first word of "$ac_prog", so it can be a program name with args.
36781set dummy $ac_prog; ac_word=$2
36782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36783$as_echo_n "checking for $ac_word... " >&6; }
36784if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36785  $as_echo_n "(cached) " >&6
36786else
36787  if test -n "$ac_ct_STRIP"; then
36788  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36789else
36790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36791for as_dir in $PATH
36792do
36793  IFS=$as_save_IFS
36794  test -z "$as_dir" && as_dir=.
36795    for ac_exec_ext in '' $ac_executable_extensions; do
36796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36797    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36799    break 2
36800  fi
36801done
36802  done
36803IFS=$as_save_IFS
36804
36805fi
36806fi
36807ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36808if test -n "$ac_ct_STRIP"; then
36809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36810$as_echo "$ac_ct_STRIP" >&6; }
36811else
36812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36813$as_echo "no" >&6; }
36814fi
36815
36816
36817  test -n "$ac_ct_STRIP" && break
36818done
36819
36820  if test "x$ac_ct_STRIP" = x; then
36821    STRIP=""
36822  else
36823    case $cross_compiling:$ac_tool_warned in
36824yes:)
36825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36827ac_tool_warned=yes ;;
36828esac
36829    STRIP=$ac_ct_STRIP
36830  fi
36831fi
36832
36833  else
36834    # The variable is set, but is it from the command line or the environment?
36835
36836    # Try to remove the string !STRIP! from our list.
36837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36839      # If it failed, the variable was not from the command line. Ignore it,
36840      # but warn the user (except for BASH, which is always set by the calling BASH).
36841      if test "xSTRIP" != xBASH; then
36842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36843$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36844      fi
36845      # Try to locate tool using the code snippet
36846      if test -n "$ac_tool_prefix"; then
36847  for ac_prog in strip
36848  do
36849    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36852$as_echo_n "checking for $ac_word... " >&6; }
36853if ${ac_cv_prog_STRIP+:} false; then :
36854  $as_echo_n "(cached) " >&6
36855else
36856  if test -n "$STRIP"; then
36857  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36858else
36859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36860for as_dir in $PATH
36861do
36862  IFS=$as_save_IFS
36863  test -z "$as_dir" && as_dir=.
36864    for ac_exec_ext in '' $ac_executable_extensions; do
36865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36866    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36868    break 2
36869  fi
36870done
36871  done
36872IFS=$as_save_IFS
36873
36874fi
36875fi
36876STRIP=$ac_cv_prog_STRIP
36877if test -n "$STRIP"; then
36878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36879$as_echo "$STRIP" >&6; }
36880else
36881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36882$as_echo "no" >&6; }
36883fi
36884
36885
36886    test -n "$STRIP" && break
36887  done
36888fi
36889if test -z "$STRIP"; then
36890  ac_ct_STRIP=$STRIP
36891  for ac_prog in strip
36892do
36893  # Extract the first word of "$ac_prog", so it can be a program name with args.
36894set dummy $ac_prog; ac_word=$2
36895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36896$as_echo_n "checking for $ac_word... " >&6; }
36897if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36898  $as_echo_n "(cached) " >&6
36899else
36900  if test -n "$ac_ct_STRIP"; then
36901  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36902else
36903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36904for as_dir in $PATH
36905do
36906  IFS=$as_save_IFS
36907  test -z "$as_dir" && as_dir=.
36908    for ac_exec_ext in '' $ac_executable_extensions; do
36909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36910    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36912    break 2
36913  fi
36914done
36915  done
36916IFS=$as_save_IFS
36917
36918fi
36919fi
36920ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36921if test -n "$ac_ct_STRIP"; then
36922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36923$as_echo "$ac_ct_STRIP" >&6; }
36924else
36925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36926$as_echo "no" >&6; }
36927fi
36928
36929
36930  test -n "$ac_ct_STRIP" && break
36931done
36932
36933  if test "x$ac_ct_STRIP" = x; then
36934    STRIP=""
36935  else
36936    case $cross_compiling:$ac_tool_warned in
36937yes:)
36938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36940ac_tool_warned=yes ;;
36941esac
36942    STRIP=$ac_ct_STRIP
36943  fi
36944fi
36945
36946    else
36947      # If it succeeded, then it was overridden by the user. We will use it
36948      # for the tool.
36949
36950      # First remove it from the list of overridden variables, so we can test
36951      # for unknown variables in the end.
36952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36953
36954      # Check if the provided tool contains a complete path.
36955      tool_specified="$STRIP"
36956      tool_basename="${tool_specified##*/}"
36957      if test "x$tool_basename" = "x$tool_specified"; then
36958        # A command without a complete path is provided, search $PATH.
36959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36960$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36961        # Extract the first word of "$tool_basename", so it can be a program name with args.
36962set dummy $tool_basename; ac_word=$2
36963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36964$as_echo_n "checking for $ac_word... " >&6; }
36965if ${ac_cv_path_STRIP+:} false; then :
36966  $as_echo_n "(cached) " >&6
36967else
36968  case $STRIP in
36969  [\\/]* | ?:[\\/]*)
36970  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36971  ;;
36972  *)
36973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36974for as_dir in $PATH
36975do
36976  IFS=$as_save_IFS
36977  test -z "$as_dir" && as_dir=.
36978    for ac_exec_ext in '' $ac_executable_extensions; do
36979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36980    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36982    break 2
36983  fi
36984done
36985  done
36986IFS=$as_save_IFS
36987
36988  ;;
36989esac
36990fi
36991STRIP=$ac_cv_path_STRIP
36992if test -n "$STRIP"; then
36993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36994$as_echo "$STRIP" >&6; }
36995else
36996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36997$as_echo "no" >&6; }
36998fi
36999
37000
37001        if test "x$STRIP" = x; then
37002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37003        fi
37004      else
37005        # Otherwise we believe it is a complete path. Use it as it is.
37006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37007$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37009$as_echo_n "checking for STRIP... " >&6; }
37010        if test ! -x "$tool_specified"; then
37011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37012$as_echo "not found" >&6; }
37013          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37014        fi
37015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37016$as_echo "$tool_specified" >&6; }
37017      fi
37018    fi
37019  fi
37020
37021
37022
37023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37024
37025  # First separate the path from the arguments. This will split at the first
37026  # space.
37027  complete="$STRIP"
37028  path="${complete%% *}"
37029  tmp="$complete EOL"
37030  arguments="${tmp#* }"
37031
37032  # Input might be given as Windows format, start by converting to
37033  # unix format.
37034  new_path=`$CYGPATH -u "$path"`
37035
37036  # Now try to locate executable using which
37037  new_path=`$WHICH "$new_path" 2> /dev/null`
37038  # bat and cmd files are not always considered executable in cygwin causing which
37039  # to not find them
37040  if test "x$new_path" = x \
37041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37043    new_path=`$CYGPATH -u "$path"`
37044  fi
37045  if test "x$new_path" = x; then
37046    # Oops. Which didn't find the executable.
37047    # The splitting of arguments from the executable at a space might have been incorrect,
37048    # since paths with space are more likely in Windows. Give it another try with the whole
37049    # argument.
37050    path="$complete"
37051    arguments="EOL"
37052    new_path=`$CYGPATH -u "$path"`
37053    new_path=`$WHICH "$new_path" 2> /dev/null`
37054    # bat and cmd files are not always considered executable in cygwin causing which
37055    # to not find them
37056    if test "x$new_path" = x \
37057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37059      new_path=`$CYGPATH -u "$path"`
37060    fi
37061    if test "x$new_path" = x; then
37062      # It's still not found. Now this is an unrecoverable error.
37063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37064$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37065      has_space=`$ECHO "$complete" | $GREP " "`
37066      if test "x$has_space" != x; then
37067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37069      fi
37070      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37071    fi
37072  fi
37073
37074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37077  # "foo.exe" is OK but "foo" is an error.
37078  #
37079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37080  # It is also a way to make sure we got the proper file name for the real test later on.
37081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37082  if test "x$test_shortpath" = x; then
37083    # Short path failed, file does not exist as specified.
37084    # Try adding .exe or .cmd
37085    if test -f "${new_path}.exe"; then
37086      input_to_shortpath="${new_path}.exe"
37087    elif test -f "${new_path}.cmd"; then
37088      input_to_shortpath="${new_path}.cmd"
37089    else
37090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37091$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37094      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37095    fi
37096  else
37097    input_to_shortpath="$new_path"
37098  fi
37099
37100  # Call helper function which possibly converts this using DOS-style short mode.
37101  # If so, the updated path is stored in $new_path.
37102  new_path="$input_to_shortpath"
37103
37104  input_path="$input_to_shortpath"
37105  # Check if we need to convert this using DOS-style short mode. If the path
37106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37107  # take no chances and rewrite it.
37108  # Note: m4 eats our [], so we need to use [ and ] instead.
37109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37110  if test "x$has_forbidden_chars" != x; then
37111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37115      # Going to short mode and back again did indeed matter. Since short mode is
37116      # case insensitive, let's make it lowercase to improve readability.
37117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37118      # Now convert it back to Unix-stile (cygpath)
37119      input_path=`$CYGPATH -u "$shortmode_path"`
37120      new_path="$input_path"
37121    fi
37122  fi
37123
37124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37125  if test "x$test_cygdrive_prefix" = x; then
37126    # As a simple fix, exclude /usr/bin since it's not a real path.
37127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37129      # a path prefixed by /cygdrive for fixpath to work.
37130      new_path="$CYGWIN_ROOT_PATH$input_path"
37131    fi
37132  fi
37133
37134  # remove trailing .exe if any
37135  new_path="${new_path/%.exe/}"
37136
37137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37138
37139  # First separate the path from the arguments. This will split at the first
37140  # space.
37141  complete="$STRIP"
37142  path="${complete%% *}"
37143  tmp="$complete EOL"
37144  arguments="${tmp#* }"
37145
37146  # Input might be given as Windows format, start by converting to
37147  # unix format.
37148  new_path="$path"
37149
37150  windows_path="$new_path"
37151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37152    unix_path=`$CYGPATH -u "$windows_path"`
37153    new_path="$unix_path"
37154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37156    new_path="$unix_path"
37157  fi
37158
37159
37160  # Now try to locate executable using which
37161  new_path=`$WHICH "$new_path" 2> /dev/null`
37162
37163  if test "x$new_path" = x; then
37164    # Oops. Which didn't find the executable.
37165    # The splitting of arguments from the executable at a space might have been incorrect,
37166    # since paths with space are more likely in Windows. Give it another try with the whole
37167    # argument.
37168    path="$complete"
37169    arguments="EOL"
37170    new_path="$path"
37171
37172  windows_path="$new_path"
37173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37174    unix_path=`$CYGPATH -u "$windows_path"`
37175    new_path="$unix_path"
37176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37178    new_path="$unix_path"
37179  fi
37180
37181
37182    new_path=`$WHICH "$new_path" 2> /dev/null`
37183
37184    if test "x$new_path" = x; then
37185      # It's still not found. Now this is an unrecoverable error.
37186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37187$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37188      has_space=`$ECHO "$complete" | $GREP " "`
37189      if test "x$has_space" != x; then
37190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37192      fi
37193      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37194    fi
37195  fi
37196
37197  # Now new_path has a complete unix path to the binary
37198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37199    # Keep paths in /bin as-is, but remove trailing .exe if any
37200    new_path="${new_path/%.exe/}"
37201    # Do not save /bin paths to all_fixpath_prefixes!
37202  else
37203    # Not in mixed or Windows style, start by that.
37204    new_path=`cmd //c echo $new_path`
37205
37206  input_path="$new_path"
37207  # Check if we need to convert this using DOS-style short mode. If the path
37208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37209  # take no chances and rewrite it.
37210  # Note: m4 eats our [], so we need to use [ and ] instead.
37211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37212  if test "x$has_forbidden_chars" != x; then
37213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37215  fi
37216
37217    # Output is in $new_path
37218
37219  windows_path="$new_path"
37220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37221    unix_path=`$CYGPATH -u "$windows_path"`
37222    new_path="$unix_path"
37223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37225    new_path="$unix_path"
37226  fi
37227
37228    # remove trailing .exe if any
37229    new_path="${new_path/%.exe/}"
37230
37231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37233  fi
37234
37235  else
37236    # We're on a posix platform. Hooray! :)
37237    # First separate the path from the arguments. This will split at the first
37238    # space.
37239    complete="$STRIP"
37240    path="${complete%% *}"
37241    tmp="$complete EOL"
37242    arguments="${tmp#* }"
37243
37244    # Cannot rely on the command "which" here since it doesn't always work.
37245    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37246    if test -z "$is_absolute_path"; then
37247      # Path to executable is not absolute. Find it.
37248      IFS_save="$IFS"
37249      IFS=:
37250      for p in $PATH; do
37251        if test -f "$p/$path" && test -x "$p/$path"; then
37252          new_path="$p/$path"
37253          break
37254        fi
37255      done
37256      IFS="$IFS_save"
37257    else
37258      # This is an absolute path, we can use it without further modifications.
37259      new_path="$path"
37260    fi
37261
37262    if test "x$new_path" = x; then
37263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37264$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37265      has_space=`$ECHO "$complete" | $GREP " "`
37266      if test "x$has_space" != x; then
37267        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37269      fi
37270      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37271    fi
37272  fi
37273
37274  # Now join together the path and the arguments once again
37275  if test "x$arguments" != xEOL; then
37276    new_complete="$new_path ${arguments% *}"
37277  else
37278    new_complete="$new_path"
37279  fi
37280
37281  if test "x$complete" != "x$new_complete"; then
37282    STRIP="$new_complete"
37283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37284$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37285  fi
37286
37287
37288
37289  # Publish this variable in the help.
37290
37291
37292  if test "x$NM" = x; then
37293    # The variable is not set by user, try to locate tool using the code snippet
37294    if test -n "$ac_tool_prefix"; then
37295  for ac_prog in nm
37296  do
37297    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37298set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37300$as_echo_n "checking for $ac_word... " >&6; }
37301if ${ac_cv_prog_NM+:} false; then :
37302  $as_echo_n "(cached) " >&6
37303else
37304  if test -n "$NM"; then
37305  ac_cv_prog_NM="$NM" # Let the user override the test.
37306else
37307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37308for as_dir in $PATH
37309do
37310  IFS=$as_save_IFS
37311  test -z "$as_dir" && as_dir=.
37312    for ac_exec_ext in '' $ac_executable_extensions; do
37313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37314    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37316    break 2
37317  fi
37318done
37319  done
37320IFS=$as_save_IFS
37321
37322fi
37323fi
37324NM=$ac_cv_prog_NM
37325if test -n "$NM"; then
37326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37327$as_echo "$NM" >&6; }
37328else
37329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37330$as_echo "no" >&6; }
37331fi
37332
37333
37334    test -n "$NM" && break
37335  done
37336fi
37337if test -z "$NM"; then
37338  ac_ct_NM=$NM
37339  for ac_prog in nm
37340do
37341  # Extract the first word of "$ac_prog", so it can be a program name with args.
37342set dummy $ac_prog; ac_word=$2
37343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37344$as_echo_n "checking for $ac_word... " >&6; }
37345if ${ac_cv_prog_ac_ct_NM+:} false; then :
37346  $as_echo_n "(cached) " >&6
37347else
37348  if test -n "$ac_ct_NM"; then
37349  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37350else
37351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37352for as_dir in $PATH
37353do
37354  IFS=$as_save_IFS
37355  test -z "$as_dir" && as_dir=.
37356    for ac_exec_ext in '' $ac_executable_extensions; do
37357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37358    ac_cv_prog_ac_ct_NM="$ac_prog"
37359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37360    break 2
37361  fi
37362done
37363  done
37364IFS=$as_save_IFS
37365
37366fi
37367fi
37368ac_ct_NM=$ac_cv_prog_ac_ct_NM
37369if test -n "$ac_ct_NM"; then
37370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37371$as_echo "$ac_ct_NM" >&6; }
37372else
37373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37374$as_echo "no" >&6; }
37375fi
37376
37377
37378  test -n "$ac_ct_NM" && break
37379done
37380
37381  if test "x$ac_ct_NM" = x; then
37382    NM=""
37383  else
37384    case $cross_compiling:$ac_tool_warned in
37385yes:)
37386{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37387$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37388ac_tool_warned=yes ;;
37389esac
37390    NM=$ac_ct_NM
37391  fi
37392fi
37393
37394  else
37395    # The variable is set, but is it from the command line or the environment?
37396
37397    # Try to remove the string !NM! from our list.
37398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37400      # If it failed, the variable was not from the command line. Ignore it,
37401      # but warn the user (except for BASH, which is always set by the calling BASH).
37402      if test "xNM" != xBASH; then
37403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37404$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37405      fi
37406      # Try to locate tool using the code snippet
37407      if test -n "$ac_tool_prefix"; then
37408  for ac_prog in nm
37409  do
37410    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37411set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37413$as_echo_n "checking for $ac_word... " >&6; }
37414if ${ac_cv_prog_NM+:} false; then :
37415  $as_echo_n "(cached) " >&6
37416else
37417  if test -n "$NM"; then
37418  ac_cv_prog_NM="$NM" # Let the user override the test.
37419else
37420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37421for as_dir in $PATH
37422do
37423  IFS=$as_save_IFS
37424  test -z "$as_dir" && as_dir=.
37425    for ac_exec_ext in '' $ac_executable_extensions; do
37426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37427    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37429    break 2
37430  fi
37431done
37432  done
37433IFS=$as_save_IFS
37434
37435fi
37436fi
37437NM=$ac_cv_prog_NM
37438if test -n "$NM"; then
37439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37440$as_echo "$NM" >&6; }
37441else
37442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37443$as_echo "no" >&6; }
37444fi
37445
37446
37447    test -n "$NM" && break
37448  done
37449fi
37450if test -z "$NM"; then
37451  ac_ct_NM=$NM
37452  for ac_prog in nm
37453do
37454  # Extract the first word of "$ac_prog", so it can be a program name with args.
37455set dummy $ac_prog; ac_word=$2
37456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457$as_echo_n "checking for $ac_word... " >&6; }
37458if ${ac_cv_prog_ac_ct_NM+:} false; then :
37459  $as_echo_n "(cached) " >&6
37460else
37461  if test -n "$ac_ct_NM"; then
37462  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37463else
37464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37465for as_dir in $PATH
37466do
37467  IFS=$as_save_IFS
37468  test -z "$as_dir" && as_dir=.
37469    for ac_exec_ext in '' $ac_executable_extensions; do
37470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37471    ac_cv_prog_ac_ct_NM="$ac_prog"
37472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37473    break 2
37474  fi
37475done
37476  done
37477IFS=$as_save_IFS
37478
37479fi
37480fi
37481ac_ct_NM=$ac_cv_prog_ac_ct_NM
37482if test -n "$ac_ct_NM"; then
37483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37484$as_echo "$ac_ct_NM" >&6; }
37485else
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37487$as_echo "no" >&6; }
37488fi
37489
37490
37491  test -n "$ac_ct_NM" && break
37492done
37493
37494  if test "x$ac_ct_NM" = x; then
37495    NM=""
37496  else
37497    case $cross_compiling:$ac_tool_warned in
37498yes:)
37499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37501ac_tool_warned=yes ;;
37502esac
37503    NM=$ac_ct_NM
37504  fi
37505fi
37506
37507    else
37508      # If it succeeded, then it was overridden by the user. We will use it
37509      # for the tool.
37510
37511      # First remove it from the list of overridden variables, so we can test
37512      # for unknown variables in the end.
37513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37514
37515      # Check if the provided tool contains a complete path.
37516      tool_specified="$NM"
37517      tool_basename="${tool_specified##*/}"
37518      if test "x$tool_basename" = "x$tool_specified"; then
37519        # A command without a complete path is provided, search $PATH.
37520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37521$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37522        # Extract the first word of "$tool_basename", so it can be a program name with args.
37523set dummy $tool_basename; ac_word=$2
37524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37525$as_echo_n "checking for $ac_word... " >&6; }
37526if ${ac_cv_path_NM+:} false; then :
37527  $as_echo_n "(cached) " >&6
37528else
37529  case $NM in
37530  [\\/]* | ?:[\\/]*)
37531  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37532  ;;
37533  *)
37534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37535for as_dir in $PATH
37536do
37537  IFS=$as_save_IFS
37538  test -z "$as_dir" && as_dir=.
37539    for ac_exec_ext in '' $ac_executable_extensions; do
37540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37541    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37543    break 2
37544  fi
37545done
37546  done
37547IFS=$as_save_IFS
37548
37549  ;;
37550esac
37551fi
37552NM=$ac_cv_path_NM
37553if test -n "$NM"; then
37554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37555$as_echo "$NM" >&6; }
37556else
37557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37558$as_echo "no" >&6; }
37559fi
37560
37561
37562        if test "x$NM" = x; then
37563          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37564        fi
37565      else
37566        # Otherwise we believe it is a complete path. Use it as it is.
37567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37568$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37570$as_echo_n "checking for NM... " >&6; }
37571        if test ! -x "$tool_specified"; then
37572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37573$as_echo "not found" >&6; }
37574          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37575        fi
37576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37577$as_echo "$tool_specified" >&6; }
37578      fi
37579    fi
37580  fi
37581
37582
37583
37584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37585
37586  # First separate the path from the arguments. This will split at the first
37587  # space.
37588  complete="$NM"
37589  path="${complete%% *}"
37590  tmp="$complete EOL"
37591  arguments="${tmp#* }"
37592
37593  # Input might be given as Windows format, start by converting to
37594  # unix format.
37595  new_path=`$CYGPATH -u "$path"`
37596
37597  # Now try to locate executable using which
37598  new_path=`$WHICH "$new_path" 2> /dev/null`
37599  # bat and cmd files are not always considered executable in cygwin causing which
37600  # to not find them
37601  if test "x$new_path" = x \
37602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37604    new_path=`$CYGPATH -u "$path"`
37605  fi
37606  if test "x$new_path" = x; then
37607    # Oops. Which didn't find the executable.
37608    # The splitting of arguments from the executable at a space might have been incorrect,
37609    # since paths with space are more likely in Windows. Give it another try with the whole
37610    # argument.
37611    path="$complete"
37612    arguments="EOL"
37613    new_path=`$CYGPATH -u "$path"`
37614    new_path=`$WHICH "$new_path" 2> /dev/null`
37615    # bat and cmd files are not always considered executable in cygwin causing which
37616    # to not find them
37617    if test "x$new_path" = x \
37618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37620      new_path=`$CYGPATH -u "$path"`
37621    fi
37622    if test "x$new_path" = x; then
37623      # It's still not found. Now this is an unrecoverable error.
37624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37625$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37626      has_space=`$ECHO "$complete" | $GREP " "`
37627      if test "x$has_space" != x; then
37628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37630      fi
37631      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37632    fi
37633  fi
37634
37635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37638  # "foo.exe" is OK but "foo" is an error.
37639  #
37640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37641  # It is also a way to make sure we got the proper file name for the real test later on.
37642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37643  if test "x$test_shortpath" = x; then
37644    # Short path failed, file does not exist as specified.
37645    # Try adding .exe or .cmd
37646    if test -f "${new_path}.exe"; then
37647      input_to_shortpath="${new_path}.exe"
37648    elif test -f "${new_path}.cmd"; then
37649      input_to_shortpath="${new_path}.cmd"
37650    else
37651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37652$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37655      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37656    fi
37657  else
37658    input_to_shortpath="$new_path"
37659  fi
37660
37661  # Call helper function which possibly converts this using DOS-style short mode.
37662  # If so, the updated path is stored in $new_path.
37663  new_path="$input_to_shortpath"
37664
37665  input_path="$input_to_shortpath"
37666  # Check if we need to convert this using DOS-style short mode. If the path
37667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37668  # take no chances and rewrite it.
37669  # Note: m4 eats our [], so we need to use [ and ] instead.
37670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37671  if test "x$has_forbidden_chars" != x; then
37672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37676      # Going to short mode and back again did indeed matter. Since short mode is
37677      # case insensitive, let's make it lowercase to improve readability.
37678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37679      # Now convert it back to Unix-stile (cygpath)
37680      input_path=`$CYGPATH -u "$shortmode_path"`
37681      new_path="$input_path"
37682    fi
37683  fi
37684
37685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37686  if test "x$test_cygdrive_prefix" = x; then
37687    # As a simple fix, exclude /usr/bin since it's not a real path.
37688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37690      # a path prefixed by /cygdrive for fixpath to work.
37691      new_path="$CYGWIN_ROOT_PATH$input_path"
37692    fi
37693  fi
37694
37695  # remove trailing .exe if any
37696  new_path="${new_path/%.exe/}"
37697
37698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37699
37700  # First separate the path from the arguments. This will split at the first
37701  # space.
37702  complete="$NM"
37703  path="${complete%% *}"
37704  tmp="$complete EOL"
37705  arguments="${tmp#* }"
37706
37707  # Input might be given as Windows format, start by converting to
37708  # unix format.
37709  new_path="$path"
37710
37711  windows_path="$new_path"
37712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37713    unix_path=`$CYGPATH -u "$windows_path"`
37714    new_path="$unix_path"
37715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37717    new_path="$unix_path"
37718  fi
37719
37720
37721  # Now try to locate executable using which
37722  new_path=`$WHICH "$new_path" 2> /dev/null`
37723
37724  if test "x$new_path" = x; then
37725    # Oops. Which didn't find the executable.
37726    # The splitting of arguments from the executable at a space might have been incorrect,
37727    # since paths with space are more likely in Windows. Give it another try with the whole
37728    # argument.
37729    path="$complete"
37730    arguments="EOL"
37731    new_path="$path"
37732
37733  windows_path="$new_path"
37734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37735    unix_path=`$CYGPATH -u "$windows_path"`
37736    new_path="$unix_path"
37737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37739    new_path="$unix_path"
37740  fi
37741
37742
37743    new_path=`$WHICH "$new_path" 2> /dev/null`
37744
37745    if test "x$new_path" = x; then
37746      # It's still not found. Now this is an unrecoverable error.
37747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37748$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37749      has_space=`$ECHO "$complete" | $GREP " "`
37750      if test "x$has_space" != x; then
37751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37753      fi
37754      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37755    fi
37756  fi
37757
37758  # Now new_path has a complete unix path to the binary
37759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37760    # Keep paths in /bin as-is, but remove trailing .exe if any
37761    new_path="${new_path/%.exe/}"
37762    # Do not save /bin paths to all_fixpath_prefixes!
37763  else
37764    # Not in mixed or Windows style, start by that.
37765    new_path=`cmd //c echo $new_path`
37766
37767  input_path="$new_path"
37768  # Check if we need to convert this using DOS-style short mode. If the path
37769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37770  # take no chances and rewrite it.
37771  # Note: m4 eats our [], so we need to use [ and ] instead.
37772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37773  if test "x$has_forbidden_chars" != x; then
37774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37776  fi
37777
37778    # Output is in $new_path
37779
37780  windows_path="$new_path"
37781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37782    unix_path=`$CYGPATH -u "$windows_path"`
37783    new_path="$unix_path"
37784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37786    new_path="$unix_path"
37787  fi
37788
37789    # remove trailing .exe if any
37790    new_path="${new_path/%.exe/}"
37791
37792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37794  fi
37795
37796  else
37797    # We're on a posix platform. Hooray! :)
37798    # First separate the path from the arguments. This will split at the first
37799    # space.
37800    complete="$NM"
37801    path="${complete%% *}"
37802    tmp="$complete EOL"
37803    arguments="${tmp#* }"
37804
37805    # Cannot rely on the command "which" here since it doesn't always work.
37806    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37807    if test -z "$is_absolute_path"; then
37808      # Path to executable is not absolute. Find it.
37809      IFS_save="$IFS"
37810      IFS=:
37811      for p in $PATH; do
37812        if test -f "$p/$path" && test -x "$p/$path"; then
37813          new_path="$p/$path"
37814          break
37815        fi
37816      done
37817      IFS="$IFS_save"
37818    else
37819      # This is an absolute path, we can use it without further modifications.
37820      new_path="$path"
37821    fi
37822
37823    if test "x$new_path" = x; then
37824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37825$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37826      has_space=`$ECHO "$complete" | $GREP " "`
37827      if test "x$has_space" != x; then
37828        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37830      fi
37831      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37832    fi
37833  fi
37834
37835  # Now join together the path and the arguments once again
37836  if test "x$arguments" != xEOL; then
37837    new_complete="$new_path ${arguments% *}"
37838  else
37839    new_complete="$new_path"
37840  fi
37841
37842  if test "x$complete" != "x$new_complete"; then
37843    NM="$new_complete"
37844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37845$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37846  fi
37847
37848    GNM="$NM"
37849
37850  fi
37851
37852  # objcopy is used for moving debug symbols to separate files when
37853  # full debug symbols are enabled.
37854  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37855
37856
37857  # Publish this variable in the help.
37858
37859
37860  if test "x$OBJCOPY" = x; then
37861    # The variable is not set by user, try to locate tool using the code snippet
37862    if test -n "$ac_tool_prefix"; then
37863  for ac_prog in gobjcopy objcopy
37864  do
37865    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37866set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37868$as_echo_n "checking for $ac_word... " >&6; }
37869if ${ac_cv_prog_OBJCOPY+:} false; then :
37870  $as_echo_n "(cached) " >&6
37871else
37872  if test -n "$OBJCOPY"; then
37873  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37874else
37875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37876for as_dir in $PATH
37877do
37878  IFS=$as_save_IFS
37879  test -z "$as_dir" && as_dir=.
37880    for ac_exec_ext in '' $ac_executable_extensions; do
37881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37882    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37884    break 2
37885  fi
37886done
37887  done
37888IFS=$as_save_IFS
37889
37890fi
37891fi
37892OBJCOPY=$ac_cv_prog_OBJCOPY
37893if test -n "$OBJCOPY"; then
37894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37895$as_echo "$OBJCOPY" >&6; }
37896else
37897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37898$as_echo "no" >&6; }
37899fi
37900
37901
37902    test -n "$OBJCOPY" && break
37903  done
37904fi
37905if test -z "$OBJCOPY"; then
37906  ac_ct_OBJCOPY=$OBJCOPY
37907  for ac_prog in gobjcopy objcopy
37908do
37909  # Extract the first word of "$ac_prog", so it can be a program name with args.
37910set dummy $ac_prog; ac_word=$2
37911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37912$as_echo_n "checking for $ac_word... " >&6; }
37913if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37914  $as_echo_n "(cached) " >&6
37915else
37916  if test -n "$ac_ct_OBJCOPY"; then
37917  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37918else
37919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37920for as_dir in $PATH
37921do
37922  IFS=$as_save_IFS
37923  test -z "$as_dir" && as_dir=.
37924    for ac_exec_ext in '' $ac_executable_extensions; do
37925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37926    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37928    break 2
37929  fi
37930done
37931  done
37932IFS=$as_save_IFS
37933
37934fi
37935fi
37936ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37937if test -n "$ac_ct_OBJCOPY"; then
37938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37939$as_echo "$ac_ct_OBJCOPY" >&6; }
37940else
37941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37942$as_echo "no" >&6; }
37943fi
37944
37945
37946  test -n "$ac_ct_OBJCOPY" && break
37947done
37948
37949  if test "x$ac_ct_OBJCOPY" = x; then
37950    OBJCOPY=""
37951  else
37952    case $cross_compiling:$ac_tool_warned in
37953yes:)
37954{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37955$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37956ac_tool_warned=yes ;;
37957esac
37958    OBJCOPY=$ac_ct_OBJCOPY
37959  fi
37960fi
37961
37962  else
37963    # The variable is set, but is it from the command line or the environment?
37964
37965    # Try to remove the string !OBJCOPY! from our list.
37966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37968      # If it failed, the variable was not from the command line. Ignore it,
37969      # but warn the user (except for BASH, which is always set by the calling BASH).
37970      if test "xOBJCOPY" != xBASH; then
37971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37972$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37973      fi
37974      # Try to locate tool using the code snippet
37975      if test -n "$ac_tool_prefix"; then
37976  for ac_prog in gobjcopy objcopy
37977  do
37978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37981$as_echo_n "checking for $ac_word... " >&6; }
37982if ${ac_cv_prog_OBJCOPY+:} false; then :
37983  $as_echo_n "(cached) " >&6
37984else
37985  if test -n "$OBJCOPY"; then
37986  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37987else
37988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37989for as_dir in $PATH
37990do
37991  IFS=$as_save_IFS
37992  test -z "$as_dir" && as_dir=.
37993    for ac_exec_ext in '' $ac_executable_extensions; do
37994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37995    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37997    break 2
37998  fi
37999done
38000  done
38001IFS=$as_save_IFS
38002
38003fi
38004fi
38005OBJCOPY=$ac_cv_prog_OBJCOPY
38006if test -n "$OBJCOPY"; then
38007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38008$as_echo "$OBJCOPY" >&6; }
38009else
38010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38011$as_echo "no" >&6; }
38012fi
38013
38014
38015    test -n "$OBJCOPY" && break
38016  done
38017fi
38018if test -z "$OBJCOPY"; then
38019  ac_ct_OBJCOPY=$OBJCOPY
38020  for ac_prog in gobjcopy objcopy
38021do
38022  # Extract the first word of "$ac_prog", so it can be a program name with args.
38023set dummy $ac_prog; ac_word=$2
38024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38025$as_echo_n "checking for $ac_word... " >&6; }
38026if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38027  $as_echo_n "(cached) " >&6
38028else
38029  if test -n "$ac_ct_OBJCOPY"; then
38030  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38031else
38032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38033for as_dir in $PATH
38034do
38035  IFS=$as_save_IFS
38036  test -z "$as_dir" && as_dir=.
38037    for ac_exec_ext in '' $ac_executable_extensions; do
38038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38039    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38041    break 2
38042  fi
38043done
38044  done
38045IFS=$as_save_IFS
38046
38047fi
38048fi
38049ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38050if test -n "$ac_ct_OBJCOPY"; then
38051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38052$as_echo "$ac_ct_OBJCOPY" >&6; }
38053else
38054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38055$as_echo "no" >&6; }
38056fi
38057
38058
38059  test -n "$ac_ct_OBJCOPY" && break
38060done
38061
38062  if test "x$ac_ct_OBJCOPY" = x; then
38063    OBJCOPY=""
38064  else
38065    case $cross_compiling:$ac_tool_warned in
38066yes:)
38067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38069ac_tool_warned=yes ;;
38070esac
38071    OBJCOPY=$ac_ct_OBJCOPY
38072  fi
38073fi
38074
38075    else
38076      # If it succeeded, then it was overridden by the user. We will use it
38077      # for the tool.
38078
38079      # First remove it from the list of overridden variables, so we can test
38080      # for unknown variables in the end.
38081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38082
38083      # Check if the provided tool contains a complete path.
38084      tool_specified="$OBJCOPY"
38085      tool_basename="${tool_specified##*/}"
38086      if test "x$tool_basename" = "x$tool_specified"; then
38087        # A command without a complete path is provided, search $PATH.
38088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38089$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38090        # Extract the first word of "$tool_basename", so it can be a program name with args.
38091set dummy $tool_basename; ac_word=$2
38092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38093$as_echo_n "checking for $ac_word... " >&6; }
38094if ${ac_cv_path_OBJCOPY+:} false; then :
38095  $as_echo_n "(cached) " >&6
38096else
38097  case $OBJCOPY in
38098  [\\/]* | ?:[\\/]*)
38099  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38100  ;;
38101  *)
38102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38103for as_dir in $PATH
38104do
38105  IFS=$as_save_IFS
38106  test -z "$as_dir" && as_dir=.
38107    for ac_exec_ext in '' $ac_executable_extensions; do
38108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38109    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38111    break 2
38112  fi
38113done
38114  done
38115IFS=$as_save_IFS
38116
38117  ;;
38118esac
38119fi
38120OBJCOPY=$ac_cv_path_OBJCOPY
38121if test -n "$OBJCOPY"; then
38122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38123$as_echo "$OBJCOPY" >&6; }
38124else
38125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38126$as_echo "no" >&6; }
38127fi
38128
38129
38130        if test "x$OBJCOPY" = x; then
38131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38132        fi
38133      else
38134        # Otherwise we believe it is a complete path. Use it as it is.
38135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38136$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38138$as_echo_n "checking for OBJCOPY... " >&6; }
38139        if test ! -x "$tool_specified"; then
38140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38141$as_echo "not found" >&6; }
38142          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38143        fi
38144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38145$as_echo "$tool_specified" >&6; }
38146      fi
38147    fi
38148  fi
38149
38150
38151    # Only call fixup if objcopy was found.
38152    if test -n "$OBJCOPY"; then
38153
38154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38155
38156  # First separate the path from the arguments. This will split at the first
38157  # space.
38158  complete="$OBJCOPY"
38159  path="${complete%% *}"
38160  tmp="$complete EOL"
38161  arguments="${tmp#* }"
38162
38163  # Input might be given as Windows format, start by converting to
38164  # unix format.
38165  new_path=`$CYGPATH -u "$path"`
38166
38167  # Now try to locate executable using which
38168  new_path=`$WHICH "$new_path" 2> /dev/null`
38169  # bat and cmd files are not always considered executable in cygwin causing which
38170  # to not find them
38171  if test "x$new_path" = x \
38172      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38173      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38174    new_path=`$CYGPATH -u "$path"`
38175  fi
38176  if test "x$new_path" = x; then
38177    # Oops. Which didn't find the executable.
38178    # The splitting of arguments from the executable at a space might have been incorrect,
38179    # since paths with space are more likely in Windows. Give it another try with the whole
38180    # argument.
38181    path="$complete"
38182    arguments="EOL"
38183    new_path=`$CYGPATH -u "$path"`
38184    new_path=`$WHICH "$new_path" 2> /dev/null`
38185    # bat and cmd files are not always considered executable in cygwin causing which
38186    # to not find them
38187    if test "x$new_path" = x \
38188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38190      new_path=`$CYGPATH -u "$path"`
38191    fi
38192    if test "x$new_path" = x; then
38193      # It's still not found. Now this is an unrecoverable error.
38194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38195$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38196      has_space=`$ECHO "$complete" | $GREP " "`
38197      if test "x$has_space" != x; then
38198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38200      fi
38201      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38202    fi
38203  fi
38204
38205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38208  # "foo.exe" is OK but "foo" is an error.
38209  #
38210  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38211  # It is also a way to make sure we got the proper file name for the real test later on.
38212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38213  if test "x$test_shortpath" = x; then
38214    # Short path failed, file does not exist as specified.
38215    # Try adding .exe or .cmd
38216    if test -f "${new_path}.exe"; then
38217      input_to_shortpath="${new_path}.exe"
38218    elif test -f "${new_path}.cmd"; then
38219      input_to_shortpath="${new_path}.cmd"
38220    else
38221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38222$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38225      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38226    fi
38227  else
38228    input_to_shortpath="$new_path"
38229  fi
38230
38231  # Call helper function which possibly converts this using DOS-style short mode.
38232  # If so, the updated path is stored in $new_path.
38233  new_path="$input_to_shortpath"
38234
38235  input_path="$input_to_shortpath"
38236  # Check if we need to convert this using DOS-style short mode. If the path
38237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38238  # take no chances and rewrite it.
38239  # Note: m4 eats our [], so we need to use [ and ] instead.
38240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38241  if test "x$has_forbidden_chars" != x; then
38242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38246      # Going to short mode and back again did indeed matter. Since short mode is
38247      # case insensitive, let's make it lowercase to improve readability.
38248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38249      # Now convert it back to Unix-stile (cygpath)
38250      input_path=`$CYGPATH -u "$shortmode_path"`
38251      new_path="$input_path"
38252    fi
38253  fi
38254
38255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38256  if test "x$test_cygdrive_prefix" = x; then
38257    # As a simple fix, exclude /usr/bin since it's not a real path.
38258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38260      # a path prefixed by /cygdrive for fixpath to work.
38261      new_path="$CYGWIN_ROOT_PATH$input_path"
38262    fi
38263  fi
38264
38265  # remove trailing .exe if any
38266  new_path="${new_path/%.exe/}"
38267
38268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38269
38270  # First separate the path from the arguments. This will split at the first
38271  # space.
38272  complete="$OBJCOPY"
38273  path="${complete%% *}"
38274  tmp="$complete EOL"
38275  arguments="${tmp#* }"
38276
38277  # Input might be given as Windows format, start by converting to
38278  # unix format.
38279  new_path="$path"
38280
38281  windows_path="$new_path"
38282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38283    unix_path=`$CYGPATH -u "$windows_path"`
38284    new_path="$unix_path"
38285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38287    new_path="$unix_path"
38288  fi
38289
38290
38291  # Now try to locate executable using which
38292  new_path=`$WHICH "$new_path" 2> /dev/null`
38293
38294  if test "x$new_path" = x; then
38295    # Oops. Which didn't find the executable.
38296    # The splitting of arguments from the executable at a space might have been incorrect,
38297    # since paths with space are more likely in Windows. Give it another try with the whole
38298    # argument.
38299    path="$complete"
38300    arguments="EOL"
38301    new_path="$path"
38302
38303  windows_path="$new_path"
38304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38305    unix_path=`$CYGPATH -u "$windows_path"`
38306    new_path="$unix_path"
38307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38309    new_path="$unix_path"
38310  fi
38311
38312
38313    new_path=`$WHICH "$new_path" 2> /dev/null`
38314
38315    if test "x$new_path" = x; then
38316      # It's still not found. Now this is an unrecoverable error.
38317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38318$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38319      has_space=`$ECHO "$complete" | $GREP " "`
38320      if test "x$has_space" != x; then
38321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38323      fi
38324      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38325    fi
38326  fi
38327
38328  # Now new_path has a complete unix path to the binary
38329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38330    # Keep paths in /bin as-is, but remove trailing .exe if any
38331    new_path="${new_path/%.exe/}"
38332    # Do not save /bin paths to all_fixpath_prefixes!
38333  else
38334    # Not in mixed or Windows style, start by that.
38335    new_path=`cmd //c echo $new_path`
38336
38337  input_path="$new_path"
38338  # Check if we need to convert this using DOS-style short mode. If the path
38339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38340  # take no chances and rewrite it.
38341  # Note: m4 eats our [], so we need to use [ and ] instead.
38342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38343  if test "x$has_forbidden_chars" != x; then
38344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38346  fi
38347
38348    # Output is in $new_path
38349
38350  windows_path="$new_path"
38351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38352    unix_path=`$CYGPATH -u "$windows_path"`
38353    new_path="$unix_path"
38354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38356    new_path="$unix_path"
38357  fi
38358
38359    # remove trailing .exe if any
38360    new_path="${new_path/%.exe/}"
38361
38362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38364  fi
38365
38366  else
38367    # We're on a posix platform. Hooray! :)
38368    # First separate the path from the arguments. This will split at the first
38369    # space.
38370    complete="$OBJCOPY"
38371    path="${complete%% *}"
38372    tmp="$complete EOL"
38373    arguments="${tmp#* }"
38374
38375    # Cannot rely on the command "which" here since it doesn't always work.
38376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38377    if test -z "$is_absolute_path"; then
38378      # Path to executable is not absolute. Find it.
38379      IFS_save="$IFS"
38380      IFS=:
38381      for p in $PATH; do
38382        if test -f "$p/$path" && test -x "$p/$path"; then
38383          new_path="$p/$path"
38384          break
38385        fi
38386      done
38387      IFS="$IFS_save"
38388    else
38389      # This is an absolute path, we can use it without further modifications.
38390      new_path="$path"
38391    fi
38392
38393    if test "x$new_path" = x; then
38394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38395$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38396      has_space=`$ECHO "$complete" | $GREP " "`
38397      if test "x$has_space" != x; then
38398        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38400      fi
38401      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38402    fi
38403  fi
38404
38405  # Now join together the path and the arguments once again
38406  if test "x$arguments" != xEOL; then
38407    new_complete="$new_path ${arguments% *}"
38408  else
38409    new_complete="$new_path"
38410  fi
38411
38412  if test "x$complete" != "x$new_complete"; then
38413    OBJCOPY="$new_complete"
38414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38415$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38416  fi
38417
38418    fi
38419  fi
38420
38421
38422
38423  # Publish this variable in the help.
38424
38425
38426  if test "x$OBJDUMP" = x; then
38427    # The variable is not set by user, try to locate tool using the code snippet
38428    if test -n "$ac_tool_prefix"; then
38429  for ac_prog in gobjdump objdump
38430  do
38431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38434$as_echo_n "checking for $ac_word... " >&6; }
38435if ${ac_cv_prog_OBJDUMP+:} false; then :
38436  $as_echo_n "(cached) " >&6
38437else
38438  if test -n "$OBJDUMP"; then
38439  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38440else
38441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38442for as_dir in $PATH
38443do
38444  IFS=$as_save_IFS
38445  test -z "$as_dir" && as_dir=.
38446    for ac_exec_ext in '' $ac_executable_extensions; do
38447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38448    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38450    break 2
38451  fi
38452done
38453  done
38454IFS=$as_save_IFS
38455
38456fi
38457fi
38458OBJDUMP=$ac_cv_prog_OBJDUMP
38459if test -n "$OBJDUMP"; then
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38461$as_echo "$OBJDUMP" >&6; }
38462else
38463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38464$as_echo "no" >&6; }
38465fi
38466
38467
38468    test -n "$OBJDUMP" && break
38469  done
38470fi
38471if test -z "$OBJDUMP"; then
38472  ac_ct_OBJDUMP=$OBJDUMP
38473  for ac_prog in gobjdump objdump
38474do
38475  # Extract the first word of "$ac_prog", so it can be a program name with args.
38476set dummy $ac_prog; ac_word=$2
38477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38478$as_echo_n "checking for $ac_word... " >&6; }
38479if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38480  $as_echo_n "(cached) " >&6
38481else
38482  if test -n "$ac_ct_OBJDUMP"; then
38483  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38484else
38485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38486for as_dir in $PATH
38487do
38488  IFS=$as_save_IFS
38489  test -z "$as_dir" && as_dir=.
38490    for ac_exec_ext in '' $ac_executable_extensions; do
38491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38492    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38494    break 2
38495  fi
38496done
38497  done
38498IFS=$as_save_IFS
38499
38500fi
38501fi
38502ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38503if test -n "$ac_ct_OBJDUMP"; then
38504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38505$as_echo "$ac_ct_OBJDUMP" >&6; }
38506else
38507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38508$as_echo "no" >&6; }
38509fi
38510
38511
38512  test -n "$ac_ct_OBJDUMP" && break
38513done
38514
38515  if test "x$ac_ct_OBJDUMP" = x; then
38516    OBJDUMP=""
38517  else
38518    case $cross_compiling:$ac_tool_warned in
38519yes:)
38520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38522ac_tool_warned=yes ;;
38523esac
38524    OBJDUMP=$ac_ct_OBJDUMP
38525  fi
38526fi
38527
38528  else
38529    # The variable is set, but is it from the command line or the environment?
38530
38531    # Try to remove the string !OBJDUMP! from our list.
38532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38534      # If it failed, the variable was not from the command line. Ignore it,
38535      # but warn the user (except for BASH, which is always set by the calling BASH).
38536      if test "xOBJDUMP" != xBASH; then
38537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38538$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38539      fi
38540      # Try to locate tool using the code snippet
38541      if test -n "$ac_tool_prefix"; then
38542  for ac_prog in gobjdump objdump
38543  do
38544    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38545set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38547$as_echo_n "checking for $ac_word... " >&6; }
38548if ${ac_cv_prog_OBJDUMP+:} false; then :
38549  $as_echo_n "(cached) " >&6
38550else
38551  if test -n "$OBJDUMP"; then
38552  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38553else
38554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38555for as_dir in $PATH
38556do
38557  IFS=$as_save_IFS
38558  test -z "$as_dir" && as_dir=.
38559    for ac_exec_ext in '' $ac_executable_extensions; do
38560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38561    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38563    break 2
38564  fi
38565done
38566  done
38567IFS=$as_save_IFS
38568
38569fi
38570fi
38571OBJDUMP=$ac_cv_prog_OBJDUMP
38572if test -n "$OBJDUMP"; then
38573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38574$as_echo "$OBJDUMP" >&6; }
38575else
38576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38577$as_echo "no" >&6; }
38578fi
38579
38580
38581    test -n "$OBJDUMP" && break
38582  done
38583fi
38584if test -z "$OBJDUMP"; then
38585  ac_ct_OBJDUMP=$OBJDUMP
38586  for ac_prog in gobjdump objdump
38587do
38588  # Extract the first word of "$ac_prog", so it can be a program name with args.
38589set dummy $ac_prog; ac_word=$2
38590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38591$as_echo_n "checking for $ac_word... " >&6; }
38592if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38593  $as_echo_n "(cached) " >&6
38594else
38595  if test -n "$ac_ct_OBJDUMP"; then
38596  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38597else
38598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38599for as_dir in $PATH
38600do
38601  IFS=$as_save_IFS
38602  test -z "$as_dir" && as_dir=.
38603    for ac_exec_ext in '' $ac_executable_extensions; do
38604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38605    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38607    break 2
38608  fi
38609done
38610  done
38611IFS=$as_save_IFS
38612
38613fi
38614fi
38615ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38616if test -n "$ac_ct_OBJDUMP"; then
38617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38618$as_echo "$ac_ct_OBJDUMP" >&6; }
38619else
38620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38621$as_echo "no" >&6; }
38622fi
38623
38624
38625  test -n "$ac_ct_OBJDUMP" && break
38626done
38627
38628  if test "x$ac_ct_OBJDUMP" = x; then
38629    OBJDUMP=""
38630  else
38631    case $cross_compiling:$ac_tool_warned in
38632yes:)
38633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38635ac_tool_warned=yes ;;
38636esac
38637    OBJDUMP=$ac_ct_OBJDUMP
38638  fi
38639fi
38640
38641    else
38642      # If it succeeded, then it was overridden by the user. We will use it
38643      # for the tool.
38644
38645      # First remove it from the list of overridden variables, so we can test
38646      # for unknown variables in the end.
38647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38648
38649      # Check if the provided tool contains a complete path.
38650      tool_specified="$OBJDUMP"
38651      tool_basename="${tool_specified##*/}"
38652      if test "x$tool_basename" = "x$tool_specified"; then
38653        # A command without a complete path is provided, search $PATH.
38654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38655$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38656        # Extract the first word of "$tool_basename", so it can be a program name with args.
38657set dummy $tool_basename; ac_word=$2
38658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38659$as_echo_n "checking for $ac_word... " >&6; }
38660if ${ac_cv_path_OBJDUMP+:} false; then :
38661  $as_echo_n "(cached) " >&6
38662else
38663  case $OBJDUMP in
38664  [\\/]* | ?:[\\/]*)
38665  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38666  ;;
38667  *)
38668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38669for as_dir in $PATH
38670do
38671  IFS=$as_save_IFS
38672  test -z "$as_dir" && as_dir=.
38673    for ac_exec_ext in '' $ac_executable_extensions; do
38674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38675    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38677    break 2
38678  fi
38679done
38680  done
38681IFS=$as_save_IFS
38682
38683  ;;
38684esac
38685fi
38686OBJDUMP=$ac_cv_path_OBJDUMP
38687if test -n "$OBJDUMP"; then
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38689$as_echo "$OBJDUMP" >&6; }
38690else
38691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38692$as_echo "no" >&6; }
38693fi
38694
38695
38696        if test "x$OBJDUMP" = x; then
38697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38698        fi
38699      else
38700        # Otherwise we believe it is a complete path. Use it as it is.
38701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38702$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38704$as_echo_n "checking for OBJDUMP... " >&6; }
38705        if test ! -x "$tool_specified"; then
38706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38707$as_echo "not found" >&6; }
38708          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38709        fi
38710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38711$as_echo "$tool_specified" >&6; }
38712      fi
38713    fi
38714  fi
38715
38716
38717  if test "x$OBJDUMP" != x; then
38718    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38719    # bails if argument is missing.
38720
38721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38722
38723  # First separate the path from the arguments. This will split at the first
38724  # space.
38725  complete="$OBJDUMP"
38726  path="${complete%% *}"
38727  tmp="$complete EOL"
38728  arguments="${tmp#* }"
38729
38730  # Input might be given as Windows format, start by converting to
38731  # unix format.
38732  new_path=`$CYGPATH -u "$path"`
38733
38734  # Now try to locate executable using which
38735  new_path=`$WHICH "$new_path" 2> /dev/null`
38736  # bat and cmd files are not always considered executable in cygwin causing which
38737  # to not find them
38738  if test "x$new_path" = x \
38739      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38740      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38741    new_path=`$CYGPATH -u "$path"`
38742  fi
38743  if test "x$new_path" = x; then
38744    # Oops. Which didn't find the executable.
38745    # The splitting of arguments from the executable at a space might have been incorrect,
38746    # since paths with space are more likely in Windows. Give it another try with the whole
38747    # argument.
38748    path="$complete"
38749    arguments="EOL"
38750    new_path=`$CYGPATH -u "$path"`
38751    new_path=`$WHICH "$new_path" 2> /dev/null`
38752    # bat and cmd files are not always considered executable in cygwin causing which
38753    # to not find them
38754    if test "x$new_path" = x \
38755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38757      new_path=`$CYGPATH -u "$path"`
38758    fi
38759    if test "x$new_path" = x; then
38760      # It's still not found. Now this is an unrecoverable error.
38761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38762$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38763      has_space=`$ECHO "$complete" | $GREP " "`
38764      if test "x$has_space" != x; then
38765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38767      fi
38768      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38769    fi
38770  fi
38771
38772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38775  # "foo.exe" is OK but "foo" is an error.
38776  #
38777  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38778  # It is also a way to make sure we got the proper file name for the real test later on.
38779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38780  if test "x$test_shortpath" = x; then
38781    # Short path failed, file does not exist as specified.
38782    # Try adding .exe or .cmd
38783    if test -f "${new_path}.exe"; then
38784      input_to_shortpath="${new_path}.exe"
38785    elif test -f "${new_path}.cmd"; then
38786      input_to_shortpath="${new_path}.cmd"
38787    else
38788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38789$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38792      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38793    fi
38794  else
38795    input_to_shortpath="$new_path"
38796  fi
38797
38798  # Call helper function which possibly converts this using DOS-style short mode.
38799  # If so, the updated path is stored in $new_path.
38800  new_path="$input_to_shortpath"
38801
38802  input_path="$input_to_shortpath"
38803  # Check if we need to convert this using DOS-style short mode. If the path
38804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38805  # take no chances and rewrite it.
38806  # Note: m4 eats our [], so we need to use [ and ] instead.
38807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38808  if test "x$has_forbidden_chars" != x; then
38809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38813      # Going to short mode and back again did indeed matter. Since short mode is
38814      # case insensitive, let's make it lowercase to improve readability.
38815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38816      # Now convert it back to Unix-stile (cygpath)
38817      input_path=`$CYGPATH -u "$shortmode_path"`
38818      new_path="$input_path"
38819    fi
38820  fi
38821
38822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38823  if test "x$test_cygdrive_prefix" = x; then
38824    # As a simple fix, exclude /usr/bin since it's not a real path.
38825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38827      # a path prefixed by /cygdrive for fixpath to work.
38828      new_path="$CYGWIN_ROOT_PATH$input_path"
38829    fi
38830  fi
38831
38832  # remove trailing .exe if any
38833  new_path="${new_path/%.exe/}"
38834
38835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38836
38837  # First separate the path from the arguments. This will split at the first
38838  # space.
38839  complete="$OBJDUMP"
38840  path="${complete%% *}"
38841  tmp="$complete EOL"
38842  arguments="${tmp#* }"
38843
38844  # Input might be given as Windows format, start by converting to
38845  # unix format.
38846  new_path="$path"
38847
38848  windows_path="$new_path"
38849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38850    unix_path=`$CYGPATH -u "$windows_path"`
38851    new_path="$unix_path"
38852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38854    new_path="$unix_path"
38855  fi
38856
38857
38858  # Now try to locate executable using which
38859  new_path=`$WHICH "$new_path" 2> /dev/null`
38860
38861  if test "x$new_path" = x; then
38862    # Oops. Which didn't find the executable.
38863    # The splitting of arguments from the executable at a space might have been incorrect,
38864    # since paths with space are more likely in Windows. Give it another try with the whole
38865    # argument.
38866    path="$complete"
38867    arguments="EOL"
38868    new_path="$path"
38869
38870  windows_path="$new_path"
38871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38872    unix_path=`$CYGPATH -u "$windows_path"`
38873    new_path="$unix_path"
38874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38876    new_path="$unix_path"
38877  fi
38878
38879
38880    new_path=`$WHICH "$new_path" 2> /dev/null`
38881
38882    if test "x$new_path" = x; then
38883      # It's still not found. Now this is an unrecoverable error.
38884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38885$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38886      has_space=`$ECHO "$complete" | $GREP " "`
38887      if test "x$has_space" != x; then
38888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38890      fi
38891      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38892    fi
38893  fi
38894
38895  # Now new_path has a complete unix path to the binary
38896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38897    # Keep paths in /bin as-is, but remove trailing .exe if any
38898    new_path="${new_path/%.exe/}"
38899    # Do not save /bin paths to all_fixpath_prefixes!
38900  else
38901    # Not in mixed or Windows style, start by that.
38902    new_path=`cmd //c echo $new_path`
38903
38904  input_path="$new_path"
38905  # Check if we need to convert this using DOS-style short mode. If the path
38906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38907  # take no chances and rewrite it.
38908  # Note: m4 eats our [], so we need to use [ and ] instead.
38909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38910  if test "x$has_forbidden_chars" != x; then
38911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38913  fi
38914
38915    # Output is in $new_path
38916
38917  windows_path="$new_path"
38918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38919    unix_path=`$CYGPATH -u "$windows_path"`
38920    new_path="$unix_path"
38921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38923    new_path="$unix_path"
38924  fi
38925
38926    # remove trailing .exe if any
38927    new_path="${new_path/%.exe/}"
38928
38929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38931  fi
38932
38933  else
38934    # We're on a posix platform. Hooray! :)
38935    # First separate the path from the arguments. This will split at the first
38936    # space.
38937    complete="$OBJDUMP"
38938    path="${complete%% *}"
38939    tmp="$complete EOL"
38940    arguments="${tmp#* }"
38941
38942    # Cannot rely on the command "which" here since it doesn't always work.
38943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38944    if test -z "$is_absolute_path"; then
38945      # Path to executable is not absolute. Find it.
38946      IFS_save="$IFS"
38947      IFS=:
38948      for p in $PATH; do
38949        if test -f "$p/$path" && test -x "$p/$path"; then
38950          new_path="$p/$path"
38951          break
38952        fi
38953      done
38954      IFS="$IFS_save"
38955    else
38956      # This is an absolute path, we can use it without further modifications.
38957      new_path="$path"
38958    fi
38959
38960    if test "x$new_path" = x; then
38961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38962$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38963      has_space=`$ECHO "$complete" | $GREP " "`
38964      if test "x$has_space" != x; then
38965        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38967      fi
38968      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38969    fi
38970  fi
38971
38972  # Now join together the path and the arguments once again
38973  if test "x$arguments" != xEOL; then
38974    new_complete="$new_path ${arguments% *}"
38975  else
38976    new_complete="$new_path"
38977  fi
38978
38979  if test "x$complete" != "x$new_complete"; then
38980    OBJDUMP="$new_complete"
38981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38982$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38983  fi
38984
38985  fi
38986
38987
38988  # Restore old path.
38989  PATH="$OLD_PATH"
38990
38991  # Restore the flags to the user specified values.
38992  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38993  CFLAGS="$ORG_CFLAGS"
38994  CXXFLAGS="$ORG_CXXFLAGS"
38995  OBJCFLAGS="$ORG_OBJCFLAGS"
38996
38997
38998# Finally do some processing after the detection phase
38999
39000  if test "x$COMPILE_TYPE" = "xcross"; then
39001    # Now we need to find a C/C++ compiler that can build executables for the
39002    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39003    # used once. Also, we need to do this without adding a tools dir to the
39004    # path, otherwise we might pick up cross-compilers which don't use standard
39005    # naming.
39006
39007    # FIXME: we should list the discovered compilers as an exclude pattern!
39008    # If we do that, we can do this detection before POST_DETECTION, and still
39009    # find the build compilers in the tools dir, if needed.
39010
39011
39012  # Publish this variable in the help.
39013
39014
39015  if test "x$BUILD_CC" = x; then
39016    # The variable is not set by user, try to locate tool using the code snippet
39017    for ac_prog in cl cc gcc
39018do
39019  # Extract the first word of "$ac_prog", so it can be a program name with args.
39020set dummy $ac_prog; ac_word=$2
39021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39022$as_echo_n "checking for $ac_word... " >&6; }
39023if ${ac_cv_path_BUILD_CC+:} false; then :
39024  $as_echo_n "(cached) " >&6
39025else
39026  case $BUILD_CC in
39027  [\\/]* | ?:[\\/]*)
39028  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39029  ;;
39030  *)
39031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39032for as_dir in $PATH
39033do
39034  IFS=$as_save_IFS
39035  test -z "$as_dir" && as_dir=.
39036    for ac_exec_ext in '' $ac_executable_extensions; do
39037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39038    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39040    break 2
39041  fi
39042done
39043  done
39044IFS=$as_save_IFS
39045
39046  ;;
39047esac
39048fi
39049BUILD_CC=$ac_cv_path_BUILD_CC
39050if test -n "$BUILD_CC"; then
39051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39052$as_echo "$BUILD_CC" >&6; }
39053else
39054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39055$as_echo "no" >&6; }
39056fi
39057
39058
39059  test -n "$BUILD_CC" && break
39060done
39061
39062  else
39063    # The variable is set, but is it from the command line or the environment?
39064
39065    # Try to remove the string !BUILD_CC! from our list.
39066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39068      # If it failed, the variable was not from the command line. Ignore it,
39069      # but warn the user (except for BASH, which is always set by the calling BASH).
39070      if test "xBUILD_CC" != xBASH; then
39071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39072$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39073      fi
39074      # Try to locate tool using the code snippet
39075      for ac_prog in cl cc gcc
39076do
39077  # Extract the first word of "$ac_prog", so it can be a program name with args.
39078set dummy $ac_prog; ac_word=$2
39079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39080$as_echo_n "checking for $ac_word... " >&6; }
39081if ${ac_cv_path_BUILD_CC+:} false; then :
39082  $as_echo_n "(cached) " >&6
39083else
39084  case $BUILD_CC in
39085  [\\/]* | ?:[\\/]*)
39086  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39087  ;;
39088  *)
39089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39090for as_dir in $PATH
39091do
39092  IFS=$as_save_IFS
39093  test -z "$as_dir" && as_dir=.
39094    for ac_exec_ext in '' $ac_executable_extensions; do
39095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39096    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39098    break 2
39099  fi
39100done
39101  done
39102IFS=$as_save_IFS
39103
39104  ;;
39105esac
39106fi
39107BUILD_CC=$ac_cv_path_BUILD_CC
39108if test -n "$BUILD_CC"; then
39109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39110$as_echo "$BUILD_CC" >&6; }
39111else
39112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39113$as_echo "no" >&6; }
39114fi
39115
39116
39117  test -n "$BUILD_CC" && break
39118done
39119
39120    else
39121      # If it succeeded, then it was overridden by the user. We will use it
39122      # for the tool.
39123
39124      # First remove it from the list of overridden variables, so we can test
39125      # for unknown variables in the end.
39126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39127
39128      # Check if the provided tool contains a complete path.
39129      tool_specified="$BUILD_CC"
39130      tool_basename="${tool_specified##*/}"
39131      if test "x$tool_basename" = "x$tool_specified"; then
39132        # A command without a complete path is provided, search $PATH.
39133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39134$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39135        # Extract the first word of "$tool_basename", so it can be a program name with args.
39136set dummy $tool_basename; ac_word=$2
39137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39138$as_echo_n "checking for $ac_word... " >&6; }
39139if ${ac_cv_path_BUILD_CC+:} false; then :
39140  $as_echo_n "(cached) " >&6
39141else
39142  case $BUILD_CC in
39143  [\\/]* | ?:[\\/]*)
39144  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39145  ;;
39146  *)
39147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39148for as_dir in $PATH
39149do
39150  IFS=$as_save_IFS
39151  test -z "$as_dir" && as_dir=.
39152    for ac_exec_ext in '' $ac_executable_extensions; do
39153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39154    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39156    break 2
39157  fi
39158done
39159  done
39160IFS=$as_save_IFS
39161
39162  ;;
39163esac
39164fi
39165BUILD_CC=$ac_cv_path_BUILD_CC
39166if test -n "$BUILD_CC"; then
39167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39168$as_echo "$BUILD_CC" >&6; }
39169else
39170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39171$as_echo "no" >&6; }
39172fi
39173
39174
39175        if test "x$BUILD_CC" = x; then
39176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39177        fi
39178      else
39179        # Otherwise we believe it is a complete path. Use it as it is.
39180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39181$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39183$as_echo_n "checking for BUILD_CC... " >&6; }
39184        if test ! -x "$tool_specified"; then
39185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39186$as_echo "not found" >&6; }
39187          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39188        fi
39189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39190$as_echo "$tool_specified" >&6; }
39191      fi
39192    fi
39193  fi
39194
39195
39196
39197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39198
39199  # First separate the path from the arguments. This will split at the first
39200  # space.
39201  complete="$BUILD_CC"
39202  path="${complete%% *}"
39203  tmp="$complete EOL"
39204  arguments="${tmp#* }"
39205
39206  # Input might be given as Windows format, start by converting to
39207  # unix format.
39208  new_path=`$CYGPATH -u "$path"`
39209
39210  # Now try to locate executable using which
39211  new_path=`$WHICH "$new_path" 2> /dev/null`
39212  # bat and cmd files are not always considered executable in cygwin causing which
39213  # to not find them
39214  if test "x$new_path" = x \
39215      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39216      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39217    new_path=`$CYGPATH -u "$path"`
39218  fi
39219  if test "x$new_path" = x; then
39220    # Oops. Which didn't find the executable.
39221    # The splitting of arguments from the executable at a space might have been incorrect,
39222    # since paths with space are more likely in Windows. Give it another try with the whole
39223    # argument.
39224    path="$complete"
39225    arguments="EOL"
39226    new_path=`$CYGPATH -u "$path"`
39227    new_path=`$WHICH "$new_path" 2> /dev/null`
39228    # bat and cmd files are not always considered executable in cygwin causing which
39229    # to not find them
39230    if test "x$new_path" = x \
39231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39233      new_path=`$CYGPATH -u "$path"`
39234    fi
39235    if test "x$new_path" = x; then
39236      # It's still not found. Now this is an unrecoverable error.
39237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39238$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39239      has_space=`$ECHO "$complete" | $GREP " "`
39240      if test "x$has_space" != x; then
39241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39243      fi
39244      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39245    fi
39246  fi
39247
39248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39251  # "foo.exe" is OK but "foo" is an error.
39252  #
39253  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39254  # It is also a way to make sure we got the proper file name for the real test later on.
39255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39256  if test "x$test_shortpath" = x; then
39257    # Short path failed, file does not exist as specified.
39258    # Try adding .exe or .cmd
39259    if test -f "${new_path}.exe"; then
39260      input_to_shortpath="${new_path}.exe"
39261    elif test -f "${new_path}.cmd"; then
39262      input_to_shortpath="${new_path}.cmd"
39263    else
39264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39265$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39266      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39267$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39268      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39269    fi
39270  else
39271    input_to_shortpath="$new_path"
39272  fi
39273
39274  # Call helper function which possibly converts this using DOS-style short mode.
39275  # If so, the updated path is stored in $new_path.
39276  new_path="$input_to_shortpath"
39277
39278  input_path="$input_to_shortpath"
39279  # Check if we need to convert this using DOS-style short mode. If the path
39280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39281  # take no chances and rewrite it.
39282  # Note: m4 eats our [], so we need to use [ and ] instead.
39283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39284  if test "x$has_forbidden_chars" != x; then
39285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39289      # Going to short mode and back again did indeed matter. Since short mode is
39290      # case insensitive, let's make it lowercase to improve readability.
39291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39292      # Now convert it back to Unix-stile (cygpath)
39293      input_path=`$CYGPATH -u "$shortmode_path"`
39294      new_path="$input_path"
39295    fi
39296  fi
39297
39298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39299  if test "x$test_cygdrive_prefix" = x; then
39300    # As a simple fix, exclude /usr/bin since it's not a real path.
39301    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39303      # a path prefixed by /cygdrive for fixpath to work.
39304      new_path="$CYGWIN_ROOT_PATH$input_path"
39305    fi
39306  fi
39307
39308  # remove trailing .exe if any
39309  new_path="${new_path/%.exe/}"
39310
39311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39312
39313  # First separate the path from the arguments. This will split at the first
39314  # space.
39315  complete="$BUILD_CC"
39316  path="${complete%% *}"
39317  tmp="$complete EOL"
39318  arguments="${tmp#* }"
39319
39320  # Input might be given as Windows format, start by converting to
39321  # unix format.
39322  new_path="$path"
39323
39324  windows_path="$new_path"
39325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39326    unix_path=`$CYGPATH -u "$windows_path"`
39327    new_path="$unix_path"
39328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39330    new_path="$unix_path"
39331  fi
39332
39333
39334  # Now try to locate executable using which
39335  new_path=`$WHICH "$new_path" 2> /dev/null`
39336
39337  if test "x$new_path" = x; then
39338    # Oops. Which didn't find the executable.
39339    # The splitting of arguments from the executable at a space might have been incorrect,
39340    # since paths with space are more likely in Windows. Give it another try with the whole
39341    # argument.
39342    path="$complete"
39343    arguments="EOL"
39344    new_path="$path"
39345
39346  windows_path="$new_path"
39347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39348    unix_path=`$CYGPATH -u "$windows_path"`
39349    new_path="$unix_path"
39350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39352    new_path="$unix_path"
39353  fi
39354
39355
39356    new_path=`$WHICH "$new_path" 2> /dev/null`
39357
39358    if test "x$new_path" = x; then
39359      # It's still not found. Now this is an unrecoverable error.
39360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39361$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39362      has_space=`$ECHO "$complete" | $GREP " "`
39363      if test "x$has_space" != x; then
39364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39366      fi
39367      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39368    fi
39369  fi
39370
39371  # Now new_path has a complete unix path to the binary
39372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39373    # Keep paths in /bin as-is, but remove trailing .exe if any
39374    new_path="${new_path/%.exe/}"
39375    # Do not save /bin paths to all_fixpath_prefixes!
39376  else
39377    # Not in mixed or Windows style, start by that.
39378    new_path=`cmd //c echo $new_path`
39379
39380  input_path="$new_path"
39381  # Check if we need to convert this using DOS-style short mode. If the path
39382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39383  # take no chances and rewrite it.
39384  # Note: m4 eats our [], so we need to use [ and ] instead.
39385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39386  if test "x$has_forbidden_chars" != x; then
39387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39389  fi
39390
39391    # Output is in $new_path
39392
39393  windows_path="$new_path"
39394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39395    unix_path=`$CYGPATH -u "$windows_path"`
39396    new_path="$unix_path"
39397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39399    new_path="$unix_path"
39400  fi
39401
39402    # remove trailing .exe if any
39403    new_path="${new_path/%.exe/}"
39404
39405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39407  fi
39408
39409  else
39410    # We're on a posix platform. Hooray! :)
39411    # First separate the path from the arguments. This will split at the first
39412    # space.
39413    complete="$BUILD_CC"
39414    path="${complete%% *}"
39415    tmp="$complete EOL"
39416    arguments="${tmp#* }"
39417
39418    # Cannot rely on the command "which" here since it doesn't always work.
39419    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39420    if test -z "$is_absolute_path"; then
39421      # Path to executable is not absolute. Find it.
39422      IFS_save="$IFS"
39423      IFS=:
39424      for p in $PATH; do
39425        if test -f "$p/$path" && test -x "$p/$path"; then
39426          new_path="$p/$path"
39427          break
39428        fi
39429      done
39430      IFS="$IFS_save"
39431    else
39432      # This is an absolute path, we can use it without further modifications.
39433      new_path="$path"
39434    fi
39435
39436    if test "x$new_path" = x; then
39437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39438$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39439      has_space=`$ECHO "$complete" | $GREP " "`
39440      if test "x$has_space" != x; then
39441        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39443      fi
39444      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39445    fi
39446  fi
39447
39448  # Now join together the path and the arguments once again
39449  if test "x$arguments" != xEOL; then
39450    new_complete="$new_path ${arguments% *}"
39451  else
39452    new_complete="$new_path"
39453  fi
39454
39455  if test "x$complete" != "x$new_complete"; then
39456    BUILD_CC="$new_complete"
39457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39458$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39459  fi
39460
39461
39462
39463  # Publish this variable in the help.
39464
39465
39466  if test "x$BUILD_CXX" = x; then
39467    # The variable is not set by user, try to locate tool using the code snippet
39468    for ac_prog in cl CC g++
39469do
39470  # Extract the first word of "$ac_prog", so it can be a program name with args.
39471set dummy $ac_prog; ac_word=$2
39472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39473$as_echo_n "checking for $ac_word... " >&6; }
39474if ${ac_cv_path_BUILD_CXX+:} false; then :
39475  $as_echo_n "(cached) " >&6
39476else
39477  case $BUILD_CXX in
39478  [\\/]* | ?:[\\/]*)
39479  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39480  ;;
39481  *)
39482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39483for as_dir in $PATH
39484do
39485  IFS=$as_save_IFS
39486  test -z "$as_dir" && as_dir=.
39487    for ac_exec_ext in '' $ac_executable_extensions; do
39488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39489    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39491    break 2
39492  fi
39493done
39494  done
39495IFS=$as_save_IFS
39496
39497  ;;
39498esac
39499fi
39500BUILD_CXX=$ac_cv_path_BUILD_CXX
39501if test -n "$BUILD_CXX"; then
39502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39503$as_echo "$BUILD_CXX" >&6; }
39504else
39505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39506$as_echo "no" >&6; }
39507fi
39508
39509
39510  test -n "$BUILD_CXX" && break
39511done
39512
39513  else
39514    # The variable is set, but is it from the command line or the environment?
39515
39516    # Try to remove the string !BUILD_CXX! from our list.
39517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39519      # If it failed, the variable was not from the command line. Ignore it,
39520      # but warn the user (except for BASH, which is always set by the calling BASH).
39521      if test "xBUILD_CXX" != xBASH; then
39522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39523$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39524      fi
39525      # Try to locate tool using the code snippet
39526      for ac_prog in cl CC g++
39527do
39528  # Extract the first word of "$ac_prog", so it can be a program name with args.
39529set dummy $ac_prog; ac_word=$2
39530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39531$as_echo_n "checking for $ac_word... " >&6; }
39532if ${ac_cv_path_BUILD_CXX+:} false; then :
39533  $as_echo_n "(cached) " >&6
39534else
39535  case $BUILD_CXX in
39536  [\\/]* | ?:[\\/]*)
39537  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39538  ;;
39539  *)
39540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39541for as_dir in $PATH
39542do
39543  IFS=$as_save_IFS
39544  test -z "$as_dir" && as_dir=.
39545    for ac_exec_ext in '' $ac_executable_extensions; do
39546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39547    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39549    break 2
39550  fi
39551done
39552  done
39553IFS=$as_save_IFS
39554
39555  ;;
39556esac
39557fi
39558BUILD_CXX=$ac_cv_path_BUILD_CXX
39559if test -n "$BUILD_CXX"; then
39560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39561$as_echo "$BUILD_CXX" >&6; }
39562else
39563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39564$as_echo "no" >&6; }
39565fi
39566
39567
39568  test -n "$BUILD_CXX" && break
39569done
39570
39571    else
39572      # If it succeeded, then it was overridden by the user. We will use it
39573      # for the tool.
39574
39575      # First remove it from the list of overridden variables, so we can test
39576      # for unknown variables in the end.
39577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39578
39579      # Check if the provided tool contains a complete path.
39580      tool_specified="$BUILD_CXX"
39581      tool_basename="${tool_specified##*/}"
39582      if test "x$tool_basename" = "x$tool_specified"; then
39583        # A command without a complete path is provided, search $PATH.
39584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39585$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39586        # Extract the first word of "$tool_basename", so it can be a program name with args.
39587set dummy $tool_basename; ac_word=$2
39588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39589$as_echo_n "checking for $ac_word... " >&6; }
39590if ${ac_cv_path_BUILD_CXX+:} false; then :
39591  $as_echo_n "(cached) " >&6
39592else
39593  case $BUILD_CXX in
39594  [\\/]* | ?:[\\/]*)
39595  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39596  ;;
39597  *)
39598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39599for as_dir in $PATH
39600do
39601  IFS=$as_save_IFS
39602  test -z "$as_dir" && as_dir=.
39603    for ac_exec_ext in '' $ac_executable_extensions; do
39604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39605    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39607    break 2
39608  fi
39609done
39610  done
39611IFS=$as_save_IFS
39612
39613  ;;
39614esac
39615fi
39616BUILD_CXX=$ac_cv_path_BUILD_CXX
39617if test -n "$BUILD_CXX"; then
39618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39619$as_echo "$BUILD_CXX" >&6; }
39620else
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39622$as_echo "no" >&6; }
39623fi
39624
39625
39626        if test "x$BUILD_CXX" = x; then
39627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39628        fi
39629      else
39630        # Otherwise we believe it is a complete path. Use it as it is.
39631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39632$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39634$as_echo_n "checking for BUILD_CXX... " >&6; }
39635        if test ! -x "$tool_specified"; then
39636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39637$as_echo "not found" >&6; }
39638          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39639        fi
39640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39641$as_echo "$tool_specified" >&6; }
39642      fi
39643    fi
39644  fi
39645
39646
39647
39648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39649
39650  # First separate the path from the arguments. This will split at the first
39651  # space.
39652  complete="$BUILD_CXX"
39653  path="${complete%% *}"
39654  tmp="$complete EOL"
39655  arguments="${tmp#* }"
39656
39657  # Input might be given as Windows format, start by converting to
39658  # unix format.
39659  new_path=`$CYGPATH -u "$path"`
39660
39661  # Now try to locate executable using which
39662  new_path=`$WHICH "$new_path" 2> /dev/null`
39663  # bat and cmd files are not always considered executable in cygwin causing which
39664  # to not find them
39665  if test "x$new_path" = x \
39666      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39667      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39668    new_path=`$CYGPATH -u "$path"`
39669  fi
39670  if test "x$new_path" = x; then
39671    # Oops. Which didn't find the executable.
39672    # The splitting of arguments from the executable at a space might have been incorrect,
39673    # since paths with space are more likely in Windows. Give it another try with the whole
39674    # argument.
39675    path="$complete"
39676    arguments="EOL"
39677    new_path=`$CYGPATH -u "$path"`
39678    new_path=`$WHICH "$new_path" 2> /dev/null`
39679    # bat and cmd files are not always considered executable in cygwin causing which
39680    # to not find them
39681    if test "x$new_path" = x \
39682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39684      new_path=`$CYGPATH -u "$path"`
39685    fi
39686    if test "x$new_path" = x; then
39687      # It's still not found. Now this is an unrecoverable error.
39688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39689$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39690      has_space=`$ECHO "$complete" | $GREP " "`
39691      if test "x$has_space" != x; then
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39694      fi
39695      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39696    fi
39697  fi
39698
39699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39702  # "foo.exe" is OK but "foo" is an error.
39703  #
39704  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39705  # It is also a way to make sure we got the proper file name for the real test later on.
39706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39707  if test "x$test_shortpath" = x; then
39708    # Short path failed, file does not exist as specified.
39709    # Try adding .exe or .cmd
39710    if test -f "${new_path}.exe"; then
39711      input_to_shortpath="${new_path}.exe"
39712    elif test -f "${new_path}.cmd"; then
39713      input_to_shortpath="${new_path}.cmd"
39714    else
39715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39716$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39717      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39718$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39719      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39720    fi
39721  else
39722    input_to_shortpath="$new_path"
39723  fi
39724
39725  # Call helper function which possibly converts this using DOS-style short mode.
39726  # If so, the updated path is stored in $new_path.
39727  new_path="$input_to_shortpath"
39728
39729  input_path="$input_to_shortpath"
39730  # Check if we need to convert this using DOS-style short mode. If the path
39731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39732  # take no chances and rewrite it.
39733  # Note: m4 eats our [], so we need to use [ and ] instead.
39734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39735  if test "x$has_forbidden_chars" != x; then
39736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39740      # Going to short mode and back again did indeed matter. Since short mode is
39741      # case insensitive, let's make it lowercase to improve readability.
39742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39743      # Now convert it back to Unix-stile (cygpath)
39744      input_path=`$CYGPATH -u "$shortmode_path"`
39745      new_path="$input_path"
39746    fi
39747  fi
39748
39749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39750  if test "x$test_cygdrive_prefix" = x; then
39751    # As a simple fix, exclude /usr/bin since it's not a real path.
39752    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39754      # a path prefixed by /cygdrive for fixpath to work.
39755      new_path="$CYGWIN_ROOT_PATH$input_path"
39756    fi
39757  fi
39758
39759  # remove trailing .exe if any
39760  new_path="${new_path/%.exe/}"
39761
39762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39763
39764  # First separate the path from the arguments. This will split at the first
39765  # space.
39766  complete="$BUILD_CXX"
39767  path="${complete%% *}"
39768  tmp="$complete EOL"
39769  arguments="${tmp#* }"
39770
39771  # Input might be given as Windows format, start by converting to
39772  # unix format.
39773  new_path="$path"
39774
39775  windows_path="$new_path"
39776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39777    unix_path=`$CYGPATH -u "$windows_path"`
39778    new_path="$unix_path"
39779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39781    new_path="$unix_path"
39782  fi
39783
39784
39785  # Now try to locate executable using which
39786  new_path=`$WHICH "$new_path" 2> /dev/null`
39787
39788  if test "x$new_path" = x; then
39789    # Oops. Which didn't find the executable.
39790    # The splitting of arguments from the executable at a space might have been incorrect,
39791    # since paths with space are more likely in Windows. Give it another try with the whole
39792    # argument.
39793    path="$complete"
39794    arguments="EOL"
39795    new_path="$path"
39796
39797  windows_path="$new_path"
39798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39799    unix_path=`$CYGPATH -u "$windows_path"`
39800    new_path="$unix_path"
39801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39803    new_path="$unix_path"
39804  fi
39805
39806
39807    new_path=`$WHICH "$new_path" 2> /dev/null`
39808
39809    if test "x$new_path" = x; then
39810      # It's still not found. Now this is an unrecoverable error.
39811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39812$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39813      has_space=`$ECHO "$complete" | $GREP " "`
39814      if test "x$has_space" != x; then
39815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39817      fi
39818      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39819    fi
39820  fi
39821
39822  # Now new_path has a complete unix path to the binary
39823  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39824    # Keep paths in /bin as-is, but remove trailing .exe if any
39825    new_path="${new_path/%.exe/}"
39826    # Do not save /bin paths to all_fixpath_prefixes!
39827  else
39828    # Not in mixed or Windows style, start by that.
39829    new_path=`cmd //c echo $new_path`
39830
39831  input_path="$new_path"
39832  # Check if we need to convert this using DOS-style short mode. If the path
39833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39834  # take no chances and rewrite it.
39835  # Note: m4 eats our [], so we need to use [ and ] instead.
39836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39837  if test "x$has_forbidden_chars" != x; then
39838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39840  fi
39841
39842    # Output is in $new_path
39843
39844  windows_path="$new_path"
39845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39846    unix_path=`$CYGPATH -u "$windows_path"`
39847    new_path="$unix_path"
39848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39850    new_path="$unix_path"
39851  fi
39852
39853    # remove trailing .exe if any
39854    new_path="${new_path/%.exe/}"
39855
39856    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39857    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39858  fi
39859
39860  else
39861    # We're on a posix platform. Hooray! :)
39862    # First separate the path from the arguments. This will split at the first
39863    # space.
39864    complete="$BUILD_CXX"
39865    path="${complete%% *}"
39866    tmp="$complete EOL"
39867    arguments="${tmp#* }"
39868
39869    # Cannot rely on the command "which" here since it doesn't always work.
39870    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39871    if test -z "$is_absolute_path"; then
39872      # Path to executable is not absolute. Find it.
39873      IFS_save="$IFS"
39874      IFS=:
39875      for p in $PATH; do
39876        if test -f "$p/$path" && test -x "$p/$path"; then
39877          new_path="$p/$path"
39878          break
39879        fi
39880      done
39881      IFS="$IFS_save"
39882    else
39883      # This is an absolute path, we can use it without further modifications.
39884      new_path="$path"
39885    fi
39886
39887    if test "x$new_path" = x; then
39888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39889$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39890      has_space=`$ECHO "$complete" | $GREP " "`
39891      if test "x$has_space" != x; then
39892        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39893$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39894      fi
39895      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39896    fi
39897  fi
39898
39899  # Now join together the path and the arguments once again
39900  if test "x$arguments" != xEOL; then
39901    new_complete="$new_path ${arguments% *}"
39902  else
39903    new_complete="$new_path"
39904  fi
39905
39906  if test "x$complete" != "x$new_complete"; then
39907    BUILD_CXX="$new_complete"
39908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39909$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39910  fi
39911
39912
39913
39914  # Publish this variable in the help.
39915
39916
39917  if test "x$BUILD_LD" = x; then
39918    # The variable is not set by user, try to locate tool using the code snippet
39919    for ac_prog in ld
39920do
39921  # Extract the first word of "$ac_prog", so it can be a program name with args.
39922set dummy $ac_prog; ac_word=$2
39923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39924$as_echo_n "checking for $ac_word... " >&6; }
39925if ${ac_cv_path_BUILD_LD+:} false; then :
39926  $as_echo_n "(cached) " >&6
39927else
39928  case $BUILD_LD in
39929  [\\/]* | ?:[\\/]*)
39930  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39931  ;;
39932  *)
39933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39934for as_dir in $PATH
39935do
39936  IFS=$as_save_IFS
39937  test -z "$as_dir" && as_dir=.
39938    for ac_exec_ext in '' $ac_executable_extensions; do
39939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39940    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39942    break 2
39943  fi
39944done
39945  done
39946IFS=$as_save_IFS
39947
39948  ;;
39949esac
39950fi
39951BUILD_LD=$ac_cv_path_BUILD_LD
39952if test -n "$BUILD_LD"; then
39953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39954$as_echo "$BUILD_LD" >&6; }
39955else
39956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39957$as_echo "no" >&6; }
39958fi
39959
39960
39961  test -n "$BUILD_LD" && break
39962done
39963
39964  else
39965    # The variable is set, but is it from the command line or the environment?
39966
39967    # Try to remove the string !BUILD_LD! from our list.
39968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39970      # If it failed, the variable was not from the command line. Ignore it,
39971      # but warn the user (except for BASH, which is always set by the calling BASH).
39972      if test "xBUILD_LD" != xBASH; then
39973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39974$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39975      fi
39976      # Try to locate tool using the code snippet
39977      for ac_prog in ld
39978do
39979  # Extract the first word of "$ac_prog", so it can be a program name with args.
39980set dummy $ac_prog; ac_word=$2
39981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39982$as_echo_n "checking for $ac_word... " >&6; }
39983if ${ac_cv_path_BUILD_LD+:} false; then :
39984  $as_echo_n "(cached) " >&6
39985else
39986  case $BUILD_LD in
39987  [\\/]* | ?:[\\/]*)
39988  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39989  ;;
39990  *)
39991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39992for as_dir in $PATH
39993do
39994  IFS=$as_save_IFS
39995  test -z "$as_dir" && as_dir=.
39996    for ac_exec_ext in '' $ac_executable_extensions; do
39997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39998    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40000    break 2
40001  fi
40002done
40003  done
40004IFS=$as_save_IFS
40005
40006  ;;
40007esac
40008fi
40009BUILD_LD=$ac_cv_path_BUILD_LD
40010if test -n "$BUILD_LD"; then
40011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40012$as_echo "$BUILD_LD" >&6; }
40013else
40014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40015$as_echo "no" >&6; }
40016fi
40017
40018
40019  test -n "$BUILD_LD" && break
40020done
40021
40022    else
40023      # If it succeeded, then it was overridden by the user. We will use it
40024      # for the tool.
40025
40026      # First remove it from the list of overridden variables, so we can test
40027      # for unknown variables in the end.
40028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40029
40030      # Check if the provided tool contains a complete path.
40031      tool_specified="$BUILD_LD"
40032      tool_basename="${tool_specified##*/}"
40033      if test "x$tool_basename" = "x$tool_specified"; then
40034        # A command without a complete path is provided, search $PATH.
40035        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40036$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40037        # Extract the first word of "$tool_basename", so it can be a program name with args.
40038set dummy $tool_basename; ac_word=$2
40039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40040$as_echo_n "checking for $ac_word... " >&6; }
40041if ${ac_cv_path_BUILD_LD+:} false; then :
40042  $as_echo_n "(cached) " >&6
40043else
40044  case $BUILD_LD in
40045  [\\/]* | ?:[\\/]*)
40046  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40047  ;;
40048  *)
40049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40050for as_dir in $PATH
40051do
40052  IFS=$as_save_IFS
40053  test -z "$as_dir" && as_dir=.
40054    for ac_exec_ext in '' $ac_executable_extensions; do
40055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40056    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40058    break 2
40059  fi
40060done
40061  done
40062IFS=$as_save_IFS
40063
40064  ;;
40065esac
40066fi
40067BUILD_LD=$ac_cv_path_BUILD_LD
40068if test -n "$BUILD_LD"; then
40069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40070$as_echo "$BUILD_LD" >&6; }
40071else
40072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40073$as_echo "no" >&6; }
40074fi
40075
40076
40077        if test "x$BUILD_LD" = x; then
40078          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40079        fi
40080      else
40081        # Otherwise we believe it is a complete path. Use it as it is.
40082        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40083$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40085$as_echo_n "checking for BUILD_LD... " >&6; }
40086        if test ! -x "$tool_specified"; then
40087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40088$as_echo "not found" >&6; }
40089          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40090        fi
40091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40092$as_echo "$tool_specified" >&6; }
40093      fi
40094    fi
40095  fi
40096
40097
40098
40099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40100
40101  # First separate the path from the arguments. This will split at the first
40102  # space.
40103  complete="$BUILD_LD"
40104  path="${complete%% *}"
40105  tmp="$complete EOL"
40106  arguments="${tmp#* }"
40107
40108  # Input might be given as Windows format, start by converting to
40109  # unix format.
40110  new_path=`$CYGPATH -u "$path"`
40111
40112  # Now try to locate executable using which
40113  new_path=`$WHICH "$new_path" 2> /dev/null`
40114  # bat and cmd files are not always considered executable in cygwin causing which
40115  # to not find them
40116  if test "x$new_path" = x \
40117      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40118      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40119    new_path=`$CYGPATH -u "$path"`
40120  fi
40121  if test "x$new_path" = x; then
40122    # Oops. Which didn't find the executable.
40123    # The splitting of arguments from the executable at a space might have been incorrect,
40124    # since paths with space are more likely in Windows. Give it another try with the whole
40125    # argument.
40126    path="$complete"
40127    arguments="EOL"
40128    new_path=`$CYGPATH -u "$path"`
40129    new_path=`$WHICH "$new_path" 2> /dev/null`
40130    # bat and cmd files are not always considered executable in cygwin causing which
40131    # to not find them
40132    if test "x$new_path" = x \
40133        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40134        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40135      new_path=`$CYGPATH -u "$path"`
40136    fi
40137    if test "x$new_path" = x; then
40138      # It's still not found. Now this is an unrecoverable error.
40139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40140$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40141      has_space=`$ECHO "$complete" | $GREP " "`
40142      if test "x$has_space" != x; then
40143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40145      fi
40146      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40147    fi
40148  fi
40149
40150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40153  # "foo.exe" is OK but "foo" is an error.
40154  #
40155  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40156  # It is also a way to make sure we got the proper file name for the real test later on.
40157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40158  if test "x$test_shortpath" = x; then
40159    # Short path failed, file does not exist as specified.
40160    # Try adding .exe or .cmd
40161    if test -f "${new_path}.exe"; then
40162      input_to_shortpath="${new_path}.exe"
40163    elif test -f "${new_path}.cmd"; then
40164      input_to_shortpath="${new_path}.cmd"
40165    else
40166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40167$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40170      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40171    fi
40172  else
40173    input_to_shortpath="$new_path"
40174  fi
40175
40176  # Call helper function which possibly converts this using DOS-style short mode.
40177  # If so, the updated path is stored in $new_path.
40178  new_path="$input_to_shortpath"
40179
40180  input_path="$input_to_shortpath"
40181  # Check if we need to convert this using DOS-style short mode. If the path
40182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40183  # take no chances and rewrite it.
40184  # Note: m4 eats our [], so we need to use [ and ] instead.
40185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40186  if test "x$has_forbidden_chars" != x; then
40187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40191      # Going to short mode and back again did indeed matter. Since short mode is
40192      # case insensitive, let's make it lowercase to improve readability.
40193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40194      # Now convert it back to Unix-stile (cygpath)
40195      input_path=`$CYGPATH -u "$shortmode_path"`
40196      new_path="$input_path"
40197    fi
40198  fi
40199
40200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40201  if test "x$test_cygdrive_prefix" = x; then
40202    # As a simple fix, exclude /usr/bin since it's not a real path.
40203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40205      # a path prefixed by /cygdrive for fixpath to work.
40206      new_path="$CYGWIN_ROOT_PATH$input_path"
40207    fi
40208  fi
40209
40210  # remove trailing .exe if any
40211  new_path="${new_path/%.exe/}"
40212
40213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40214
40215  # First separate the path from the arguments. This will split at the first
40216  # space.
40217  complete="$BUILD_LD"
40218  path="${complete%% *}"
40219  tmp="$complete EOL"
40220  arguments="${tmp#* }"
40221
40222  # Input might be given as Windows format, start by converting to
40223  # unix format.
40224  new_path="$path"
40225
40226  windows_path="$new_path"
40227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228    unix_path=`$CYGPATH -u "$windows_path"`
40229    new_path="$unix_path"
40230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40232    new_path="$unix_path"
40233  fi
40234
40235
40236  # Now try to locate executable using which
40237  new_path=`$WHICH "$new_path" 2> /dev/null`
40238
40239  if test "x$new_path" = x; then
40240    # Oops. Which didn't find the executable.
40241    # The splitting of arguments from the executable at a space might have been incorrect,
40242    # since paths with space are more likely in Windows. Give it another try with the whole
40243    # argument.
40244    path="$complete"
40245    arguments="EOL"
40246    new_path="$path"
40247
40248  windows_path="$new_path"
40249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40250    unix_path=`$CYGPATH -u "$windows_path"`
40251    new_path="$unix_path"
40252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40254    new_path="$unix_path"
40255  fi
40256
40257
40258    new_path=`$WHICH "$new_path" 2> /dev/null`
40259
40260    if test "x$new_path" = x; then
40261      # It's still not found. Now this is an unrecoverable error.
40262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40263$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40264      has_space=`$ECHO "$complete" | $GREP " "`
40265      if test "x$has_space" != x; then
40266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40268      fi
40269      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40270    fi
40271  fi
40272
40273  # Now new_path has a complete unix path to the binary
40274  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40275    # Keep paths in /bin as-is, but remove trailing .exe if any
40276    new_path="${new_path/%.exe/}"
40277    # Do not save /bin paths to all_fixpath_prefixes!
40278  else
40279    # Not in mixed or Windows style, start by that.
40280    new_path=`cmd //c echo $new_path`
40281
40282  input_path="$new_path"
40283  # Check if we need to convert this using DOS-style short mode. If the path
40284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40285  # take no chances and rewrite it.
40286  # Note: m4 eats our [], so we need to use [ and ] instead.
40287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40288  if test "x$has_forbidden_chars" != x; then
40289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40291  fi
40292
40293    # Output is in $new_path
40294
40295  windows_path="$new_path"
40296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40297    unix_path=`$CYGPATH -u "$windows_path"`
40298    new_path="$unix_path"
40299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40301    new_path="$unix_path"
40302  fi
40303
40304    # remove trailing .exe if any
40305    new_path="${new_path/%.exe/}"
40306
40307    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40308    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40309  fi
40310
40311  else
40312    # We're on a posix platform. Hooray! :)
40313    # First separate the path from the arguments. This will split at the first
40314    # space.
40315    complete="$BUILD_LD"
40316    path="${complete%% *}"
40317    tmp="$complete EOL"
40318    arguments="${tmp#* }"
40319
40320    # Cannot rely on the command "which" here since it doesn't always work.
40321    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40322    if test -z "$is_absolute_path"; then
40323      # Path to executable is not absolute. Find it.
40324      IFS_save="$IFS"
40325      IFS=:
40326      for p in $PATH; do
40327        if test -f "$p/$path" && test -x "$p/$path"; then
40328          new_path="$p/$path"
40329          break
40330        fi
40331      done
40332      IFS="$IFS_save"
40333    else
40334      # This is an absolute path, we can use it without further modifications.
40335      new_path="$path"
40336    fi
40337
40338    if test "x$new_path" = x; then
40339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40340$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40341      has_space=`$ECHO "$complete" | $GREP " "`
40342      if test "x$has_space" != x; then
40343        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40344$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40345      fi
40346      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40347    fi
40348  fi
40349
40350  # Now join together the path and the arguments once again
40351  if test "x$arguments" != xEOL; then
40352    new_complete="$new_path ${arguments% *}"
40353  else
40354    new_complete="$new_path"
40355  fi
40356
40357  if test "x$complete" != "x$new_complete"; then
40358    BUILD_LD="$new_complete"
40359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40360$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40361  fi
40362
40363  else
40364    # If we are not cross compiling, use the normal target compilers for
40365    # building the build platform executables.
40366    BUILD_CC="$CC"
40367    BUILD_CXX="$CXX"
40368    BUILD_LD="$LD"
40369  fi
40370
40371
40372
40373
40374
40375
40376  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40377    # For hotspot, we need these in Windows mixed path,
40378    # so rewrite them all. Need added .exe suffix.
40379    HOTSPOT_CXX="$CXX.exe"
40380    HOTSPOT_LD="$LD.exe"
40381    HOTSPOT_MT="$MT.exe"
40382    HOTSPOT_RC="$RC.exe"
40383
40384  unix_path="$HOTSPOT_CXX"
40385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40386    windows_path=`$CYGPATH -m "$unix_path"`
40387    HOTSPOT_CXX="$windows_path"
40388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40389    windows_path=`cmd //c echo $unix_path`
40390    HOTSPOT_CXX="$windows_path"
40391  fi
40392
40393
40394  unix_path="$HOTSPOT_LD"
40395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40396    windows_path=`$CYGPATH -m "$unix_path"`
40397    HOTSPOT_LD="$windows_path"
40398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40399    windows_path=`cmd //c echo $unix_path`
40400    HOTSPOT_LD="$windows_path"
40401  fi
40402
40403
40404  unix_path="$HOTSPOT_MT"
40405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40406    windows_path=`$CYGPATH -m "$unix_path"`
40407    HOTSPOT_MT="$windows_path"
40408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40409    windows_path=`cmd //c echo $unix_path`
40410    HOTSPOT_MT="$windows_path"
40411  fi
40412
40413
40414  unix_path="$HOTSPOT_RC"
40415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40416    windows_path=`$CYGPATH -m "$unix_path"`
40417    HOTSPOT_RC="$windows_path"
40418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40419    windows_path=`cmd //c echo $unix_path`
40420    HOTSPOT_RC="$windows_path"
40421  fi
40422
40423
40424
40425  else
40426    HOTSPOT_CXX="$CXX"
40427    HOTSPOT_LD="$LD"
40428  fi
40429
40430
40431
40432  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40433    USE_CLANG=true
40434  fi
40435
40436
40437  # LDEXE is the linker to use, when creating executables. Not really used.
40438  # FIXME: These should just be removed!
40439  LDEXE="$LD"
40440  LDEXECXX="$LDCXX"
40441
40442
40443
40444
40445
40446
40447  # The package path is used only on macosx?
40448  # FIXME: clean this up, and/or move it elsewhere.
40449  PACKAGE_PATH=/opt/local
40450
40451
40452  # Check for extra potential brokenness.
40453  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40454    # On Windows, double-check that we got the right compiler.
40455    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40456    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40457    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40458      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40459        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40460      fi
40461    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40462      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40463        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40464      fi
40465    fi
40466  fi
40467
40468  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40469    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40470    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40471    # This is later checked when setting flags.
40472
40473    # "-Og" suppported for GCC 4.8 and later
40474    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40475
40476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40477$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40478  supports=yes
40479
40480  saved_cflags="$CFLAGS"
40481  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40482  ac_ext=c
40483ac_cpp='$CPP $CPPFLAGS'
40484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40486ac_compiler_gnu=$ac_cv_c_compiler_gnu
40487
40488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40489/* end confdefs.h.  */
40490int i;
40491_ACEOF
40492if ac_fn_c_try_compile "$LINENO"; then :
40493
40494else
40495  supports=no
40496fi
40497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40498  ac_ext=cpp
40499ac_cpp='$CXXCPP $CPPFLAGS'
40500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40503
40504  CFLAGS="$saved_cflags"
40505
40506  saved_cxxflags="$CXXFLAGS"
40507  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40508  ac_ext=cpp
40509ac_cpp='$CXXCPP $CPPFLAGS'
40510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40513
40514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40515/* end confdefs.h.  */
40516int i;
40517_ACEOF
40518if ac_fn_cxx_try_compile "$LINENO"; then :
40519
40520else
40521  supports=no
40522fi
40523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40524  ac_ext=cpp
40525ac_cpp='$CXXCPP $CPPFLAGS'
40526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40529
40530  CXXFLAGS="$saved_cxxflags"
40531
40532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40533$as_echo "$supports" >&6; }
40534  if test "x$supports" = "xyes" ; then
40535    HAS_CFLAG_OPTIMIZE_DEBUG=true
40536  else
40537    HAS_CFLAG_OPTIMIZE_DEBUG=false
40538  fi
40539
40540
40541    # "-fsanitize=undefined" supported for GCC 4.9 and later
40542    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
40543
40544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
40545$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
40546  supports=yes
40547
40548  saved_cflags="$CFLAGS"
40549  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40550  ac_ext=c
40551ac_cpp='$CPP $CPPFLAGS'
40552ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40553ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40554ac_compiler_gnu=$ac_cv_c_compiler_gnu
40555
40556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40557/* end confdefs.h.  */
40558int i;
40559_ACEOF
40560if ac_fn_c_try_compile "$LINENO"; then :
40561
40562else
40563  supports=no
40564fi
40565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40566  ac_ext=cpp
40567ac_cpp='$CXXCPP $CPPFLAGS'
40568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40571
40572  CFLAGS="$saved_cflags"
40573
40574  saved_cxxflags="$CXXFLAGS"
40575  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40576  ac_ext=cpp
40577ac_cpp='$CXXCPP $CPPFLAGS'
40578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40581
40582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40583/* end confdefs.h.  */
40584int i;
40585_ACEOF
40586if ac_fn_cxx_try_compile "$LINENO"; then :
40587
40588else
40589  supports=no
40590fi
40591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40592  ac_ext=cpp
40593ac_cpp='$CXXCPP $CPPFLAGS'
40594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40597
40598  CXXFLAGS="$saved_cxxflags"
40599
40600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40601$as_echo "$supports" >&6; }
40602  if test "x$supports" = "xyes" ; then
40603    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
40604  else
40605    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
40606  fi
40607
40608
40609    # "-z relro" supported in GNU binutils 2.17 and later
40610    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40611
40612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40613$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40614  supports=yes
40615
40616  saved_ldflags="$LDFLAGS"
40617  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40618  ac_ext=c
40619ac_cpp='$CPP $CPPFLAGS'
40620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40622ac_compiler_gnu=$ac_cv_c_compiler_gnu
40623
40624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40625/* end confdefs.h.  */
40626
40627int
40628main ()
40629{
40630
40631  ;
40632  return 0;
40633}
40634_ACEOF
40635if ac_fn_c_try_link "$LINENO"; then :
40636
40637else
40638  supports=no
40639fi
40640rm -f core conftest.err conftest.$ac_objext \
40641    conftest$ac_exeext conftest.$ac_ext
40642  ac_ext=cpp
40643ac_cpp='$CXXCPP $CPPFLAGS'
40644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40647
40648  LDFLAGS="$saved_ldflags"
40649
40650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40651$as_echo "$supports" >&6; }
40652  if test "x$supports" = "xyes" ; then
40653    HAS_LINKER_RELRO=true
40654  else
40655    HAS_LINKER_RELRO=false
40656  fi
40657
40658
40659    # "-z now" supported in GNU binutils 2.11 and later
40660    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40661
40662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40663$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40664  supports=yes
40665
40666  saved_ldflags="$LDFLAGS"
40667  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40668  ac_ext=c
40669ac_cpp='$CPP $CPPFLAGS'
40670ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40671ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40672ac_compiler_gnu=$ac_cv_c_compiler_gnu
40673
40674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40675/* end confdefs.h.  */
40676
40677int
40678main ()
40679{
40680
40681  ;
40682  return 0;
40683}
40684_ACEOF
40685if ac_fn_c_try_link "$LINENO"; then :
40686
40687else
40688  supports=no
40689fi
40690rm -f core conftest.err conftest.$ac_objext \
40691    conftest$ac_exeext conftest.$ac_ext
40692  ac_ext=cpp
40693ac_cpp='$CXXCPP $CPPFLAGS'
40694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40697
40698  LDFLAGS="$saved_ldflags"
40699
40700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40701$as_echo "$supports" >&6; }
40702  if test "x$supports" = "xyes" ; then
40703    HAS_LINKER_NOW=true
40704  else
40705    HAS_LINKER_NOW=false
40706  fi
40707
40708  fi
40709
40710  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40711  # in executable.'
40712  USING_BROKEN_SUSE_LD=no
40713  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40715$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40716    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40717    $ECHO "int main() { }" > main.c
40718    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40720$as_echo "no" >&6; }
40721      USING_BROKEN_SUSE_LD=no
40722    else
40723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40724$as_echo "yes" >&6; }
40725      USING_BROKEN_SUSE_LD=yes
40726    fi
40727    rm -rf version-script.map main.c a.out
40728  fi
40729
40730
40731
40732# Setup the JTReg Regression Test Harness.
40733
40734
40735# Check whether --with-jtreg was given.
40736if test "${with_jtreg+set}" = set; then :
40737  withval=$with_jtreg;
40738else
40739  with_jtreg=no
40740fi
40741
40742
40743  if test "x$with_jtreg" = xno; then
40744    # jtreg disabled
40745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40746$as_echo_n "checking for jtreg... " >&6; }
40747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40748$as_echo "no" >&6; }
40749  else
40750    if test "x$with_jtreg" != xyes; then
40751      # with path specified.
40752      JT_HOME="$with_jtreg"
40753    fi
40754
40755    if test "x$JT_HOME" != x; then
40756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40757$as_echo_n "checking for jtreg... " >&6; }
40758
40759      # use JT_HOME enviroment var.
40760
40761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40762
40763  # Input might be given as Windows format, start by converting to
40764  # unix format.
40765  path="$JT_HOME"
40766  new_path=`$CYGPATH -u "$path"`
40767
40768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40771  # "foo.exe" is OK but "foo" is an error.
40772  #
40773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40774  # It is also a way to make sure we got the proper file name for the real test later on.
40775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40776  if test "x$test_shortpath" = x; then
40777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40778$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40779    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40780  fi
40781
40782  # Call helper function which possibly converts this using DOS-style short mode.
40783  # If so, the updated path is stored in $new_path.
40784
40785  input_path="$new_path"
40786  # Check if we need to convert this using DOS-style short mode. If the path
40787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40788  # take no chances and rewrite it.
40789  # Note: m4 eats our [], so we need to use [ and ] instead.
40790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40791  if test "x$has_forbidden_chars" != x; then
40792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40796      # Going to short mode and back again did indeed matter. Since short mode is
40797      # case insensitive, let's make it lowercase to improve readability.
40798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40799      # Now convert it back to Unix-stile (cygpath)
40800      input_path=`$CYGPATH -u "$shortmode_path"`
40801      new_path="$input_path"
40802    fi
40803  fi
40804
40805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40806  if test "x$test_cygdrive_prefix" = x; then
40807    # As a simple fix, exclude /usr/bin since it's not a real path.
40808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40810      # a path prefixed by /cygdrive for fixpath to work.
40811      new_path="$CYGWIN_ROOT_PATH$input_path"
40812    fi
40813  fi
40814
40815
40816  if test "x$path" != "x$new_path"; then
40817    JT_HOME="$new_path"
40818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40819$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40820  fi
40821
40822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40823
40824  path="$JT_HOME"
40825  has_colon=`$ECHO $path | $GREP ^.:`
40826  new_path="$path"
40827  if test "x$has_colon" = x; then
40828    # Not in mixed or Windows style, start by that.
40829    new_path=`cmd //c echo $path`
40830  fi
40831
40832
40833  input_path="$new_path"
40834  # Check if we need to convert this using DOS-style short mode. If the path
40835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40836  # take no chances and rewrite it.
40837  # Note: m4 eats our [], so we need to use [ and ] instead.
40838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40839  if test "x$has_forbidden_chars" != x; then
40840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40842  fi
40843
40844
40845  windows_path="$new_path"
40846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40847    unix_path=`$CYGPATH -u "$windows_path"`
40848    new_path="$unix_path"
40849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40851    new_path="$unix_path"
40852  fi
40853
40854  if test "x$path" != "x$new_path"; then
40855    JT_HOME="$new_path"
40856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40857$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40858  fi
40859
40860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40862
40863  else
40864    # We're on a posix platform. Hooray! :)
40865    path="$JT_HOME"
40866    has_space=`$ECHO "$path" | $GREP " "`
40867    if test "x$has_space" != x; then
40868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40869$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40870      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40871    fi
40872
40873    # Use eval to expand a potential ~
40874    eval path="$path"
40875    if test ! -f "$path" && test ! -d "$path"; then
40876      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40877    fi
40878
40879    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40880  fi
40881
40882
40883      # jtreg win32 script works for everybody
40884      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40885
40886      if test ! -f "$JTREGEXE"; then
40887        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40888      fi
40889
40890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40891$as_echo "$JTREGEXE" >&6; }
40892    else
40893      # try to find jtreg on path
40894
40895
40896
40897  # Publish this variable in the help.
40898
40899
40900  if test "x$JTREGEXE" = x; then
40901    # The variable is not set by user, try to locate tool using the code snippet
40902    for ac_prog in jtreg
40903do
40904  # Extract the first word of "$ac_prog", so it can be a program name with args.
40905set dummy $ac_prog; ac_word=$2
40906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40907$as_echo_n "checking for $ac_word... " >&6; }
40908if ${ac_cv_path_JTREGEXE+:} false; then :
40909  $as_echo_n "(cached) " >&6
40910else
40911  case $JTREGEXE in
40912  [\\/]* | ?:[\\/]*)
40913  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40914  ;;
40915  *)
40916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40917for as_dir in $PATH
40918do
40919  IFS=$as_save_IFS
40920  test -z "$as_dir" && as_dir=.
40921    for ac_exec_ext in '' $ac_executable_extensions; do
40922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40923    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40925    break 2
40926  fi
40927done
40928  done
40929IFS=$as_save_IFS
40930
40931  ;;
40932esac
40933fi
40934JTREGEXE=$ac_cv_path_JTREGEXE
40935if test -n "$JTREGEXE"; then
40936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40937$as_echo "$JTREGEXE" >&6; }
40938else
40939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40940$as_echo "no" >&6; }
40941fi
40942
40943
40944  test -n "$JTREGEXE" && break
40945done
40946
40947  else
40948    # The variable is set, but is it from the command line or the environment?
40949
40950    # Try to remove the string !JTREGEXE! from our list.
40951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40953      # If it failed, the variable was not from the command line. Ignore it,
40954      # but warn the user (except for BASH, which is always set by the calling BASH).
40955      if test "xJTREGEXE" != xBASH; then
40956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40957$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40958      fi
40959      # Try to locate tool using the code snippet
40960      for ac_prog in jtreg
40961do
40962  # Extract the first word of "$ac_prog", so it can be a program name with args.
40963set dummy $ac_prog; ac_word=$2
40964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40965$as_echo_n "checking for $ac_word... " >&6; }
40966if ${ac_cv_path_JTREGEXE+:} false; then :
40967  $as_echo_n "(cached) " >&6
40968else
40969  case $JTREGEXE in
40970  [\\/]* | ?:[\\/]*)
40971  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40972  ;;
40973  *)
40974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40975for as_dir in $PATH
40976do
40977  IFS=$as_save_IFS
40978  test -z "$as_dir" && as_dir=.
40979    for ac_exec_ext in '' $ac_executable_extensions; do
40980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40981    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40983    break 2
40984  fi
40985done
40986  done
40987IFS=$as_save_IFS
40988
40989  ;;
40990esac
40991fi
40992JTREGEXE=$ac_cv_path_JTREGEXE
40993if test -n "$JTREGEXE"; then
40994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40995$as_echo "$JTREGEXE" >&6; }
40996else
40997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40998$as_echo "no" >&6; }
40999fi
41000
41001
41002  test -n "$JTREGEXE" && break
41003done
41004
41005    else
41006      # If it succeeded, then it was overridden by the user. We will use it
41007      # for the tool.
41008
41009      # First remove it from the list of overridden variables, so we can test
41010      # for unknown variables in the end.
41011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41012
41013      # Check if the provided tool contains a complete path.
41014      tool_specified="$JTREGEXE"
41015      tool_basename="${tool_specified##*/}"
41016      if test "x$tool_basename" = "x$tool_specified"; then
41017        # A command without a complete path is provided, search $PATH.
41018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41019$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41020        # Extract the first word of "$tool_basename", so it can be a program name with args.
41021set dummy $tool_basename; ac_word=$2
41022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41023$as_echo_n "checking for $ac_word... " >&6; }
41024if ${ac_cv_path_JTREGEXE+:} false; then :
41025  $as_echo_n "(cached) " >&6
41026else
41027  case $JTREGEXE in
41028  [\\/]* | ?:[\\/]*)
41029  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41030  ;;
41031  *)
41032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41033for as_dir in $PATH
41034do
41035  IFS=$as_save_IFS
41036  test -z "$as_dir" && as_dir=.
41037    for ac_exec_ext in '' $ac_executable_extensions; do
41038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41039    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41041    break 2
41042  fi
41043done
41044  done
41045IFS=$as_save_IFS
41046
41047  ;;
41048esac
41049fi
41050JTREGEXE=$ac_cv_path_JTREGEXE
41051if test -n "$JTREGEXE"; then
41052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41053$as_echo "$JTREGEXE" >&6; }
41054else
41055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41056$as_echo "no" >&6; }
41057fi
41058
41059
41060        if test "x$JTREGEXE" = x; then
41061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41062        fi
41063      else
41064        # Otherwise we believe it is a complete path. Use it as it is.
41065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41066$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41068$as_echo_n "checking for JTREGEXE... " >&6; }
41069        if test ! -x "$tool_specified"; then
41070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41071$as_echo "not found" >&6; }
41072          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41073        fi
41074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41075$as_echo "$tool_specified" >&6; }
41076      fi
41077    fi
41078  fi
41079
41080
41081
41082  if test "x$JTREGEXE" = x; then
41083    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41084  fi
41085
41086
41087      JT_HOME="`$DIRNAME $JTREGEXE`"
41088    fi
41089  fi
41090
41091
41092
41093
41094
41095
41096  # Option used to tell the compiler whether to create 32- or 64-bit executables
41097  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41098    COMPILER_TARGET_BITS_FLAG="-q"
41099  else
41100    COMPILER_TARGET_BITS_FLAG="-m"
41101  fi
41102
41103
41104  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41105  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41106    ARFLAGS="-r"
41107  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41108    ARFLAGS="-X64"
41109  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41110    # lib.exe is used as AR to create static libraries.
41111    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41112  else
41113    ARFLAGS=""
41114  fi
41115
41116
41117  ## Setup strip.
41118  # FIXME: should this really be per platform, or should it be per toolchain type?
41119  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41120  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41121  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41122    STRIPFLAGS="-g"
41123  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41124    STRIPFLAGS="-x"
41125  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41126    STRIPFLAGS="-S"
41127  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41128    STRIPFLAGS="-X32_64"
41129  fi
41130
41131  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41132    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41133  fi
41134
41135
41136  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41137    # FIXME: break out into MCSFLAGS
41138    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41139  fi
41140
41141
41142  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41143    CC_OUT_OPTION=-Fo
41144    EXE_OUT_OPTION=-out:
41145    LD_OUT_OPTION=-out:
41146    AR_OUT_OPTION=-out:
41147  else
41148    # The option used to specify the target .o,.a or .so file.
41149    # When compiling, how to specify the to be created object file.
41150    CC_OUT_OPTION='-o$(SPACE)'
41151    # When linking, how to specify the to be created executable.
41152    EXE_OUT_OPTION='-o$(SPACE)'
41153    # When linking, how to specify the to be created dynamically linkable library.
41154    LD_OUT_OPTION='-o$(SPACE)'
41155    # When archiving, how to specify the to be create static archive for object files.
41156    AR_OUT_OPTION='rcs$(SPACE)'
41157  fi
41158
41159
41160
41161
41162
41163  # On Windows, we need to set RC flags.
41164  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41165    RC_FLAGS="-nologo -l 0x409 -r"
41166    if test "x$VARIANT" = xOPT; then
41167      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41168    fi
41169
41170    # The version variables used to create RC_FLAGS may be overridden
41171    # in a custom configure script, or possibly the command line.
41172    # Let those variables be expanded at make time in spec.gmk.
41173    # The \$ are escaped to the shell, and the $(...) variables
41174    # are evaluated by make.
41175    RC_FLAGS="$RC_FLAGS \
41176        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41177        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41178        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41179        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41180        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41181        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41182        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41183  fi
41184
41185
41186  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41187    # silence copyright notice and other headers.
41188    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41189  fi
41190
41191  if test "x$SYSROOT" != "x"; then
41192    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41193      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41194        # Solaris Studio does not have a concept of sysroot. Instead we must
41195        # make sure the default include and lib dirs are appended to each
41196        # compile and link command line.
41197        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41198        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41199            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41200            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41201      fi
41202    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41203      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41204      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41205      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41206    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41207      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41208      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41209    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41210      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41211      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41212    fi
41213    # Propagate the sysroot args to hotspot
41214    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41215    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41216    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41217  fi
41218
41219  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41220  # set this here so it doesn't have to be peppered throughout the forest
41221  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41222    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41223    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41224  fi
41225
41226
41227
41228
41229
41230# FIXME: Currently we must test this after toolchain but before flags. Fix!
41231
41232# Now we can test some aspects on the target using configure macros.
41233
41234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41235$as_echo_n "checking for ANSI C header files... " >&6; }
41236if ${ac_cv_header_stdc+:} false; then :
41237  $as_echo_n "(cached) " >&6
41238else
41239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41240/* end confdefs.h.  */
41241#include <stdlib.h>
41242#include <stdarg.h>
41243#include <string.h>
41244#include <float.h>
41245
41246int
41247main ()
41248{
41249
41250  ;
41251  return 0;
41252}
41253_ACEOF
41254if ac_fn_cxx_try_compile "$LINENO"; then :
41255  ac_cv_header_stdc=yes
41256else
41257  ac_cv_header_stdc=no
41258fi
41259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260
41261if test $ac_cv_header_stdc = yes; then
41262  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41263  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41264/* end confdefs.h.  */
41265#include <string.h>
41266
41267_ACEOF
41268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41269  $EGREP "memchr" >/dev/null 2>&1; then :
41270
41271else
41272  ac_cv_header_stdc=no
41273fi
41274rm -f conftest*
41275
41276fi
41277
41278if test $ac_cv_header_stdc = yes; then
41279  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41281/* end confdefs.h.  */
41282#include <stdlib.h>
41283
41284_ACEOF
41285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41286  $EGREP "free" >/dev/null 2>&1; then :
41287
41288else
41289  ac_cv_header_stdc=no
41290fi
41291rm -f conftest*
41292
41293fi
41294
41295if test $ac_cv_header_stdc = yes; then
41296  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41297  if test "$cross_compiling" = yes; then :
41298  :
41299else
41300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41301/* end confdefs.h.  */
41302#include <ctype.h>
41303#include <stdlib.h>
41304#if ((' ' & 0x0FF) == 0x020)
41305# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41306# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41307#else
41308# define ISLOWER(c) \
41309		   (('a' <= (c) && (c) <= 'i') \
41310		     || ('j' <= (c) && (c) <= 'r') \
41311		     || ('s' <= (c) && (c) <= 'z'))
41312# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41313#endif
41314
41315#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41316int
41317main ()
41318{
41319  int i;
41320  for (i = 0; i < 256; i++)
41321    if (XOR (islower (i), ISLOWER (i))
41322	|| toupper (i) != TOUPPER (i))
41323      return 2;
41324  return 0;
41325}
41326_ACEOF
41327if ac_fn_cxx_try_run "$LINENO"; then :
41328
41329else
41330  ac_cv_header_stdc=no
41331fi
41332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41333  conftest.$ac_objext conftest.beam conftest.$ac_ext
41334fi
41335
41336fi
41337fi
41338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41339$as_echo "$ac_cv_header_stdc" >&6; }
41340if test $ac_cv_header_stdc = yes; then
41341
41342$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41343
41344fi
41345
41346# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41347for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41348		  inttypes.h stdint.h unistd.h
41349do :
41350  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41351ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41352"
41353if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41354  cat >>confdefs.h <<_ACEOF
41355#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41356_ACEOF
41357
41358fi
41359
41360done
41361
41362
41363
41364  ###############################################################################
41365  #
41366  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41367  # (The JVM can use 32 or 64 bit Java pointers but that decision
41368  # is made at runtime.)
41369  #
41370
41371  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41372    # Always specify -m flag on Solaris
41373    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41374
41375  # When we add flags to the "official" CFLAGS etc, we need to
41376  # keep track of these additions in ADDED_CFLAGS etc. These
41377  # will later be checked to make sure only controlled additions
41378  # have been made to CFLAGS etc.
41379  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41380  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41381  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41382
41383  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41384  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41385  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41386
41387  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41388  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41389  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41390
41391  elif test "x$COMPILE_TYPE" = xreduced; then
41392    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41393      # Specify -m if running reduced on other Posix platforms
41394
41395  # When we add flags to the "official" CFLAGS etc, we need to
41396  # keep track of these additions in ADDED_CFLAGS etc. These
41397  # will later be checked to make sure only controlled additions
41398  # have been made to CFLAGS etc.
41399  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41400  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41401  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41402
41403  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41404  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41405  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41406
41407  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41408  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41409  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41410
41411    fi
41412  fi
41413
41414  # Make compilation sanity check
41415  for ac_header in stdio.h
41416do :
41417  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41418if test "x$ac_cv_header_stdio_h" = xyes; then :
41419  cat >>confdefs.h <<_ACEOF
41420#define HAVE_STDIO_H 1
41421_ACEOF
41422
41423else
41424
41425    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41426$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41427    if test "x$COMPILE_TYPE" = xreduced; then
41428      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41429$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41430    elif test "x$COMPILE_TYPE" = xcross; then
41431      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41432$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41433    fi
41434    as_fn_error $? "Cannot continue." "$LINENO" 5
41435
41436fi
41437
41438done
41439
41440
41441  # The cast to long int works around a bug in the HP C Compiler
41442# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41443# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41444# This bug is HP SR number 8606223364.
41445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41446$as_echo_n "checking size of int *... " >&6; }
41447if ${ac_cv_sizeof_int_p+:} false; then :
41448  $as_echo_n "(cached) " >&6
41449else
41450  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41451
41452else
41453  if test "$ac_cv_type_int_p" = yes; then
41454     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41456as_fn_error 77 "cannot compute sizeof (int *)
41457See \`config.log' for more details" "$LINENO" 5; }
41458   else
41459     ac_cv_sizeof_int_p=0
41460   fi
41461fi
41462
41463fi
41464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41465$as_echo "$ac_cv_sizeof_int_p" >&6; }
41466
41467
41468
41469cat >>confdefs.h <<_ACEOF
41470#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41471_ACEOF
41472
41473
41474
41475  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41476  if test "x$ac_cv_sizeof_int_p" = x; then
41477    # The test failed, lets stick to the assumed value.
41478    { $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
41479$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41480  else
41481    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41482
41483    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41484      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41485      # Let's try to implicitely set the compilers target architecture and retry the test
41486      { $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
41487$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;}
41488      { $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
41489$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;}
41490
41491  # When we add flags to the "official" CFLAGS etc, we need to
41492  # keep track of these additions in ADDED_CFLAGS etc. These
41493  # will later be checked to make sure only controlled additions
41494  # have been made to CFLAGS etc.
41495  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41496  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41497  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41498
41499  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41500  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41501  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41502
41503  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41504  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41505  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41506
41507
41508      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41509      unset ac_cv_sizeof_int_p
41510      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41511      cat >>confdefs.h <<_ACEOF
41512#undef SIZEOF_INT_P
41513_ACEOF
41514
41515      # The cast to long int works around a bug in the HP C Compiler
41516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41518# This bug is HP SR number 8606223364.
41519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41520$as_echo_n "checking size of int *... " >&6; }
41521if ${ac_cv_sizeof_int_p+:} false; then :
41522  $as_echo_n "(cached) " >&6
41523else
41524  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41525
41526else
41527  if test "$ac_cv_type_int_p" = yes; then
41528     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41530as_fn_error 77 "cannot compute sizeof (int *)
41531See \`config.log' for more details" "$LINENO" 5; }
41532   else
41533     ac_cv_sizeof_int_p=0
41534   fi
41535fi
41536
41537fi
41538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41539$as_echo "$ac_cv_sizeof_int_p" >&6; }
41540
41541
41542
41543cat >>confdefs.h <<_ACEOF
41544#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41545_ACEOF
41546
41547
41548
41549      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41550
41551      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41552        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
41553      fi
41554    fi
41555  fi
41556
41557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41558$as_echo_n "checking for target address size... " >&6; }
41559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41560$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41561
41562
41563  ###############################################################################
41564  #
41565  # Is the target little of big endian?
41566  #
41567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41568$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41569if ${ac_cv_c_bigendian+:} false; then :
41570  $as_echo_n "(cached) " >&6
41571else
41572  ac_cv_c_bigendian=unknown
41573    # See if we're dealing with a universal compiler.
41574    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41575/* end confdefs.h.  */
41576#ifndef __APPLE_CC__
41577	       not a universal capable compiler
41578	     #endif
41579	     typedef int dummy;
41580
41581_ACEOF
41582if ac_fn_cxx_try_compile "$LINENO"; then :
41583
41584	# Check for potential -arch flags.  It is not universal unless
41585	# there are at least two -arch flags with different values.
41586	ac_arch=
41587	ac_prev=
41588	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41589	 if test -n "$ac_prev"; then
41590	   case $ac_word in
41591	     i?86 | x86_64 | ppc | ppc64)
41592	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41593		 ac_arch=$ac_word
41594	       else
41595		 ac_cv_c_bigendian=universal
41596		 break
41597	       fi
41598	       ;;
41599	   esac
41600	   ac_prev=
41601	 elif test "x$ac_word" = "x-arch"; then
41602	   ac_prev=arch
41603	 fi
41604       done
41605fi
41606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41607    if test $ac_cv_c_bigendian = unknown; then
41608      # See if sys/param.h defines the BYTE_ORDER macro.
41609      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41610/* end confdefs.h.  */
41611#include <sys/types.h>
41612	     #include <sys/param.h>
41613
41614int
41615main ()
41616{
41617#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41618		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41619		     && LITTLE_ENDIAN)
41620	      bogus endian macros
41621	     #endif
41622
41623  ;
41624  return 0;
41625}
41626_ACEOF
41627if ac_fn_cxx_try_compile "$LINENO"; then :
41628  # It does; now see whether it defined to BIG_ENDIAN or not.
41629	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41630/* end confdefs.h.  */
41631#include <sys/types.h>
41632		#include <sys/param.h>
41633
41634int
41635main ()
41636{
41637#if BYTE_ORDER != BIG_ENDIAN
41638		 not big endian
41639		#endif
41640
41641  ;
41642  return 0;
41643}
41644_ACEOF
41645if ac_fn_cxx_try_compile "$LINENO"; then :
41646  ac_cv_c_bigendian=yes
41647else
41648  ac_cv_c_bigendian=no
41649fi
41650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41651fi
41652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41653    fi
41654    if test $ac_cv_c_bigendian = unknown; then
41655      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41656      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41657/* end confdefs.h.  */
41658#include <limits.h>
41659
41660int
41661main ()
41662{
41663#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41664	      bogus endian macros
41665	     #endif
41666
41667  ;
41668  return 0;
41669}
41670_ACEOF
41671if ac_fn_cxx_try_compile "$LINENO"; then :
41672  # It does; now see whether it defined to _BIG_ENDIAN or not.
41673	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41674/* end confdefs.h.  */
41675#include <limits.h>
41676
41677int
41678main ()
41679{
41680#ifndef _BIG_ENDIAN
41681		 not big endian
41682		#endif
41683
41684  ;
41685  return 0;
41686}
41687_ACEOF
41688if ac_fn_cxx_try_compile "$LINENO"; then :
41689  ac_cv_c_bigendian=yes
41690else
41691  ac_cv_c_bigendian=no
41692fi
41693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41694fi
41695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41696    fi
41697    if test $ac_cv_c_bigendian = unknown; then
41698      # Compile a test program.
41699      if test "$cross_compiling" = yes; then :
41700  # Try to guess by grepping values from an object file.
41701	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41702/* end confdefs.h.  */
41703short int ascii_mm[] =
41704		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41705		short int ascii_ii[] =
41706		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41707		int use_ascii (int i) {
41708		  return ascii_mm[i] + ascii_ii[i];
41709		}
41710		short int ebcdic_ii[] =
41711		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41712		short int ebcdic_mm[] =
41713		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41714		int use_ebcdic (int i) {
41715		  return ebcdic_mm[i] + ebcdic_ii[i];
41716		}
41717		extern int foo;
41718
41719int
41720main ()
41721{
41722return use_ascii (foo) == use_ebcdic (foo);
41723  ;
41724  return 0;
41725}
41726_ACEOF
41727if ac_fn_cxx_try_compile "$LINENO"; then :
41728  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41729	      ac_cv_c_bigendian=yes
41730	    fi
41731	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41732	      if test "$ac_cv_c_bigendian" = unknown; then
41733		ac_cv_c_bigendian=no
41734	      else
41735		# finding both strings is unlikely to happen, but who knows?
41736		ac_cv_c_bigendian=unknown
41737	      fi
41738	    fi
41739fi
41740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41741else
41742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41743/* end confdefs.h.  */
41744$ac_includes_default
41745int
41746main ()
41747{
41748
41749	     /* Are we little or big endian?  From Harbison&Steele.  */
41750	     union
41751	     {
41752	       long int l;
41753	       char c[sizeof (long int)];
41754	     } u;
41755	     u.l = 1;
41756	     return u.c[sizeof (long int) - 1] == 1;
41757
41758  ;
41759  return 0;
41760}
41761_ACEOF
41762if ac_fn_cxx_try_run "$LINENO"; then :
41763  ac_cv_c_bigendian=no
41764else
41765  ac_cv_c_bigendian=yes
41766fi
41767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41768  conftest.$ac_objext conftest.beam conftest.$ac_ext
41769fi
41770
41771    fi
41772fi
41773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41774$as_echo "$ac_cv_c_bigendian" >&6; }
41775 case $ac_cv_c_bigendian in #(
41776   yes)
41777     ENDIAN="big";; #(
41778   no)
41779     ENDIAN="little" ;; #(
41780   universal)
41781     ENDIAN="universal_endianness"
41782     ;; #(
41783   *)
41784     ENDIAN="unknown" ;;
41785 esac
41786
41787
41788  if test "x$ENDIAN" = xuniversal_endianness; then
41789    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41790  fi
41791  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41792    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
41793  fi
41794
41795
41796# Configure flags for the tools
41797
41798  ###############################################################################
41799  #
41800  # How to compile shared libraries.
41801  #
41802
41803  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41804    PICFLAG="-fPIC"
41805    C_FLAG_REORDER=''
41806    CXX_FLAG_REORDER=''
41807
41808    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41809      # Linking is different on MacOSX
41810      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41811      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41812      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41813      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41814      SET_SHARED_LIBRARY_MAPFILE=''
41815    else
41816      # Default works for linux, might work on other platforms as well.
41817      SHARED_LIBRARY_FLAGS='-shared'
41818      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41819      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41820      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41821      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41822    fi
41823  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41824    PICFLAG=''
41825    C_FLAG_REORDER=''
41826    CXX_FLAG_REORDER=''
41827
41828    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41829      # Linking is different on MacOSX
41830      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41831      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41832      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41833      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41834      SET_SHARED_LIBRARY_MAPFILE=''
41835    else
41836      # Default works for linux, might work on other platforms as well.
41837      SHARED_LIBRARY_FLAGS='-shared'
41838      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41839      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41840      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41841      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41842    fi
41843  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41844    PICFLAG="-KPIC"
41845    C_FLAG_REORDER='-xF'
41846    CXX_FLAG_REORDER='-xF'
41847    SHARED_LIBRARY_FLAGS="-G"
41848    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41849    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41850    SET_SHARED_LIBRARY_NAME=''
41851    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41852  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41853    PICFLAG="-qpic=large"
41854    C_FLAG_REORDER=''
41855    CXX_FLAG_REORDER=''
41856    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41857    SET_EXECUTABLE_ORIGIN=""
41858    SET_SHARED_LIBRARY_ORIGIN=''
41859    SET_SHARED_LIBRARY_NAME=''
41860    SET_SHARED_LIBRARY_MAPFILE=''
41861  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41862    PICFLAG=""
41863    C_FLAG_REORDER=''
41864    CXX_FLAG_REORDER=''
41865    SHARED_LIBRARY_FLAGS="-LD"
41866    SET_EXECUTABLE_ORIGIN=''
41867    SET_SHARED_LIBRARY_ORIGIN=''
41868    SET_SHARED_LIBRARY_NAME=''
41869    SET_SHARED_LIBRARY_MAPFILE=''
41870  fi
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41881    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41882    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41883    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41884  fi
41885  # The (cross) compiler is now configured, we can now test capabilities
41886  # of the target platform.
41887
41888
41889
41890  ###############################################################################
41891  #
41892  # Setup the opt flags for different compilers
41893  # and different operating systems.
41894  #
41895
41896  # FIXME: this was indirectly the old default, but just inherited.
41897  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41898  #   C_FLAG_DEPS="-MMD -MF"
41899  # fi
41900
41901  # Generate make dependency files
41902  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41903    C_FLAG_DEPS="-MMD -MF"
41904  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41905    C_FLAG_DEPS="-MMD -MF"
41906  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41907    C_FLAG_DEPS="-xMMD -xMF"
41908  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41909    C_FLAG_DEPS="-qmakedep=gcc -MF"
41910  fi
41911  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41912
41913
41914
41915  # Debug symbols
41916  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41917    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41918      # reduce from default "-g2" option to save space
41919      CFLAGS_DEBUG_SYMBOLS="-g1"
41920      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41921    else
41922      CFLAGS_DEBUG_SYMBOLS="-g"
41923      CXXFLAGS_DEBUG_SYMBOLS="-g"
41924    fi
41925  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41926    CFLAGS_DEBUG_SYMBOLS="-g"
41927    CXXFLAGS_DEBUG_SYMBOLS="-g"
41928  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41929    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41930    # FIXME: likely a bug, this disables debug symbols rather than enables them
41931    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41932  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41933    CFLAGS_DEBUG_SYMBOLS="-g"
41934    CXXFLAGS_DEBUG_SYMBOLS="-g"
41935  fi
41936
41937
41938
41939  # bounds, memory and behavior checking options
41940  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41941    case $DEBUG_LEVEL in
41942    release )
41943      # no adjustment
41944      ;;
41945    fastdebug )
41946      # Add compile time bounds checks.
41947      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41948      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41949      ;;
41950    slowdebug )
41951      # Add runtime bounds checks and symbol info.
41952      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
41953      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
41954      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
41955        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41956        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41957      fi
41958      ;;
41959    esac
41960  fi
41961
41962
41963
41964  # Optimization levels
41965  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41966    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41967
41968    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41969      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41970      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41971      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41972      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41973      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41974      C_O_FLAG_NONE="-xregs=no%frameptr"
41975      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41976      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41977      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41978      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41979      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41980      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41981        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41982        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41983      fi
41984    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41985      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41986      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41987      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41988      C_O_FLAG_DEBUG=""
41989      C_O_FLAG_NONE=""
41990      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41991      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41992      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41993      C_O_FLAG_DEBUG=""
41994      CXX_O_FLAG_NONE=""
41995    fi
41996  else
41997    # The remaining toolchains share opt flags between CC and CXX;
41998    # setup for C and duplicate afterwards.
41999    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42000      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42001        # On MacOSX we optimize for size, something
42002        # we should do for all platforms?
42003        C_O_FLAG_HIGHEST="-Os"
42004        C_O_FLAG_HI="-Os"
42005        C_O_FLAG_NORM="-Os"
42006      else
42007        C_O_FLAG_HIGHEST="-O3"
42008        C_O_FLAG_HI="-O3"
42009        C_O_FLAG_NORM="-O2"
42010      fi
42011      if test "x$HAS_CFLAG_OPTIMIZE_DEBUG" = "xtrue"; then
42012        C_O_FLAG_DEBUG="$CFLAG_OPTIMIZE_DEBUG_FLAG"
42013      else
42014        C_O_FLAG_DEBUG="-O0"
42015      fi
42016      C_O_FLAG_NONE="-O0"
42017    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42018      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42019        # On MacOSX we optimize for size, something
42020        # we should do for all platforms?
42021        C_O_FLAG_HIGHEST="-Os"
42022        C_O_FLAG_HI="-Os"
42023        C_O_FLAG_NORM="-Os"
42024      else
42025        C_O_FLAG_HIGHEST="-O3"
42026        C_O_FLAG_HI="-O3"
42027        C_O_FLAG_NORM="-O2"
42028      fi
42029      C_O_FLAG_DEBUG="-O0"
42030      C_O_FLAG_NONE="-O0"
42031    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42032      C_O_FLAG_HIGHEST="-O3"
42033      C_O_FLAG_HI="-O3 -qstrict"
42034      C_O_FLAG_NORM="-O2"
42035      C_O_FLAG_DEBUG="-qnoopt"
42036      C_O_FLAG_NONE="-qnoop"
42037    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42038      C_O_FLAG_HIGHEST="-O2"
42039      C_O_FLAG_HI="-O1"
42040      C_O_FLAG_NORM="-O1"
42041      C_O_FLAG_DEBUG="-Od"
42042      C_O_FLAG_NONE="-Od"
42043    fi
42044    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42045    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42046    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42047    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42048    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42049  fi
42050
42051  # Adjust optimization flags according to debug level.
42052  case $DEBUG_LEVEL in
42053    release )
42054      # no adjustment
42055      ;;
42056    fastdebug )
42057      # Not quite so much optimization
42058      C_O_FLAG_HI="$C_O_FLAG_NORM"
42059      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42060      ;;
42061    slowdebug )
42062      # Disable optimization
42063      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42064      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42065      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42066      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42067      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42068      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42069      ;;
42070  esac
42071
42072
42073
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084  # Special extras...
42085  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42086    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42087      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42088      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42089    fi
42090  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42091    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42092    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42093    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42094  fi
42095
42096  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42098$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42099  fi
42100
42101  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42102    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42103$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42104  fi
42105
42106  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42107    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42108$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42109  fi
42110
42111
42112# Check whether --with-extra-cflags was given.
42113if test "${with_extra_cflags+set}" = set; then :
42114  withval=$with_extra_cflags;
42115fi
42116
42117
42118
42119# Check whether --with-extra-cxxflags was given.
42120if test "${with_extra_cxxflags+set}" = set; then :
42121  withval=$with_extra_cxxflags;
42122fi
42123
42124
42125
42126# Check whether --with-extra-ldflags was given.
42127if test "${with_extra_ldflags+set}" = set; then :
42128  withval=$with_extra_ldflags;
42129fi
42130
42131
42132  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42133  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42134  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42135
42136  # Hotspot needs these set in their legacy form
42137  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42138  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42139  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42140
42141
42142
42143
42144
42145  ###############################################################################
42146  #
42147  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42148  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42149  #
42150
42151  # Setup compiler/platform specific flags into
42152  #    CFLAGS_JDK    - C Compiler flags
42153  #    CXXFLAGS_JDK  - C++ Compiler flags
42154  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42155  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42156    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42157        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42158    case $OPENJDK_TARGET_CPU_ARCH in
42159      arm )
42160        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42161        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42162        ;;
42163      ppc )
42164        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42165        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42166        ;;
42167      * )
42168        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42169        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42170        ;;
42171    esac
42172  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42173    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42174    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42175      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42176      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42177    fi
42178
42179    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42180    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42181  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42182    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42183    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42184  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42185    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42186    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42187    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42188    -DWIN32 -DIAL"
42189    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42190      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42191    else
42192      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42193    fi
42194  fi
42195
42196  ###############################################################################
42197
42198  # Adjust flags according to debug level.
42199  case $DEBUG_LEVEL in
42200    fastdebug | slowdebug )
42201      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42202      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42203      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42204      ;;
42205    release )
42206      ;;
42207    * )
42208      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42209      ;;
42210  esac
42211
42212  # Setup LP64
42213  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42214
42215  # Set some common defines. These works for all compilers, but assume
42216  # -D is universally accepted.
42217
42218  # Setup endianness
42219  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42220    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42221    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42222    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42223    #   Note: -Dmacro         is the same as    #define macro 1
42224    #         -Dmacro=        is the same as    #define macro
42225    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42226      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42227    else
42228      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42229    fi
42230  else
42231    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42232    # are defined in the system?
42233    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42234      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42235    else
42236      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42237    fi
42238  fi
42239
42240  # Setup target OS define. Use OS target name but in upper case.
42241  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42242  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42243
42244  # Setup target CPU
42245  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42246
42247  # Setup debug/release defines
42248  if test "x$DEBUG_LEVEL" = xrelease; then
42249    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42250    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42251      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42252    fi
42253  else
42254    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42255  fi
42256
42257  # Setup release name
42258  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42259
42260
42261  # Set some additional per-OS defines.
42262  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42263    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42264  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42265    # FIXME: PPC64 should not be here.
42266    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42267  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42268    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42269  fi
42270
42271  # Additional macosx handling
42272  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42273    # Setting these parameters makes it an error to link to macosx APIs that are
42274    # newer than the given OS version and makes the linked binaries compatible
42275    # even if built on a newer version of the OS.
42276    # The expected format is X.Y.Z
42277    MACOSX_VERSION_MIN=10.7.0
42278
42279
42280    # The macro takes the version with no dots, ex: 1070
42281    # Let the flags variables get resolved in make for easier override on make
42282    # command line.
42283    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42284    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42285  fi
42286
42287  # Setup some hard coded includes
42288  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42289      -I${JDK_OUTPUTDIR}/include \
42290      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42291      -I${JDK_TOPDIR}/src/share/javavm/export \
42292      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42293      -I${JDK_TOPDIR}/src/share/native/common \
42294      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42295
42296  # The shared libraries are compiled using the picflag.
42297  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42298  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42299
42300  # Executable flags
42301  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42302  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42303
42304
42305
42306
42307
42308
42309  # Setup LDFLAGS et al.
42310  #
42311
42312  # Now this is odd. The JDK native libraries have to link against libjvm.so
42313  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42314  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42315  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42316  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42317  # libraries will link to whatever is in memory. Yuck.
42318  #
42319  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42320  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42321    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42322    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42323      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42324    fi
42325    # TODO: make -debug optional "--disable-full-debug-symbols"
42326    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42327  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42328    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42329    # We have previously set HAS_GNU_HASH if this is the case
42330    if test -n "$HAS_GNU_HASH"; then
42331      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42332    fi
42333    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42334      # And since we now know that the linker is gnu, then add -z defs, to forbid
42335      # undefined symbols in object files.
42336      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42337      case $DEBUG_LEVEL in
42338        release )
42339          # tell linker to optimize libraries.
42340          # Should this be supplied to the OSS linker as well?
42341          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42342          ;;
42343        slowdebug )
42344          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42345            # do relocations at load
42346            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42347            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42348          fi
42349          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42350            # mark relocations read only
42351            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42352            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42353          fi
42354          ;;
42355        fastdebug )
42356          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42357            # mark relocations read only
42358            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42359            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42360          fi
42361          ;;
42362        * )
42363          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42364          ;;
42365        esac
42366    fi
42367  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42368    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42369    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42370  fi
42371
42372  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42373    # If undefined behaviour detection is enabled then we need to tell linker.
42374    case $DEBUG_LEVEL in
42375      release | fastdebug )
42376        ;;
42377      slowdebug )
42378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42379$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42380        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42381          # enable undefined behaviour checking
42382          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42383          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42384        fi
42385        ;;
42386      * )
42387        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42388        ;;
42389    esac
42390  fi
42391
42392  # Customize LDFLAGS for executables
42393
42394  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42395
42396  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42397    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42398      LDFLAGS_STACK_SIZE=1048576
42399    else
42400      LDFLAGS_STACK_SIZE=327680
42401    fi
42402    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42403  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42404    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42405  fi
42406
42407  # Customize LDFLAGS for libs
42408  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42409
42410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42411    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42412    LDFLAGS_JDKLIB_SUFFIX=""
42413  else
42414    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42415        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42416
42417    # On some platforms (mac) the linker warns about non existing -L dirs.
42418    # Add server first if available. Linking aginst client does not always produce the same results.
42419    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42420    # Default to server for other variants.
42421    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42422      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42423    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42424      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42425    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42426      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42427    else
42428      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42429    fi
42430
42431    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42432    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42433      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42434    fi
42435  fi
42436
42437
42438
42439
42440
42441
42442
42443
42444  # Some Zero and Shark settings.
42445  # ZERO_ARCHFLAG tells the compiler which mode to build for
42446  case "${OPENJDK_TARGET_CPU}" in
42447    s390)
42448      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42449      ;;
42450    *)
42451      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42452  esac
42453
42454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42455$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42456  supports=yes
42457
42458  saved_cflags="$CFLAGS"
42459  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42460  ac_ext=c
42461ac_cpp='$CPP $CPPFLAGS'
42462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42464ac_compiler_gnu=$ac_cv_c_compiler_gnu
42465
42466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42467/* end confdefs.h.  */
42468int i;
42469_ACEOF
42470if ac_fn_c_try_compile "$LINENO"; then :
42471
42472else
42473  supports=no
42474fi
42475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42476  ac_ext=cpp
42477ac_cpp='$CXXCPP $CPPFLAGS'
42478ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42479ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42480ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42481
42482  CFLAGS="$saved_cflags"
42483
42484  saved_cxxflags="$CXXFLAGS"
42485  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42486  ac_ext=cpp
42487ac_cpp='$CXXCPP $CPPFLAGS'
42488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42491
42492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42493/* end confdefs.h.  */
42494int i;
42495_ACEOF
42496if ac_fn_cxx_try_compile "$LINENO"; then :
42497
42498else
42499  supports=no
42500fi
42501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42502  ac_ext=cpp
42503ac_cpp='$CXXCPP $CPPFLAGS'
42504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42507
42508  CXXFLAGS="$saved_cxxflags"
42509
42510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42511$as_echo "$supports" >&6; }
42512  if test "x$supports" = "xyes" ; then
42513    :
42514  else
42515    ZERO_ARCHFLAG=""
42516  fi
42517
42518
42519
42520  # Check that the compiler supports -mX (or -qX on AIX) flags
42521  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42522
42523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42524$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42525  supports=yes
42526
42527  saved_cflags="$CFLAGS"
42528  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42529  ac_ext=c
42530ac_cpp='$CPP $CPPFLAGS'
42531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42533ac_compiler_gnu=$ac_cv_c_compiler_gnu
42534
42535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42536/* end confdefs.h.  */
42537int i;
42538_ACEOF
42539if ac_fn_c_try_compile "$LINENO"; then :
42540
42541else
42542  supports=no
42543fi
42544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42545  ac_ext=cpp
42546ac_cpp='$CXXCPP $CPPFLAGS'
42547ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42548ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42549ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42550
42551  CFLAGS="$saved_cflags"
42552
42553  saved_cxxflags="$CXXFLAGS"
42554  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42555  ac_ext=cpp
42556ac_cpp='$CXXCPP $CPPFLAGS'
42557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42560
42561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42562/* end confdefs.h.  */
42563int i;
42564_ACEOF
42565if ac_fn_cxx_try_compile "$LINENO"; then :
42566
42567else
42568  supports=no
42569fi
42570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42571  ac_ext=cpp
42572ac_cpp='$CXXCPP $CPPFLAGS'
42573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42576
42577  CXXFLAGS="$saved_cxxflags"
42578
42579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42580$as_echo "$supports" >&6; }
42581  if test "x$supports" = "xyes" ; then
42582    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42583  else
42584    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42585  fi
42586
42587
42588
42589  case "${TOOLCHAIN_TYPE}" in
42590    microsoft)
42591      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42592      ;;
42593    solstudio)
42594      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42595      ;;
42596    gcc)
42597      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42598      ;;
42599    clang)
42600      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42601      ;;
42602  esac
42603
42604
42605
42606# Setup debug symbols (need objcopy from the toolchain for that)
42607
42608  #
42609  # ENABLE_DEBUG_SYMBOLS
42610  # This must be done after the toolchain is setup, since we're looking at objcopy.
42611  #
42612  # Check whether --enable-debug-symbols was given.
42613if test "${enable_debug_symbols+set}" = set; then :
42614  enableval=$enable_debug_symbols;
42615fi
42616
42617
42618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42619$as_echo_n "checking if we should generate debug symbols... " >&6; }
42620
42621  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42622    # explicit enabling of enable-debug-symbols and can't find objcopy
42623    #   this is an error
42624    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42625  fi
42626
42627  if test "x$enable_debug_symbols" = "xyes"; then
42628    ENABLE_DEBUG_SYMBOLS=true
42629  elif test "x$enable_debug_symbols" = "xno"; then
42630    ENABLE_DEBUG_SYMBOLS=false
42631  else
42632    # Default is on if objcopy is found
42633    if test "x$OBJCOPY" != x; then
42634      ENABLE_DEBUG_SYMBOLS=true
42635    # MacOS X and Windows don't use objcopy but default is on for those OSes
42636    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42637      ENABLE_DEBUG_SYMBOLS=true
42638    else
42639      ENABLE_DEBUG_SYMBOLS=false
42640    fi
42641  fi
42642
42643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42644$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42645
42646  #
42647  # ZIP_DEBUGINFO_FILES
42648  #
42649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42650$as_echo_n "checking if we should zip debug-info files... " >&6; }
42651  # Check whether --enable-zip-debug-info was given.
42652if test "${enable_zip_debug_info+set}" = set; then :
42653  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42654else
42655  enable_zip_debug_info="yes"
42656fi
42657
42658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42659$as_echo "${enable_zip_debug_info}" >&6; }
42660
42661  if test "x${enable_zip_debug_info}" = "xno"; then
42662    ZIP_DEBUGINFO_FILES=false
42663  else
42664    ZIP_DEBUGINFO_FILES=true
42665  fi
42666
42667
42668
42669
42670
42671###############################################################################
42672#
42673# Check dependencies for external and internal libraries.
42674#
42675###############################################################################
42676
42677# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42678
42679  # When using cygwin or msys, we need a wrapper binary that renames
42680  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42681  # @files and rewrites these too! This wrapper binary is
42682  # called fixpath.
42683  FIXPATH=
42684  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42686$as_echo_n "checking if fixpath can be created... " >&6; }
42687    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42688    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42689    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42690      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42691      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42692      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42693      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42694    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42695      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42696      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42697
42698      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42699      # @ was chosen as separator to minimize risk of other tools messing around with it
42700      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42701      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42702
42703      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42704    fi
42705    rm -f $OUTPUT_ROOT/fixpath*
42706    cd $OUTPUT_ROOT
42707    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42708    cd $CURDIR
42709
42710    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42712$as_echo "no" >&6; }
42713      cat $OUTPUT_ROOT/fixpath1.log
42714      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42715    fi
42716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42717$as_echo "yes" >&6; }
42718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42719$as_echo_n "checking if fixpath.exe works... " >&6; }
42720    cd $OUTPUT_ROOT
42721    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42722    cd $CURDIR
42723    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42725$as_echo "no" >&6; }
42726      cat $OUTPUT_ROOT/fixpath2.log
42727      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42728    fi
42729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42730$as_echo "yes" >&6; }
42731    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42732  fi
42733
42734
42735
42736
42737
42738
42739  ###############################################################################
42740  #
42741  # OS specific settings that we never will need to probe.
42742  #
42743  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42745$as_echo_n "checking what is not needed on Linux?... " >&6; }
42746    PULSE_NOT_NEEDED=yes
42747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42748$as_echo "pulse" >&6; }
42749  fi
42750
42751  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42753$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42754    ALSA_NOT_NEEDED=yes
42755    PULSE_NOT_NEEDED=yes
42756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42757$as_echo "alsa pulse" >&6; }
42758  fi
42759
42760  if test "x$OPENJDK_TARGET_OS" = xaix; then
42761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42762$as_echo_n "checking what is not needed on AIX?... " >&6; }
42763    ALSA_NOT_NEEDED=yes
42764    PULSE_NOT_NEEDED=yes
42765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42766$as_echo "alsa pulse" >&6; }
42767  fi
42768
42769
42770  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42772$as_echo_n "checking what is not needed on Windows?... " >&6; }
42773    CUPS_NOT_NEEDED=yes
42774    ALSA_NOT_NEEDED=yes
42775    PULSE_NOT_NEEDED=yes
42776    X11_NOT_NEEDED=yes
42777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42778$as_echo "alsa cups pulse x11" >&6; }
42779  fi
42780
42781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42783$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42784    ALSA_NOT_NEEDED=yes
42785    PULSE_NOT_NEEDED=yes
42786    X11_NOT_NEEDED=yes
42787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42788$as_echo "alsa pulse x11" >&6; }
42789  fi
42790
42791  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42793$as_echo_n "checking what is not needed on bsd?... " >&6; }
42794    ALSA_NOT_NEEDED=yes
42795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42796$as_echo "alsa" >&6; }
42797  fi
42798
42799  if test "x$OPENJDK" = "xfalse"; then
42800    FREETYPE_NOT_NEEDED=yes
42801  fi
42802
42803  if test "x$SUPPORT_HEADFUL" = xno; then
42804    X11_NOT_NEEDED=yes
42805  fi
42806
42807
42808
42809  ###############################################################################
42810  #
42811  # Check for X Windows
42812  #
42813
42814  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42815  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42816  # --x-libraries for the sysroot, if that seems to be correct.
42817  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42818    if test "x$SYSROOT" != "x"; then
42819      if test "x$x_includes" = xNONE; then
42820        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42821          x_includes="$SYSROOT/usr/X11R6/include"
42822        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42823          x_includes="$SYSROOT/usr/include"
42824        fi
42825      fi
42826      if test "x$x_libraries" = xNONE; then
42827        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42828          x_libraries="$SYSROOT/usr/X11R6/lib"
42829        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42830          x_libraries="$SYSROOT/usr/lib64"
42831        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42832          x_libraries="$SYSROOT/usr/lib"
42833        fi
42834      fi
42835    fi
42836  fi
42837
42838  # Now let autoconf do it's magic
42839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42840$as_echo_n "checking for X... " >&6; }
42841
42842
42843# Check whether --with-x was given.
42844if test "${with_x+set}" = set; then :
42845  withval=$with_x;
42846fi
42847
42848# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42849if test "x$with_x" = xno; then
42850  # The user explicitly disabled X.
42851  have_x=disabled
42852else
42853  case $x_includes,$x_libraries in #(
42854    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42855    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42856  $as_echo_n "(cached) " >&6
42857else
42858  # One or both of the vars are not set, and there is no cached value.
42859ac_x_includes=no ac_x_libraries=no
42860rm -f -r conftest.dir
42861if mkdir conftest.dir; then
42862  cd conftest.dir
42863  cat >Imakefile <<'_ACEOF'
42864incroot:
42865	@echo incroot='${INCROOT}'
42866usrlibdir:
42867	@echo usrlibdir='${USRLIBDIR}'
42868libdir:
42869	@echo libdir='${LIBDIR}'
42870_ACEOF
42871  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42872    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42873    for ac_var in incroot usrlibdir libdir; do
42874      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42875    done
42876    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42877    for ac_extension in a so sl dylib la dll; do
42878      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42879	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42880	ac_im_usrlibdir=$ac_im_libdir; break
42881      fi
42882    done
42883    # Screen out bogus values from the imake configuration.  They are
42884    # bogus both because they are the default anyway, and because
42885    # using them would break gcc on systems where it needs fixed includes.
42886    case $ac_im_incroot in
42887	/usr/include) ac_x_includes= ;;
42888	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42889    esac
42890    case $ac_im_usrlibdir in
42891	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42892	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42893    esac
42894  fi
42895  cd ..
42896  rm -f -r conftest.dir
42897fi
42898
42899# Standard set of common directories for X headers.
42900# Check X11 before X11Rn because it is often a symlink to the current release.
42901ac_x_header_dirs='
42902/usr/X11/include
42903/usr/X11R7/include
42904/usr/X11R6/include
42905/usr/X11R5/include
42906/usr/X11R4/include
42907
42908/usr/include/X11
42909/usr/include/X11R7
42910/usr/include/X11R6
42911/usr/include/X11R5
42912/usr/include/X11R4
42913
42914/usr/local/X11/include
42915/usr/local/X11R7/include
42916/usr/local/X11R6/include
42917/usr/local/X11R5/include
42918/usr/local/X11R4/include
42919
42920/usr/local/include/X11
42921/usr/local/include/X11R7
42922/usr/local/include/X11R6
42923/usr/local/include/X11R5
42924/usr/local/include/X11R4
42925
42926/usr/X386/include
42927/usr/x386/include
42928/usr/XFree86/include/X11
42929
42930/usr/include
42931/usr/local/include
42932/usr/unsupported/include
42933/usr/athena/include
42934/usr/local/x11r5/include
42935/usr/lpp/Xamples/include
42936
42937/usr/openwin/include
42938/usr/openwin/share/include'
42939
42940if test "$ac_x_includes" = no; then
42941  # Guess where to find include files, by looking for Xlib.h.
42942  # First, try using that file with no special directory specified.
42943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42944/* end confdefs.h.  */
42945#include <X11/Xlib.h>
42946_ACEOF
42947if ac_fn_cxx_try_cpp "$LINENO"; then :
42948  # We can compile using X headers with no special include directory.
42949ac_x_includes=
42950else
42951  for ac_dir in $ac_x_header_dirs; do
42952  if test -r "$ac_dir/X11/Xlib.h"; then
42953    ac_x_includes=$ac_dir
42954    break
42955  fi
42956done
42957fi
42958rm -f conftest.err conftest.i conftest.$ac_ext
42959fi # $ac_x_includes = no
42960
42961if test "$ac_x_libraries" = no; then
42962  # Check for the libraries.
42963  # See if we find them without any special options.
42964  # Don't add to $LIBS permanently.
42965  ac_save_LIBS=$LIBS
42966  LIBS="-lX11 $LIBS"
42967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42968/* end confdefs.h.  */
42969#include <X11/Xlib.h>
42970int
42971main ()
42972{
42973XrmInitialize ()
42974  ;
42975  return 0;
42976}
42977_ACEOF
42978if ac_fn_cxx_try_link "$LINENO"; then :
42979  LIBS=$ac_save_LIBS
42980# We can link X programs with no special library path.
42981ac_x_libraries=
42982else
42983  LIBS=$ac_save_LIBS
42984for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42985do
42986  # Don't even attempt the hair of trying to link an X program!
42987  for ac_extension in a so sl dylib la dll; do
42988    if test -r "$ac_dir/libX11.$ac_extension"; then
42989      ac_x_libraries=$ac_dir
42990      break 2
42991    fi
42992  done
42993done
42994fi
42995rm -f core conftest.err conftest.$ac_objext \
42996    conftest$ac_exeext conftest.$ac_ext
42997fi # $ac_x_libraries = no
42998
42999case $ac_x_includes,$ac_x_libraries in #(
43000  no,* | *,no | *\'*)
43001    # Didn't find X, or a directory has "'" in its name.
43002    ac_cv_have_x="have_x=no";; #(
43003  *)
43004    # Record where we found X for the cache.
43005    ac_cv_have_x="have_x=yes\
43006	ac_x_includes='$ac_x_includes'\
43007	ac_x_libraries='$ac_x_libraries'"
43008esac
43009fi
43010;; #(
43011    *) have_x=yes;;
43012  esac
43013  eval "$ac_cv_have_x"
43014fi # $with_x != no
43015
43016if test "$have_x" != yes; then
43017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43018$as_echo "$have_x" >&6; }
43019  no_x=yes
43020else
43021  # If each of the values was on the command line, it overrides each guess.
43022  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43023  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43024  # Update the cache value to reflect the command line values.
43025  ac_cv_have_x="have_x=yes\
43026	ac_x_includes='$x_includes'\
43027	ac_x_libraries='$x_libraries'"
43028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43029$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43030fi
43031
43032  if test "$no_x" = yes; then
43033  # Not all programs may use this symbol, but it does not hurt to define it.
43034
43035$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43036
43037  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43038else
43039  if test -n "$x_includes"; then
43040    X_CFLAGS="$X_CFLAGS -I$x_includes"
43041  fi
43042
43043  # It would also be nice to do this for all -L options, not just this one.
43044  if test -n "$x_libraries"; then
43045    X_LIBS="$X_LIBS -L$x_libraries"
43046    # For Solaris; some versions of Sun CC require a space after -R and
43047    # others require no space.  Words are not sufficient . . . .
43048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43049$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43050    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43051    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43052    ac_cxx_werror_flag=yes
43053    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43054/* end confdefs.h.  */
43055
43056int
43057main ()
43058{
43059
43060  ;
43061  return 0;
43062}
43063_ACEOF
43064if ac_fn_cxx_try_link "$LINENO"; then :
43065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43066$as_echo "no" >&6; }
43067       X_LIBS="$X_LIBS -R$x_libraries"
43068else
43069  LIBS="$ac_xsave_LIBS -R $x_libraries"
43070       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43071/* end confdefs.h.  */
43072
43073int
43074main ()
43075{
43076
43077  ;
43078  return 0;
43079}
43080_ACEOF
43081if ac_fn_cxx_try_link "$LINENO"; then :
43082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43083$as_echo "yes" >&6; }
43084	  X_LIBS="$X_LIBS -R $x_libraries"
43085else
43086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43087$as_echo "neither works" >&6; }
43088fi
43089rm -f core conftest.err conftest.$ac_objext \
43090    conftest$ac_exeext conftest.$ac_ext
43091fi
43092rm -f core conftest.err conftest.$ac_objext \
43093    conftest$ac_exeext conftest.$ac_ext
43094    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43095    LIBS=$ac_xsave_LIBS
43096  fi
43097
43098  # Check for system-dependent libraries X programs must link with.
43099  # Do this before checking for the system-independent R6 libraries
43100  # (-lICE), since we may need -lsocket or whatever for X linking.
43101
43102  if test "$ISC" = yes; then
43103    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43104  else
43105    # Martyn Johnson says this is needed for Ultrix, if the X
43106    # libraries were built with DECnet support.  And Karl Berry says
43107    # the Alpha needs dnet_stub (dnet does not exist).
43108    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43109    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43110/* end confdefs.h.  */
43111
43112/* Override any GCC internal prototype to avoid an error.
43113   Use char because int might match the return type of a GCC
43114   builtin and then its argument prototype would still apply.  */
43115#ifdef __cplusplus
43116extern "C"
43117#endif
43118char XOpenDisplay ();
43119int
43120main ()
43121{
43122return XOpenDisplay ();
43123  ;
43124  return 0;
43125}
43126_ACEOF
43127if ac_fn_cxx_try_link "$LINENO"; then :
43128
43129else
43130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43131$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43132if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43133  $as_echo_n "(cached) " >&6
43134else
43135  ac_check_lib_save_LIBS=$LIBS
43136LIBS="-ldnet  $LIBS"
43137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43138/* end confdefs.h.  */
43139
43140/* Override any GCC internal prototype to avoid an error.
43141   Use char because int might match the return type of a GCC
43142   builtin and then its argument prototype would still apply.  */
43143#ifdef __cplusplus
43144extern "C"
43145#endif
43146char dnet_ntoa ();
43147int
43148main ()
43149{
43150return dnet_ntoa ();
43151  ;
43152  return 0;
43153}
43154_ACEOF
43155if ac_fn_cxx_try_link "$LINENO"; then :
43156  ac_cv_lib_dnet_dnet_ntoa=yes
43157else
43158  ac_cv_lib_dnet_dnet_ntoa=no
43159fi
43160rm -f core conftest.err conftest.$ac_objext \
43161    conftest$ac_exeext conftest.$ac_ext
43162LIBS=$ac_check_lib_save_LIBS
43163fi
43164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43165$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43166if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43167  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43168fi
43169
43170    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43172$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43173if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43174  $as_echo_n "(cached) " >&6
43175else
43176  ac_check_lib_save_LIBS=$LIBS
43177LIBS="-ldnet_stub  $LIBS"
43178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43179/* end confdefs.h.  */
43180
43181/* Override any GCC internal prototype to avoid an error.
43182   Use char because int might match the return type of a GCC
43183   builtin and then its argument prototype would still apply.  */
43184#ifdef __cplusplus
43185extern "C"
43186#endif
43187char dnet_ntoa ();
43188int
43189main ()
43190{
43191return dnet_ntoa ();
43192  ;
43193  return 0;
43194}
43195_ACEOF
43196if ac_fn_cxx_try_link "$LINENO"; then :
43197  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43198else
43199  ac_cv_lib_dnet_stub_dnet_ntoa=no
43200fi
43201rm -f core conftest.err conftest.$ac_objext \
43202    conftest$ac_exeext conftest.$ac_ext
43203LIBS=$ac_check_lib_save_LIBS
43204fi
43205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43206$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43207if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43208  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43209fi
43210
43211    fi
43212fi
43213rm -f core conftest.err conftest.$ac_objext \
43214    conftest$ac_exeext conftest.$ac_ext
43215    LIBS="$ac_xsave_LIBS"
43216
43217    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43218    # to get the SysV transport functions.
43219    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43220    # needs -lnsl.
43221    # The nsl library prevents programs from opening the X display
43222    # on Irix 5.2, according to T.E. Dickey.
43223    # The functions gethostbyname, getservbyname, and inet_addr are
43224    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43225    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43226if test "x$ac_cv_func_gethostbyname" = xyes; then :
43227
43228fi
43229
43230    if test $ac_cv_func_gethostbyname = no; then
43231      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43232$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43233if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43234  $as_echo_n "(cached) " >&6
43235else
43236  ac_check_lib_save_LIBS=$LIBS
43237LIBS="-lnsl  $LIBS"
43238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43239/* end confdefs.h.  */
43240
43241/* Override any GCC internal prototype to avoid an error.
43242   Use char because int might match the return type of a GCC
43243   builtin and then its argument prototype would still apply.  */
43244#ifdef __cplusplus
43245extern "C"
43246#endif
43247char gethostbyname ();
43248int
43249main ()
43250{
43251return gethostbyname ();
43252  ;
43253  return 0;
43254}
43255_ACEOF
43256if ac_fn_cxx_try_link "$LINENO"; then :
43257  ac_cv_lib_nsl_gethostbyname=yes
43258else
43259  ac_cv_lib_nsl_gethostbyname=no
43260fi
43261rm -f core conftest.err conftest.$ac_objext \
43262    conftest$ac_exeext conftest.$ac_ext
43263LIBS=$ac_check_lib_save_LIBS
43264fi
43265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43266$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43267if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43268  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43269fi
43270
43271      if test $ac_cv_lib_nsl_gethostbyname = no; then
43272	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43273$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43274if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43275  $as_echo_n "(cached) " >&6
43276else
43277  ac_check_lib_save_LIBS=$LIBS
43278LIBS="-lbsd  $LIBS"
43279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43280/* end confdefs.h.  */
43281
43282/* Override any GCC internal prototype to avoid an error.
43283   Use char because int might match the return type of a GCC
43284   builtin and then its argument prototype would still apply.  */
43285#ifdef __cplusplus
43286extern "C"
43287#endif
43288char gethostbyname ();
43289int
43290main ()
43291{
43292return gethostbyname ();
43293  ;
43294  return 0;
43295}
43296_ACEOF
43297if ac_fn_cxx_try_link "$LINENO"; then :
43298  ac_cv_lib_bsd_gethostbyname=yes
43299else
43300  ac_cv_lib_bsd_gethostbyname=no
43301fi
43302rm -f core conftest.err conftest.$ac_objext \
43303    conftest$ac_exeext conftest.$ac_ext
43304LIBS=$ac_check_lib_save_LIBS
43305fi
43306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43307$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43308if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43309  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43310fi
43311
43312      fi
43313    fi
43314
43315    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43316    # socket/setsockopt and other routines are undefined under SCO ODT
43317    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43318    # on later versions), says Simon Leinen: it contains gethostby*
43319    # variants that don't use the name server (or something).  -lsocket
43320    # must be given before -lnsl if both are needed.  We assume that
43321    # if connect needs -lnsl, so does gethostbyname.
43322    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43323if test "x$ac_cv_func_connect" = xyes; then :
43324
43325fi
43326
43327    if test $ac_cv_func_connect = no; then
43328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43329$as_echo_n "checking for connect in -lsocket... " >&6; }
43330if ${ac_cv_lib_socket_connect+:} false; then :
43331  $as_echo_n "(cached) " >&6
43332else
43333  ac_check_lib_save_LIBS=$LIBS
43334LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43336/* end confdefs.h.  */
43337
43338/* Override any GCC internal prototype to avoid an error.
43339   Use char because int might match the return type of a GCC
43340   builtin and then its argument prototype would still apply.  */
43341#ifdef __cplusplus
43342extern "C"
43343#endif
43344char connect ();
43345int
43346main ()
43347{
43348return connect ();
43349  ;
43350  return 0;
43351}
43352_ACEOF
43353if ac_fn_cxx_try_link "$LINENO"; then :
43354  ac_cv_lib_socket_connect=yes
43355else
43356  ac_cv_lib_socket_connect=no
43357fi
43358rm -f core conftest.err conftest.$ac_objext \
43359    conftest$ac_exeext conftest.$ac_ext
43360LIBS=$ac_check_lib_save_LIBS
43361fi
43362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43363$as_echo "$ac_cv_lib_socket_connect" >&6; }
43364if test "x$ac_cv_lib_socket_connect" = xyes; then :
43365  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43366fi
43367
43368    fi
43369
43370    # Guillermo Gomez says -lposix is necessary on A/UX.
43371    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43372if test "x$ac_cv_func_remove" = xyes; then :
43373
43374fi
43375
43376    if test $ac_cv_func_remove = no; then
43377      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43378$as_echo_n "checking for remove in -lposix... " >&6; }
43379if ${ac_cv_lib_posix_remove+:} false; then :
43380  $as_echo_n "(cached) " >&6
43381else
43382  ac_check_lib_save_LIBS=$LIBS
43383LIBS="-lposix  $LIBS"
43384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43385/* end confdefs.h.  */
43386
43387/* Override any GCC internal prototype to avoid an error.
43388   Use char because int might match the return type of a GCC
43389   builtin and then its argument prototype would still apply.  */
43390#ifdef __cplusplus
43391extern "C"
43392#endif
43393char remove ();
43394int
43395main ()
43396{
43397return remove ();
43398  ;
43399  return 0;
43400}
43401_ACEOF
43402if ac_fn_cxx_try_link "$LINENO"; then :
43403  ac_cv_lib_posix_remove=yes
43404else
43405  ac_cv_lib_posix_remove=no
43406fi
43407rm -f core conftest.err conftest.$ac_objext \
43408    conftest$ac_exeext conftest.$ac_ext
43409LIBS=$ac_check_lib_save_LIBS
43410fi
43411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43412$as_echo "$ac_cv_lib_posix_remove" >&6; }
43413if test "x$ac_cv_lib_posix_remove" = xyes; then :
43414  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43415fi
43416
43417    fi
43418
43419    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43420    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43421if test "x$ac_cv_func_shmat" = xyes; then :
43422
43423fi
43424
43425    if test $ac_cv_func_shmat = no; then
43426      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43427$as_echo_n "checking for shmat in -lipc... " >&6; }
43428if ${ac_cv_lib_ipc_shmat+:} false; then :
43429  $as_echo_n "(cached) " >&6
43430else
43431  ac_check_lib_save_LIBS=$LIBS
43432LIBS="-lipc  $LIBS"
43433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43434/* end confdefs.h.  */
43435
43436/* Override any GCC internal prototype to avoid an error.
43437   Use char because int might match the return type of a GCC
43438   builtin and then its argument prototype would still apply.  */
43439#ifdef __cplusplus
43440extern "C"
43441#endif
43442char shmat ();
43443int
43444main ()
43445{
43446return shmat ();
43447  ;
43448  return 0;
43449}
43450_ACEOF
43451if ac_fn_cxx_try_link "$LINENO"; then :
43452  ac_cv_lib_ipc_shmat=yes
43453else
43454  ac_cv_lib_ipc_shmat=no
43455fi
43456rm -f core conftest.err conftest.$ac_objext \
43457    conftest$ac_exeext conftest.$ac_ext
43458LIBS=$ac_check_lib_save_LIBS
43459fi
43460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43461$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43462if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43463  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43464fi
43465
43466    fi
43467  fi
43468
43469  # Check for libraries that X11R6 Xt/Xaw programs need.
43470  ac_save_LDFLAGS=$LDFLAGS
43471  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43472  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43473  # check for ICE first), but we must link in the order -lSM -lICE or
43474  # we get undefined symbols.  So assume we have SM if we have ICE.
43475  # These have to be linked with before -lX11, unlike the other
43476  # libraries we check for below, so use a different variable.
43477  # John Interrante, Karl Berry
43478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43479$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43480if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43481  $as_echo_n "(cached) " >&6
43482else
43483  ac_check_lib_save_LIBS=$LIBS
43484LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43486/* end confdefs.h.  */
43487
43488/* Override any GCC internal prototype to avoid an error.
43489   Use char because int might match the return type of a GCC
43490   builtin and then its argument prototype would still apply.  */
43491#ifdef __cplusplus
43492extern "C"
43493#endif
43494char IceConnectionNumber ();
43495int
43496main ()
43497{
43498return IceConnectionNumber ();
43499  ;
43500  return 0;
43501}
43502_ACEOF
43503if ac_fn_cxx_try_link "$LINENO"; then :
43504  ac_cv_lib_ICE_IceConnectionNumber=yes
43505else
43506  ac_cv_lib_ICE_IceConnectionNumber=no
43507fi
43508rm -f core conftest.err conftest.$ac_objext \
43509    conftest$ac_exeext conftest.$ac_ext
43510LIBS=$ac_check_lib_save_LIBS
43511fi
43512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43513$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43514if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43515  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43516fi
43517
43518  LDFLAGS=$ac_save_LDFLAGS
43519
43520fi
43521
43522
43523  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43524  # this doesn't make sense so we remove it.
43525  if test "x$COMPILE_TYPE" = xcross; then
43526    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43527  fi
43528
43529  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43530
43531  # Print a helpful message on how to acquire the necessary build dependency.
43532  # x11 is the help tag: freetype, cups, pulse, alsa etc
43533  MISSING_DEPENDENCY=x11
43534
43535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43536    cygwin_help $MISSING_DEPENDENCY
43537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43538    msys_help $MISSING_DEPENDENCY
43539  else
43540    PKGHANDLER_COMMAND=
43541
43542    case $PKGHANDLER in
43543      apt-get)
43544        apt_help     $MISSING_DEPENDENCY ;;
43545      yum)
43546        yum_help     $MISSING_DEPENDENCY ;;
43547      port)
43548        port_help    $MISSING_DEPENDENCY ;;
43549      pkgutil)
43550        pkgutil_help $MISSING_DEPENDENCY ;;
43551      pkgadd)
43552        pkgadd_help  $MISSING_DEPENDENCY ;;
43553    esac
43554
43555    if test "x$PKGHANDLER_COMMAND" != x; then
43556      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43557    fi
43558  fi
43559
43560    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43561  fi
43562
43563  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43564    OPENWIN_HOME="/usr/openwin"
43565    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43566    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43567        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43568        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43569        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43570  fi
43571
43572  #
43573  # Weird Sol10 something check...TODO change to try compile
43574  #
43575  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43576    if test "`uname -r`" = "5.10"; then
43577      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43578        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43579      fi
43580    fi
43581  fi
43582
43583  ac_ext=c
43584ac_cpp='$CPP $CPPFLAGS'
43585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43587ac_compiler_gnu=$ac_cv_c_compiler_gnu
43588
43589  OLD_CFLAGS="$CFLAGS"
43590  CFLAGS="$CFLAGS $X_CFLAGS"
43591
43592  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43593  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43594do :
43595  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43596ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43597        # include <X11/Xlib.h>
43598        # include <X11/Xutil.h>
43599
43600
43601"
43602if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43603  cat >>confdefs.h <<_ACEOF
43604#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43605_ACEOF
43606 X11_A_OK=yes
43607else
43608  X11_A_OK=no; break
43609fi
43610
43611done
43612
43613
43614  CFLAGS="$OLD_CFLAGS"
43615  ac_ext=cpp
43616ac_cpp='$CXXCPP $CPPFLAGS'
43617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43620
43621
43622  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43623
43624  # Print a helpful message on how to acquire the necessary build dependency.
43625  # x11 is the help tag: freetype, cups, pulse, alsa etc
43626  MISSING_DEPENDENCY=x11
43627
43628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43629    cygwin_help $MISSING_DEPENDENCY
43630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43631    msys_help $MISSING_DEPENDENCY
43632  else
43633    PKGHANDLER_COMMAND=
43634
43635    case $PKGHANDLER in
43636      apt-get)
43637        apt_help     $MISSING_DEPENDENCY ;;
43638      yum)
43639        yum_help     $MISSING_DEPENDENCY ;;
43640      port)
43641        port_help    $MISSING_DEPENDENCY ;;
43642      pkgutil)
43643        pkgutil_help $MISSING_DEPENDENCY ;;
43644      pkgadd)
43645        pkgadd_help  $MISSING_DEPENDENCY ;;
43646    esac
43647
43648    if test "x$PKGHANDLER_COMMAND" != x; then
43649      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43650    fi
43651  fi
43652
43653    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43654  fi
43655
43656
43657
43658
43659
43660
43661  ###############################################################################
43662  #
43663  # The common unix printing system cups is used to print from java.
43664  #
43665
43666# Check whether --with-cups was given.
43667if test "${with_cups+set}" = set; then :
43668  withval=$with_cups;
43669fi
43670
43671
43672# Check whether --with-cups-include was given.
43673if test "${with_cups_include+set}" = set; then :
43674  withval=$with_cups_include;
43675fi
43676
43677
43678  if test "x$CUPS_NOT_NEEDED" = xyes; then
43679    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43680      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43681$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43682    fi
43683    CUPS_CFLAGS=
43684  else
43685    CUPS_FOUND=no
43686
43687    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43688      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43689    fi
43690
43691    if test "x${with_cups}" != x; then
43692      CUPS_CFLAGS="-I${with_cups}/include"
43693      CUPS_FOUND=yes
43694    fi
43695    if test "x${with_cups_include}" != x; then
43696      CUPS_CFLAGS="-I${with_cups_include}"
43697      CUPS_FOUND=yes
43698    fi
43699    if test "x$CUPS_FOUND" = xno; then
43700
43701
43702  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43703    # Source the builddeps file again, to make sure it uses the latest variables!
43704    . $builddepsfile
43705    # Look for a target and build machine specific resource!
43706    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43707    if test "x$resource" = x; then
43708      # Ok, lets instead look for a target specific resource
43709      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43710    fi
43711    if test "x$resource" = x; then
43712      # Ok, lets instead look for a build specific resource
43713      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43714    fi
43715    if test "x$resource" = x; then
43716      # Ok, lets instead look for a generic resource
43717      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43718      resource=${builddep_cups}
43719    fi
43720    if test "x$resource" != x; then
43721      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43722$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43723      # If the resource in the builddeps.conf file is an existing directory,
43724      # for example /java/linux/cups
43725      if test -d ${resource}; then
43726        depdir=${resource}
43727      else
43728
43729  # cups is for example mymodule
43730  # $resource is for example libs/general/libmymod_1_2_3.zip
43731  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43732  # $with_builddeps_dir is for example /localhome/builddeps
43733  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43734  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43735  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43736  filename=`basename $resource`
43737  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43738  filebase=${filename%%.*}
43739  extension=${filename#*.}
43740  installdir=$with_builddeps_dir/$filebase
43741  if test ! -f $installdir/$filename.unpacked; then
43742    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43743$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43744    if test ! -d $installdir; then
43745      mkdir -p $installdir
43746    fi
43747    if test ! -d $installdir; then
43748      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43749    fi
43750    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43751    touch $tmpfile
43752    if test ! -f $tmpfile; then
43753      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43754    fi
43755
43756  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43757  # $tmpfile is the local file name for the downloaded file.
43758  VALID_TOOL=no
43759  if test "x$BDEPS_FTP" = xwget; then
43760    VALID_TOOL=yes
43761    wget -O $tmpfile $with_builddeps_server/$resource
43762  fi
43763  if test "x$BDEPS_FTP" = xlftp; then
43764    VALID_TOOL=yes
43765    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43766  fi
43767  if test "x$BDEPS_FTP" = xftp; then
43768    VALID_TOOL=yes
43769    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43770    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43771    FTPUSERPWD=${FTPSERVER%%@*}
43772    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43773      FTPUSER=${userpwd%%:*}
43774      FTPPWD=${userpwd#*@}
43775      FTPSERVER=${FTPSERVER#*@}
43776    else
43777      FTPUSER=ftp
43778      FTPPWD=ftp
43779    fi
43780    # the "pass" command does not work on some
43781    # ftp clients (read ftp.exe) but if it works,
43782    # passive mode is better!
43783    ( \
43784        echo "user $FTPUSER $FTPPWD"        ; \
43785        echo "pass"                         ; \
43786        echo "bin"                          ; \
43787        echo "get $FTPPATH $tmpfile"              ; \
43788    ) | ftp -in $FTPSERVER
43789  fi
43790  if test "x$VALID_TOOL" != xyes; then
43791    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43792  fi
43793
43794    mv $tmpfile $installdir/$filename
43795    if test ! -s $installdir/$filename; then
43796      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43797    fi
43798    case "$extension" in
43799      zip)  echo "Unzipping $installdir/$filename..."
43800        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43801        ;;
43802      tar.gz) echo "Untaring $installdir/$filename..."
43803        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43804        ;;
43805      tgz) echo "Untaring $installdir/$filename..."
43806        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43807        ;;
43808      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43809        ;;
43810    esac
43811  fi
43812  if test -f $installdir/$filename.unpacked; then
43813    depdir=$installdir
43814  fi
43815
43816      fi
43817      # Source the builddeps file again, because in the previous command, the depdir
43818      # was updated to point at the current build dependency install directory.
43819      . $builddepsfile
43820      # Now extract variables from the builddeps.conf files.
43821      theroot=${builddep_cups_ROOT}
43822      thecflags=${builddep_cups_CFLAGS}
43823      thelibs=${builddep_cups_LIBS}
43824      if test "x$depdir" = x; then
43825        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43826      fi
43827      CUPS=$depdir
43828      if test "x$theroot" != x; then
43829        CUPS="$theroot"
43830      fi
43831      if test "x$thecflags" != x; then
43832        CUPS_CFLAGS="$thecflags"
43833      fi
43834      if test "x$thelibs" != x; then
43835        CUPS_LIBS="$thelibs"
43836      fi
43837      CUPS_FOUND=yes
43838
43839    fi
43840
43841  fi
43842
43843    fi
43844    if test "x$CUPS_FOUND" = xno; then
43845      # Are the cups headers installed in the default /usr/include location?
43846      for ac_header in cups/cups.h cups/ppd.h
43847do :
43848  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43849ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43850if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43851  cat >>confdefs.h <<_ACEOF
43852#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43853_ACEOF
43854
43855            CUPS_FOUND=yes
43856            CUPS_CFLAGS=
43857            DEFAULT_CUPS=yes
43858
43859
43860fi
43861
43862done
43863
43864    fi
43865    if test "x$CUPS_FOUND" = xno; then
43866      # Getting nervous now? Lets poke around for standard Solaris third-party
43867      # package installation locations.
43868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43869$as_echo_n "checking for cups headers... " >&6; }
43870      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43871        # An SFW package seems to be installed!
43872        CUPS_FOUND=yes
43873        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43874      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43875        # A CSW package seems to be installed!
43876        CUPS_FOUND=yes
43877        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43878      fi
43879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43880$as_echo "$CUPS_FOUND" >&6; }
43881    fi
43882    if test "x$CUPS_FOUND" = xno; then
43883
43884  # Print a helpful message on how to acquire the necessary build dependency.
43885  # cups is the help tag: freetype, cups, pulse, alsa etc
43886  MISSING_DEPENDENCY=cups
43887
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889    cygwin_help $MISSING_DEPENDENCY
43890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43891    msys_help $MISSING_DEPENDENCY
43892  else
43893    PKGHANDLER_COMMAND=
43894
43895    case $PKGHANDLER in
43896      apt-get)
43897        apt_help     $MISSING_DEPENDENCY ;;
43898      yum)
43899        yum_help     $MISSING_DEPENDENCY ;;
43900      port)
43901        port_help    $MISSING_DEPENDENCY ;;
43902      pkgutil)
43903        pkgutil_help $MISSING_DEPENDENCY ;;
43904      pkgadd)
43905        pkgadd_help  $MISSING_DEPENDENCY ;;
43906    esac
43907
43908    if test "x$PKGHANDLER_COMMAND" != x; then
43909      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43910    fi
43911  fi
43912
43913      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43914    fi
43915  fi
43916
43917
43918
43919
43920
43921
43922  ###############################################################################
43923  #
43924  # The ubiquitous freetype library is used to render fonts.
43925  #
43926
43927# Check whether --with-freetype was given.
43928if test "${with_freetype+set}" = set; then :
43929  withval=$with_freetype;
43930fi
43931
43932
43933# Check whether --with-freetype-include was given.
43934if test "${with_freetype_include+set}" = set; then :
43935  withval=$with_freetype_include;
43936fi
43937
43938
43939# Check whether --with-freetype-lib was given.
43940if test "${with_freetype_lib+set}" = set; then :
43941  withval=$with_freetype_lib;
43942fi
43943
43944  # Check whether --enable-freetype-bundling was given.
43945if test "${enable_freetype_bundling+set}" = set; then :
43946  enableval=$enable_freetype_bundling;
43947fi
43948
43949
43950  FREETYPE_CFLAGS=
43951  FREETYPE_LIBS=
43952  FREETYPE_BUNDLE_LIB_PATH=
43953
43954  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43955    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43956      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43957$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43958    fi
43959    if test "x$enable_freetype_bundling" != x; then
43960      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43961$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43962    fi
43963  else
43964    # freetype is needed to build; go get it!
43965
43966    BUNDLE_FREETYPE="$enable_freetype_bundling"
43967
43968    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43969      # User has specified settings
43970
43971      if test "x$BUNDLE_FREETYPE" = x; then
43972        # If not specified, default is to bundle freetype
43973        BUNDLE_FREETYPE=yes
43974      fi
43975
43976      if test "x$with_freetype" != x; then
43977        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43978        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43979      fi
43980
43981      # Allow --with-freetype-lib and --with-freetype-include to override
43982      if test "x$with_freetype_include" != x; then
43983        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43984      fi
43985      if test "x$with_freetype_lib" != x; then
43986        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43987      fi
43988
43989      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43990        # Okay, we got it. Check that it works.
43991
43992  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43993  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43994  METHOD="--with-freetype"
43995
43996  # First check if the files exists.
43997  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43998    # We found an arbitrary include file. That's a good sign.
43999    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44000$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44001    FOUND_FREETYPE=yes
44002
44003    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44004    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44005      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44006$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44007      FOUND_FREETYPE=no
44008    else
44009      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44010        # On Windows, we will need both .lib and .dll file.
44011        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44012          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44013$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44014          FOUND_FREETYPE=no
44015        fi
44016      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44017          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44018        # Found lib in isa dir, use that instead.
44019        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44020      fi
44021    fi
44022  fi
44023
44024  if test "x$FOUND_FREETYPE" = xyes; then
44025
44026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44027
44028  # Input might be given as Windows format, start by converting to
44029  # unix format.
44030  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44031  new_path=`$CYGPATH -u "$path"`
44032
44033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44036  # "foo.exe" is OK but "foo" is an error.
44037  #
44038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44039  # It is also a way to make sure we got the proper file name for the real test later on.
44040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44041  if test "x$test_shortpath" = x; then
44042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44043$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44044    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44045  fi
44046
44047  # Call helper function which possibly converts this using DOS-style short mode.
44048  # If so, the updated path is stored in $new_path.
44049
44050  input_path="$new_path"
44051  # Check if we need to convert this using DOS-style short mode. If the path
44052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44053  # take no chances and rewrite it.
44054  # Note: m4 eats our [], so we need to use [ and ] instead.
44055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44056  if test "x$has_forbidden_chars" != x; then
44057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44061      # Going to short mode and back again did indeed matter. Since short mode is
44062      # case insensitive, let's make it lowercase to improve readability.
44063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44064      # Now convert it back to Unix-stile (cygpath)
44065      input_path=`$CYGPATH -u "$shortmode_path"`
44066      new_path="$input_path"
44067    fi
44068  fi
44069
44070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44071  if test "x$test_cygdrive_prefix" = x; then
44072    # As a simple fix, exclude /usr/bin since it's not a real path.
44073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44075      # a path prefixed by /cygdrive for fixpath to work.
44076      new_path="$CYGWIN_ROOT_PATH$input_path"
44077    fi
44078  fi
44079
44080
44081  if test "x$path" != "x$new_path"; then
44082    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44085  fi
44086
44087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44088
44089  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44090  has_colon=`$ECHO $path | $GREP ^.:`
44091  new_path="$path"
44092  if test "x$has_colon" = x; then
44093    # Not in mixed or Windows style, start by that.
44094    new_path=`cmd //c echo $path`
44095  fi
44096
44097
44098  input_path="$new_path"
44099  # Check if we need to convert this using DOS-style short mode. If the path
44100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44101  # take no chances and rewrite it.
44102  # Note: m4 eats our [], so we need to use [ and ] instead.
44103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44104  if test "x$has_forbidden_chars" != x; then
44105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44107  fi
44108
44109
44110  windows_path="$new_path"
44111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44112    unix_path=`$CYGPATH -u "$windows_path"`
44113    new_path="$unix_path"
44114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44116    new_path="$unix_path"
44117  fi
44118
44119  if test "x$path" != "x$new_path"; then
44120    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44123  fi
44124
44125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44127
44128  else
44129    # We're on a posix platform. Hooray! :)
44130    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44131    has_space=`$ECHO "$path" | $GREP " "`
44132    if test "x$has_space" != x; then
44133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44136    fi
44137
44138    # Use eval to expand a potential ~
44139    eval path="$path"
44140    if test ! -f "$path" && test ! -d "$path"; then
44141      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44142    fi
44143
44144    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44145  fi
44146
44147
44148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44149
44150  # Input might be given as Windows format, start by converting to
44151  # unix format.
44152  path="$POTENTIAL_FREETYPE_LIB_PATH"
44153  new_path=`$CYGPATH -u "$path"`
44154
44155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44158  # "foo.exe" is OK but "foo" is an error.
44159  #
44160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44161  # It is also a way to make sure we got the proper file name for the real test later on.
44162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44163  if test "x$test_shortpath" = x; then
44164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44165$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44166    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44167  fi
44168
44169  # Call helper function which possibly converts this using DOS-style short mode.
44170  # If so, the updated path is stored in $new_path.
44171
44172  input_path="$new_path"
44173  # Check if we need to convert this using DOS-style short mode. If the path
44174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44175  # take no chances and rewrite it.
44176  # Note: m4 eats our [], so we need to use [ and ] instead.
44177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44178  if test "x$has_forbidden_chars" != x; then
44179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44183      # Going to short mode and back again did indeed matter. Since short mode is
44184      # case insensitive, let's make it lowercase to improve readability.
44185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44186      # Now convert it back to Unix-stile (cygpath)
44187      input_path=`$CYGPATH -u "$shortmode_path"`
44188      new_path="$input_path"
44189    fi
44190  fi
44191
44192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44193  if test "x$test_cygdrive_prefix" = x; then
44194    # As a simple fix, exclude /usr/bin since it's not a real path.
44195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44197      # a path prefixed by /cygdrive for fixpath to work.
44198      new_path="$CYGWIN_ROOT_PATH$input_path"
44199    fi
44200  fi
44201
44202
44203  if test "x$path" != "x$new_path"; then
44204    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44207  fi
44208
44209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44210
44211  path="$POTENTIAL_FREETYPE_LIB_PATH"
44212  has_colon=`$ECHO $path | $GREP ^.:`
44213  new_path="$path"
44214  if test "x$has_colon" = x; then
44215    # Not in mixed or Windows style, start by that.
44216    new_path=`cmd //c echo $path`
44217  fi
44218
44219
44220  input_path="$new_path"
44221  # Check if we need to convert this using DOS-style short mode. If the path
44222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44223  # take no chances and rewrite it.
44224  # Note: m4 eats our [], so we need to use [ and ] instead.
44225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44226  if test "x$has_forbidden_chars" != x; then
44227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44229  fi
44230
44231
44232  windows_path="$new_path"
44233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44234    unix_path=`$CYGPATH -u "$windows_path"`
44235    new_path="$unix_path"
44236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44238    new_path="$unix_path"
44239  fi
44240
44241  if test "x$path" != "x$new_path"; then
44242    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44245  fi
44246
44247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44249
44250  else
44251    # We're on a posix platform. Hooray! :)
44252    path="$POTENTIAL_FREETYPE_LIB_PATH"
44253    has_space=`$ECHO "$path" | $GREP " "`
44254    if test "x$has_space" != x; then
44255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44256$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44257      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44258    fi
44259
44260    # Use eval to expand a potential ~
44261    eval path="$path"
44262    if test ! -f "$path" && test ! -d "$path"; then
44263      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44264    fi
44265
44266    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44267  fi
44268
44269
44270    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44272$as_echo_n "checking for freetype includes... " >&6; }
44273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44274$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44275    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44277$as_echo_n "checking for freetype libraries... " >&6; }
44278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44279$as_echo "$FREETYPE_LIB_PATH" >&6; }
44280  fi
44281
44282        if test "x$FOUND_FREETYPE" != xyes; then
44283          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44284        fi
44285      else
44286        # User specified only one of lib or include. This is an error.
44287        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44288          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44289$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44290          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44291        else
44292          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44293$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44294          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44295        fi
44296      fi
44297    else
44298      # User did not specify settings, but we need freetype. Try to locate it.
44299
44300      if test "x$BUNDLE_FREETYPE" = x; then
44301        # If not specified, default is to bundle freetype only on windows
44302        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44303          BUNDLE_FREETYPE=yes
44304        else
44305          BUNDLE_FREETYPE=no
44306        fi
44307      fi
44308
44309      if test "x$FOUND_FREETYPE" != xyes; then
44310        # Check builddeps
44311
44312
44313  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44314    # Source the builddeps file again, to make sure it uses the latest variables!
44315    . $builddepsfile
44316    # Look for a target and build machine specific resource!
44317    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44318    if test "x$resource" = x; then
44319      # Ok, lets instead look for a target specific resource
44320      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44321    fi
44322    if test "x$resource" = x; then
44323      # Ok, lets instead look for a build specific resource
44324      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44325    fi
44326    if test "x$resource" = x; then
44327      # Ok, lets instead look for a generic resource
44328      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44329      resource=${builddep_freetype2}
44330    fi
44331    if test "x$resource" != x; then
44332      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44333$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44334      # If the resource in the builddeps.conf file is an existing directory,
44335      # for example /java/linux/cups
44336      if test -d ${resource}; then
44337        depdir=${resource}
44338      else
44339
44340  # freetype2 is for example mymodule
44341  # $resource is for example libs/general/libmymod_1_2_3.zip
44342  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44343  # $with_builddeps_dir is for example /localhome/builddeps
44344  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44345  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44346  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44347  filename=`basename $resource`
44348  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44349  filebase=${filename%%.*}
44350  extension=${filename#*.}
44351  installdir=$with_builddeps_dir/$filebase
44352  if test ! -f $installdir/$filename.unpacked; then
44353    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44354$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44355    if test ! -d $installdir; then
44356      mkdir -p $installdir
44357    fi
44358    if test ! -d $installdir; then
44359      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44360    fi
44361    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44362    touch $tmpfile
44363    if test ! -f $tmpfile; then
44364      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44365    fi
44366
44367  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44368  # $tmpfile is the local file name for the downloaded file.
44369  VALID_TOOL=no
44370  if test "x$BDEPS_FTP" = xwget; then
44371    VALID_TOOL=yes
44372    wget -O $tmpfile $with_builddeps_server/$resource
44373  fi
44374  if test "x$BDEPS_FTP" = xlftp; then
44375    VALID_TOOL=yes
44376    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44377  fi
44378  if test "x$BDEPS_FTP" = xftp; then
44379    VALID_TOOL=yes
44380    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44381    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44382    FTPUSERPWD=${FTPSERVER%%@*}
44383    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44384      FTPUSER=${userpwd%%:*}
44385      FTPPWD=${userpwd#*@}
44386      FTPSERVER=${FTPSERVER#*@}
44387    else
44388      FTPUSER=ftp
44389      FTPPWD=ftp
44390    fi
44391    # the "pass" command does not work on some
44392    # ftp clients (read ftp.exe) but if it works,
44393    # passive mode is better!
44394    ( \
44395        echo "user $FTPUSER $FTPPWD"        ; \
44396        echo "pass"                         ; \
44397        echo "bin"                          ; \
44398        echo "get $FTPPATH $tmpfile"              ; \
44399    ) | ftp -in $FTPSERVER
44400  fi
44401  if test "x$VALID_TOOL" != xyes; then
44402    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44403  fi
44404
44405    mv $tmpfile $installdir/$filename
44406    if test ! -s $installdir/$filename; then
44407      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44408    fi
44409    case "$extension" in
44410      zip)  echo "Unzipping $installdir/$filename..."
44411        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44412        ;;
44413      tar.gz) echo "Untaring $installdir/$filename..."
44414        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44415        ;;
44416      tgz) echo "Untaring $installdir/$filename..."
44417        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44418        ;;
44419      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44420        ;;
44421    esac
44422  fi
44423  if test -f $installdir/$filename.unpacked; then
44424    depdir=$installdir
44425  fi
44426
44427      fi
44428      # Source the builddeps file again, because in the previous command, the depdir
44429      # was updated to point at the current build dependency install directory.
44430      . $builddepsfile
44431      # Now extract variables from the builddeps.conf files.
44432      theroot=${builddep_freetype2_ROOT}
44433      thecflags=${builddep_freetype2_CFLAGS}
44434      thelibs=${builddep_freetype2_LIBS}
44435      if test "x$depdir" = x; then
44436        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44437      fi
44438      FREETYPE=$depdir
44439      if test "x$theroot" != x; then
44440        FREETYPE="$theroot"
44441      fi
44442      if test "x$thecflags" != x; then
44443        FREETYPE_CFLAGS="$thecflags"
44444      fi
44445      if test "x$thelibs" != x; then
44446        FREETYPE_LIBS="$thelibs"
44447      fi
44448      FOUND_FREETYPE=yes
44449      else FOUND_FREETYPE=no
44450
44451    fi
44452    else FOUND_FREETYPE=no
44453
44454  fi
44455
44456        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44457        if test "x$FOUND_FREETYPE" = xyes; then
44458          if test "x$BUNDLE_FREETYPE" = xyes; then
44459            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44460$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44461            FOUND_FREETYPE=no
44462          else
44463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44464$as_echo_n "checking for freetype... " >&6; }
44465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44466$as_echo "yes (using builddeps)" >&6; }
44467          fi
44468        fi
44469      fi
44470
44471      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44472      if test "x$SYSROOT" = x; then
44473        if test "x$FOUND_FREETYPE" != xyes; then
44474          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44475          if test "x$PKG_CONFIG" != x; then
44476
44477pkg_failed=no
44478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44479$as_echo_n "checking for FREETYPE... " >&6; }
44480
44481if test -n "$FREETYPE_CFLAGS"; then
44482    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44483 elif test -n "$PKG_CONFIG"; then
44484    if test -n "$PKG_CONFIG" && \
44485    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44486  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44487  ac_status=$?
44488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44489  test $ac_status = 0; }; then
44490  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44491else
44492  pkg_failed=yes
44493fi
44494 else
44495    pkg_failed=untried
44496fi
44497if test -n "$FREETYPE_LIBS"; then
44498    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44499 elif test -n "$PKG_CONFIG"; then
44500    if test -n "$PKG_CONFIG" && \
44501    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44502  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44503  ac_status=$?
44504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44505  test $ac_status = 0; }; then
44506  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44507else
44508  pkg_failed=yes
44509fi
44510 else
44511    pkg_failed=untried
44512fi
44513
44514
44515
44516if test $pkg_failed = yes; then
44517
44518if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44519        _pkg_short_errors_supported=yes
44520else
44521        _pkg_short_errors_supported=no
44522fi
44523        if test $_pkg_short_errors_supported = yes; then
44524	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44525        else
44526	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44527        fi
44528	# Put the nasty error message in config.log where it belongs
44529	echo "$FREETYPE_PKG_ERRORS" >&5
44530
44531	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44532$as_echo "no" >&6; }
44533                FOUND_FREETYPE=no
44534elif test $pkg_failed = untried; then
44535	FOUND_FREETYPE=no
44536else
44537	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44538	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44540$as_echo "yes" >&6; }
44541	FOUND_FREETYPE=yes
44542fi
44543            if test "x$FOUND_FREETYPE" = xyes; then
44544              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44545              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44546              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44547              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44548                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44549              fi
44550              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44551              if test "x$BUNDLE_FREETYPE" = xyes; then
44552                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44553$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44554                FOUND_FREETYPE=no
44555              else
44556                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44557$as_echo_n "checking for freetype... " >&6; }
44558                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44559$as_echo "yes (using pkg-config)" >&6; }
44560              fi
44561            fi
44562          fi
44563        fi
44564      fi
44565
44566      if test "x$FOUND_FREETYPE" != xyes; then
44567        # Check in well-known locations
44568        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44569          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44570
44571  windows_path="$FREETYPE_BASE_DIR"
44572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44573    unix_path=`$CYGPATH -u "$windows_path"`
44574    FREETYPE_BASE_DIR="$unix_path"
44575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44577    FREETYPE_BASE_DIR="$unix_path"
44578  fi
44579
44580
44581  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44582  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44583  METHOD="well-known location"
44584
44585  # First check if the files exists.
44586  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44587    # We found an arbitrary include file. That's a good sign.
44588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44589$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44590    FOUND_FREETYPE=yes
44591
44592    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44593    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44594      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44595$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44596      FOUND_FREETYPE=no
44597    else
44598      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44599        # On Windows, we will need both .lib and .dll file.
44600        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44601          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44602$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44603          FOUND_FREETYPE=no
44604        fi
44605      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44606          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44607        # Found lib in isa dir, use that instead.
44608        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44609      fi
44610    fi
44611  fi
44612
44613  if test "x$FOUND_FREETYPE" = xyes; then
44614
44615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44616
44617  # Input might be given as Windows format, start by converting to
44618  # unix format.
44619  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44620  new_path=`$CYGPATH -u "$path"`
44621
44622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44625  # "foo.exe" is OK but "foo" is an error.
44626  #
44627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44628  # It is also a way to make sure we got the proper file name for the real test later on.
44629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44630  if test "x$test_shortpath" = x; then
44631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44633    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44634  fi
44635
44636  # Call helper function which possibly converts this using DOS-style short mode.
44637  # If so, the updated path is stored in $new_path.
44638
44639  input_path="$new_path"
44640  # Check if we need to convert this using DOS-style short mode. If the path
44641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44642  # take no chances and rewrite it.
44643  # Note: m4 eats our [], so we need to use [ and ] instead.
44644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44645  if test "x$has_forbidden_chars" != x; then
44646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44650      # Going to short mode and back again did indeed matter. Since short mode is
44651      # case insensitive, let's make it lowercase to improve readability.
44652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44653      # Now convert it back to Unix-stile (cygpath)
44654      input_path=`$CYGPATH -u "$shortmode_path"`
44655      new_path="$input_path"
44656    fi
44657  fi
44658
44659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44660  if test "x$test_cygdrive_prefix" = x; then
44661    # As a simple fix, exclude /usr/bin since it's not a real path.
44662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44664      # a path prefixed by /cygdrive for fixpath to work.
44665      new_path="$CYGWIN_ROOT_PATH$input_path"
44666    fi
44667  fi
44668
44669
44670  if test "x$path" != "x$new_path"; then
44671    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44673$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44674  fi
44675
44676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44677
44678  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44679  has_colon=`$ECHO $path | $GREP ^.:`
44680  new_path="$path"
44681  if test "x$has_colon" = x; then
44682    # Not in mixed or Windows style, start by that.
44683    new_path=`cmd //c echo $path`
44684  fi
44685
44686
44687  input_path="$new_path"
44688  # Check if we need to convert this using DOS-style short mode. If the path
44689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44690  # take no chances and rewrite it.
44691  # Note: m4 eats our [], so we need to use [ and ] instead.
44692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44693  if test "x$has_forbidden_chars" != x; then
44694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44696  fi
44697
44698
44699  windows_path="$new_path"
44700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44701    unix_path=`$CYGPATH -u "$windows_path"`
44702    new_path="$unix_path"
44703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44705    new_path="$unix_path"
44706  fi
44707
44708  if test "x$path" != "x$new_path"; then
44709    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44712  fi
44713
44714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44716
44717  else
44718    # We're on a posix platform. Hooray! :)
44719    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44720    has_space=`$ECHO "$path" | $GREP " "`
44721    if test "x$has_space" != x; then
44722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44723$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44724      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44725    fi
44726
44727    # Use eval to expand a potential ~
44728    eval path="$path"
44729    if test ! -f "$path" && test ! -d "$path"; then
44730      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44731    fi
44732
44733    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44734  fi
44735
44736
44737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44738
44739  # Input might be given as Windows format, start by converting to
44740  # unix format.
44741  path="$POTENTIAL_FREETYPE_LIB_PATH"
44742  new_path=`$CYGPATH -u "$path"`
44743
44744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44747  # "foo.exe" is OK but "foo" is an error.
44748  #
44749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44750  # It is also a way to make sure we got the proper file name for the real test later on.
44751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44752  if test "x$test_shortpath" = x; then
44753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44755    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44756  fi
44757
44758  # Call helper function which possibly converts this using DOS-style short mode.
44759  # If so, the updated path is stored in $new_path.
44760
44761  input_path="$new_path"
44762  # Check if we need to convert this using DOS-style short mode. If the path
44763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44764  # take no chances and rewrite it.
44765  # Note: m4 eats our [], so we need to use [ and ] instead.
44766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44767  if test "x$has_forbidden_chars" != x; then
44768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44772      # Going to short mode and back again did indeed matter. Since short mode is
44773      # case insensitive, let's make it lowercase to improve readability.
44774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44775      # Now convert it back to Unix-stile (cygpath)
44776      input_path=`$CYGPATH -u "$shortmode_path"`
44777      new_path="$input_path"
44778    fi
44779  fi
44780
44781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44782  if test "x$test_cygdrive_prefix" = x; then
44783    # As a simple fix, exclude /usr/bin since it's not a real path.
44784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44786      # a path prefixed by /cygdrive for fixpath to work.
44787      new_path="$CYGWIN_ROOT_PATH$input_path"
44788    fi
44789  fi
44790
44791
44792  if test "x$path" != "x$new_path"; then
44793    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44796  fi
44797
44798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44799
44800  path="$POTENTIAL_FREETYPE_LIB_PATH"
44801  has_colon=`$ECHO $path | $GREP ^.:`
44802  new_path="$path"
44803  if test "x$has_colon" = x; then
44804    # Not in mixed or Windows style, start by that.
44805    new_path=`cmd //c echo $path`
44806  fi
44807
44808
44809  input_path="$new_path"
44810  # Check if we need to convert this using DOS-style short mode. If the path
44811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44812  # take no chances and rewrite it.
44813  # Note: m4 eats our [], so we need to use [ and ] instead.
44814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44815  if test "x$has_forbidden_chars" != x; then
44816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44818  fi
44819
44820
44821  windows_path="$new_path"
44822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44823    unix_path=`$CYGPATH -u "$windows_path"`
44824    new_path="$unix_path"
44825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44827    new_path="$unix_path"
44828  fi
44829
44830  if test "x$path" != "x$new_path"; then
44831    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44833$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44834  fi
44835
44836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44838
44839  else
44840    # We're on a posix platform. Hooray! :)
44841    path="$POTENTIAL_FREETYPE_LIB_PATH"
44842    has_space=`$ECHO "$path" | $GREP " "`
44843    if test "x$has_space" != x; then
44844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44846      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44847    fi
44848
44849    # Use eval to expand a potential ~
44850    eval path="$path"
44851    if test ! -f "$path" && test ! -d "$path"; then
44852      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44853    fi
44854
44855    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44856  fi
44857
44858
44859    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44861$as_echo_n "checking for freetype includes... " >&6; }
44862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44863$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44864    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44866$as_echo_n "checking for freetype libraries... " >&6; }
44867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44868$as_echo "$FREETYPE_LIB_PATH" >&6; }
44869  fi
44870
44871          if test "x$FOUND_FREETYPE" != xyes; then
44872            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44873
44874  windows_path="$FREETYPE_BASE_DIR"
44875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44876    unix_path=`$CYGPATH -u "$windows_path"`
44877    FREETYPE_BASE_DIR="$unix_path"
44878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44880    FREETYPE_BASE_DIR="$unix_path"
44881  fi
44882
44883
44884  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44885  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44886  METHOD="well-known location"
44887
44888  # First check if the files exists.
44889  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44890    # We found an arbitrary include file. That's a good sign.
44891    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44892$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44893    FOUND_FREETYPE=yes
44894
44895    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44896    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44897      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44898$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44899      FOUND_FREETYPE=no
44900    else
44901      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44902        # On Windows, we will need both .lib and .dll file.
44903        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44904          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44905$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44906          FOUND_FREETYPE=no
44907        fi
44908      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44909          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44910        # Found lib in isa dir, use that instead.
44911        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44912      fi
44913    fi
44914  fi
44915
44916  if test "x$FOUND_FREETYPE" = xyes; then
44917
44918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919
44920  # Input might be given as Windows format, start by converting to
44921  # unix format.
44922  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44923  new_path=`$CYGPATH -u "$path"`
44924
44925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44928  # "foo.exe" is OK but "foo" is an error.
44929  #
44930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44931  # It is also a way to make sure we got the proper file name for the real test later on.
44932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44933  if test "x$test_shortpath" = x; then
44934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44936    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44937  fi
44938
44939  # Call helper function which possibly converts this using DOS-style short mode.
44940  # If so, the updated path is stored in $new_path.
44941
44942  input_path="$new_path"
44943  # Check if we need to convert this using DOS-style short mode. If the path
44944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44945  # take no chances and rewrite it.
44946  # Note: m4 eats our [], so we need to use [ and ] instead.
44947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44948  if test "x$has_forbidden_chars" != x; then
44949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44953      # Going to short mode and back again did indeed matter. Since short mode is
44954      # case insensitive, let's make it lowercase to improve readability.
44955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44956      # Now convert it back to Unix-stile (cygpath)
44957      input_path=`$CYGPATH -u "$shortmode_path"`
44958      new_path="$input_path"
44959    fi
44960  fi
44961
44962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44963  if test "x$test_cygdrive_prefix" = x; then
44964    # As a simple fix, exclude /usr/bin since it's not a real path.
44965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44967      # a path prefixed by /cygdrive for fixpath to work.
44968      new_path="$CYGWIN_ROOT_PATH$input_path"
44969    fi
44970  fi
44971
44972
44973  if test "x$path" != "x$new_path"; then
44974    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44977  fi
44978
44979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44980
44981  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44982  has_colon=`$ECHO $path | $GREP ^.:`
44983  new_path="$path"
44984  if test "x$has_colon" = x; then
44985    # Not in mixed or Windows style, start by that.
44986    new_path=`cmd //c echo $path`
44987  fi
44988
44989
44990  input_path="$new_path"
44991  # Check if we need to convert this using DOS-style short mode. If the path
44992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44993  # take no chances and rewrite it.
44994  # Note: m4 eats our [], so we need to use [ and ] instead.
44995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44996  if test "x$has_forbidden_chars" != x; then
44997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44999  fi
45000
45001
45002  windows_path="$new_path"
45003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45004    unix_path=`$CYGPATH -u "$windows_path"`
45005    new_path="$unix_path"
45006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45008    new_path="$unix_path"
45009  fi
45010
45011  if test "x$path" != "x$new_path"; then
45012    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45015  fi
45016
45017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45019
45020  else
45021    # We're on a posix platform. Hooray! :)
45022    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45023    has_space=`$ECHO "$path" | $GREP " "`
45024    if test "x$has_space" != x; then
45025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45027      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45028    fi
45029
45030    # Use eval to expand a potential ~
45031    eval path="$path"
45032    if test ! -f "$path" && test ! -d "$path"; then
45033      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45034    fi
45035
45036    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45037  fi
45038
45039
45040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45041
45042  # Input might be given as Windows format, start by converting to
45043  # unix format.
45044  path="$POTENTIAL_FREETYPE_LIB_PATH"
45045  new_path=`$CYGPATH -u "$path"`
45046
45047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45050  # "foo.exe" is OK but "foo" is an error.
45051  #
45052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45053  # It is also a way to make sure we got the proper file name for the real test later on.
45054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45055  if test "x$test_shortpath" = x; then
45056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45058    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45059  fi
45060
45061  # Call helper function which possibly converts this using DOS-style short mode.
45062  # If so, the updated path is stored in $new_path.
45063
45064  input_path="$new_path"
45065  # Check if we need to convert this using DOS-style short mode. If the path
45066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45067  # take no chances and rewrite it.
45068  # Note: m4 eats our [], so we need to use [ and ] instead.
45069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45070  if test "x$has_forbidden_chars" != x; then
45071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45075      # Going to short mode and back again did indeed matter. Since short mode is
45076      # case insensitive, let's make it lowercase to improve readability.
45077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45078      # Now convert it back to Unix-stile (cygpath)
45079      input_path=`$CYGPATH -u "$shortmode_path"`
45080      new_path="$input_path"
45081    fi
45082  fi
45083
45084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45085  if test "x$test_cygdrive_prefix" = x; then
45086    # As a simple fix, exclude /usr/bin since it's not a real path.
45087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45089      # a path prefixed by /cygdrive for fixpath to work.
45090      new_path="$CYGWIN_ROOT_PATH$input_path"
45091    fi
45092  fi
45093
45094
45095  if test "x$path" != "x$new_path"; then
45096    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45099  fi
45100
45101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45102
45103  path="$POTENTIAL_FREETYPE_LIB_PATH"
45104  has_colon=`$ECHO $path | $GREP ^.:`
45105  new_path="$path"
45106  if test "x$has_colon" = x; then
45107    # Not in mixed or Windows style, start by that.
45108    new_path=`cmd //c echo $path`
45109  fi
45110
45111
45112  input_path="$new_path"
45113  # Check if we need to convert this using DOS-style short mode. If the path
45114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45115  # take no chances and rewrite it.
45116  # Note: m4 eats our [], so we need to use [ and ] instead.
45117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45118  if test "x$has_forbidden_chars" != x; then
45119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45121  fi
45122
45123
45124  windows_path="$new_path"
45125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45126    unix_path=`$CYGPATH -u "$windows_path"`
45127    new_path="$unix_path"
45128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45130    new_path="$unix_path"
45131  fi
45132
45133  if test "x$path" != "x$new_path"; then
45134    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45136$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45137  fi
45138
45139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45141
45142  else
45143    # We're on a posix platform. Hooray! :)
45144    path="$POTENTIAL_FREETYPE_LIB_PATH"
45145    has_space=`$ECHO "$path" | $GREP " "`
45146    if test "x$has_space" != x; then
45147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45149      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45150    fi
45151
45152    # Use eval to expand a potential ~
45153    eval path="$path"
45154    if test ! -f "$path" && test ! -d "$path"; then
45155      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45156    fi
45157
45158    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45159  fi
45160
45161
45162    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45164$as_echo_n "checking for freetype includes... " >&6; }
45165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45166$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45167    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45169$as_echo_n "checking for freetype libraries... " >&6; }
45170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45171$as_echo "$FREETYPE_LIB_PATH" >&6; }
45172  fi
45173
45174          fi
45175        else
45176          FREETYPE_BASE_DIR="$SYSROOT/usr"
45177
45178  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45179  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45180  METHOD="well-known location"
45181
45182  # First check if the files exists.
45183  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45184    # We found an arbitrary include file. That's a good sign.
45185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45186$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45187    FOUND_FREETYPE=yes
45188
45189    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45190    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45191      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45193      FOUND_FREETYPE=no
45194    else
45195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45196        # On Windows, we will need both .lib and .dll file.
45197        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45200          FOUND_FREETYPE=no
45201        fi
45202      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45204        # Found lib in isa dir, use that instead.
45205        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45206      fi
45207    fi
45208  fi
45209
45210  if test "x$FOUND_FREETYPE" = xyes; then
45211
45212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45213
45214  # Input might be given as Windows format, start by converting to
45215  # unix format.
45216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45217  new_path=`$CYGPATH -u "$path"`
45218
45219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45222  # "foo.exe" is OK but "foo" is an error.
45223  #
45224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45225  # It is also a way to make sure we got the proper file name for the real test later on.
45226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45227  if test "x$test_shortpath" = x; then
45228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45230    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45231  fi
45232
45233  # Call helper function which possibly converts this using DOS-style short mode.
45234  # If so, the updated path is stored in $new_path.
45235
45236  input_path="$new_path"
45237  # Check if we need to convert this using DOS-style short mode. If the path
45238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45239  # take no chances and rewrite it.
45240  # Note: m4 eats our [], so we need to use [ and ] instead.
45241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45242  if test "x$has_forbidden_chars" != x; then
45243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45247      # Going to short mode and back again did indeed matter. Since short mode is
45248      # case insensitive, let's make it lowercase to improve readability.
45249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45250      # Now convert it back to Unix-stile (cygpath)
45251      input_path=`$CYGPATH -u "$shortmode_path"`
45252      new_path="$input_path"
45253    fi
45254  fi
45255
45256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45257  if test "x$test_cygdrive_prefix" = x; then
45258    # As a simple fix, exclude /usr/bin since it's not a real path.
45259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45261      # a path prefixed by /cygdrive for fixpath to work.
45262      new_path="$CYGWIN_ROOT_PATH$input_path"
45263    fi
45264  fi
45265
45266
45267  if test "x$path" != "x$new_path"; then
45268    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45270$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45271  fi
45272
45273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45274
45275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45276  has_colon=`$ECHO $path | $GREP ^.:`
45277  new_path="$path"
45278  if test "x$has_colon" = x; then
45279    # Not in mixed or Windows style, start by that.
45280    new_path=`cmd //c echo $path`
45281  fi
45282
45283
45284  input_path="$new_path"
45285  # Check if we need to convert this using DOS-style short mode. If the path
45286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45287  # take no chances and rewrite it.
45288  # Note: m4 eats our [], so we need to use [ and ] instead.
45289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45290  if test "x$has_forbidden_chars" != x; then
45291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45293  fi
45294
45295
45296  windows_path="$new_path"
45297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45298    unix_path=`$CYGPATH -u "$windows_path"`
45299    new_path="$unix_path"
45300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45302    new_path="$unix_path"
45303  fi
45304
45305  if test "x$path" != "x$new_path"; then
45306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45309  fi
45310
45311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45313
45314  else
45315    # We're on a posix platform. Hooray! :)
45316    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45317    has_space=`$ECHO "$path" | $GREP " "`
45318    if test "x$has_space" != x; then
45319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45321      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45322    fi
45323
45324    # Use eval to expand a potential ~
45325    eval path="$path"
45326    if test ! -f "$path" && test ! -d "$path"; then
45327      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45328    fi
45329
45330    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45331  fi
45332
45333
45334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45335
45336  # Input might be given as Windows format, start by converting to
45337  # unix format.
45338  path="$POTENTIAL_FREETYPE_LIB_PATH"
45339  new_path=`$CYGPATH -u "$path"`
45340
45341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45344  # "foo.exe" is OK but "foo" is an error.
45345  #
45346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45347  # It is also a way to make sure we got the proper file name for the real test later on.
45348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45349  if test "x$test_shortpath" = x; then
45350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45351$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45352    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45353  fi
45354
45355  # Call helper function which possibly converts this using DOS-style short mode.
45356  # If so, the updated path is stored in $new_path.
45357
45358  input_path="$new_path"
45359  # Check if we need to convert this using DOS-style short mode. If the path
45360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45361  # take no chances and rewrite it.
45362  # Note: m4 eats our [], so we need to use [ and ] instead.
45363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45364  if test "x$has_forbidden_chars" != x; then
45365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45369      # Going to short mode and back again did indeed matter. Since short mode is
45370      # case insensitive, let's make it lowercase to improve readability.
45371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45372      # Now convert it back to Unix-stile (cygpath)
45373      input_path=`$CYGPATH -u "$shortmode_path"`
45374      new_path="$input_path"
45375    fi
45376  fi
45377
45378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45379  if test "x$test_cygdrive_prefix" = x; then
45380    # As a simple fix, exclude /usr/bin since it's not a real path.
45381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45383      # a path prefixed by /cygdrive for fixpath to work.
45384      new_path="$CYGWIN_ROOT_PATH$input_path"
45385    fi
45386  fi
45387
45388
45389  if test "x$path" != "x$new_path"; then
45390    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45393  fi
45394
45395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45396
45397  path="$POTENTIAL_FREETYPE_LIB_PATH"
45398  has_colon=`$ECHO $path | $GREP ^.:`
45399  new_path="$path"
45400  if test "x$has_colon" = x; then
45401    # Not in mixed or Windows style, start by that.
45402    new_path=`cmd //c echo $path`
45403  fi
45404
45405
45406  input_path="$new_path"
45407  # Check if we need to convert this using DOS-style short mode. If the path
45408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45409  # take no chances and rewrite it.
45410  # Note: m4 eats our [], so we need to use [ and ] instead.
45411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45412  if test "x$has_forbidden_chars" != x; then
45413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45415  fi
45416
45417
45418  windows_path="$new_path"
45419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45420    unix_path=`$CYGPATH -u "$windows_path"`
45421    new_path="$unix_path"
45422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45424    new_path="$unix_path"
45425  fi
45426
45427  if test "x$path" != "x$new_path"; then
45428    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45431  fi
45432
45433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45435
45436  else
45437    # We're on a posix platform. Hooray! :)
45438    path="$POTENTIAL_FREETYPE_LIB_PATH"
45439    has_space=`$ECHO "$path" | $GREP " "`
45440    if test "x$has_space" != x; then
45441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45443      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45444    fi
45445
45446    # Use eval to expand a potential ~
45447    eval path="$path"
45448    if test ! -f "$path" && test ! -d "$path"; then
45449      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45450    fi
45451
45452    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45453  fi
45454
45455
45456    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45458$as_echo_n "checking for freetype includes... " >&6; }
45459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45460$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45461    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45463$as_echo_n "checking for freetype libraries... " >&6; }
45464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45465$as_echo "$FREETYPE_LIB_PATH" >&6; }
45466  fi
45467
45468
45469          if test "x$FOUND_FREETYPE" != xyes; then
45470            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45471
45472  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45473  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45474  METHOD="well-known location"
45475
45476  # First check if the files exists.
45477  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45478    # We found an arbitrary include file. That's a good sign.
45479    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45480$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45481    FOUND_FREETYPE=yes
45482
45483    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45484    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45485      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45486$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45487      FOUND_FREETYPE=no
45488    else
45489      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45490        # On Windows, we will need both .lib and .dll file.
45491        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45492          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45493$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45494          FOUND_FREETYPE=no
45495        fi
45496      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45497          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45498        # Found lib in isa dir, use that instead.
45499        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45500      fi
45501    fi
45502  fi
45503
45504  if test "x$FOUND_FREETYPE" = xyes; then
45505
45506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45507
45508  # Input might be given as Windows format, start by converting to
45509  # unix format.
45510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45511  new_path=`$CYGPATH -u "$path"`
45512
45513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45516  # "foo.exe" is OK but "foo" is an error.
45517  #
45518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45519  # It is also a way to make sure we got the proper file name for the real test later on.
45520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45521  if test "x$test_shortpath" = x; then
45522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45525  fi
45526
45527  # Call helper function which possibly converts this using DOS-style short mode.
45528  # If so, the updated path is stored in $new_path.
45529
45530  input_path="$new_path"
45531  # Check if we need to convert this using DOS-style short mode. If the path
45532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45533  # take no chances and rewrite it.
45534  # Note: m4 eats our [], so we need to use [ and ] instead.
45535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45536  if test "x$has_forbidden_chars" != x; then
45537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45541      # Going to short mode and back again did indeed matter. Since short mode is
45542      # case insensitive, let's make it lowercase to improve readability.
45543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45544      # Now convert it back to Unix-stile (cygpath)
45545      input_path=`$CYGPATH -u "$shortmode_path"`
45546      new_path="$input_path"
45547    fi
45548  fi
45549
45550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45551  if test "x$test_cygdrive_prefix" = x; then
45552    # As a simple fix, exclude /usr/bin since it's not a real path.
45553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45555      # a path prefixed by /cygdrive for fixpath to work.
45556      new_path="$CYGWIN_ROOT_PATH$input_path"
45557    fi
45558  fi
45559
45560
45561  if test "x$path" != "x$new_path"; then
45562    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45565  fi
45566
45567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45568
45569  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45570  has_colon=`$ECHO $path | $GREP ^.:`
45571  new_path="$path"
45572  if test "x$has_colon" = x; then
45573    # Not in mixed or Windows style, start by that.
45574    new_path=`cmd //c echo $path`
45575  fi
45576
45577
45578  input_path="$new_path"
45579  # Check if we need to convert this using DOS-style short mode. If the path
45580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45581  # take no chances and rewrite it.
45582  # Note: m4 eats our [], so we need to use [ and ] instead.
45583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45584  if test "x$has_forbidden_chars" != x; then
45585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45587  fi
45588
45589
45590  windows_path="$new_path"
45591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45592    unix_path=`$CYGPATH -u "$windows_path"`
45593    new_path="$unix_path"
45594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45596    new_path="$unix_path"
45597  fi
45598
45599  if test "x$path" != "x$new_path"; then
45600    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45603  fi
45604
45605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45607
45608  else
45609    # We're on a posix platform. Hooray! :)
45610    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45611    has_space=`$ECHO "$path" | $GREP " "`
45612    if test "x$has_space" != x; then
45613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45616    fi
45617
45618    # Use eval to expand a potential ~
45619    eval path="$path"
45620    if test ! -f "$path" && test ! -d "$path"; then
45621      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45622    fi
45623
45624    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45625  fi
45626
45627
45628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45629
45630  # Input might be given as Windows format, start by converting to
45631  # unix format.
45632  path="$POTENTIAL_FREETYPE_LIB_PATH"
45633  new_path=`$CYGPATH -u "$path"`
45634
45635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45638  # "foo.exe" is OK but "foo" is an error.
45639  #
45640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45641  # It is also a way to make sure we got the proper file name for the real test later on.
45642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45643  if test "x$test_shortpath" = x; then
45644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45646    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45647  fi
45648
45649  # Call helper function which possibly converts this using DOS-style short mode.
45650  # If so, the updated path is stored in $new_path.
45651
45652  input_path="$new_path"
45653  # Check if we need to convert this using DOS-style short mode. If the path
45654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45655  # take no chances and rewrite it.
45656  # Note: m4 eats our [], so we need to use [ and ] instead.
45657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45658  if test "x$has_forbidden_chars" != x; then
45659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45663      # Going to short mode and back again did indeed matter. Since short mode is
45664      # case insensitive, let's make it lowercase to improve readability.
45665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45666      # Now convert it back to Unix-stile (cygpath)
45667      input_path=`$CYGPATH -u "$shortmode_path"`
45668      new_path="$input_path"
45669    fi
45670  fi
45671
45672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45673  if test "x$test_cygdrive_prefix" = x; then
45674    # As a simple fix, exclude /usr/bin since it's not a real path.
45675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45677      # a path prefixed by /cygdrive for fixpath to work.
45678      new_path="$CYGWIN_ROOT_PATH$input_path"
45679    fi
45680  fi
45681
45682
45683  if test "x$path" != "x$new_path"; then
45684    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45686$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45687  fi
45688
45689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45690
45691  path="$POTENTIAL_FREETYPE_LIB_PATH"
45692  has_colon=`$ECHO $path | $GREP ^.:`
45693  new_path="$path"
45694  if test "x$has_colon" = x; then
45695    # Not in mixed or Windows style, start by that.
45696    new_path=`cmd //c echo $path`
45697  fi
45698
45699
45700  input_path="$new_path"
45701  # Check if we need to convert this using DOS-style short mode. If the path
45702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45703  # take no chances and rewrite it.
45704  # Note: m4 eats our [], so we need to use [ and ] instead.
45705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45706  if test "x$has_forbidden_chars" != x; then
45707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45709  fi
45710
45711
45712  windows_path="$new_path"
45713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45714    unix_path=`$CYGPATH -u "$windows_path"`
45715    new_path="$unix_path"
45716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45718    new_path="$unix_path"
45719  fi
45720
45721  if test "x$path" != "x$new_path"; then
45722    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45724$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45725  fi
45726
45727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45729
45730  else
45731    # We're on a posix platform. Hooray! :)
45732    path="$POTENTIAL_FREETYPE_LIB_PATH"
45733    has_space=`$ECHO "$path" | $GREP " "`
45734    if test "x$has_space" != x; then
45735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45737      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45738    fi
45739
45740    # Use eval to expand a potential ~
45741    eval path="$path"
45742    if test ! -f "$path" && test ! -d "$path"; then
45743      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45744    fi
45745
45746    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45747  fi
45748
45749
45750    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45752$as_echo_n "checking for freetype includes... " >&6; }
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45754$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45755    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45757$as_echo_n "checking for freetype libraries... " >&6; }
45758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45759$as_echo "$FREETYPE_LIB_PATH" >&6; }
45760  fi
45761
45762          fi
45763
45764          if test "x$FOUND_FREETYPE" != xyes; then
45765            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45766
45767  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45768  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45769  METHOD="well-known location"
45770
45771  # First check if the files exists.
45772  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45773    # We found an arbitrary include file. That's a good sign.
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45775$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45776    FOUND_FREETYPE=yes
45777
45778    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45779    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45780      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45782      FOUND_FREETYPE=no
45783    else
45784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45785        # On Windows, we will need both .lib and .dll file.
45786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45789          FOUND_FREETYPE=no
45790        fi
45791      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45793        # Found lib in isa dir, use that instead.
45794        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45795      fi
45796    fi
45797  fi
45798
45799  if test "x$FOUND_FREETYPE" = xyes; then
45800
45801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45802
45803  # Input might be given as Windows format, start by converting to
45804  # unix format.
45805  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45806  new_path=`$CYGPATH -u "$path"`
45807
45808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45811  # "foo.exe" is OK but "foo" is an error.
45812  #
45813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45814  # It is also a way to make sure we got the proper file name for the real test later on.
45815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45816  if test "x$test_shortpath" = x; then
45817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45818$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45819    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45820  fi
45821
45822  # Call helper function which possibly converts this using DOS-style short mode.
45823  # If so, the updated path is stored in $new_path.
45824
45825  input_path="$new_path"
45826  # Check if we need to convert this using DOS-style short mode. If the path
45827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45828  # take no chances and rewrite it.
45829  # Note: m4 eats our [], so we need to use [ and ] instead.
45830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45831  if test "x$has_forbidden_chars" != x; then
45832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45836      # Going to short mode and back again did indeed matter. Since short mode is
45837      # case insensitive, let's make it lowercase to improve readability.
45838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45839      # Now convert it back to Unix-stile (cygpath)
45840      input_path=`$CYGPATH -u "$shortmode_path"`
45841      new_path="$input_path"
45842    fi
45843  fi
45844
45845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45846  if test "x$test_cygdrive_prefix" = x; then
45847    # As a simple fix, exclude /usr/bin since it's not a real path.
45848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45850      # a path prefixed by /cygdrive for fixpath to work.
45851      new_path="$CYGWIN_ROOT_PATH$input_path"
45852    fi
45853  fi
45854
45855
45856  if test "x$path" != "x$new_path"; then
45857    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45860  fi
45861
45862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45863
45864  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45865  has_colon=`$ECHO $path | $GREP ^.:`
45866  new_path="$path"
45867  if test "x$has_colon" = x; then
45868    # Not in mixed or Windows style, start by that.
45869    new_path=`cmd //c echo $path`
45870  fi
45871
45872
45873  input_path="$new_path"
45874  # Check if we need to convert this using DOS-style short mode. If the path
45875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45876  # take no chances and rewrite it.
45877  # Note: m4 eats our [], so we need to use [ and ] instead.
45878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45879  if test "x$has_forbidden_chars" != x; then
45880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45882  fi
45883
45884
45885  windows_path="$new_path"
45886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45887    unix_path=`$CYGPATH -u "$windows_path"`
45888    new_path="$unix_path"
45889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45891    new_path="$unix_path"
45892  fi
45893
45894  if test "x$path" != "x$new_path"; then
45895    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45898  fi
45899
45900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45902
45903  else
45904    # We're on a posix platform. Hooray! :)
45905    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45906    has_space=`$ECHO "$path" | $GREP " "`
45907    if test "x$has_space" != x; then
45908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45910      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45911    fi
45912
45913    # Use eval to expand a potential ~
45914    eval path="$path"
45915    if test ! -f "$path" && test ! -d "$path"; then
45916      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45917    fi
45918
45919    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45920  fi
45921
45922
45923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45924
45925  # Input might be given as Windows format, start by converting to
45926  # unix format.
45927  path="$POTENTIAL_FREETYPE_LIB_PATH"
45928  new_path=`$CYGPATH -u "$path"`
45929
45930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45933  # "foo.exe" is OK but "foo" is an error.
45934  #
45935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45936  # It is also a way to make sure we got the proper file name for the real test later on.
45937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45938  if test "x$test_shortpath" = x; then
45939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45941    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45942  fi
45943
45944  # Call helper function which possibly converts this using DOS-style short mode.
45945  # If so, the updated path is stored in $new_path.
45946
45947  input_path="$new_path"
45948  # Check if we need to convert this using DOS-style short mode. If the path
45949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45950  # take no chances and rewrite it.
45951  # Note: m4 eats our [], so we need to use [ and ] instead.
45952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45953  if test "x$has_forbidden_chars" != x; then
45954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45958      # Going to short mode and back again did indeed matter. Since short mode is
45959      # case insensitive, let's make it lowercase to improve readability.
45960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45961      # Now convert it back to Unix-stile (cygpath)
45962      input_path=`$CYGPATH -u "$shortmode_path"`
45963      new_path="$input_path"
45964    fi
45965  fi
45966
45967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45968  if test "x$test_cygdrive_prefix" = x; then
45969    # As a simple fix, exclude /usr/bin since it's not a real path.
45970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45972      # a path prefixed by /cygdrive for fixpath to work.
45973      new_path="$CYGWIN_ROOT_PATH$input_path"
45974    fi
45975  fi
45976
45977
45978  if test "x$path" != "x$new_path"; then
45979    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45982  fi
45983
45984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45985
45986  path="$POTENTIAL_FREETYPE_LIB_PATH"
45987  has_colon=`$ECHO $path | $GREP ^.:`
45988  new_path="$path"
45989  if test "x$has_colon" = x; then
45990    # Not in mixed or Windows style, start by that.
45991    new_path=`cmd //c echo $path`
45992  fi
45993
45994
45995  input_path="$new_path"
45996  # Check if we need to convert this using DOS-style short mode. If the path
45997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45998  # take no chances and rewrite it.
45999  # Note: m4 eats our [], so we need to use [ and ] instead.
46000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46001  if test "x$has_forbidden_chars" != x; then
46002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46004  fi
46005
46006
46007  windows_path="$new_path"
46008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46009    unix_path=`$CYGPATH -u "$windows_path"`
46010    new_path="$unix_path"
46011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46013    new_path="$unix_path"
46014  fi
46015
46016  if test "x$path" != "x$new_path"; then
46017    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46020  fi
46021
46022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46024
46025  else
46026    # We're on a posix platform. Hooray! :)
46027    path="$POTENTIAL_FREETYPE_LIB_PATH"
46028    has_space=`$ECHO "$path" | $GREP " "`
46029    if test "x$has_space" != x; then
46030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46032      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46033    fi
46034
46035    # Use eval to expand a potential ~
46036    eval path="$path"
46037    if test ! -f "$path" && test ! -d "$path"; then
46038      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46039    fi
46040
46041    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46042  fi
46043
46044
46045    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46047$as_echo_n "checking for freetype includes... " >&6; }
46048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46049$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46050    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46052$as_echo_n "checking for freetype libraries... " >&6; }
46053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46054$as_echo "$FREETYPE_LIB_PATH" >&6; }
46055  fi
46056
46057          fi
46058
46059          if test "x$FOUND_FREETYPE" != xyes; then
46060            FREETYPE_BASE_DIR="$SYSROOT/usr"
46061            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46062
46063  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46064  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46065  METHOD="well-known location"
46066
46067  # First check if the files exists.
46068  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46069    # We found an arbitrary include file. That's a good sign.
46070    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46071$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46072    FOUND_FREETYPE=yes
46073
46074    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46075    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46076      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46077$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46078      FOUND_FREETYPE=no
46079    else
46080      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46081        # On Windows, we will need both .lib and .dll file.
46082        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46083          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46085          FOUND_FREETYPE=no
46086        fi
46087      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46088          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46089        # Found lib in isa dir, use that instead.
46090        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46091      fi
46092    fi
46093  fi
46094
46095  if test "x$FOUND_FREETYPE" = xyes; then
46096
46097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46098
46099  # Input might be given as Windows format, start by converting to
46100  # unix format.
46101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46102  new_path=`$CYGPATH -u "$path"`
46103
46104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46107  # "foo.exe" is OK but "foo" is an error.
46108  #
46109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46110  # It is also a way to make sure we got the proper file name for the real test later on.
46111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46112  if test "x$test_shortpath" = x; then
46113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46116  fi
46117
46118  # Call helper function which possibly converts this using DOS-style short mode.
46119  # If so, the updated path is stored in $new_path.
46120
46121  input_path="$new_path"
46122  # Check if we need to convert this using DOS-style short mode. If the path
46123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46124  # take no chances and rewrite it.
46125  # Note: m4 eats our [], so we need to use [ and ] instead.
46126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46127  if test "x$has_forbidden_chars" != x; then
46128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46132      # Going to short mode and back again did indeed matter. Since short mode is
46133      # case insensitive, let's make it lowercase to improve readability.
46134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46135      # Now convert it back to Unix-stile (cygpath)
46136      input_path=`$CYGPATH -u "$shortmode_path"`
46137      new_path="$input_path"
46138    fi
46139  fi
46140
46141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46142  if test "x$test_cygdrive_prefix" = x; then
46143    # As a simple fix, exclude /usr/bin since it's not a real path.
46144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46146      # a path prefixed by /cygdrive for fixpath to work.
46147      new_path="$CYGWIN_ROOT_PATH$input_path"
46148    fi
46149  fi
46150
46151
46152  if test "x$path" != "x$new_path"; then
46153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46156  fi
46157
46158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46159
46160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46161  has_colon=`$ECHO $path | $GREP ^.:`
46162  new_path="$path"
46163  if test "x$has_colon" = x; then
46164    # Not in mixed or Windows style, start by that.
46165    new_path=`cmd //c echo $path`
46166  fi
46167
46168
46169  input_path="$new_path"
46170  # Check if we need to convert this using DOS-style short mode. If the path
46171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46172  # take no chances and rewrite it.
46173  # Note: m4 eats our [], so we need to use [ and ] instead.
46174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46175  if test "x$has_forbidden_chars" != x; then
46176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46178  fi
46179
46180
46181  windows_path="$new_path"
46182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46183    unix_path=`$CYGPATH -u "$windows_path"`
46184    new_path="$unix_path"
46185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46187    new_path="$unix_path"
46188  fi
46189
46190  if test "x$path" != "x$new_path"; then
46191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46194  fi
46195
46196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46198
46199  else
46200    # We're on a posix platform. Hooray! :)
46201    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46202    has_space=`$ECHO "$path" | $GREP " "`
46203    if test "x$has_space" != x; then
46204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46206      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46207    fi
46208
46209    # Use eval to expand a potential ~
46210    eval path="$path"
46211    if test ! -f "$path" && test ! -d "$path"; then
46212      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46213    fi
46214
46215    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46216  fi
46217
46218
46219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46220
46221  # Input might be given as Windows format, start by converting to
46222  # unix format.
46223  path="$POTENTIAL_FREETYPE_LIB_PATH"
46224  new_path=`$CYGPATH -u "$path"`
46225
46226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46229  # "foo.exe" is OK but "foo" is an error.
46230  #
46231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46232  # It is also a way to make sure we got the proper file name for the real test later on.
46233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46234  if test "x$test_shortpath" = x; then
46235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46237    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46238  fi
46239
46240  # Call helper function which possibly converts this using DOS-style short mode.
46241  # If so, the updated path is stored in $new_path.
46242
46243  input_path="$new_path"
46244  # Check if we need to convert this using DOS-style short mode. If the path
46245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46246  # take no chances and rewrite it.
46247  # Note: m4 eats our [], so we need to use [ and ] instead.
46248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46249  if test "x$has_forbidden_chars" != x; then
46250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46254      # Going to short mode and back again did indeed matter. Since short mode is
46255      # case insensitive, let's make it lowercase to improve readability.
46256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46257      # Now convert it back to Unix-stile (cygpath)
46258      input_path=`$CYGPATH -u "$shortmode_path"`
46259      new_path="$input_path"
46260    fi
46261  fi
46262
46263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46264  if test "x$test_cygdrive_prefix" = x; then
46265    # As a simple fix, exclude /usr/bin since it's not a real path.
46266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46268      # a path prefixed by /cygdrive for fixpath to work.
46269      new_path="$CYGWIN_ROOT_PATH$input_path"
46270    fi
46271  fi
46272
46273
46274  if test "x$path" != "x$new_path"; then
46275    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46278  fi
46279
46280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46281
46282  path="$POTENTIAL_FREETYPE_LIB_PATH"
46283  has_colon=`$ECHO $path | $GREP ^.:`
46284  new_path="$path"
46285  if test "x$has_colon" = x; then
46286    # Not in mixed or Windows style, start by that.
46287    new_path=`cmd //c echo $path`
46288  fi
46289
46290
46291  input_path="$new_path"
46292  # Check if we need to convert this using DOS-style short mode. If the path
46293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46294  # take no chances and rewrite it.
46295  # Note: m4 eats our [], so we need to use [ and ] instead.
46296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46297  if test "x$has_forbidden_chars" != x; then
46298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46300  fi
46301
46302
46303  windows_path="$new_path"
46304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46305    unix_path=`$CYGPATH -u "$windows_path"`
46306    new_path="$unix_path"
46307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46309    new_path="$unix_path"
46310  fi
46311
46312  if test "x$path" != "x$new_path"; then
46313    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46316  fi
46317
46318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46320
46321  else
46322    # We're on a posix platform. Hooray! :)
46323    path="$POTENTIAL_FREETYPE_LIB_PATH"
46324    has_space=`$ECHO "$path" | $GREP " "`
46325    if test "x$has_space" != x; then
46326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46327$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46328      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46329    fi
46330
46331    # Use eval to expand a potential ~
46332    eval path="$path"
46333    if test ! -f "$path" && test ! -d "$path"; then
46334      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46335    fi
46336
46337    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46338  fi
46339
46340
46341    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46343$as_echo_n "checking for freetype includes... " >&6; }
46344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46345$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46346    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46348$as_echo_n "checking for freetype libraries... " >&6; }
46349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46350$as_echo "$FREETYPE_LIB_PATH" >&6; }
46351  fi
46352
46353            else
46354
46355  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46356  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46357  METHOD="well-known location"
46358
46359  # First check if the files exists.
46360  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46361    # We found an arbitrary include file. That's a good sign.
46362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46363$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46364    FOUND_FREETYPE=yes
46365
46366    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46367    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46368      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46369$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46370      FOUND_FREETYPE=no
46371    else
46372      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46373        # On Windows, we will need both .lib and .dll file.
46374        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46375          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46376$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46377          FOUND_FREETYPE=no
46378        fi
46379      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46380          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46381        # Found lib in isa dir, use that instead.
46382        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46383      fi
46384    fi
46385  fi
46386
46387  if test "x$FOUND_FREETYPE" = xyes; then
46388
46389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46390
46391  # Input might be given as Windows format, start by converting to
46392  # unix format.
46393  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46394  new_path=`$CYGPATH -u "$path"`
46395
46396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46399  # "foo.exe" is OK but "foo" is an error.
46400  #
46401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46402  # It is also a way to make sure we got the proper file name for the real test later on.
46403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46404  if test "x$test_shortpath" = x; then
46405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46407    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46408  fi
46409
46410  # Call helper function which possibly converts this using DOS-style short mode.
46411  # If so, the updated path is stored in $new_path.
46412
46413  input_path="$new_path"
46414  # Check if we need to convert this using DOS-style short mode. If the path
46415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46416  # take no chances and rewrite it.
46417  # Note: m4 eats our [], so we need to use [ and ] instead.
46418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46419  if test "x$has_forbidden_chars" != x; then
46420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46424      # Going to short mode and back again did indeed matter. Since short mode is
46425      # case insensitive, let's make it lowercase to improve readability.
46426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46427      # Now convert it back to Unix-stile (cygpath)
46428      input_path=`$CYGPATH -u "$shortmode_path"`
46429      new_path="$input_path"
46430    fi
46431  fi
46432
46433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46434  if test "x$test_cygdrive_prefix" = x; then
46435    # As a simple fix, exclude /usr/bin since it's not a real path.
46436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46438      # a path prefixed by /cygdrive for fixpath to work.
46439      new_path="$CYGWIN_ROOT_PATH$input_path"
46440    fi
46441  fi
46442
46443
46444  if test "x$path" != "x$new_path"; then
46445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46448  fi
46449
46450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46451
46452  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46453  has_colon=`$ECHO $path | $GREP ^.:`
46454  new_path="$path"
46455  if test "x$has_colon" = x; then
46456    # Not in mixed or Windows style, start by that.
46457    new_path=`cmd //c echo $path`
46458  fi
46459
46460
46461  input_path="$new_path"
46462  # Check if we need to convert this using DOS-style short mode. If the path
46463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46464  # take no chances and rewrite it.
46465  # Note: m4 eats our [], so we need to use [ and ] instead.
46466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46467  if test "x$has_forbidden_chars" != x; then
46468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46470  fi
46471
46472
46473  windows_path="$new_path"
46474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46475    unix_path=`$CYGPATH -u "$windows_path"`
46476    new_path="$unix_path"
46477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46479    new_path="$unix_path"
46480  fi
46481
46482  if test "x$path" != "x$new_path"; then
46483    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46486  fi
46487
46488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46490
46491  else
46492    # We're on a posix platform. Hooray! :)
46493    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46494    has_space=`$ECHO "$path" | $GREP " "`
46495    if test "x$has_space" != x; then
46496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46497$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46498      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46499    fi
46500
46501    # Use eval to expand a potential ~
46502    eval path="$path"
46503    if test ! -f "$path" && test ! -d "$path"; then
46504      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46505    fi
46506
46507    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46508  fi
46509
46510
46511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46512
46513  # Input might be given as Windows format, start by converting to
46514  # unix format.
46515  path="$POTENTIAL_FREETYPE_LIB_PATH"
46516  new_path=`$CYGPATH -u "$path"`
46517
46518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46521  # "foo.exe" is OK but "foo" is an error.
46522  #
46523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46524  # It is also a way to make sure we got the proper file name for the real test later on.
46525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46526  if test "x$test_shortpath" = x; then
46527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46529    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46530  fi
46531
46532  # Call helper function which possibly converts this using DOS-style short mode.
46533  # If so, the updated path is stored in $new_path.
46534
46535  input_path="$new_path"
46536  # Check if we need to convert this using DOS-style short mode. If the path
46537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46538  # take no chances and rewrite it.
46539  # Note: m4 eats our [], so we need to use [ and ] instead.
46540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46541  if test "x$has_forbidden_chars" != x; then
46542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46546      # Going to short mode and back again did indeed matter. Since short mode is
46547      # case insensitive, let's make it lowercase to improve readability.
46548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46549      # Now convert it back to Unix-stile (cygpath)
46550      input_path=`$CYGPATH -u "$shortmode_path"`
46551      new_path="$input_path"
46552    fi
46553  fi
46554
46555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46556  if test "x$test_cygdrive_prefix" = x; then
46557    # As a simple fix, exclude /usr/bin since it's not a real path.
46558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46560      # a path prefixed by /cygdrive for fixpath to work.
46561      new_path="$CYGWIN_ROOT_PATH$input_path"
46562    fi
46563  fi
46564
46565
46566  if test "x$path" != "x$new_path"; then
46567    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46569$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46570  fi
46571
46572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46573
46574  path="$POTENTIAL_FREETYPE_LIB_PATH"
46575  has_colon=`$ECHO $path | $GREP ^.:`
46576  new_path="$path"
46577  if test "x$has_colon" = x; then
46578    # Not in mixed or Windows style, start by that.
46579    new_path=`cmd //c echo $path`
46580  fi
46581
46582
46583  input_path="$new_path"
46584  # Check if we need to convert this using DOS-style short mode. If the path
46585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46586  # take no chances and rewrite it.
46587  # Note: m4 eats our [], so we need to use [ and ] instead.
46588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46589  if test "x$has_forbidden_chars" != x; then
46590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46592  fi
46593
46594
46595  windows_path="$new_path"
46596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46597    unix_path=`$CYGPATH -u "$windows_path"`
46598    new_path="$unix_path"
46599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46601    new_path="$unix_path"
46602  fi
46603
46604  if test "x$path" != "x$new_path"; then
46605    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46608  fi
46609
46610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46612
46613  else
46614    # We're on a posix platform. Hooray! :)
46615    path="$POTENTIAL_FREETYPE_LIB_PATH"
46616    has_space=`$ECHO "$path" | $GREP " "`
46617    if test "x$has_space" != x; then
46618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46620      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46621    fi
46622
46623    # Use eval to expand a potential ~
46624    eval path="$path"
46625    if test ! -f "$path" && test ! -d "$path"; then
46626      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46627    fi
46628
46629    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46630  fi
46631
46632
46633    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46635$as_echo_n "checking for freetype includes... " >&6; }
46636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46637$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46638    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46640$as_echo_n "checking for freetype libraries... " >&6; }
46641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46642$as_echo "$FREETYPE_LIB_PATH" >&6; }
46643  fi
46644
46645              if test "x$FOUND_FREETYPE" != xyes; then
46646
46647  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46648  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46649  METHOD="well-known location"
46650
46651  # First check if the files exists.
46652  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46653    # We found an arbitrary include file. That's a good sign.
46654    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46655$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46656    FOUND_FREETYPE=yes
46657
46658    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46659    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46660      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46661$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46662      FOUND_FREETYPE=no
46663    else
46664      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46665        # On Windows, we will need both .lib and .dll file.
46666        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46667          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46669          FOUND_FREETYPE=no
46670        fi
46671      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46672          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46673        # Found lib in isa dir, use that instead.
46674        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46675      fi
46676    fi
46677  fi
46678
46679  if test "x$FOUND_FREETYPE" = xyes; then
46680
46681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46682
46683  # Input might be given as Windows format, start by converting to
46684  # unix format.
46685  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46686  new_path=`$CYGPATH -u "$path"`
46687
46688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46691  # "foo.exe" is OK but "foo" is an error.
46692  #
46693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46694  # It is also a way to make sure we got the proper file name for the real test later on.
46695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46696  if test "x$test_shortpath" = x; then
46697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46700  fi
46701
46702  # Call helper function which possibly converts this using DOS-style short mode.
46703  # If so, the updated path is stored in $new_path.
46704
46705  input_path="$new_path"
46706  # Check if we need to convert this using DOS-style short mode. If the path
46707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46708  # take no chances and rewrite it.
46709  # Note: m4 eats our [], so we need to use [ and ] instead.
46710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46711  if test "x$has_forbidden_chars" != x; then
46712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46716      # Going to short mode and back again did indeed matter. Since short mode is
46717      # case insensitive, let's make it lowercase to improve readability.
46718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46719      # Now convert it back to Unix-stile (cygpath)
46720      input_path=`$CYGPATH -u "$shortmode_path"`
46721      new_path="$input_path"
46722    fi
46723  fi
46724
46725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46726  if test "x$test_cygdrive_prefix" = x; then
46727    # As a simple fix, exclude /usr/bin since it's not a real path.
46728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46730      # a path prefixed by /cygdrive for fixpath to work.
46731      new_path="$CYGWIN_ROOT_PATH$input_path"
46732    fi
46733  fi
46734
46735
46736  if test "x$path" != "x$new_path"; then
46737    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46740  fi
46741
46742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46743
46744  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46745  has_colon=`$ECHO $path | $GREP ^.:`
46746  new_path="$path"
46747  if test "x$has_colon" = x; then
46748    # Not in mixed or Windows style, start by that.
46749    new_path=`cmd //c echo $path`
46750  fi
46751
46752
46753  input_path="$new_path"
46754  # Check if we need to convert this using DOS-style short mode. If the path
46755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46756  # take no chances and rewrite it.
46757  # Note: m4 eats our [], so we need to use [ and ] instead.
46758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46759  if test "x$has_forbidden_chars" != x; then
46760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46762  fi
46763
46764
46765  windows_path="$new_path"
46766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46767    unix_path=`$CYGPATH -u "$windows_path"`
46768    new_path="$unix_path"
46769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46771    new_path="$unix_path"
46772  fi
46773
46774  if test "x$path" != "x$new_path"; then
46775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46778  fi
46779
46780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46782
46783  else
46784    # We're on a posix platform. Hooray! :)
46785    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46786    has_space=`$ECHO "$path" | $GREP " "`
46787    if test "x$has_space" != x; then
46788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46790      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46791    fi
46792
46793    # Use eval to expand a potential ~
46794    eval path="$path"
46795    if test ! -f "$path" && test ! -d "$path"; then
46796      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46797    fi
46798
46799    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46800  fi
46801
46802
46803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46804
46805  # Input might be given as Windows format, start by converting to
46806  # unix format.
46807  path="$POTENTIAL_FREETYPE_LIB_PATH"
46808  new_path=`$CYGPATH -u "$path"`
46809
46810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46813  # "foo.exe" is OK but "foo" is an error.
46814  #
46815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46816  # It is also a way to make sure we got the proper file name for the real test later on.
46817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46818  if test "x$test_shortpath" = x; then
46819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46821    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46822  fi
46823
46824  # Call helper function which possibly converts this using DOS-style short mode.
46825  # If so, the updated path is stored in $new_path.
46826
46827  input_path="$new_path"
46828  # Check if we need to convert this using DOS-style short mode. If the path
46829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46830  # take no chances and rewrite it.
46831  # Note: m4 eats our [], so we need to use [ and ] instead.
46832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46833  if test "x$has_forbidden_chars" != x; then
46834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46838      # Going to short mode and back again did indeed matter. Since short mode is
46839      # case insensitive, let's make it lowercase to improve readability.
46840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46841      # Now convert it back to Unix-stile (cygpath)
46842      input_path=`$CYGPATH -u "$shortmode_path"`
46843      new_path="$input_path"
46844    fi
46845  fi
46846
46847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46848  if test "x$test_cygdrive_prefix" = x; then
46849    # As a simple fix, exclude /usr/bin since it's not a real path.
46850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46852      # a path prefixed by /cygdrive for fixpath to work.
46853      new_path="$CYGWIN_ROOT_PATH$input_path"
46854    fi
46855  fi
46856
46857
46858  if test "x$path" != "x$new_path"; then
46859    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46861$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46862  fi
46863
46864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46865
46866  path="$POTENTIAL_FREETYPE_LIB_PATH"
46867  has_colon=`$ECHO $path | $GREP ^.:`
46868  new_path="$path"
46869  if test "x$has_colon" = x; then
46870    # Not in mixed or Windows style, start by that.
46871    new_path=`cmd //c echo $path`
46872  fi
46873
46874
46875  input_path="$new_path"
46876  # Check if we need to convert this using DOS-style short mode. If the path
46877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46878  # take no chances and rewrite it.
46879  # Note: m4 eats our [], so we need to use [ and ] instead.
46880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46881  if test "x$has_forbidden_chars" != x; then
46882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46884  fi
46885
46886
46887  windows_path="$new_path"
46888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46889    unix_path=`$CYGPATH -u "$windows_path"`
46890    new_path="$unix_path"
46891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46893    new_path="$unix_path"
46894  fi
46895
46896  if test "x$path" != "x$new_path"; then
46897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46900  fi
46901
46902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46904
46905  else
46906    # We're on a posix platform. Hooray! :)
46907    path="$POTENTIAL_FREETYPE_LIB_PATH"
46908    has_space=`$ECHO "$path" | $GREP " "`
46909    if test "x$has_space" != x; then
46910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46911$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46912      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46913    fi
46914
46915    # Use eval to expand a potential ~
46916    eval path="$path"
46917    if test ! -f "$path" && test ! -d "$path"; then
46918      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46919    fi
46920
46921    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46922  fi
46923
46924
46925    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46927$as_echo_n "checking for freetype includes... " >&6; }
46928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46929$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46930    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46932$as_echo_n "checking for freetype libraries... " >&6; }
46933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46934$as_echo "$FREETYPE_LIB_PATH" >&6; }
46935  fi
46936
46937              fi
46938            fi
46939          fi
46940        fi
46941      fi # end check in well-known locations
46942
46943      if test "x$FOUND_FREETYPE" != xyes; then
46944
46945  # Print a helpful message on how to acquire the necessary build dependency.
46946  # freetype is the help tag: freetype, cups, pulse, alsa etc
46947  MISSING_DEPENDENCY=freetype
46948
46949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46950    cygwin_help $MISSING_DEPENDENCY
46951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46952    msys_help $MISSING_DEPENDENCY
46953  else
46954    PKGHANDLER_COMMAND=
46955
46956    case $PKGHANDLER in
46957      apt-get)
46958        apt_help     $MISSING_DEPENDENCY ;;
46959      yum)
46960        yum_help     $MISSING_DEPENDENCY ;;
46961      port)
46962        port_help    $MISSING_DEPENDENCY ;;
46963      pkgutil)
46964        pkgutil_help $MISSING_DEPENDENCY ;;
46965      pkgadd)
46966        pkgadd_help  $MISSING_DEPENDENCY ;;
46967    esac
46968
46969    if test "x$PKGHANDLER_COMMAND" != x; then
46970      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46971    fi
46972  fi
46973
46974        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46975      fi
46976    fi # end user specified settings
46977
46978    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46979    if test "x$FREETYPE_CFLAGS" = x; then
46980
46981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46982
46983  # Input might be given as Windows format, start by converting to
46984  # unix format.
46985  path="$FREETYPE_INCLUDE_PATH"
46986  new_path=`$CYGPATH -u "$path"`
46987
46988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46991  # "foo.exe" is OK but "foo" is an error.
46992  #
46993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46994  # It is also a way to make sure we got the proper file name for the real test later on.
46995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46996  if test "x$test_shortpath" = x; then
46997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46998$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46999    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47000  fi
47001
47002  # Call helper function which possibly converts this using DOS-style short mode.
47003  # If so, the updated path is stored in $new_path.
47004
47005  input_path="$new_path"
47006  # Check if we need to convert this using DOS-style short mode. If the path
47007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47008  # take no chances and rewrite it.
47009  # Note: m4 eats our [], so we need to use [ and ] instead.
47010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47011  if test "x$has_forbidden_chars" != x; then
47012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47016      # Going to short mode and back again did indeed matter. Since short mode is
47017      # case insensitive, let's make it lowercase to improve readability.
47018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47019      # Now convert it back to Unix-stile (cygpath)
47020      input_path=`$CYGPATH -u "$shortmode_path"`
47021      new_path="$input_path"
47022    fi
47023  fi
47024
47025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47026  if test "x$test_cygdrive_prefix" = x; then
47027    # As a simple fix, exclude /usr/bin since it's not a real path.
47028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47030      # a path prefixed by /cygdrive for fixpath to work.
47031      new_path="$CYGWIN_ROOT_PATH$input_path"
47032    fi
47033  fi
47034
47035
47036  if test "x$path" != "x$new_path"; then
47037    FREETYPE_INCLUDE_PATH="$new_path"
47038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47039$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47040  fi
47041
47042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47043
47044  path="$FREETYPE_INCLUDE_PATH"
47045  has_colon=`$ECHO $path | $GREP ^.:`
47046  new_path="$path"
47047  if test "x$has_colon" = x; then
47048    # Not in mixed or Windows style, start by that.
47049    new_path=`cmd //c echo $path`
47050  fi
47051
47052
47053  input_path="$new_path"
47054  # Check if we need to convert this using DOS-style short mode. If the path
47055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47056  # take no chances and rewrite it.
47057  # Note: m4 eats our [], so we need to use [ and ] instead.
47058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47059  if test "x$has_forbidden_chars" != x; then
47060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47062  fi
47063
47064
47065  windows_path="$new_path"
47066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47067    unix_path=`$CYGPATH -u "$windows_path"`
47068    new_path="$unix_path"
47069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47071    new_path="$unix_path"
47072  fi
47073
47074  if test "x$path" != "x$new_path"; then
47075    FREETYPE_INCLUDE_PATH="$new_path"
47076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47077$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47078  fi
47079
47080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47082
47083  else
47084    # We're on a posix platform. Hooray! :)
47085    path="$FREETYPE_INCLUDE_PATH"
47086    has_space=`$ECHO "$path" | $GREP " "`
47087    if test "x$has_space" != x; then
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47089$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47091    fi
47092
47093    # Use eval to expand a potential ~
47094    eval path="$path"
47095    if test ! -f "$path" && test ! -d "$path"; then
47096      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47097    fi
47098
47099    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47100  fi
47101
47102      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47103        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47104      else
47105        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47106      fi
47107    fi
47108
47109    if test "x$FREETYPE_LIBS" = x; then
47110
47111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47112
47113  # Input might be given as Windows format, start by converting to
47114  # unix format.
47115  path="$FREETYPE_LIB_PATH"
47116  new_path=`$CYGPATH -u "$path"`
47117
47118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47121  # "foo.exe" is OK but "foo" is an error.
47122  #
47123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47124  # It is also a way to make sure we got the proper file name for the real test later on.
47125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47126  if test "x$test_shortpath" = x; then
47127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47128$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47129    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47130  fi
47131
47132  # Call helper function which possibly converts this using DOS-style short mode.
47133  # If so, the updated path is stored in $new_path.
47134
47135  input_path="$new_path"
47136  # Check if we need to convert this using DOS-style short mode. If the path
47137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47138  # take no chances and rewrite it.
47139  # Note: m4 eats our [], so we need to use [ and ] instead.
47140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47141  if test "x$has_forbidden_chars" != x; then
47142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47146      # Going to short mode and back again did indeed matter. Since short mode is
47147      # case insensitive, let's make it lowercase to improve readability.
47148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47149      # Now convert it back to Unix-stile (cygpath)
47150      input_path=`$CYGPATH -u "$shortmode_path"`
47151      new_path="$input_path"
47152    fi
47153  fi
47154
47155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47156  if test "x$test_cygdrive_prefix" = x; then
47157    # As a simple fix, exclude /usr/bin since it's not a real path.
47158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47160      # a path prefixed by /cygdrive for fixpath to work.
47161      new_path="$CYGWIN_ROOT_PATH$input_path"
47162    fi
47163  fi
47164
47165
47166  if test "x$path" != "x$new_path"; then
47167    FREETYPE_LIB_PATH="$new_path"
47168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47169$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47170  fi
47171
47172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47173
47174  path="$FREETYPE_LIB_PATH"
47175  has_colon=`$ECHO $path | $GREP ^.:`
47176  new_path="$path"
47177  if test "x$has_colon" = x; then
47178    # Not in mixed or Windows style, start by that.
47179    new_path=`cmd //c echo $path`
47180  fi
47181
47182
47183  input_path="$new_path"
47184  # Check if we need to convert this using DOS-style short mode. If the path
47185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47186  # take no chances and rewrite it.
47187  # Note: m4 eats our [], so we need to use [ and ] instead.
47188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47189  if test "x$has_forbidden_chars" != x; then
47190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47192  fi
47193
47194
47195  windows_path="$new_path"
47196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47197    unix_path=`$CYGPATH -u "$windows_path"`
47198    new_path="$unix_path"
47199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47201    new_path="$unix_path"
47202  fi
47203
47204  if test "x$path" != "x$new_path"; then
47205    FREETYPE_LIB_PATH="$new_path"
47206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47207$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47208  fi
47209
47210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47212
47213  else
47214    # We're on a posix platform. Hooray! :)
47215    path="$FREETYPE_LIB_PATH"
47216    has_space=`$ECHO "$path" | $GREP " "`
47217    if test "x$has_space" != x; then
47218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47219$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47220      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47221    fi
47222
47223    # Use eval to expand a potential ~
47224    eval path="$path"
47225    if test ! -f "$path" && test ! -d "$path"; then
47226      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47227    fi
47228
47229    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47230  fi
47231
47232      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47233        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47234      else
47235        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47236      fi
47237    fi
47238
47239    # Try to compile it
47240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47241$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47242    ac_ext=cpp
47243ac_cpp='$CXXCPP $CPPFLAGS'
47244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47247
47248    PREV_CXXCFLAGS="$CXXFLAGS"
47249    PREV_LIBS="$LIBS"
47250    PREV_CXX="$CXX"
47251    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47252    LIBS="$LIBS $FREETYPE_LIBS"
47253    CXX="$FIXPATH $CXX"
47254    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47255/* end confdefs.h.  */
47256
47257          #include<ft2build.h>
47258          #include FT_FREETYPE_H
47259          int main () {
47260            FT_Init_FreeType(NULL);
47261            return 0;
47262          }
47263
47264_ACEOF
47265if ac_fn_cxx_try_link "$LINENO"; then :
47266
47267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47268$as_echo "yes" >&6; }
47269
47270else
47271
47272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47273$as_echo "no" >&6; }
47274          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47275$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47276          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47277$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47278
47279
47280  # Print a helpful message on how to acquire the necessary build dependency.
47281  # freetype is the help tag: freetype, cups, pulse, alsa etc
47282  MISSING_DEPENDENCY=freetype
47283
47284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47285    cygwin_help $MISSING_DEPENDENCY
47286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47287    msys_help $MISSING_DEPENDENCY
47288  else
47289    PKGHANDLER_COMMAND=
47290
47291    case $PKGHANDLER in
47292      apt-get)
47293        apt_help     $MISSING_DEPENDENCY ;;
47294      yum)
47295        yum_help     $MISSING_DEPENDENCY ;;
47296      port)
47297        port_help    $MISSING_DEPENDENCY ;;
47298      pkgutil)
47299        pkgutil_help $MISSING_DEPENDENCY ;;
47300      pkgadd)
47301        pkgadd_help  $MISSING_DEPENDENCY ;;
47302    esac
47303
47304    if test "x$PKGHANDLER_COMMAND" != x; then
47305      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47306    fi
47307  fi
47308
47309
47310          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47311
47312
47313fi
47314rm -f core conftest.err conftest.$ac_objext \
47315    conftest$ac_exeext conftest.$ac_ext
47316    CXXCFLAGS="$PREV_CXXFLAGS"
47317    LIBS="$PREV_LIBS"
47318    CXX="$PREV_CXX"
47319    ac_ext=cpp
47320ac_cpp='$CXXCPP $CPPFLAGS'
47321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47324
47325
47326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47327$as_echo_n "checking if we should bundle freetype... " >&6; }
47328    if test "x$BUNDLE_FREETYPE" = xyes; then
47329      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47330    fi
47331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47332$as_echo "$BUNDLE_FREETYPE" >&6; }
47333
47334  fi # end freetype needed
47335
47336
47337
47338
47339
47340
47341
47342  ###############################################################################
47343  #
47344  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47345  #
47346
47347# Check whether --with-alsa was given.
47348if test "${with_alsa+set}" = set; then :
47349  withval=$with_alsa;
47350fi
47351
47352
47353# Check whether --with-alsa-include was given.
47354if test "${with_alsa_include+set}" = set; then :
47355  withval=$with_alsa_include;
47356fi
47357
47358
47359# Check whether --with-alsa-lib was given.
47360if test "${with_alsa_lib+set}" = set; then :
47361  withval=$with_alsa_lib;
47362fi
47363
47364
47365  if test "x$ALSA_NOT_NEEDED" = xyes; then
47366    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47367      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47368$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47369    fi
47370    ALSA_CFLAGS=
47371    ALSA_LIBS=
47372  else
47373    ALSA_FOUND=no
47374
47375    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47376      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47377    fi
47378
47379    if test "x${with_alsa}" != x; then
47380      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47381      ALSA_CFLAGS="-I${with_alsa}/include"
47382      ALSA_FOUND=yes
47383    fi
47384    if test "x${with_alsa_include}" != x; then
47385      ALSA_CFLAGS="-I${with_alsa_include}"
47386      ALSA_FOUND=yes
47387    fi
47388    if test "x${with_alsa_lib}" != x; then
47389      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47390      ALSA_FOUND=yes
47391    fi
47392    if test "x$ALSA_FOUND" = xno; then
47393
47394
47395  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47396    # Source the builddeps file again, to make sure it uses the latest variables!
47397    . $builddepsfile
47398    # Look for a target and build machine specific resource!
47399    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47400    if test "x$resource" = x; then
47401      # Ok, lets instead look for a target specific resource
47402      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47403    fi
47404    if test "x$resource" = x; then
47405      # Ok, lets instead look for a build specific resource
47406      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47407    fi
47408    if test "x$resource" = x; then
47409      # Ok, lets instead look for a generic resource
47410      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47411      resource=${builddep_alsa}
47412    fi
47413    if test "x$resource" != x; then
47414      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47415$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47416      # If the resource in the builddeps.conf file is an existing directory,
47417      # for example /java/linux/cups
47418      if test -d ${resource}; then
47419        depdir=${resource}
47420      else
47421
47422  # alsa is for example mymodule
47423  # $resource is for example libs/general/libmymod_1_2_3.zip
47424  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47425  # $with_builddeps_dir is for example /localhome/builddeps
47426  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47427  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47428  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47429  filename=`basename $resource`
47430  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47431  filebase=${filename%%.*}
47432  extension=${filename#*.}
47433  installdir=$with_builddeps_dir/$filebase
47434  if test ! -f $installdir/$filename.unpacked; then
47435    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47436$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47437    if test ! -d $installdir; then
47438      mkdir -p $installdir
47439    fi
47440    if test ! -d $installdir; then
47441      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47442    fi
47443    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47444    touch $tmpfile
47445    if test ! -f $tmpfile; then
47446      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47447    fi
47448
47449  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47450  # $tmpfile is the local file name for the downloaded file.
47451  VALID_TOOL=no
47452  if test "x$BDEPS_FTP" = xwget; then
47453    VALID_TOOL=yes
47454    wget -O $tmpfile $with_builddeps_server/$resource
47455  fi
47456  if test "x$BDEPS_FTP" = xlftp; then
47457    VALID_TOOL=yes
47458    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47459  fi
47460  if test "x$BDEPS_FTP" = xftp; then
47461    VALID_TOOL=yes
47462    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47463    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47464    FTPUSERPWD=${FTPSERVER%%@*}
47465    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47466      FTPUSER=${userpwd%%:*}
47467      FTPPWD=${userpwd#*@}
47468      FTPSERVER=${FTPSERVER#*@}
47469    else
47470      FTPUSER=ftp
47471      FTPPWD=ftp
47472    fi
47473    # the "pass" command does not work on some
47474    # ftp clients (read ftp.exe) but if it works,
47475    # passive mode is better!
47476    ( \
47477        echo "user $FTPUSER $FTPPWD"        ; \
47478        echo "pass"                         ; \
47479        echo "bin"                          ; \
47480        echo "get $FTPPATH $tmpfile"              ; \
47481    ) | ftp -in $FTPSERVER
47482  fi
47483  if test "x$VALID_TOOL" != xyes; then
47484    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47485  fi
47486
47487    mv $tmpfile $installdir/$filename
47488    if test ! -s $installdir/$filename; then
47489      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47490    fi
47491    case "$extension" in
47492      zip)  echo "Unzipping $installdir/$filename..."
47493        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47494        ;;
47495      tar.gz) echo "Untaring $installdir/$filename..."
47496        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47497        ;;
47498      tgz) echo "Untaring $installdir/$filename..."
47499        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47500        ;;
47501      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47502        ;;
47503    esac
47504  fi
47505  if test -f $installdir/$filename.unpacked; then
47506    depdir=$installdir
47507  fi
47508
47509      fi
47510      # Source the builddeps file again, because in the previous command, the depdir
47511      # was updated to point at the current build dependency install directory.
47512      . $builddepsfile
47513      # Now extract variables from the builddeps.conf files.
47514      theroot=${builddep_alsa_ROOT}
47515      thecflags=${builddep_alsa_CFLAGS}
47516      thelibs=${builddep_alsa_LIBS}
47517      if test "x$depdir" = x; then
47518        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47519      fi
47520      ALSA=$depdir
47521      if test "x$theroot" != x; then
47522        ALSA="$theroot"
47523      fi
47524      if test "x$thecflags" != x; then
47525        ALSA_CFLAGS="$thecflags"
47526      fi
47527      if test "x$thelibs" != x; then
47528        ALSA_LIBS="$thelibs"
47529      fi
47530      ALSA_FOUND=yes
47531      else ALSA_FOUND=no
47532
47533    fi
47534    else ALSA_FOUND=no
47535
47536  fi
47537
47538    fi
47539    # Do not try pkg-config if we have a sysroot set.
47540    if test "x$SYSROOT" = x; then
47541      if test "x$ALSA_FOUND" = xno; then
47542
47543pkg_failed=no
47544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47545$as_echo_n "checking for ALSA... " >&6; }
47546
47547if test -n "$ALSA_CFLAGS"; then
47548    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47549 elif test -n "$PKG_CONFIG"; then
47550    if test -n "$PKG_CONFIG" && \
47551    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47552  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47553  ac_status=$?
47554  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47555  test $ac_status = 0; }; then
47556  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47557else
47558  pkg_failed=yes
47559fi
47560 else
47561    pkg_failed=untried
47562fi
47563if test -n "$ALSA_LIBS"; then
47564    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47565 elif test -n "$PKG_CONFIG"; then
47566    if test -n "$PKG_CONFIG" && \
47567    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47568  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47569  ac_status=$?
47570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47571  test $ac_status = 0; }; then
47572  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47573else
47574  pkg_failed=yes
47575fi
47576 else
47577    pkg_failed=untried
47578fi
47579
47580
47581
47582if test $pkg_failed = yes; then
47583
47584if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47585        _pkg_short_errors_supported=yes
47586else
47587        _pkg_short_errors_supported=no
47588fi
47589        if test $_pkg_short_errors_supported = yes; then
47590	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47591        else
47592	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47593        fi
47594	# Put the nasty error message in config.log where it belongs
47595	echo "$ALSA_PKG_ERRORS" >&5
47596
47597	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47598$as_echo "no" >&6; }
47599                ALSA_FOUND=no
47600elif test $pkg_failed = untried; then
47601	ALSA_FOUND=no
47602else
47603	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47604	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47606$as_echo "yes" >&6; }
47607	ALSA_FOUND=yes
47608fi
47609      fi
47610    fi
47611    if test "x$ALSA_FOUND" = xno; then
47612      for ac_header in alsa/asoundlib.h
47613do :
47614  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47615if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47616  cat >>confdefs.h <<_ACEOF
47617#define HAVE_ALSA_ASOUNDLIB_H 1
47618_ACEOF
47619
47620            ALSA_FOUND=yes
47621            ALSA_CFLAGS=-Iignoreme
47622            ALSA_LIBS=-lasound
47623            DEFAULT_ALSA=yes
47624
47625else
47626  ALSA_FOUND=no
47627fi
47628
47629done
47630
47631    fi
47632    if test "x$ALSA_FOUND" = xno; then
47633
47634  # Print a helpful message on how to acquire the necessary build dependency.
47635  # alsa is the help tag: freetype, cups, pulse, alsa etc
47636  MISSING_DEPENDENCY=alsa
47637
47638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47639    cygwin_help $MISSING_DEPENDENCY
47640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47641    msys_help $MISSING_DEPENDENCY
47642  else
47643    PKGHANDLER_COMMAND=
47644
47645    case $PKGHANDLER in
47646      apt-get)
47647        apt_help     $MISSING_DEPENDENCY ;;
47648      yum)
47649        yum_help     $MISSING_DEPENDENCY ;;
47650      port)
47651        port_help    $MISSING_DEPENDENCY ;;
47652      pkgutil)
47653        pkgutil_help $MISSING_DEPENDENCY ;;
47654      pkgadd)
47655        pkgadd_help  $MISSING_DEPENDENCY ;;
47656    esac
47657
47658    if test "x$PKGHANDLER_COMMAND" != x; then
47659      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47660    fi
47661  fi
47662
47663      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47664    fi
47665  fi
47666
47667
47668
47669
47670
47671
47672  ###############################################################################
47673  #
47674  # Check for the jpeg library
47675  #
47676
47677  USE_EXTERNAL_LIBJPEG=true
47678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47679$as_echo_n "checking for main in -ljpeg... " >&6; }
47680if ${ac_cv_lib_jpeg_main+:} false; then :
47681  $as_echo_n "(cached) " >&6
47682else
47683  ac_check_lib_save_LIBS=$LIBS
47684LIBS="-ljpeg  $LIBS"
47685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47686/* end confdefs.h.  */
47687
47688
47689int
47690main ()
47691{
47692return main ();
47693  ;
47694  return 0;
47695}
47696_ACEOF
47697if ac_fn_cxx_try_link "$LINENO"; then :
47698  ac_cv_lib_jpeg_main=yes
47699else
47700  ac_cv_lib_jpeg_main=no
47701fi
47702rm -f core conftest.err conftest.$ac_objext \
47703    conftest$ac_exeext conftest.$ac_ext
47704LIBS=$ac_check_lib_save_LIBS
47705fi
47706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47707$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47708if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47709  cat >>confdefs.h <<_ACEOF
47710#define HAVE_LIBJPEG 1
47711_ACEOF
47712
47713  LIBS="-ljpeg $LIBS"
47714
47715else
47716   USE_EXTERNAL_LIBJPEG=false
47717      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47718$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47719
47720fi
47721
47722
47723
47724  ###############################################################################
47725  #
47726  # Check for the gif library
47727  #
47728
47729
47730# Check whether --with-giflib was given.
47731if test "${with_giflib+set}" = set; then :
47732  withval=$with_giflib;
47733fi
47734
47735
47736
47737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47738$as_echo_n "checking for which giflib to use... " >&6; }
47739
47740  # default is bundled
47741  DEFAULT_GIFLIB=bundled
47742
47743  #
47744  # if user didn't specify, use DEFAULT_GIFLIB
47745  #
47746  if test "x${with_giflib}" = "x"; then
47747    with_giflib=${DEFAULT_GIFLIB}
47748  fi
47749
47750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47751$as_echo "${with_giflib}" >&6; }
47752
47753  if test "x${with_giflib}" = "xbundled"; then
47754    USE_EXTERNAL_LIBGIF=false
47755  elif test "x${with_giflib}" = "xsystem"; then
47756    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47757if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47758
47759else
47760   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47761fi
47762
47763
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47765$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47766if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47767  $as_echo_n "(cached) " >&6
47768else
47769  ac_check_lib_save_LIBS=$LIBS
47770LIBS="-lgif  $LIBS"
47771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47772/* end confdefs.h.  */
47773
47774/* Override any GCC internal prototype to avoid an error.
47775   Use char because int might match the return type of a GCC
47776   builtin and then its argument prototype would still apply.  */
47777#ifdef __cplusplus
47778extern "C"
47779#endif
47780char DGifGetCode ();
47781int
47782main ()
47783{
47784return DGifGetCode ();
47785  ;
47786  return 0;
47787}
47788_ACEOF
47789if ac_fn_cxx_try_link "$LINENO"; then :
47790  ac_cv_lib_gif_DGifGetCode=yes
47791else
47792  ac_cv_lib_gif_DGifGetCode=no
47793fi
47794rm -f core conftest.err conftest.$ac_objext \
47795    conftest$ac_exeext conftest.$ac_ext
47796LIBS=$ac_check_lib_save_LIBS
47797fi
47798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47799$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47800if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47801  cat >>confdefs.h <<_ACEOF
47802#define HAVE_LIBGIF 1
47803_ACEOF
47804
47805  LIBS="-lgif $LIBS"
47806
47807else
47808   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47809fi
47810
47811
47812    USE_EXTERNAL_LIBGIF=true
47813  else
47814    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47815  fi
47816
47817
47818  ###############################################################################
47819  #
47820  # Check for the lcms2 library
47821  #
47822
47823
47824# Check whether --with-lcms was given.
47825if test "${with_lcms+set}" = set; then :
47826  withval=$with_lcms;
47827fi
47828
47829
47830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47831$as_echo_n "checking for which lcms to use... " >&6; }
47832
47833  DEFAULT_LCMS=bundled
47834
47835  #
47836  # If user didn't specify, use DEFAULT_LCMS
47837  #
47838  if test "x${with_lcms}" = "x"; then
47839      with_lcms=${DEFAULT_LCMS}
47840  fi
47841
47842  if test "x${with_lcms}" = "xbundled"; then
47843    USE_EXTERNAL_LCMS=false
47844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47845$as_echo "bundled" >&6; }
47846  elif test "x${with_lcms}" = "xsystem"; then
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47848$as_echo "system" >&6; }
47849
47850pkg_failed=no
47851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47852$as_echo_n "checking for LCMS... " >&6; }
47853
47854if test -n "$LCMS_CFLAGS"; then
47855    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47856 elif test -n "$PKG_CONFIG"; then
47857    if test -n "$PKG_CONFIG" && \
47858    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47859  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47860  ac_status=$?
47861  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47862  test $ac_status = 0; }; then
47863  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47864else
47865  pkg_failed=yes
47866fi
47867 else
47868    pkg_failed=untried
47869fi
47870if test -n "$LCMS_LIBS"; then
47871    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47872 elif test -n "$PKG_CONFIG"; then
47873    if test -n "$PKG_CONFIG" && \
47874    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47875  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47876  ac_status=$?
47877  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47878  test $ac_status = 0; }; then
47879  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47880else
47881  pkg_failed=yes
47882fi
47883 else
47884    pkg_failed=untried
47885fi
47886
47887
47888
47889if test $pkg_failed = yes; then
47890
47891if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47892        _pkg_short_errors_supported=yes
47893else
47894        _pkg_short_errors_supported=no
47895fi
47896        if test $_pkg_short_errors_supported = yes; then
47897	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47898        else
47899	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47900        fi
47901	# Put the nasty error message in config.log where it belongs
47902	echo "$LCMS_PKG_ERRORS" >&5
47903
47904	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47905$as_echo "no" >&6; }
47906                LCMS_FOUND=no
47907elif test $pkg_failed = untried; then
47908	LCMS_FOUND=no
47909else
47910	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47911	LCMS_LIBS=$pkg_cv_LCMS_LIBS
47912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47913$as_echo "yes" >&6; }
47914	LCMS_FOUND=yes
47915fi
47916    if test "x${LCMS_FOUND}" = "xyes"; then
47917      USE_EXTERNAL_LCMS=true
47918    else
47919      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
47920    fi
47921  else
47922    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
47923  fi
47924
47925
47926
47927  ###############################################################################
47928  #
47929  # Check for the png library
47930  #
47931
47932
47933# Check whether --with-libpng was given.
47934if test "${with_libpng+set}" = set; then :
47935  withval=$with_libpng;
47936fi
47937
47938
47939
47940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47941$as_echo_n "checking for which libpng to use... " >&6; }
47942
47943  # default is bundled
47944  DEFAULT_LIBPNG=bundled
47945
47946  #
47947  # if user didn't specify, use DEFAULT_LIBPNG
47948  #
47949  if test "x${with_libpng}" = "x"; then
47950      with_libpng=${DEFAULT_LIBPNG}
47951  fi
47952
47953  if test "x${with_libpng}" = "xbundled"; then
47954      USE_EXTERNAL_LIBPNG=false
47955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47956$as_echo "bundled" >&6; }
47957  elif test "x${with_libpng}" = "xsystem"; then
47958
47959pkg_failed=no
47960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47961$as_echo_n "checking for PNG... " >&6; }
47962
47963if test -n "$PNG_CFLAGS"; then
47964    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47965 elif test -n "$PKG_CONFIG"; then
47966    if test -n "$PKG_CONFIG" && \
47967    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47968  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47969  ac_status=$?
47970  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47971  test $ac_status = 0; }; then
47972  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47973else
47974  pkg_failed=yes
47975fi
47976 else
47977    pkg_failed=untried
47978fi
47979if test -n "$PNG_LIBS"; then
47980    pkg_cv_PNG_LIBS="$PNG_LIBS"
47981 elif test -n "$PKG_CONFIG"; then
47982    if test -n "$PKG_CONFIG" && \
47983    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47984  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47985  ac_status=$?
47986  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47987  test $ac_status = 0; }; then
47988  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47989else
47990  pkg_failed=yes
47991fi
47992 else
47993    pkg_failed=untried
47994fi
47995
47996
47997
47998if test $pkg_failed = yes; then
47999
48000if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48001        _pkg_short_errors_supported=yes
48002else
48003        _pkg_short_errors_supported=no
48004fi
48005        if test $_pkg_short_errors_supported = yes; then
48006	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48007        else
48008	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48009        fi
48010	# Put the nasty error message in config.log where it belongs
48011	echo "$PNG_PKG_ERRORS" >&5
48012
48013	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48014$as_echo "no" >&6; }
48015                 LIBPNG_FOUND=no
48016elif test $pkg_failed = untried; then
48017	 LIBPNG_FOUND=no
48018else
48019	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48020	PNG_LIBS=$pkg_cv_PNG_LIBS
48021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48022$as_echo "yes" >&6; }
48023	 LIBPNG_FOUND=yes
48024fi
48025      if test "x${LIBPNG_FOUND}" = "xyes"; then
48026          USE_EXTERNAL_LIBPNG=true
48027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48028$as_echo "system" >&6; }
48029      else
48030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48031$as_echo "system not found" >&6; }
48032          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48033      fi
48034  else
48035      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48036  fi
48037
48038
48039  ###############################################################################
48040  #
48041  # Check for the zlib library
48042  #
48043
48044
48045# Check whether --with-zlib was given.
48046if test "${with_zlib+set}" = set; then :
48047  withval=$with_zlib;
48048fi
48049
48050
48051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48052$as_echo_n "checking for compress in -lz... " >&6; }
48053if ${ac_cv_lib_z_compress+:} false; then :
48054  $as_echo_n "(cached) " >&6
48055else
48056  ac_check_lib_save_LIBS=$LIBS
48057LIBS="-lz  $LIBS"
48058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48059/* end confdefs.h.  */
48060
48061/* Override any GCC internal prototype to avoid an error.
48062   Use char because int might match the return type of a GCC
48063   builtin and then its argument prototype would still apply.  */
48064#ifdef __cplusplus
48065extern "C"
48066#endif
48067char compress ();
48068int
48069main ()
48070{
48071return compress ();
48072  ;
48073  return 0;
48074}
48075_ACEOF
48076if ac_fn_cxx_try_link "$LINENO"; then :
48077  ac_cv_lib_z_compress=yes
48078else
48079  ac_cv_lib_z_compress=no
48080fi
48081rm -f core conftest.err conftest.$ac_objext \
48082    conftest$ac_exeext conftest.$ac_ext
48083LIBS=$ac_check_lib_save_LIBS
48084fi
48085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48086$as_echo "$ac_cv_lib_z_compress" >&6; }
48087if test "x$ac_cv_lib_z_compress" = xyes; then :
48088   ZLIB_FOUND=yes
48089else
48090   ZLIB_FOUND=no
48091fi
48092
48093
48094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48095$as_echo_n "checking for which zlib to use... " >&6; }
48096
48097  DEFAULT_ZLIB=bundled
48098  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48099    #
48100    # On macosx default is system...on others default is
48101    #
48102    DEFAULT_ZLIB=system
48103  fi
48104
48105  if test "x${ZLIB_FOUND}" != "xyes"; then
48106    #
48107    # If we don't find any system...set default to bundled
48108    #
48109    DEFAULT_ZLIB=bundled
48110  fi
48111
48112  #
48113  # If user didn't specify, use DEFAULT_ZLIB
48114  #
48115  if test "x${with_zlib}" = "x"; then
48116    with_zlib=${DEFAULT_ZLIB}
48117  fi
48118
48119  if test "x${with_zlib}" = "xbundled"; then
48120    USE_EXTERNAL_LIBZ=false
48121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48122$as_echo "bundled" >&6; }
48123  elif test "x${with_zlib}" = "xsystem"; then
48124    if test "x${ZLIB_FOUND}" = "xyes"; then
48125      USE_EXTERNAL_LIBZ=true
48126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48127$as_echo "system" >&6; }
48128    else
48129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48130$as_echo "system not found" >&6; }
48131      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48132    fi
48133  else
48134    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48135  fi
48136
48137
48138
48139  ###############################################################################
48140  LIBZIP_CAN_USE_MMAP=true
48141
48142
48143
48144  ###############################################################################
48145  #
48146  # Check if altzone exists in time.h
48147  #
48148
48149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48150/* end confdefs.h.  */
48151#include <time.h>
48152int
48153main ()
48154{
48155return (int)altzone;
48156  ;
48157  return 0;
48158}
48159_ACEOF
48160if ac_fn_cxx_try_link "$LINENO"; then :
48161  has_altzone=yes
48162else
48163  has_altzone=no
48164fi
48165rm -f core conftest.err conftest.$ac_objext \
48166    conftest$ac_exeext conftest.$ac_ext
48167  if test "x$has_altzone" = xyes; then
48168
48169$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48170
48171  fi
48172
48173  ###############################################################################
48174  #
48175  # Check the maths library
48176  #
48177
48178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48179$as_echo_n "checking for cos in -lm... " >&6; }
48180if ${ac_cv_lib_m_cos+:} false; then :
48181  $as_echo_n "(cached) " >&6
48182else
48183  ac_check_lib_save_LIBS=$LIBS
48184LIBS="-lm  $LIBS"
48185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48186/* end confdefs.h.  */
48187
48188/* Override any GCC internal prototype to avoid an error.
48189   Use char because int might match the return type of a GCC
48190   builtin and then its argument prototype would still apply.  */
48191#ifdef __cplusplus
48192extern "C"
48193#endif
48194char cos ();
48195int
48196main ()
48197{
48198return cos ();
48199  ;
48200  return 0;
48201}
48202_ACEOF
48203if ac_fn_cxx_try_link "$LINENO"; then :
48204  ac_cv_lib_m_cos=yes
48205else
48206  ac_cv_lib_m_cos=no
48207fi
48208rm -f core conftest.err conftest.$ac_objext \
48209    conftest$ac_exeext conftest.$ac_ext
48210LIBS=$ac_check_lib_save_LIBS
48211fi
48212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48213$as_echo "$ac_cv_lib_m_cos" >&6; }
48214if test "x$ac_cv_lib_m_cos" = xyes; then :
48215  cat >>confdefs.h <<_ACEOF
48216#define HAVE_LIBM 1
48217_ACEOF
48218
48219  LIBS="-lm $LIBS"
48220
48221else
48222
48223        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48224$as_echo "$as_me: Maths library was not found" >&6;}
48225
48226
48227fi
48228
48229
48230
48231  ###############################################################################
48232  #
48233  # Check for libdl.so
48234
48235  save_LIBS="$LIBS"
48236  LIBS=""
48237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48238$as_echo_n "checking for dlopen in -ldl... " >&6; }
48239if ${ac_cv_lib_dl_dlopen+:} false; then :
48240  $as_echo_n "(cached) " >&6
48241else
48242  ac_check_lib_save_LIBS=$LIBS
48243LIBS="-ldl  $LIBS"
48244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48245/* end confdefs.h.  */
48246
48247/* Override any GCC internal prototype to avoid an error.
48248   Use char because int might match the return type of a GCC
48249   builtin and then its argument prototype would still apply.  */
48250#ifdef __cplusplus
48251extern "C"
48252#endif
48253char dlopen ();
48254int
48255main ()
48256{
48257return dlopen ();
48258  ;
48259  return 0;
48260}
48261_ACEOF
48262if ac_fn_cxx_try_link "$LINENO"; then :
48263  ac_cv_lib_dl_dlopen=yes
48264else
48265  ac_cv_lib_dl_dlopen=no
48266fi
48267rm -f core conftest.err conftest.$ac_objext \
48268    conftest$ac_exeext conftest.$ac_ext
48269LIBS=$ac_check_lib_save_LIBS
48270fi
48271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48272$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48273if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48274  cat >>confdefs.h <<_ACEOF
48275#define HAVE_LIBDL 1
48276_ACEOF
48277
48278  LIBS="-ldl $LIBS"
48279
48280fi
48281
48282  LIBDL="$LIBS"
48283
48284  LIBS="$save_LIBS"
48285
48286
48287  ###############################################################################
48288  #
48289  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48290  # dynamic build is configured on command line.
48291  #
48292
48293# Check whether --with-stdc++lib was given.
48294if test "${with_stdc__lib+set}" = set; then :
48295  withval=$with_stdc__lib;
48296        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48297                && test "x$with_stdc__lib" != xdefault; then
48298          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48299        fi
48300
48301else
48302  with_stdc__lib=default
48303
48304fi
48305
48306
48307  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48308    # Test if -lstdc++ works.
48309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48310$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48311    ac_ext=cpp
48312ac_cpp='$CXXCPP $CPPFLAGS'
48313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48316
48317    OLD_CXXFLAGS="$CXXFLAGS"
48318    CXXFLAGS="$CXXFLAGS -lstdc++"
48319    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48320/* end confdefs.h.  */
48321
48322int
48323main ()
48324{
48325return 0;
48326  ;
48327  return 0;
48328}
48329_ACEOF
48330if ac_fn_cxx_try_link "$LINENO"; then :
48331  has_dynamic_libstdcxx=yes
48332else
48333  has_dynamic_libstdcxx=no
48334fi
48335rm -f core conftest.err conftest.$ac_objext \
48336    conftest$ac_exeext conftest.$ac_ext
48337    CXXFLAGS="$OLD_CXXFLAGS"
48338    ac_ext=cpp
48339ac_cpp='$CXXCPP $CPPFLAGS'
48340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48343
48344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48345$as_echo "$has_dynamic_libstdcxx" >&6; }
48346
48347    # Test if stdc++ can be linked statically.
48348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48349$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48350    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48351    ac_ext=cpp
48352ac_cpp='$CXXCPP $CPPFLAGS'
48353ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48354ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48355ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48356
48357    OLD_LIBS="$LIBS"
48358    OLD_CXX="$CXX"
48359    LIBS="$STATIC_STDCXX_FLAGS"
48360    CXX="$CC"
48361    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48362/* end confdefs.h.  */
48363
48364int
48365main ()
48366{
48367return 0;
48368  ;
48369  return 0;
48370}
48371_ACEOF
48372if ac_fn_cxx_try_link "$LINENO"; then :
48373  has_static_libstdcxx=yes
48374else
48375  has_static_libstdcxx=no
48376fi
48377rm -f core conftest.err conftest.$ac_objext \
48378    conftest$ac_exeext conftest.$ac_ext
48379    LIBS="$OLD_LIBS"
48380    CXX="$OLD_CXX"
48381    ac_ext=cpp
48382ac_cpp='$CXXCPP $CPPFLAGS'
48383ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48384ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48385ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48386
48387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48388$as_echo "$has_static_libstdcxx" >&6; }
48389
48390    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48391      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48392    fi
48393
48394    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48395      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48396    fi
48397
48398    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48399      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48400    fi
48401
48402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48403$as_echo_n "checking how to link with libstdc++... " >&6; }
48404    # If dynamic was requested, it's available since it would fail above otherwise.
48405    # If dynamic wasn't requested, go with static unless it isn't available.
48406    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48407      LIBCXX="$LIBCXX -lstdc++"
48408      LDCXX="$CXX"
48409      STATIC_CXX_SETTING="STATIC_CXX=false"
48410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48411$as_echo "dynamic" >&6; }
48412    else
48413      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48414      LDCXX="$CC"
48415      STATIC_CXX_SETTING="STATIC_CXX=true"
48416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48417$as_echo "static" >&6; }
48418    fi
48419  fi
48420
48421
48422  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48423    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48424
48425pkg_failed=no
48426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48427$as_echo_n "checking for LIBFFI... " >&6; }
48428
48429if test -n "$LIBFFI_CFLAGS"; then
48430    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48431 elif test -n "$PKG_CONFIG"; then
48432    if test -n "$PKG_CONFIG" && \
48433    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48434  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48435  ac_status=$?
48436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48437  test $ac_status = 0; }; then
48438  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48439else
48440  pkg_failed=yes
48441fi
48442 else
48443    pkg_failed=untried
48444fi
48445if test -n "$LIBFFI_LIBS"; then
48446    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48447 elif test -n "$PKG_CONFIG"; then
48448    if test -n "$PKG_CONFIG" && \
48449    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48450  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48451  ac_status=$?
48452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48453  test $ac_status = 0; }; then
48454  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48455else
48456  pkg_failed=yes
48457fi
48458 else
48459    pkg_failed=untried
48460fi
48461
48462
48463
48464if test $pkg_failed = yes; then
48465
48466if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48467        _pkg_short_errors_supported=yes
48468else
48469        _pkg_short_errors_supported=no
48470fi
48471        if test $_pkg_short_errors_supported = yes; then
48472	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48473        else
48474	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48475        fi
48476	# Put the nasty error message in config.log where it belongs
48477	echo "$LIBFFI_PKG_ERRORS" >&5
48478
48479	as_fn_error $? "Package requirements (libffi) were not met:
48480
48481$LIBFFI_PKG_ERRORS
48482
48483Consider adjusting the PKG_CONFIG_PATH environment variable if you
48484installed software in a non-standard prefix.
48485
48486Alternatively, you may set the environment variables LIBFFI_CFLAGS
48487and LIBFFI_LIBS to avoid the need to call pkg-config.
48488See the pkg-config man page for more details.
48489" "$LINENO" 5
48490elif test $pkg_failed = untried; then
48491	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48493as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48494is in your PATH or set the PKG_CONFIG environment variable to the full
48495path to pkg-config.
48496
48497Alternatively, you may set the environment variables LIBFFI_CFLAGS
48498and LIBFFI_LIBS to avoid the need to call pkg-config.
48499See the pkg-config man page for more details.
48500
48501To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48502See \`config.log' for more details" "$LINENO" 5; }
48503else
48504	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48505	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48507$as_echo "yes" >&6; }
48508	:
48509fi
48510
48511  fi
48512
48513  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48514    # Extract the first word of "llvm-config", so it can be a program name with args.
48515set dummy llvm-config; ac_word=$2
48516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48517$as_echo_n "checking for $ac_word... " >&6; }
48518if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48519  $as_echo_n "(cached) " >&6
48520else
48521  if test -n "$LLVM_CONFIG"; then
48522  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48523else
48524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48525for as_dir in $PATH
48526do
48527  IFS=$as_save_IFS
48528  test -z "$as_dir" && as_dir=.
48529    for ac_exec_ext in '' $ac_executable_extensions; do
48530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48531    ac_cv_prog_LLVM_CONFIG="llvm-config"
48532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48533    break 2
48534  fi
48535done
48536  done
48537IFS=$as_save_IFS
48538
48539fi
48540fi
48541LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48542if test -n "$LLVM_CONFIG"; then
48543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48544$as_echo "$LLVM_CONFIG" >&6; }
48545else
48546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48547$as_echo "no" >&6; }
48548fi
48549
48550
48551
48552    if test "x$LLVM_CONFIG" != xllvm-config; then
48553      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48554    fi
48555
48556    llvm_components="jit mcjit engine nativecodegen native"
48557    unset LLVM_CFLAGS
48558    for flag in $("$LLVM_CONFIG" --cxxflags); do
48559      if echo "${flag}" | grep -q '^-[ID]'; then
48560        if test "${flag}" != "-D_DEBUG" ; then
48561          if test "${LLVM_CFLAGS}" != "" ; then
48562            LLVM_CFLAGS="${LLVM_CFLAGS} "
48563          fi
48564          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48565        fi
48566      fi
48567    done
48568    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48569    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48570
48571    unset LLVM_LDFLAGS
48572    for flag in $("${LLVM_CONFIG}" --ldflags); do
48573      if echo "${flag}" | grep -q '^-L'; then
48574        if test "${LLVM_LDFLAGS}" != ""; then
48575          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48576        fi
48577        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48578      fi
48579    done
48580
48581    unset LLVM_LIBS
48582    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48583      if echo "${flag}" | grep -q '^-l'; then
48584        if test "${LLVM_LIBS}" != ""; then
48585          LLVM_LIBS="${LLVM_LIBS} "
48586        fi
48587        LLVM_LIBS="${LLVM_LIBS}${flag}"
48588      fi
48589    done
48590
48591
48592
48593
48594  fi
48595
48596  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48597  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48598    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48599  fi
48600
48601  # TODO better (platform agnostic) test
48602  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48603    LIBCXX="-lstdc++"
48604  fi
48605
48606
48607
48608
48609  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48610
48611
48612# Check whether --with-msvcr-dll was given.
48613if test "${with_msvcr_dll+set}" = set; then :
48614  withval=$with_msvcr_dll;
48615fi
48616
48617
48618  if test "x$with_msvcr_dll" != x; then
48619    # If given explicitely by user, do not probe. If not present, fail directly.
48620
48621  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48622  METHOD="--with-msvcr-dll"
48623  if test -e "$POSSIBLE_MSVCR_DLL"; then
48624    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48625$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48626
48627    # Need to check if the found msvcr is correct architecture
48628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48629$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48630    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48631    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48632      CORRECT_MSVCR_ARCH=386
48633    else
48634      CORRECT_MSVCR_ARCH=x86-64
48635    fi
48636    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48638$as_echo "ok" >&6; }
48639      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48640      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48641$as_echo_n "checking for msvcr100.dll... " >&6; }
48642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48643$as_echo "$MSVCR_DLL" >&6; }
48644    else
48645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48646$as_echo "incorrect, ignoring" >&6; }
48647      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48648$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48649    fi
48650  fi
48651
48652    if test "x$MSVCR_DLL" = x; then
48653      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48654    fi
48655  fi
48656
48657  if test "x$MSVCR_DLL" = x; then
48658    # Probe: Using well-known location from Visual Studio 10.0
48659    if test "x$VCINSTALLDIR" != x; then
48660      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48661
48662  windows_path="$CYGWIN_VC_INSTALL_DIR"
48663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48664    unix_path=`$CYGPATH -u "$windows_path"`
48665    CYGWIN_VC_INSTALL_DIR="$unix_path"
48666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48668    CYGWIN_VC_INSTALL_DIR="$unix_path"
48669  fi
48670
48671      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48672        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48673      else
48674        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48675      fi
48676
48677  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48678  METHOD="well-known location in VCINSTALLDIR"
48679  if test -e "$POSSIBLE_MSVCR_DLL"; then
48680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48681$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48682
48683    # Need to check if the found msvcr is correct architecture
48684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48685$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48686    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48687    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48688      CORRECT_MSVCR_ARCH=386
48689    else
48690      CORRECT_MSVCR_ARCH=x86-64
48691    fi
48692    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48694$as_echo "ok" >&6; }
48695      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48697$as_echo_n "checking for msvcr100.dll... " >&6; }
48698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48699$as_echo "$MSVCR_DLL" >&6; }
48700    else
48701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48702$as_echo "incorrect, ignoring" >&6; }
48703      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48704$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48705    fi
48706  fi
48707
48708    fi
48709  fi
48710
48711  if test "x$MSVCR_DLL" = x; then
48712    # Probe: Check in the Boot JDK directory.
48713    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48714
48715  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48716  METHOD="well-known location in Boot JDK"
48717  if test -e "$POSSIBLE_MSVCR_DLL"; then
48718    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48719$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48720
48721    # Need to check if the found msvcr is correct architecture
48722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48723$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48724    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48725    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48726      CORRECT_MSVCR_ARCH=386
48727    else
48728      CORRECT_MSVCR_ARCH=x86-64
48729    fi
48730    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48732$as_echo "ok" >&6; }
48733      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48734      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48735$as_echo_n "checking for msvcr100.dll... " >&6; }
48736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48737$as_echo "$MSVCR_DLL" >&6; }
48738    else
48739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48740$as_echo "incorrect, ignoring" >&6; }
48741      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48742$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48743    fi
48744  fi
48745
48746  fi
48747
48748  if test "x$MSVCR_DLL" = x; then
48749    # Probe: Look in the Windows system32 directory
48750    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48751
48752  windows_path="$CYGWIN_SYSTEMROOT"
48753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48754    unix_path=`$CYGPATH -u "$windows_path"`
48755    CYGWIN_SYSTEMROOT="$unix_path"
48756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48758    CYGWIN_SYSTEMROOT="$unix_path"
48759  fi
48760
48761    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48762
48763  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48764  METHOD="well-known location in SYSTEMROOT"
48765  if test -e "$POSSIBLE_MSVCR_DLL"; then
48766    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48767$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48768
48769    # Need to check if the found msvcr is correct architecture
48770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48771$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48772    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48773    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48774      CORRECT_MSVCR_ARCH=386
48775    else
48776      CORRECT_MSVCR_ARCH=x86-64
48777    fi
48778    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48780$as_echo "ok" >&6; }
48781      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48783$as_echo_n "checking for msvcr100.dll... " >&6; }
48784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48785$as_echo "$MSVCR_DLL" >&6; }
48786    else
48787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48788$as_echo "incorrect, ignoring" >&6; }
48789      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48790$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48791    fi
48792  fi
48793
48794  fi
48795
48796  if test "x$MSVCR_DLL" = x; then
48797    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48798    if test "x$VS100COMNTOOLS" != x; then
48799      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48800
48801  windows_path="$CYGWIN_VS_TOOLS_DIR"
48802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48803    unix_path=`$CYGPATH -u "$windows_path"`
48804    CYGWIN_VS_TOOLS_DIR="$unix_path"
48805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48807    CYGWIN_VS_TOOLS_DIR="$unix_path"
48808  fi
48809
48810      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48811        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48812      else
48813        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48814      fi
48815
48816  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48817  METHOD="search of VS100COMNTOOLS"
48818  if test -e "$POSSIBLE_MSVCR_DLL"; then
48819    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48820$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48821
48822    # Need to check if the found msvcr is correct architecture
48823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48824$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48825    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48826    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48827      CORRECT_MSVCR_ARCH=386
48828    else
48829      CORRECT_MSVCR_ARCH=x86-64
48830    fi
48831    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48833$as_echo "ok" >&6; }
48834      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48835      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48836$as_echo_n "checking for msvcr100.dll... " >&6; }
48837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48838$as_echo "$MSVCR_DLL" >&6; }
48839    else
48840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48841$as_echo "incorrect, ignoring" >&6; }
48842      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48843$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48844    fi
48845  fi
48846
48847    fi
48848  fi
48849
48850  if test "x$MSVCR_DLL" = x; then
48851    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48852    # (This was the original behaviour; kept since it might turn up something)
48853    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48854      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48855        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48856      else
48857        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48858        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48859          # We're grasping at straws now...
48860          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48861        fi
48862      fi
48863
48864
48865  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48866  METHOD="search of VCINSTALLDIR"
48867  if test -e "$POSSIBLE_MSVCR_DLL"; then
48868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48869$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48870
48871    # Need to check if the found msvcr is correct architecture
48872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48873$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48874    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48875    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48876      CORRECT_MSVCR_ARCH=386
48877    else
48878      CORRECT_MSVCR_ARCH=x86-64
48879    fi
48880    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48882$as_echo "ok" >&6; }
48883      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48884      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48885$as_echo_n "checking for msvcr100.dll... " >&6; }
48886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48887$as_echo "$MSVCR_DLL" >&6; }
48888    else
48889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48890$as_echo "incorrect, ignoring" >&6; }
48891      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48892$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48893    fi
48894  fi
48895
48896    fi
48897  fi
48898
48899  if test "x$MSVCR_DLL" = x; then
48900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48901$as_echo_n "checking for msvcr100.dll... " >&6; }
48902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48903$as_echo "no" >&6; }
48904    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48905  fi
48906
48907
48908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48909
48910  # Input might be given as Windows format, start by converting to
48911  # unix format.
48912  path="$MSVCR_DLL"
48913  new_path=`$CYGPATH -u "$path"`
48914
48915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48918  # "foo.exe" is OK but "foo" is an error.
48919  #
48920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48921  # It is also a way to make sure we got the proper file name for the real test later on.
48922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48923  if test "x$test_shortpath" = x; then
48924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48925$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48926    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48927  fi
48928
48929  # Call helper function which possibly converts this using DOS-style short mode.
48930  # If so, the updated path is stored in $new_path.
48931
48932  input_path="$new_path"
48933  # Check if we need to convert this using DOS-style short mode. If the path
48934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48935  # take no chances and rewrite it.
48936  # Note: m4 eats our [], so we need to use [ and ] instead.
48937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48938  if test "x$has_forbidden_chars" != x; then
48939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48943      # Going to short mode and back again did indeed matter. Since short mode is
48944      # case insensitive, let's make it lowercase to improve readability.
48945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48946      # Now convert it back to Unix-stile (cygpath)
48947      input_path=`$CYGPATH -u "$shortmode_path"`
48948      new_path="$input_path"
48949    fi
48950  fi
48951
48952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48953  if test "x$test_cygdrive_prefix" = x; then
48954    # As a simple fix, exclude /usr/bin since it's not a real path.
48955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48957      # a path prefixed by /cygdrive for fixpath to work.
48958      new_path="$CYGWIN_ROOT_PATH$input_path"
48959    fi
48960  fi
48961
48962
48963  if test "x$path" != "x$new_path"; then
48964    MSVCR_DLL="$new_path"
48965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48966$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48967  fi
48968
48969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48970
48971  path="$MSVCR_DLL"
48972  has_colon=`$ECHO $path | $GREP ^.:`
48973  new_path="$path"
48974  if test "x$has_colon" = x; then
48975    # Not in mixed or Windows style, start by that.
48976    new_path=`cmd //c echo $path`
48977  fi
48978
48979
48980  input_path="$new_path"
48981  # Check if we need to convert this using DOS-style short mode. If the path
48982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48983  # take no chances and rewrite it.
48984  # Note: m4 eats our [], so we need to use [ and ] instead.
48985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48986  if test "x$has_forbidden_chars" != x; then
48987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48989  fi
48990
48991
48992  windows_path="$new_path"
48993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48994    unix_path=`$CYGPATH -u "$windows_path"`
48995    new_path="$unix_path"
48996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48998    new_path="$unix_path"
48999  fi
49000
49001  if test "x$path" != "x$new_path"; then
49002    MSVCR_DLL="$new_path"
49003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49004$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49005  fi
49006
49007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49009
49010  else
49011    # We're on a posix platform. Hooray! :)
49012    path="$MSVCR_DLL"
49013    has_space=`$ECHO "$path" | $GREP " "`
49014    if test "x$has_space" != x; then
49015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49016$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49017      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49018    fi
49019
49020    # Use eval to expand a potential ~
49021    eval path="$path"
49022    if test ! -f "$path" && test ! -d "$path"; then
49023      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49024    fi
49025
49026    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49027  fi
49028
49029
49030
49031
49032# Check whether --with-dxsdk was given.
49033if test "${with_dxsdk+set}" = set; then :
49034  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49035$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49036fi
49037
49038
49039
49040
49041# Check whether --with-dxsdk-lib was given.
49042if test "${with_dxsdk_lib+set}" = set; then :
49043  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49044$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49045fi
49046
49047
49048
49049
49050# Check whether --with-dxsdk-include was given.
49051if test "${with_dxsdk_include+set}" = set; then :
49052  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49053$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49054fi
49055
49056
49057  fi
49058
49059
49060
49061###############################################################################
49062#
49063# We need to do some final tweaking, when everything else is done.
49064#
49065###############################################################################
49066
49067
49068  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49069
49070
49071  # The name of the Service Agent jar.
49072  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49073  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49074    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49075  fi
49076
49077
49078
49079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49080$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49081
49082    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
49083      ENABLE_INTREE_EC=yes
49084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49085$as_echo "yes" >&6; }
49086    else
49087      ENABLE_INTREE_EC=no
49088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49089$as_echo "no" >&6; }
49090    fi
49091
49092
49093
49094
49095###############################################################################
49096#
49097# Configure parts of the build that only affect the build performance,
49098# not the result.
49099#
49100###############################################################################
49101
49102
49103  # How many cores do we have on this build system?
49104
49105# Check whether --with-num-cores was given.
49106if test "${with_num_cores+set}" = set; then :
49107  withval=$with_num_cores;
49108fi
49109
49110  if test "x$with_num_cores" = x; then
49111    # The number of cores were not specified, try to probe them.
49112
49113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49114$as_echo_n "checking for number of cores... " >&6; }
49115  NUM_CORES=1
49116  FOUND_CORES=no
49117
49118  if test -f /proc/cpuinfo; then
49119    # Looks like a Linux (or cygwin) system
49120    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49121    FOUND_CORES=yes
49122  elif test -x /usr/sbin/psrinfo; then
49123    # Looks like a Solaris system
49124    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49125    FOUND_CORES=yes
49126  elif test -x /usr/sbin/system_profiler; then
49127    # Looks like a MacOSX system
49128    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49129    FOUND_CORES=yes
49130  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49131    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49132    FOUND_CORES=yes
49133  elif test -n "$NUMBER_OF_PROCESSORS"; then
49134    # On windows, look in the env
49135    NUM_CORES=$NUMBER_OF_PROCESSORS
49136    FOUND_CORES=yes
49137  fi
49138
49139  if test "x$FOUND_CORES" = xyes; then
49140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49141$as_echo "$NUM_CORES" >&6; }
49142  else
49143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49144$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49146$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49147  fi
49148
49149  else
49150    NUM_CORES=$with_num_cores
49151  fi
49152
49153
49154
49155  # How much memory do we have on this build system?
49156
49157# Check whether --with-memory-size was given.
49158if test "${with_memory_size+set}" = set; then :
49159  withval=$with_memory_size;
49160fi
49161
49162  if test "x$with_memory_size" = x; then
49163    # The memory size was not specified, try to probe it.
49164
49165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49166$as_echo_n "checking for memory size... " >&6; }
49167  # Default to 1024 MB
49168  MEMORY_SIZE=1024
49169  FOUND_MEM=no
49170
49171  if test -f /proc/meminfo; then
49172    # Looks like a Linux (or cygwin) system
49173    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49174    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49175    FOUND_MEM=yes
49176  elif test -x /usr/sbin/prtconf; then
49177    # Looks like a Solaris or AIX system
49178    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49179    FOUND_MEM=yes
49180  elif test -x /usr/sbin/system_profiler; then
49181    # Looks like a MacOSX system
49182    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49183    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49184    FOUND_MEM=yes
49185  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49186    # Windows, but without cygwin
49187    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49188    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49189    FOUND_MEM=yes
49190  fi
49191
49192  if test "x$FOUND_MEM" = xyes; then
49193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49194$as_echo "$MEMORY_SIZE MB" >&6; }
49195  else
49196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49197$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49199$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49200  fi
49201
49202  else
49203    MEMORY_SIZE=$with_memory_size
49204  fi
49205
49206
49207
49208  # Provide a decent default number of parallel jobs for make depending on
49209  # number of cores, amount of memory and machine architecture.
49210
49211# Check whether --with-jobs was given.
49212if test "${with_jobs+set}" = set; then :
49213  withval=$with_jobs;
49214fi
49215
49216  if test "x$with_jobs" = x; then
49217    # Number of jobs was not specified, calculate.
49218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49219$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49220    # Approximate memory in GB, rounding up a bit.
49221    memory_gb=`expr $MEMORY_SIZE / 1100`
49222    # Pick the lowest of memory in gb and number of cores.
49223    if test "$memory_gb" -lt "$NUM_CORES"; then
49224      JOBS="$memory_gb"
49225    else
49226      JOBS="$NUM_CORES"
49227      # On bigger machines, leave some room for other processes to run
49228      if test "$JOBS" -gt "4"; then
49229        JOBS=`expr $JOBS '*' 90 / 100`
49230      fi
49231    fi
49232    # Cap number of jobs to 16
49233    if test "$JOBS" -gt "16"; then
49234      JOBS=16
49235    fi
49236    if test "$JOBS" -eq "0"; then
49237      JOBS=1
49238    fi
49239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49240$as_echo "$JOBS" >&6; }
49241  else
49242    JOBS=$with_jobs
49243  fi
49244
49245
49246
49247# Setup smart javac (after cores and memory have been setup)
49248
49249
49250# Check whether --with-sjavac-server-java was given.
49251if test "${with_sjavac_server_java+set}" = set; then :
49252  withval=$with_sjavac_server_java;
49253fi
49254
49255
49256  if test "x$with_sjavac_server_java" != x; then
49257    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49258    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49259    if test "x$FOUND_VERSION" = x; then
49260      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49261    fi
49262  else
49263    SJAVAC_SERVER_JAVA=""
49264    # Hotspot specific options.
49265
49266  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49267  $ECHO "Command: $JAVA -verbosegc -version" >&5
49268  OUTPUT=`$JAVA -verbosegc -version 2>&1`
49269  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49270  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49271  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49272    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49273    JVM_ARG_OK=true
49274  else
49275    $ECHO "Arg failed:" >&5
49276    $ECHO "$OUTPUT" >&5
49277    JVM_ARG_OK=false
49278  fi
49279
49280    # JRockit specific options.
49281
49282  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49283  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49284  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
49285  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49286  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49287  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49288    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
49289    JVM_ARG_OK=true
49290  else
49291    $ECHO "Arg failed:" >&5
49292    $ECHO "$OUTPUT" >&5
49293    JVM_ARG_OK=false
49294  fi
49295
49296    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49297  fi
49298
49299
49300  if test "$MEMORY_SIZE" -gt "2500"; then
49301
49302  $ECHO "Check if jvm arg is ok: -d64" >&5
49303  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49304  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49305  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49306  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49307  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49308    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49309    JVM_ARG_OK=true
49310  else
49311    $ECHO "Arg failed:" >&5
49312    $ECHO "$OUTPUT" >&5
49313    JVM_ARG_OK=false
49314  fi
49315
49316    if test "$JVM_ARG_OK" = true; then
49317      JVM_64BIT=true
49318      JVM_ARG_OK=false
49319    fi
49320  fi
49321
49322  if test "$JVM_64BIT" = true; then
49323    if test "$MEMORY_SIZE" -gt "17000"; then
49324
49325  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49326  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49327  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49328  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49329  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49330  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49331    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
49332    JVM_ARG_OK=true
49333  else
49334    $ECHO "Arg failed:" >&5
49335    $ECHO "$OUTPUT" >&5
49336    JVM_ARG_OK=false
49337  fi
49338
49339    fi
49340    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
49341
49342  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
49343  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
49344  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
49345  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49346  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49347  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49348    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
49349    JVM_ARG_OK=true
49350  else
49351    $ECHO "Arg failed:" >&5
49352    $ECHO "$OUTPUT" >&5
49353    JVM_ARG_OK=false
49354  fi
49355
49356    fi
49357    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
49358
49359  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
49360  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
49361  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
49362  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49363  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49364  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49365    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
49366    JVM_ARG_OK=true
49367  else
49368    $ECHO "Arg failed:" >&5
49369    $ECHO "$OUTPUT" >&5
49370    JVM_ARG_OK=false
49371  fi
49372
49373    fi
49374    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
49375
49376  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
49377  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
49378  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
49379  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49380  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49381  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49382    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
49383    JVM_ARG_OK=true
49384  else
49385    $ECHO "Arg failed:" >&5
49386    $ECHO "$OUTPUT" >&5
49387    JVM_ARG_OK=false
49388  fi
49389
49390    fi
49391  fi
49392  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
49393
49394  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
49395  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
49396  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
49397  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49398  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49399  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49400    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
49401    JVM_ARG_OK=true
49402  else
49403    $ECHO "Arg failed:" >&5
49404    $ECHO "$OUTPUT" >&5
49405    JVM_ARG_OK=false
49406  fi
49407
49408  fi
49409  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
49410
49411  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
49412  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
49413  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
49414  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49415  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49416  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49417    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
49418    JVM_ARG_OK=true
49419  else
49420    $ECHO "Arg failed:" >&5
49421    $ECHO "$OUTPUT" >&5
49422    JVM_ARG_OK=false
49423  fi
49424
49425  fi
49426  if test "$JVM_ARG_OK" = false; then
49427
49428  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
49429  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
49430  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
49431  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49432  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49433  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49434    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
49435    JVM_ARG_OK=true
49436  else
49437    $ECHO "Arg failed:" >&5
49438    $ECHO "$OUTPUT" >&5
49439    JVM_ARG_OK=false
49440  fi
49441
49442  fi
49443
49444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
49445$as_echo_n "checking whether to use sjavac... " >&6; }
49446  # Check whether --enable-sjavac was given.
49447if test "${enable_sjavac+set}" = set; then :
49448  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
49449else
49450  ENABLE_SJAVAC='no'
49451fi
49452
49453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
49454$as_echo "$ENABLE_SJAVAC" >&6; }
49455
49456
49457  if test "x$ENABLE_SJAVAC" = xyes; then
49458    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
49459  else
49460    SJAVAC_SERVER_DIR=
49461  fi
49462
49463
49464
49465# Can the C/C++ compiler use precompiled headers?
49466
49467
49468  ###############################################################################
49469  #
49470  # Can the C/C++ compiler use precompiled headers?
49471  #
49472  # Check whether --enable-precompiled-headers was given.
49473if test "${enable_precompiled_headers+set}" = set; then :
49474  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
49475else
49476  ENABLE_PRECOMPH=yes
49477fi
49478
49479
49480  USE_PRECOMPILED_HEADER=1
49481  if test "x$ENABLE_PRECOMPH" = xno; then
49482    USE_PRECOMPILED_HEADER=0
49483  fi
49484
49485  if test "x$ENABLE_PRECOMPH" = xyes; then
49486    # Check that the compiler actually supports precomp headers.
49487    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
49489$as_echo_n "checking that precompiled headers work... " >&6; }
49490      echo "int alfa();" > conftest.h
49491      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
49492      if test ! -f conftest.hpp.gch; then
49493        USE_PRECOMPILED_HEADER=0
49494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49495$as_echo "no" >&6; }
49496      else
49497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49498$as_echo "yes" >&6; }
49499      fi
49500      rm -f conftest.h conftest.hpp.gch
49501    fi
49502  fi
49503
49504
49505
49506
49507# Setup use of ccache, if available
49508
49509  # Check whether --enable-ccache was given.
49510if test "${enable_ccache+set}" = set; then :
49511  enableval=$enable_ccache;
49512fi
49513
49514
49515  CCACHE=
49516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
49517$as_echo_n "checking is ccache enabled... " >&6; }
49518  ENABLE_CCACHE=$enable_ccache
49519  if test "x$enable_ccache" = xyes; then
49520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49521$as_echo "yes" >&6; }
49522    OLD_PATH="$PATH"
49523    if test "x$TOOLCHAIN_PATH" != x; then
49524      PATH=$TOOLCHAIN_PATH:$PATH
49525    fi
49526
49527
49528
49529  # Publish this variable in the help.
49530
49531
49532  if test "x$CCACHE" = x; then
49533    # The variable is not set by user, try to locate tool using the code snippet
49534    for ac_prog in ccache
49535do
49536  # Extract the first word of "$ac_prog", so it can be a program name with args.
49537set dummy $ac_prog; ac_word=$2
49538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49539$as_echo_n "checking for $ac_word... " >&6; }
49540if ${ac_cv_path_CCACHE+:} false; then :
49541  $as_echo_n "(cached) " >&6
49542else
49543  case $CCACHE in
49544  [\\/]* | ?:[\\/]*)
49545  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49546  ;;
49547  *)
49548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49549for as_dir in $PATH
49550do
49551  IFS=$as_save_IFS
49552  test -z "$as_dir" && as_dir=.
49553    for ac_exec_ext in '' $ac_executable_extensions; do
49554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49555    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49557    break 2
49558  fi
49559done
49560  done
49561IFS=$as_save_IFS
49562
49563  ;;
49564esac
49565fi
49566CCACHE=$ac_cv_path_CCACHE
49567if test -n "$CCACHE"; then
49568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49569$as_echo "$CCACHE" >&6; }
49570else
49571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49572$as_echo "no" >&6; }
49573fi
49574
49575
49576  test -n "$CCACHE" && break
49577done
49578
49579  else
49580    # The variable is set, but is it from the command line or the environment?
49581
49582    # Try to remove the string !CCACHE! from our list.
49583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
49584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49585      # If it failed, the variable was not from the command line. Ignore it,
49586      # but warn the user (except for BASH, which is always set by the calling BASH).
49587      if test "xCCACHE" != xBASH; then
49588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
49589$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
49590      fi
49591      # Try to locate tool using the code snippet
49592      for ac_prog in ccache
49593do
49594  # Extract the first word of "$ac_prog", so it can be a program name with args.
49595set dummy $ac_prog; ac_word=$2
49596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49597$as_echo_n "checking for $ac_word... " >&6; }
49598if ${ac_cv_path_CCACHE+:} false; then :
49599  $as_echo_n "(cached) " >&6
49600else
49601  case $CCACHE in
49602  [\\/]* | ?:[\\/]*)
49603  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49604  ;;
49605  *)
49606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49607for as_dir in $PATH
49608do
49609  IFS=$as_save_IFS
49610  test -z "$as_dir" && as_dir=.
49611    for ac_exec_ext in '' $ac_executable_extensions; do
49612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49613    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49615    break 2
49616  fi
49617done
49618  done
49619IFS=$as_save_IFS
49620
49621  ;;
49622esac
49623fi
49624CCACHE=$ac_cv_path_CCACHE
49625if test -n "$CCACHE"; then
49626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49627$as_echo "$CCACHE" >&6; }
49628else
49629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49630$as_echo "no" >&6; }
49631fi
49632
49633
49634  test -n "$CCACHE" && break
49635done
49636
49637    else
49638      # If it succeeded, then it was overridden by the user. We will use it
49639      # for the tool.
49640
49641      # First remove it from the list of overridden variables, so we can test
49642      # for unknown variables in the end.
49643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49644
49645      # Check if the provided tool contains a complete path.
49646      tool_specified="$CCACHE"
49647      tool_basename="${tool_specified##*/}"
49648      if test "x$tool_basename" = "x$tool_specified"; then
49649        # A command without a complete path is provided, search $PATH.
49650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49651$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49652        # Extract the first word of "$tool_basename", so it can be a program name with args.
49653set dummy $tool_basename; ac_word=$2
49654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49655$as_echo_n "checking for $ac_word... " >&6; }
49656if ${ac_cv_path_CCACHE+:} false; then :
49657  $as_echo_n "(cached) " >&6
49658else
49659  case $CCACHE in
49660  [\\/]* | ?:[\\/]*)
49661  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49662  ;;
49663  *)
49664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49665for as_dir in $PATH
49666do
49667  IFS=$as_save_IFS
49668  test -z "$as_dir" && as_dir=.
49669    for ac_exec_ext in '' $ac_executable_extensions; do
49670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49671    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49673    break 2
49674  fi
49675done
49676  done
49677IFS=$as_save_IFS
49678
49679  ;;
49680esac
49681fi
49682CCACHE=$ac_cv_path_CCACHE
49683if test -n "$CCACHE"; then
49684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49685$as_echo "$CCACHE" >&6; }
49686else
49687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49688$as_echo "no" >&6; }
49689fi
49690
49691
49692        if test "x$CCACHE" = x; then
49693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49694        fi
49695      else
49696        # Otherwise we believe it is a complete path. Use it as it is.
49697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49698$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49700$as_echo_n "checking for CCACHE... " >&6; }
49701        if test ! -x "$tool_specified"; then
49702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49703$as_echo "not found" >&6; }
49704          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49705        fi
49706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49707$as_echo "$tool_specified" >&6; }
49708      fi
49709    fi
49710  fi
49711
49712
49713
49714  if test "x$CCACHE" = x; then
49715    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49716  fi
49717
49718
49719    CCACHE_STATUS="enabled"
49720    PATH="$OLD_PATH"
49721  elif test "x$enable_ccache" = xno; then
49722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49723$as_echo "no, explicitly disabled" >&6; }
49724  elif test "x$enable_ccache" = x; then
49725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49726$as_echo "no" >&6; }
49727  else
49728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49729$as_echo "unknown" >&6; }
49730    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49731  fi
49732
49733
49734
49735# Check whether --with-ccache-dir was given.
49736if test "${with_ccache_dir+set}" = set; then :
49737  withval=$with_ccache_dir;
49738fi
49739
49740
49741  if test "x$with_ccache_dir" != x; then
49742    # When using a non home ccache directory, assume the use is to share ccache files
49743    # with other users. Thus change the umask.
49744    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49745    if test "x$CCACHE" = x; then
49746      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49747$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49748    fi
49749  fi
49750
49751  if test "x$CCACHE" != x; then
49752
49753  if test "x$CCACHE" != x; then
49754    # Only use ccache if it is 3.1.4 or later, which supports
49755    # precompiled headers.
49756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49757$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49758    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49759    if test "x$HAS_GOOD_CCACHE" = x; then
49760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49761$as_echo "no, disabling ccache" >&6; }
49762      CCACHE=
49763      CCACHE_STATUS="disabled"
49764    else
49765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49766$as_echo "yes" >&6; }
49767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49768$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49769      PUSHED_FLAGS="$CXXFLAGS"
49770      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49771      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49772/* end confdefs.h.  */
49773
49774int
49775main ()
49776{
49777
49778  ;
49779  return 0;
49780}
49781_ACEOF
49782if ac_fn_cxx_try_compile "$LINENO"; then :
49783  CC_KNOWS_CCACHE_TRICK=yes
49784else
49785  CC_KNOWS_CCACHE_TRICK=no
49786fi
49787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49788      CXXFLAGS="$PUSHED_FLAGS"
49789      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49791$as_echo "yes" >&6; }
49792      else
49793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49794$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49795        CCACHE=
49796        CCACHE_STATUS="disabled"
49797      fi
49798    fi
49799  fi
49800
49801  if test "x$CCACHE" != x; then
49802    CCACHE_SLOPPINESS=time_macros
49803    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49804    CCACHE_FLAGS=-fpch-preprocess
49805
49806    if test "x$SET_CCACHE_DIR" != x; then
49807      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49808      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49809    fi
49810  fi
49811
49812  fi
49813
49814
49815###############################################################################
49816#
49817# And now the finish...
49818#
49819###############################################################################
49820
49821# Check for some common pitfalls
49822
49823  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49824    file_to_test="$SRC_ROOT/LICENSE"
49825    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49826      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
49827    fi
49828  fi
49829
49830
49831  # Did user specify any unknown variables?
49832
49833  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49834    # Replace the separating ! with spaces before presenting for end user.
49835    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49836    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49837$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49838  fi
49839
49840
49841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49842$as_echo_n "checking if build directory is on local disk... " >&6; }
49843
49844  # df -l lists only local disks; if the given directory is not found then
49845  # a non-zero exit code is given
49846  if test "x$DF" = x; then
49847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49848      # msys does not have df; use Windows "net use" instead.
49849      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49850      if test "x$IS_NETWORK_DISK" = x; then
49851        OUTPUT_DIR_IS_LOCAL="yes"
49852      else
49853        OUTPUT_DIR_IS_LOCAL="no"
49854      fi
49855    else
49856      # No df here, say it's local
49857      OUTPUT_DIR_IS_LOCAL="yes"
49858    fi
49859  else
49860    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49861      OUTPUT_DIR_IS_LOCAL="yes"
49862    else
49863      OUTPUT_DIR_IS_LOCAL="no"
49864    fi
49865  fi
49866
49867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49868$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49869
49870
49871
49872  # Check if the user has any old-style ALT_ variables set.
49873  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49874
49875  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49876  # Since we can't properly handle the dependencies for this, warn the user about the situation
49877  if test -e $OUTPUT_ROOT/spec.gmk; then
49878    IS_RECONFIGURE=yes
49879  else
49880    IS_RECONFIGURE=no
49881  fi
49882
49883
49884# At the end, call the custom hook. (Dummy macro if no custom sources available)
49885
49886
49887# We're messing a bit with internal autoconf variables to put the config.status
49888# in the output directory instead of the current directory.
49889CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49890
49891# Create the actual output files. Now the main work of configure is done.
49892cat >confcache <<\_ACEOF
49893# This file is a shell script that caches the results of configure
49894# tests run on this system so they can be shared between configure
49895# scripts and configure runs, see configure's option --config-cache.
49896# It is not useful on other systems.  If it contains results you don't
49897# want to keep, you may remove or edit it.
49898#
49899# config.status only pays attention to the cache file if you give it
49900# the --recheck option to rerun configure.
49901#
49902# `ac_cv_env_foo' variables (set or unset) will be overridden when
49903# loading this file, other *unset* `ac_cv_foo' will be assigned the
49904# following values.
49905
49906_ACEOF
49907
49908# The following way of writing the cache mishandles newlines in values,
49909# but we know of no workaround that is simple, portable, and efficient.
49910# So, we kill variables containing newlines.
49911# Ultrix sh set writes to stderr and can't be redirected directly,
49912# and sets the high bit in the cache file unless we assign to the vars.
49913(
49914  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49915    eval ac_val=\$$ac_var
49916    case $ac_val in #(
49917    *${as_nl}*)
49918      case $ac_var in #(
49919      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49920$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49921      esac
49922      case $ac_var in #(
49923      _ | IFS | as_nl) ;; #(
49924      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49925      *) { eval $ac_var=; unset $ac_var;} ;;
49926      esac ;;
49927    esac
49928  done
49929
49930  (set) 2>&1 |
49931    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49932    *${as_nl}ac_space=\ *)
49933      # `set' does not quote correctly, so add quotes: double-quote
49934      # substitution turns \\\\ into \\, and sed turns \\ into \.
49935      sed -n \
49936	"s/'/'\\\\''/g;
49937	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49938      ;; #(
49939    *)
49940      # `set' quotes correctly as required by POSIX, so do not add quotes.
49941      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49942      ;;
49943    esac |
49944    sort
49945) |
49946  sed '
49947     /^ac_cv_env_/b end
49948     t clear
49949     :clear
49950     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49951     t end
49952     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49953     :end' >>confcache
49954if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49955  if test -w "$cache_file"; then
49956    if test "x$cache_file" != "x/dev/null"; then
49957      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49958$as_echo "$as_me: updating cache $cache_file" >&6;}
49959      if test ! -f "$cache_file" || test -h "$cache_file"; then
49960	cat confcache >"$cache_file"
49961      else
49962        case $cache_file in #(
49963        */* | ?:*)
49964	  mv -f confcache "$cache_file"$$ &&
49965	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49966        *)
49967	  mv -f confcache "$cache_file" ;;
49968	esac
49969      fi
49970    fi
49971  else
49972    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49973$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49974  fi
49975fi
49976rm -f confcache
49977
49978test "x$prefix" = xNONE && prefix=$ac_default_prefix
49979# Let make expand exec_prefix.
49980test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49981
49982DEFS=-DHAVE_CONFIG_H
49983
49984ac_libobjs=
49985ac_ltlibobjs=
49986U=
49987for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49988  # 1. Remove the extension, and $U if already installed.
49989  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49990  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49991  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49992  #    will be set to the directory where LIBOBJS objects are built.
49993  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49994  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49995done
49996LIBOBJS=$ac_libobjs
49997
49998LTLIBOBJS=$ac_ltlibobjs
49999
50000
50001
50002: "${CONFIG_STATUS=./config.status}"
50003ac_write_fail=0
50004ac_clean_files_save=$ac_clean_files
50005ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50006{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50007$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50008as_write_fail=0
50009cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50010#! $SHELL
50011# Generated by $as_me.
50012# Run this file to recreate the current configuration.
50013# Compiler output produced by configure, useful for debugging
50014# configure, is in config.log if it exists.
50015
50016debug=false
50017ac_cs_recheck=false
50018ac_cs_silent=false
50019
50020SHELL=\${CONFIG_SHELL-$SHELL}
50021export SHELL
50022_ASEOF
50023cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50024## -------------------- ##
50025## M4sh Initialization. ##
50026## -------------------- ##
50027
50028# Be more Bourne compatible
50029DUALCASE=1; export DUALCASE # for MKS sh
50030if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50031  emulate sh
50032  NULLCMD=:
50033  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50034  # is contrary to our usage.  Disable this feature.
50035  alias -g '${1+"$@"}'='"$@"'
50036  setopt NO_GLOB_SUBST
50037else
50038  case `(set -o) 2>/dev/null` in #(
50039  *posix*) :
50040    set -o posix ;; #(
50041  *) :
50042     ;;
50043esac
50044fi
50045
50046
50047as_nl='
50048'
50049export as_nl
50050# Printing a long string crashes Solaris 7 /usr/bin/printf.
50051as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50052as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50053as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50054# Prefer a ksh shell builtin over an external printf program on Solaris,
50055# but without wasting forks for bash or zsh.
50056if test -z "$BASH_VERSION$ZSH_VERSION" \
50057    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50058  as_echo='print -r --'
50059  as_echo_n='print -rn --'
50060elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50061  as_echo='printf %s\n'
50062  as_echo_n='printf %s'
50063else
50064  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50065    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50066    as_echo_n='/usr/ucb/echo -n'
50067  else
50068    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50069    as_echo_n_body='eval
50070      arg=$1;
50071      case $arg in #(
50072      *"$as_nl"*)
50073	expr "X$arg" : "X\\(.*\\)$as_nl";
50074	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50075      esac;
50076      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50077    '
50078    export as_echo_n_body
50079    as_echo_n='sh -c $as_echo_n_body as_echo'
50080  fi
50081  export as_echo_body
50082  as_echo='sh -c $as_echo_body as_echo'
50083fi
50084
50085# The user is always right.
50086if test "${PATH_SEPARATOR+set}" != set; then
50087  PATH_SEPARATOR=:
50088  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50089    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50090      PATH_SEPARATOR=';'
50091  }
50092fi
50093
50094
50095# IFS
50096# We need space, tab and new line, in precisely that order.  Quoting is
50097# there to prevent editors from complaining about space-tab.
50098# (If _AS_PATH_WALK were called with IFS unset, it would disable word
50099# splitting by setting IFS to empty value.)
50100IFS=" ""	$as_nl"
50101
50102# Find who we are.  Look in the path if we contain no directory separator.
50103as_myself=
50104case $0 in #((
50105  *[\\/]* ) as_myself=$0 ;;
50106  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50107for as_dir in $PATH
50108do
50109  IFS=$as_save_IFS
50110  test -z "$as_dir" && as_dir=.
50111    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50112  done
50113IFS=$as_save_IFS
50114
50115     ;;
50116esac
50117# We did not find ourselves, most probably we were run as `sh COMMAND'
50118# in which case we are not to be found in the path.
50119if test "x$as_myself" = x; then
50120  as_myself=$0
50121fi
50122if test ! -f "$as_myself"; then
50123  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50124  exit 1
50125fi
50126
50127# Unset variables that we do not need and which cause bugs (e.g. in
50128# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50129# suppresses any "Segmentation fault" message there.  '((' could
50130# trigger a bug in pdksh 5.2.14.
50131for as_var in BASH_ENV ENV MAIL MAILPATH
50132do eval test x\${$as_var+set} = xset \
50133  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50134done
50135PS1='$ '
50136PS2='> '
50137PS4='+ '
50138
50139# NLS nuisances.
50140LC_ALL=C
50141export LC_ALL
50142LANGUAGE=C
50143export LANGUAGE
50144
50145# CDPATH.
50146(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50147
50148
50149# as_fn_error STATUS ERROR [LINENO LOG_FD]
50150# ----------------------------------------
50151# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50152# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50153# script with STATUS, using 1 if that was 0.
50154as_fn_error ()
50155{
50156  as_status=$1; test $as_status -eq 0 && as_status=1
50157  if test "$4"; then
50158    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50159    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50160  fi
50161  $as_echo "$as_me: error: $2" >&2
50162  as_fn_exit $as_status
50163} # as_fn_error
50164
50165
50166# as_fn_set_status STATUS
50167# -----------------------
50168# Set $? to STATUS, without forking.
50169as_fn_set_status ()
50170{
50171  return $1
50172} # as_fn_set_status
50173
50174# as_fn_exit STATUS
50175# -----------------
50176# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50177as_fn_exit ()
50178{
50179  set +e
50180  as_fn_set_status $1
50181  exit $1
50182} # as_fn_exit
50183
50184# as_fn_unset VAR
50185# ---------------
50186# Portably unset VAR.
50187as_fn_unset ()
50188{
50189  { eval $1=; unset $1;}
50190}
50191as_unset=as_fn_unset
50192# as_fn_append VAR VALUE
50193# ----------------------
50194# Append the text in VALUE to the end of the definition contained in VAR. Take
50195# advantage of any shell optimizations that allow amortized linear growth over
50196# repeated appends, instead of the typical quadratic growth present in naive
50197# implementations.
50198if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50199  eval 'as_fn_append ()
50200  {
50201    eval $1+=\$2
50202  }'
50203else
50204  as_fn_append ()
50205  {
50206    eval $1=\$$1\$2
50207  }
50208fi # as_fn_append
50209
50210# as_fn_arith ARG...
50211# ------------------
50212# Perform arithmetic evaluation on the ARGs, and store the result in the
50213# global $as_val. Take advantage of shells that can avoid forks. The arguments
50214# must be portable across $(()) and expr.
50215if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50216  eval 'as_fn_arith ()
50217  {
50218    as_val=$(( $* ))
50219  }'
50220else
50221  as_fn_arith ()
50222  {
50223    as_val=`expr "$@" || test $? -eq 1`
50224  }
50225fi # as_fn_arith
50226
50227
50228if expr a : '\(a\)' >/dev/null 2>&1 &&
50229   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50230  as_expr=expr
50231else
50232  as_expr=false
50233fi
50234
50235if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50236  as_basename=basename
50237else
50238  as_basename=false
50239fi
50240
50241if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50242  as_dirname=dirname
50243else
50244  as_dirname=false
50245fi
50246
50247as_me=`$as_basename -- "$0" ||
50248$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50249	 X"$0" : 'X\(//\)$' \| \
50250	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50251$as_echo X/"$0" |
50252    sed '/^.*\/\([^/][^/]*\)\/*$/{
50253	    s//\1/
50254	    q
50255	  }
50256	  /^X\/\(\/\/\)$/{
50257	    s//\1/
50258	    q
50259	  }
50260	  /^X\/\(\/\).*/{
50261	    s//\1/
50262	    q
50263	  }
50264	  s/.*/./; q'`
50265
50266# Avoid depending upon Character Ranges.
50267as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50268as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50269as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50270as_cr_digits='0123456789'
50271as_cr_alnum=$as_cr_Letters$as_cr_digits
50272
50273ECHO_C= ECHO_N= ECHO_T=
50274case `echo -n x` in #(((((
50275-n*)
50276  case `echo 'xy\c'` in
50277  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50278  xy)  ECHO_C='\c';;
50279  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50280       ECHO_T='	';;
50281  esac;;
50282*)
50283  ECHO_N='-n';;
50284esac
50285
50286rm -f conf$$ conf$$.exe conf$$.file
50287if test -d conf$$.dir; then
50288  rm -f conf$$.dir/conf$$.file
50289else
50290  rm -f conf$$.dir
50291  mkdir conf$$.dir 2>/dev/null
50292fi
50293if (echo >conf$$.file) 2>/dev/null; then
50294  if ln -s conf$$.file conf$$ 2>/dev/null; then
50295    as_ln_s='ln -s'
50296    # ... but there are two gotchas:
50297    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50298    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50299    # In both cases, we have to default to `cp -pR'.
50300    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50301      as_ln_s='cp -pR'
50302  elif ln conf$$.file conf$$ 2>/dev/null; then
50303    as_ln_s=ln
50304  else
50305    as_ln_s='cp -pR'
50306  fi
50307else
50308  as_ln_s='cp -pR'
50309fi
50310rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50311rmdir conf$$.dir 2>/dev/null
50312
50313
50314# as_fn_mkdir_p
50315# -------------
50316# Create "$as_dir" as a directory, including parents if necessary.
50317as_fn_mkdir_p ()
50318{
50319
50320  case $as_dir in #(
50321  -*) as_dir=./$as_dir;;
50322  esac
50323  test -d "$as_dir" || eval $as_mkdir_p || {
50324    as_dirs=
50325    while :; do
50326      case $as_dir in #(
50327      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50328      *) as_qdir=$as_dir;;
50329      esac
50330      as_dirs="'$as_qdir' $as_dirs"
50331      as_dir=`$as_dirname -- "$as_dir" ||
50332$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50333	 X"$as_dir" : 'X\(//\)[^/]' \| \
50334	 X"$as_dir" : 'X\(//\)$' \| \
50335	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
50336$as_echo X"$as_dir" |
50337    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50338	    s//\1/
50339	    q
50340	  }
50341	  /^X\(\/\/\)[^/].*/{
50342	    s//\1/
50343	    q
50344	  }
50345	  /^X\(\/\/\)$/{
50346	    s//\1/
50347	    q
50348	  }
50349	  /^X\(\/\).*/{
50350	    s//\1/
50351	    q
50352	  }
50353	  s/.*/./; q'`
50354      test -d "$as_dir" && break
50355    done
50356    test -z "$as_dirs" || eval "mkdir $as_dirs"
50357  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
50358
50359
50360} # as_fn_mkdir_p
50361if mkdir -p . 2>/dev/null; then
50362  as_mkdir_p='mkdir -p "$as_dir"'
50363else
50364  test -d ./-p && rmdir ./-p
50365  as_mkdir_p=false
50366fi
50367
50368
50369# as_fn_executable_p FILE
50370# -----------------------
50371# Test if FILE is an executable regular file.
50372as_fn_executable_p ()
50373{
50374  test -f "$1" && test -x "$1"
50375} # as_fn_executable_p
50376as_test_x='test -x'
50377as_executable_p=as_fn_executable_p
50378
50379# Sed expression to map a string onto a valid CPP name.
50380as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
50381
50382# Sed expression to map a string onto a valid variable name.
50383as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
50384
50385
50386exec 6>&1
50387## ----------------------------------- ##
50388## Main body of $CONFIG_STATUS script. ##
50389## ----------------------------------- ##
50390_ASEOF
50391test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
50392
50393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50394# Save the log message, to keep $0 and so on meaningful, and to
50395# report actual input values of CONFIG_FILES etc. instead of their
50396# values after options handling.
50397ac_log="
50398This file was extended by OpenJDK $as_me jdk9, which was
50399generated by GNU Autoconf 2.69.  Invocation command line was
50400
50401  CONFIG_FILES    = $CONFIG_FILES
50402  CONFIG_HEADERS  = $CONFIG_HEADERS
50403  CONFIG_LINKS    = $CONFIG_LINKS
50404  CONFIG_COMMANDS = $CONFIG_COMMANDS
50405  $ $0 $@
50406
50407on `(hostname || uname -n) 2>/dev/null | sed 1q`
50408"
50409
50410_ACEOF
50411
50412case $ac_config_files in *"
50413"*) set x $ac_config_files; shift; ac_config_files=$*;;
50414esac
50415
50416case $ac_config_headers in *"
50417"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
50418esac
50419
50420
50421cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50422# Files that config.status was made for.
50423config_files="$ac_config_files"
50424config_headers="$ac_config_headers"
50425
50426_ACEOF
50427
50428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50429ac_cs_usage="\
50430\`$as_me' instantiates files and other configuration actions
50431from templates according to the current configuration.  Unless the files
50432and actions are specified as TAGs, all are instantiated by default.
50433
50434Usage: $0 [OPTION]... [TAG]...
50435
50436  -h, --help       print this help, then exit
50437  -V, --version    print version number and configuration settings, then exit
50438      --config     print configuration, then exit
50439  -q, --quiet, --silent
50440                   do not print progress messages
50441  -d, --debug      don't remove temporary files
50442      --recheck    update $as_me by reconfiguring in the same conditions
50443      --file=FILE[:TEMPLATE]
50444                   instantiate the configuration file FILE
50445      --header=FILE[:TEMPLATE]
50446                   instantiate the configuration header FILE
50447
50448Configuration files:
50449$config_files
50450
50451Configuration headers:
50452$config_headers
50453
50454Report bugs to <build-dev@openjdk.java.net>.
50455OpenJDK home page: <http://openjdk.java.net>."
50456
50457_ACEOF
50458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50459ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
50460ac_cs_version="\\
50461OpenJDK config.status jdk9
50462configured by $0, generated by GNU Autoconf 2.69,
50463  with options \\"\$ac_cs_config\\"
50464
50465Copyright (C) 2012 Free Software Foundation, Inc.
50466This config.status script is free software; the Free Software Foundation
50467gives unlimited permission to copy, distribute and modify it."
50468
50469ac_pwd='$ac_pwd'
50470srcdir='$srcdir'
50471AWK='$AWK'
50472test -n "\$AWK" || AWK=awk
50473_ACEOF
50474
50475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50476# The default lists apply if the user does not specify any file.
50477ac_need_defaults=:
50478while test $# != 0
50479do
50480  case $1 in
50481  --*=?*)
50482    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50483    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
50484    ac_shift=:
50485    ;;
50486  --*=)
50487    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50488    ac_optarg=
50489    ac_shift=:
50490    ;;
50491  *)
50492    ac_option=$1
50493    ac_optarg=$2
50494    ac_shift=shift
50495    ;;
50496  esac
50497
50498  case $ac_option in
50499  # Handling of the options.
50500  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50501    ac_cs_recheck=: ;;
50502  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50503    $as_echo "$ac_cs_version"; exit ;;
50504  --config | --confi | --conf | --con | --co | --c )
50505    $as_echo "$ac_cs_config"; exit ;;
50506  --debug | --debu | --deb | --de | --d | -d )
50507    debug=: ;;
50508  --file | --fil | --fi | --f )
50509    $ac_shift
50510    case $ac_optarg in
50511    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50512    '') as_fn_error $? "missing file argument" ;;
50513    esac
50514    as_fn_append CONFIG_FILES " '$ac_optarg'"
50515    ac_need_defaults=false;;
50516  --header | --heade | --head | --hea )
50517    $ac_shift
50518    case $ac_optarg in
50519    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50520    esac
50521    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50522    ac_need_defaults=false;;
50523  --he | --h)
50524    # Conflict between --help and --header
50525    as_fn_error $? "ambiguous option: \`$1'
50526Try \`$0 --help' for more information.";;
50527  --help | --hel | -h )
50528    $as_echo "$ac_cs_usage"; exit ;;
50529  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50530  | -silent | --silent | --silen | --sile | --sil | --si | --s)
50531    ac_cs_silent=: ;;
50532
50533  # This is an error.
50534  -*) as_fn_error $? "unrecognized option: \`$1'
50535Try \`$0 --help' for more information." ;;
50536
50537  *) as_fn_append ac_config_targets " $1"
50538     ac_need_defaults=false ;;
50539
50540  esac
50541  shift
50542done
50543
50544ac_configure_extra_args=
50545
50546if $ac_cs_silent; then
50547  exec 6>/dev/null
50548  ac_configure_extra_args="$ac_configure_extra_args --silent"
50549fi
50550
50551_ACEOF
50552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50553if \$ac_cs_recheck; then
50554  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50555  shift
50556  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
50557  CONFIG_SHELL='$SHELL'
50558  export CONFIG_SHELL
50559  exec "\$@"
50560fi
50561
50562_ACEOF
50563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50564exec 5>>config.log
50565{
50566  echo
50567  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50568## Running $as_me. ##
50569_ASBOX
50570  $as_echo "$ac_log"
50571} >&5
50572
50573_ACEOF
50574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50575_ACEOF
50576
50577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50578
50579# Handling of arguments.
50580for ac_config_target in $ac_config_targets
50581do
50582  case $ac_config_target in
50583    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
50584    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
50585    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
50586    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
50587    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
50588    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
50589    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
50590
50591  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
50592  esac
50593done
50594
50595
50596# If the user did not use the arguments to specify the items to instantiate,
50597# then the envvar interface is used.  Set only those that are not.
50598# We use the long form for the default assignment because of an extremely
50599# bizarre bug on SunOS 4.1.3.
50600if $ac_need_defaults; then
50601  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50602  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50603fi
50604
50605# Have a temporary directory for convenience.  Make it in the build tree
50606# simply because there is no reason against having it here, and in addition,
50607# creating and moving files from /tmp can sometimes cause problems.
50608# Hook for its removal unless debugging.
50609# Note that there is a small window in which the directory will not be cleaned:
50610# after its creation but before its name has been assigned to `$tmp'.
50611$debug ||
50612{
50613  tmp= ac_tmp=
50614  trap 'exit_status=$?
50615  : "${ac_tmp:=$tmp}"
50616  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50617' 0
50618  trap 'as_fn_exit 1' 1 2 13 15
50619}
50620# Create a (secure) tmp directory for tmp files.
50621
50622{
50623  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50624  test -d "$tmp"
50625}  ||
50626{
50627  tmp=./conf$$-$RANDOM
50628  (umask 077 && mkdir "$tmp")
50629} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50630ac_tmp=$tmp
50631
50632# Set up the scripts for CONFIG_FILES section.
50633# No need to generate them if there are no CONFIG_FILES.
50634# This happens for instance with `./config.status config.h'.
50635if test -n "$CONFIG_FILES"; then
50636
50637
50638ac_cr=`echo X | tr X '\015'`
50639# On cygwin, bash can eat \r inside `` if the user requested igncr.
50640# But we know of no other shell where ac_cr would be empty at this
50641# point, so we can use a bashism as a fallback.
50642if test "x$ac_cr" = x; then
50643  eval ac_cr=\$\'\\r\'
50644fi
50645ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50646if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50647  ac_cs_awk_cr='\\r'
50648else
50649  ac_cs_awk_cr=$ac_cr
50650fi
50651
50652echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50653_ACEOF
50654
50655
50656{
50657  echo "cat >conf$$subs.awk <<_ACEOF" &&
50658  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50659  echo "_ACEOF"
50660} >conf$$subs.sh ||
50661  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50662ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50663ac_delim='%!_!# '
50664for ac_last_try in false false false false false :; do
50665  . ./conf$$subs.sh ||
50666    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50667
50668  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50669  if test $ac_delim_n = $ac_delim_num; then
50670    break
50671  elif $ac_last_try; then
50672    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50673  else
50674    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50675  fi
50676done
50677rm -f conf$$subs.sh
50678
50679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50680cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50681_ACEOF
50682sed -n '
50683h
50684s/^/S["/; s/!.*/"]=/
50685p
50686g
50687s/^[^!]*!//
50688:repl
50689t repl
50690s/'"$ac_delim"'$//
50691t delim
50692:nl
50693h
50694s/\(.\{148\}\)..*/\1/
50695t more1
50696s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50697p
50698n
50699b repl
50700:more1
50701s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50702p
50703g
50704s/.\{148\}//
50705t nl
50706:delim
50707h
50708s/\(.\{148\}\)..*/\1/
50709t more2
50710s/["\\]/\\&/g; s/^/"/; s/$/"/
50711p
50712b
50713:more2
50714s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50715p
50716g
50717s/.\{148\}//
50718t delim
50719' <conf$$subs.awk | sed '
50720/^[^""]/{
50721  N
50722  s/\n//
50723}
50724' >>$CONFIG_STATUS || ac_write_fail=1
50725rm -f conf$$subs.awk
50726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50727_ACAWK
50728cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50729  for (key in S) S_is_set[key] = 1
50730  FS = ""
50731
50732}
50733{
50734  line = $ 0
50735  nfields = split(line, field, "@")
50736  substed = 0
50737  len = length(field[1])
50738  for (i = 2; i < nfields; i++) {
50739    key = field[i]
50740    keylen = length(key)
50741    if (S_is_set[key]) {
50742      value = S[key]
50743      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50744      len += length(value) + length(field[++i])
50745      substed = 1
50746    } else
50747      len += 1 + keylen
50748  }
50749
50750  print line
50751}
50752
50753_ACAWK
50754_ACEOF
50755cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50756if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50757  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50758else
50759  cat
50760fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50761  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50762_ACEOF
50763
50764# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50765# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50766# trailing colons and then remove the whole line if VPATH becomes empty
50767# (actually we leave an empty line to preserve line numbers).
50768if test "x$srcdir" = x.; then
50769  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50770h
50771s///
50772s/^/:/
50773s/[	 ]*$/:/
50774s/:\$(srcdir):/:/g
50775s/:\${srcdir}:/:/g
50776s/:@srcdir@:/:/g
50777s/^:*//
50778s/:*$//
50779x
50780s/\(=[	 ]*\).*/\1/
50781G
50782s/\n//
50783s/^[^=]*=[	 ]*$//
50784}'
50785fi
50786
50787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50788fi # test -n "$CONFIG_FILES"
50789
50790# Set up the scripts for CONFIG_HEADERS section.
50791# No need to generate them if there are no CONFIG_HEADERS.
50792# This happens for instance with `./config.status Makefile'.
50793if test -n "$CONFIG_HEADERS"; then
50794cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50795BEGIN {
50796_ACEOF
50797
50798# Transform confdefs.h into an awk script `defines.awk', embedded as
50799# here-document in config.status, that substitutes the proper values into
50800# config.h.in to produce config.h.
50801
50802# Create a delimiter string that does not exist in confdefs.h, to ease
50803# handling of long lines.
50804ac_delim='%!_!# '
50805for ac_last_try in false false :; do
50806  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50807  if test -z "$ac_tt"; then
50808    break
50809  elif $ac_last_try; then
50810    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50811  else
50812    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50813  fi
50814done
50815
50816# For the awk script, D is an array of macro values keyed by name,
50817# likewise P contains macro parameters if any.  Preserve backslash
50818# newline sequences.
50819
50820ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50821sed -n '
50822s/.\{148\}/&'"$ac_delim"'/g
50823t rset
50824:rset
50825s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50826t def
50827d
50828:def
50829s/\\$//
50830t bsnl
50831s/["\\]/\\&/g
50832s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50833D["\1"]=" \3"/p
50834s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50835d
50836:bsnl
50837s/["\\]/\\&/g
50838s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50839D["\1"]=" \3\\\\\\n"\\/p
50840t cont
50841s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50842t cont
50843d
50844:cont
50845n
50846s/.\{148\}/&'"$ac_delim"'/g
50847t clear
50848:clear
50849s/\\$//
50850t bsnlc
50851s/["\\]/\\&/g; s/^/"/; s/$/"/p
50852d
50853:bsnlc
50854s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50855b cont
50856' <confdefs.h | sed '
50857s/'"$ac_delim"'/"\\\
50858"/g' >>$CONFIG_STATUS || ac_write_fail=1
50859
50860cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50861  for (key in D) D_is_set[key] = 1
50862  FS = ""
50863}
50864/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50865  line = \$ 0
50866  split(line, arg, " ")
50867  if (arg[1] == "#") {
50868    defundef = arg[2]
50869    mac1 = arg[3]
50870  } else {
50871    defundef = substr(arg[1], 2)
50872    mac1 = arg[2]
50873  }
50874  split(mac1, mac2, "(") #)
50875  macro = mac2[1]
50876  prefix = substr(line, 1, index(line, defundef) - 1)
50877  if (D_is_set[macro]) {
50878    # Preserve the white space surrounding the "#".
50879    print prefix "define", macro P[macro] D[macro]
50880    next
50881  } else {
50882    # Replace #undef with comments.  This is necessary, for example,
50883    # in the case of _POSIX_SOURCE, which is predefined and required
50884    # on some systems where configure will not decide to define it.
50885    if (defundef == "undef") {
50886      print "/*", prefix defundef, macro, "*/"
50887      next
50888    }
50889  }
50890}
50891{ print }
50892_ACAWK
50893_ACEOF
50894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50895  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50896fi # test -n "$CONFIG_HEADERS"
50897
50898
50899eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50900shift
50901for ac_tag
50902do
50903  case $ac_tag in
50904  :[FHLC]) ac_mode=$ac_tag; continue;;
50905  esac
50906  case $ac_mode$ac_tag in
50907  :[FHL]*:*);;
50908  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50909  :[FH]-) ac_tag=-:-;;
50910  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50911  esac
50912  ac_save_IFS=$IFS
50913  IFS=:
50914  set x $ac_tag
50915  IFS=$ac_save_IFS
50916  shift
50917  ac_file=$1
50918  shift
50919
50920  case $ac_mode in
50921  :L) ac_source=$1;;
50922  :[FH])
50923    ac_file_inputs=
50924    for ac_f
50925    do
50926      case $ac_f in
50927      -) ac_f="$ac_tmp/stdin";;
50928      *) # Look for the file first in the build tree, then in the source tree
50929	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50930	 # because $ac_f cannot contain `:'.
50931	 test -f "$ac_f" ||
50932	   case $ac_f in
50933	   [\\/$]*) false;;
50934	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50935	   esac ||
50936	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50937      esac
50938      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50939      as_fn_append ac_file_inputs " '$ac_f'"
50940    done
50941
50942    # Let's still pretend it is `configure' which instantiates (i.e., don't
50943    # use $as_me), people would be surprised to read:
50944    #    /* config.h.  Generated by config.status.  */
50945    configure_input='Generated from '`
50946	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50947	`' by configure.'
50948    if test x"$ac_file" != x-; then
50949      configure_input="$ac_file.  $configure_input"
50950      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50951$as_echo "$as_me: creating $ac_file" >&6;}
50952    fi
50953    # Neutralize special characters interpreted by sed in replacement strings.
50954    case $configure_input in #(
50955    *\&* | *\|* | *\\* )
50956       ac_sed_conf_input=`$as_echo "$configure_input" |
50957       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50958    *) ac_sed_conf_input=$configure_input;;
50959    esac
50960
50961    case $ac_tag in
50962    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50963      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50964    esac
50965    ;;
50966  esac
50967
50968  ac_dir=`$as_dirname -- "$ac_file" ||
50969$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50970	 X"$ac_file" : 'X\(//\)[^/]' \| \
50971	 X"$ac_file" : 'X\(//\)$' \| \
50972	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50973$as_echo X"$ac_file" |
50974    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50975	    s//\1/
50976	    q
50977	  }
50978	  /^X\(\/\/\)[^/].*/{
50979	    s//\1/
50980	    q
50981	  }
50982	  /^X\(\/\/\)$/{
50983	    s//\1/
50984	    q
50985	  }
50986	  /^X\(\/\).*/{
50987	    s//\1/
50988	    q
50989	  }
50990	  s/.*/./; q'`
50991  as_dir="$ac_dir"; as_fn_mkdir_p
50992  ac_builddir=.
50993
50994case "$ac_dir" in
50995.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50996*)
50997  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50998  # A ".." for each directory in $ac_dir_suffix.
50999  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51000  case $ac_top_builddir_sub in
51001  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51002  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51003  esac ;;
51004esac
51005ac_abs_top_builddir=$ac_pwd
51006ac_abs_builddir=$ac_pwd$ac_dir_suffix
51007# for backward compatibility:
51008ac_top_builddir=$ac_top_build_prefix
51009
51010case $srcdir in
51011  .)  # We are building in place.
51012    ac_srcdir=.
51013    ac_top_srcdir=$ac_top_builddir_sub
51014    ac_abs_top_srcdir=$ac_pwd ;;
51015  [\\/]* | ?:[\\/]* )  # Absolute name.
51016    ac_srcdir=$srcdir$ac_dir_suffix;
51017    ac_top_srcdir=$srcdir
51018    ac_abs_top_srcdir=$srcdir ;;
51019  *) # Relative name.
51020    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51021    ac_top_srcdir=$ac_top_build_prefix$srcdir
51022    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51023esac
51024ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51025
51026
51027  case $ac_mode in
51028  :F)
51029  #
51030  # CONFIG_FILE
51031  #
51032
51033_ACEOF
51034
51035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51036# If the template does not know about datarootdir, expand it.
51037# FIXME: This hack should be removed a few years after 2.60.
51038ac_datarootdir_hack=; ac_datarootdir_seen=
51039ac_sed_dataroot='
51040/datarootdir/ {
51041  p
51042  q
51043}
51044/@datadir@/p
51045/@docdir@/p
51046/@infodir@/p
51047/@localedir@/p
51048/@mandir@/p'
51049case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51050*datarootdir*) ac_datarootdir_seen=yes;;
51051*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51052  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51053$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51054_ACEOF
51055cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51056  ac_datarootdir_hack='
51057  s&@datadir@&$datadir&g
51058  s&@docdir@&$docdir&g
51059  s&@infodir@&$infodir&g
51060  s&@localedir@&$localedir&g
51061  s&@mandir@&$mandir&g
51062  s&\\\${datarootdir}&$datarootdir&g' ;;
51063esac
51064_ACEOF
51065
51066# Neutralize VPATH when `$srcdir' = `.'.
51067# Shell code in configure.ac might set extrasub.
51068# FIXME: do we really want to maintain this feature?
51069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51070ac_sed_extra="$ac_vpsub
51071$extrasub
51072_ACEOF
51073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51074:t
51075/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51076s|@configure_input@|$ac_sed_conf_input|;t t
51077s&@top_builddir@&$ac_top_builddir_sub&;t t
51078s&@top_build_prefix@&$ac_top_build_prefix&;t t
51079s&@srcdir@&$ac_srcdir&;t t
51080s&@abs_srcdir@&$ac_abs_srcdir&;t t
51081s&@top_srcdir@&$ac_top_srcdir&;t t
51082s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51083s&@builddir@&$ac_builddir&;t t
51084s&@abs_builddir@&$ac_abs_builddir&;t t
51085s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51086$ac_datarootdir_hack
51087"
51088eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51089  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51090
51091test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51092  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51093  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
51094      "$ac_tmp/out"`; test -z "$ac_out"; } &&
51095  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51096which seems to be undefined.  Please make sure it is defined" >&5
51097$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51098which seems to be undefined.  Please make sure it is defined" >&2;}
51099
51100  rm -f "$ac_tmp/stdin"
51101  case $ac_file in
51102  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51103  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51104  esac \
51105  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51106 ;;
51107  :H)
51108  #
51109  # CONFIG_HEADER
51110  #
51111  if test x"$ac_file" != x-; then
51112    {
51113      $as_echo "/* $configure_input  */" \
51114      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51115    } >"$ac_tmp/config.h" \
51116      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51117    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51118      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51119$as_echo "$as_me: $ac_file is unchanged" >&6;}
51120    else
51121      rm -f "$ac_file"
51122      mv "$ac_tmp/config.h" "$ac_file" \
51123	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51124    fi
51125  else
51126    $as_echo "/* $configure_input  */" \
51127      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51128      || as_fn_error $? "could not create -" "$LINENO" 5
51129  fi
51130 ;;
51131
51132
51133  esac
51134
51135done # for ac_tag
51136
51137
51138as_fn_exit 0
51139_ACEOF
51140ac_clean_files=$ac_clean_files_save
51141
51142test $ac_write_fail = 0 ||
51143  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51144
51145
51146# configure is writing to config.log, and then calls config.status.
51147# config.status does its own redirection, appending to config.log.
51148# Unfortunately, on DOS this fails, as config.log is still kept open
51149# by configure, so config.status won't be able to write to it; its
51150# output is simply discarded.  So we exec the FD to /dev/null,
51151# effectively closing config.log, so it can be properly (re)opened and
51152# appended to by config.status.  When coming back to configure, we
51153# need to make the FD available again.
51154if test "$no_create" != yes; then
51155  ac_cs_success=:
51156  ac_config_status_args=
51157  test "$silent" = yes &&
51158    ac_config_status_args="$ac_config_status_args --quiet"
51159  exec 5>/dev/null
51160  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51161  exec 5>>config.log
51162  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51163  # would make configure fail if this is the last instruction.
51164  $ac_cs_success || as_fn_exit 1
51165fi
51166if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51167  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51168$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51169fi
51170
51171
51172# Try to move the config.log file to the output directory.
51173if test -e ./config.log; then
51174  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51175fi
51176
51177# Make the compare script executable
51178$CHMOD +x $OUTPUT_ROOT/compare.sh
51179
51180# Finally output some useful information to the user
51181
51182  # Finally output some useful information to the user
51183
51184  printf "\n"
51185  printf "====================================================\n"
51186  if test "x$no_create" != "xyes"; then
51187    if test "x$IS_RECONFIGURE" != "xyes"; then
51188      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51189    else
51190      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51191    fi
51192  else
51193    if test "x$IS_RECONFIGURE" != "xyes"; then
51194      printf "A configuration has been successfully checked but not created\n"
51195    else
51196      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51197    fi
51198  fi
51199  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51200    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51201  else
51202    printf "using default settings.\n"
51203  fi
51204
51205  printf "\n"
51206  printf "Configuration summary:\n"
51207  printf "* Debug level:    $DEBUG_LEVEL\n"
51208  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51209  printf "* JDK variant:    $JDK_VARIANT\n"
51210  printf "* JVM variants:   $with_jvm_variants\n"
51211  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51212
51213  printf "\n"
51214  printf "Tools summary:\n"
51215  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51216    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51217  fi
51218  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51219  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51220  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51221  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51222
51223  printf "\n"
51224  printf "Build performance summary:\n"
51225  printf "* Cores to use:   $JOBS\n"
51226  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51227  if test "x$CCACHE_STATUS" != "x"; then
51228    printf "* ccache status:  $CCACHE_STATUS\n"
51229  fi
51230  printf "\n"
51231
51232  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51233    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51234    printf "will result in longer build times.\n"
51235    printf "\n"
51236  fi
51237
51238  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51239    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51240    printf "These are not respected, and will be ignored. It is recommended\n"
51241    printf "that you clean your environment. The following variables are set:\n"
51242    printf "$FOUND_ALT_VARIABLES\n"
51243    printf "\n"
51244  fi
51245
51246  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51247    printf "WARNING: Your build output directory is not on a local disk.\n"
51248    printf "This will severely degrade build performance!\n"
51249    printf "It is recommended that you create an output directory on a local disk,\n"
51250    printf "and run the configure script again from that directory.\n"
51251    printf "\n"
51252  fi
51253
51254  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51255    printf "WARNING: The result of this configuration has overridden an older\n"
51256    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51257    printf "proper build. Failure to do so might result in strange build problems.\n"
51258    printf "\n"
51259  fi
51260
51261  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51262    printf "WARNING: The result of this configuration was not saved.\n"
51263    printf "You should run without '--no-create | -n' to create the configuration.\n"
51264    printf "\n"
51265  fi
51266
51267