generated-configure.sh revision 1017:28e272c4b976
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_LIBGIF
660USE_EXTERNAL_LIBJPEG
661ALSA_LIBS
662ALSA_CFLAGS
663FREETYPE_BUNDLE_LIB_PATH
664FREETYPE_LIBS
665FREETYPE_CFLAGS
666CUPS_CFLAGS
667OPENWIN_HOME
668X_EXTRA_LIBS
669X_LIBS
670X_PRE_LIBS
671X_CFLAGS
672XMKMF
673FIXPATH
674ZIP_DEBUGINFO_FILES
675ENABLE_DEBUG_SYMBOLS
676CFLAGS_WARNINGS_ARE_ERRORS
677COMPILER_SUPPORTS_TARGET_BITS_FLAG
678ZERO_ARCHFLAG
679LDFLAGS_CXX_JDK
680LDFLAGS_JDKEXE_SUFFIX
681LDFLAGS_JDKLIB_SUFFIX
682LDFLAGS_JDKEXE
683LDFLAGS_JDKLIB
684CXXFLAGS_JDKEXE
685CXXFLAGS_JDKLIB
686CFLAGS_JDKEXE
687CFLAGS_JDKLIB
688MACOSX_VERSION_MIN
689LEGACY_EXTRA_LDFLAGS
690LEGACY_EXTRA_CXXFLAGS
691LEGACY_EXTRA_CFLAGS
692CXX_O_FLAG_NONE
693CXX_O_FLAG_NORM
694CXX_O_FLAG_HI
695CXX_O_FLAG_HIGHEST
696C_O_FLAG_NONE
697C_O_FLAG_NORM
698C_O_FLAG_HI
699C_O_FLAG_HIGHEST
700CXXFLAGS_DEBUG_SYMBOLS
701CFLAGS_DEBUG_SYMBOLS
702CXX_FLAG_DEPS
703C_FLAG_DEPS
704SET_SHARED_LIBRARY_MAPFILE
705SET_SHARED_LIBRARY_NAME
706SET_SHARED_LIBRARY_ORIGIN
707SET_EXECUTABLE_ORIGIN
708SHARED_LIBRARY_FLAGS
709CXX_FLAG_REORDER
710C_FLAG_REORDER
711RC_FLAGS
712AR_OUT_OPTION
713LD_OUT_OPTION
714EXE_OUT_OPTION
715CC_OUT_OPTION
716POST_MCS_CMD
717POST_STRIP_CMD
718ARFLAGS
719COMPILER_TARGET_BITS_FLAG
720JT_HOME
721JTREGEXE
722USING_BROKEN_SUSE_LD
723PACKAGE_PATH
724LDEXECXX
725LDEXE
726USE_CLANG
727HOTSPOT_LD
728HOTSPOT_CXX
729HOTSPOT_RC
730HOTSPOT_MT
731BUILD_LD
732BUILD_CXX
733BUILD_CC
734ac_ct_OBJDUMP
735OBJDUMP
736ac_ct_OBJCOPY
737OBJCOPY
738ac_ct_NM
739ac_ct_STRIP
740MCS
741GNM
742NM
743STRIP
744DUMPBIN
745RC
746MT
747LIPO
748ac_ct_OBJC
749OBJCFLAGS
750OBJC
751ac_ct_AR
752AR
753AS
754LDCXX
755LD
756CXXCPP
757CPP
758ac_ct_CXX
759CXXFLAGS
760CXX
761ac_ct_PROPER_COMPILER_CXX
762PROPER_COMPILER_CXX
763TOOLS_DIR_CXX
764POTENTIAL_CXX
765OBJEXT
766EXEEXT
767ac_ct_CC
768CPPFLAGS
769LDFLAGS
770CFLAGS
771CC
772ac_ct_PROPER_COMPILER_CC
773PROPER_COMPILER_CC
774TOOLS_DIR_CC
775POTENTIAL_CC
776VS_PATH
777VS_LIB
778VS_INCLUDE
779CYGWIN_LINK
780EXE_SUFFIX
781OBJ_SUFFIX
782STATIC_LIBRARY
783SHARED_LIBRARY
784STATIC_LIBRARY_SUFFIX
785SHARED_LIBRARY_SUFFIX
786LIBRARY_PREFIX
787TOOLCHAIN_TYPE
788BUILD_HOTSPOT
789HOTSPOT_DIST
790BUILD_OUTPUT
791OVERRIDE_SRC_ROOT
792ADD_SRC_ROOT
793JDK_TOPDIR
794NASHORN_TOPDIR
795HOTSPOT_TOPDIR
796JAXWS_TOPDIR
797JAXP_TOPDIR
798CORBA_TOPDIR
799LANGTOOLS_TOPDIR
800JAVA_FLAGS_SMALL
801JAVA_FLAGS_BIG
802JAVA_FLAGS
803JAVAC_FLAGS
804BOOT_JDK_SOURCETARGET
805JARSIGNER
806NATIVE2ASCII
807JAR
808JAVAH
809JAVAC
810JAVA
811BOOT_JDK
812BOOT_TOOLSJAR
813BOOT_RTJAR
814JAVA_CHECK
815JAVAC_CHECK
816COOKED_BUILD_NUMBER
817JDK_VERSION
818COPYRIGHT_YEAR
819MACOSX_BUNDLE_ID_BASE
820MACOSX_BUNDLE_NAME_BASE
821COMPANY_NAME
822JDK_RC_PLATFORM_NAME
823PRODUCT_SUFFIX
824PRODUCT_NAME
825LAUNCHER_NAME
826MILESTONE
827JDK_BUILD_NUMBER
828JDK_UPDATE_VERSION
829JDK_MICRO_VERSION
830JDK_MINOR_VERSION
831JDK_MAJOR_VERSION
832USER_RELEASE_SUFFIX
833COMPRESS_JARS
834RMICONNECTOR_IIOP
835UNLIMITED_CRYPTO
836CACERTS_FILE
837TEST_IN_BUILD
838BUILD_HEADLESS
839SUPPORT_HEADFUL
840SUPPORT_HEADLESS
841BDEPS_FTP
842BDEPS_UNZIP
843OS_VERSION_MICRO
844OS_VERSION_MINOR
845OS_VERSION_MAJOR
846PKG_CONFIG
847CODESIGN
848XATTR
849DSYMUTIL
850IS_GNU_TIME
851TIME
852STAT
853HG
854READELF
855OTOOL
856LDD
857ZIP
858UNZIP
859FIND_DELETE
860MAKE
861CHECK_TOOLSDIR_MAKE
862CHECK_TOOLSDIR_GMAKE
863CHECK_MAKE
864CHECK_GMAKE
865PKGHANDLER
866OUTPUT_ROOT
867CONF_NAME
868SPEC
869BUILD_VARIANT_RELEASE
870DEBUG_CLASSFILES
871FASTDEBUG
872VARIANT
873DEBUG_LEVEL
874MACOSX_UNIVERSAL
875INCLUDE_SA
876JVM_VARIANT_CORE
877JVM_VARIANT_ZEROSHARK
878JVM_VARIANT_ZERO
879JVM_VARIANT_KERNEL
880JVM_VARIANT_MINIMAL1
881JVM_VARIANT_CLIENT
882JVM_VARIANT_SERVER
883JVM_VARIANTS
884JVM_INTERPRETER
885JDK_VARIANT
886SET_OPENJDK
887BUILD_LOG_WRAPPER
888BUILD_LOG_PREVIOUS
889BUILD_LOG
890SYS_ROOT
891TOPDIR
892PATH_SEP
893ZERO_ARCHDEF
894DEFINE_CROSS_COMPILE_ARCH
895LP64
896OPENJDK_TARGET_OS_EXPORT_DIR
897OPENJDK_TARGET_OS_API_DIR
898OPENJDK_TARGET_CPU_JLI_CFLAGS
899OPENJDK_TARGET_CPU_OSARCH
900OPENJDK_TARGET_CPU_ISADIR
901OPENJDK_TARGET_CPU_LIBDIR
902OPENJDK_TARGET_CPU_LEGACY_LIB
903OPENJDK_TARGET_CPU_LEGACY
904REQUIRED_OS_VERSION
905REQUIRED_OS_NAME
906COMPILE_TYPE
907OPENJDK_TARGET_CPU_ENDIAN
908OPENJDK_TARGET_CPU_BITS
909OPENJDK_TARGET_CPU_ARCH
910OPENJDK_TARGET_CPU
911OPENJDK_TARGET_OS_API
912OPENJDK_TARGET_OS
913OPENJDK_BUILD_CPU_ENDIAN
914OPENJDK_BUILD_CPU_BITS
915OPENJDK_BUILD_CPU_ARCH
916OPENJDK_BUILD_CPU
917OPENJDK_BUILD_OS_API
918OPENJDK_BUILD_OS
919OPENJDK_BUILD_AUTOCONF_NAME
920OPENJDK_TARGET_AUTOCONF_NAME
921target_os
922target_vendor
923target_cpu
924target
925host_os
926host_vendor
927host_cpu
928host
929build_os
930build_vendor
931build_cpu
932build
933SETFILE
934DF
935READLINK
936CYGPATH
937SED
938FGREP
939EGREP
940GREP
941AWK
942XARGS
943WHICH
944WC
945UNIQ
946UNAME
947TR
948TOUCH
949TEE
950TAR
951TAIL
952SORT
953SH
954RM
955PRINTF
956NAWK
957MV
958MKTEMP
959MKDIR
960LS
961LN
962HEAD
963FIND
964FILE
965EXPR
966ECHO
967DIRNAME
968DIFF
969DATE
970CUT
971CPIO
972CP
973COMM
974CMP
975CHMOD
976CAT
977BASH
978BASENAME
979DATE_WHEN_CONFIGURED
980CONFIGURE_COMMAND_LINE
981target_alias
982host_alias
983build_alias
984LIBS
985ECHO_T
986ECHO_N
987ECHO_C
988DEFS
989mandir
990localedir
991libdir
992psdir
993pdfdir
994dvidir
995htmldir
996infodir
997docdir
998oldincludedir
999includedir
1000localstatedir
1001sharedstatedir
1002sysconfdir
1003datadir
1004datarootdir
1005libexecdir
1006sbindir
1007bindir
1008program_transform_name
1009prefix
1010exec_prefix
1011PACKAGE_URL
1012PACKAGE_BUGREPORT
1013PACKAGE_STRING
1014PACKAGE_VERSION
1015PACKAGE_TARNAME
1016PACKAGE_NAME
1017PATH_SEPARATOR
1018SHELL'
1019ac_subst_files=''
1020ac_user_opts='
1021enable_option_checking
1022with_target_bits
1023with_sys_root
1024with_tools_dir
1025with_devkit
1026enable_openjdk_only
1027with_custom_make_dir
1028with_jdk_variant
1029with_jvm_interpreter
1030with_jvm_variants
1031enable_debug
1032with_debug_level
1033with_conf_name
1034with_builddeps_conf
1035with_builddeps_server
1036with_builddeps_dir
1037with_builddeps_group
1038enable_headful
1039enable_hotspot_test_in_build
1040with_cacerts_file
1041enable_unlimited_crypto
1042enable_rmiconnector_iiop
1043with_milestone
1044with_update_version
1045with_user_release_suffix
1046with_build_number
1047with_boot_jdk
1048with_boot_jdk_jvmargs
1049with_add_source_root
1050with_override_source_root
1051with_adds_and_overrides
1052with_override_langtools
1053with_override_corba
1054with_override_jaxp
1055with_override_jaxws
1056with_override_hotspot
1057with_override_nashorn
1058with_override_jdk
1059with_import_hotspot
1060with_toolchain_type
1061with_jtreg
1062with_extra_cflags
1063with_extra_cxxflags
1064with_extra_ldflags
1065enable_debug_symbols
1066enable_zip_debug_info
1067enable_macosx_runtime_support
1068with_x
1069with_cups
1070with_cups_include
1071with_freetype
1072with_freetype_include
1073with_freetype_lib
1074enable_freetype_bundling
1075with_alsa
1076with_alsa_include
1077with_alsa_lib
1078with_giflib
1079with_libpng
1080with_zlib
1081with_stdc__lib
1082with_msvcr_dll
1083with_dxsdk
1084with_dxsdk_lib
1085with_dxsdk_include
1086with_num_cores
1087with_memory_size
1088with_jobs
1089with_sjavac_server_java
1090enable_sjavac
1091enable_precompiled_headers
1092enable_ccache
1093with_ccache_dir
1094'
1095      ac_precious_vars='build_alias
1096host_alias
1097target_alias
1098BASENAME
1099BASH
1100CAT
1101CHMOD
1102CMP
1103COMM
1104CP
1105CPIO
1106CUT
1107DATE
1108DIFF
1109DIRNAME
1110ECHO
1111EXPR
1112FILE
1113FIND
1114HEAD
1115LN
1116LS
1117MKDIR
1118MKTEMP
1119MV
1120NAWK
1121PRINTF
1122RM
1123SH
1124SORT
1125TAIL
1126TAR
1127TEE
1128TOUCH
1129TR
1130UNAME
1131UNIQ
1132WC
1133WHICH
1134XARGS
1135AWK
1136GREP
1137EGREP
1138FGREP
1139SED
1140CYGPATH
1141READLINK
1142DF
1143SETFILE
1144UNZIP
1145ZIP
1146LDD
1147OTOOL
1148READELF
1149HG
1150STAT
1151TIME
1152DSYMUTIL
1153XATTR
1154CODESIGN
1155PKG_CONFIG
1156JAVA
1157JAVAC
1158JAVAH
1159JAR
1160NATIVE2ASCII
1161JARSIGNER
1162CC
1163CFLAGS
1164LDFLAGS
1165LIBS
1166CPPFLAGS
1167CXX
1168CXXFLAGS
1169CCC
1170CPP
1171CXXCPP
1172AS
1173AR
1174OBJC
1175OBJCFLAGS
1176LIPO
1177STRIP
1178NM
1179GNM
1180MCS
1181OBJCOPY
1182OBJDUMP
1183BUILD_CC
1184BUILD_CXX
1185BUILD_LD
1186JTREGEXE
1187XMKMF
1188FREETYPE_CFLAGS
1189FREETYPE_LIBS
1190ALSA_CFLAGS
1191ALSA_LIBS
1192PNG_CFLAGS
1193PNG_LIBS
1194LIBFFI_CFLAGS
1195LIBFFI_LIBS
1196CCACHE'
1197
1198
1199# Initialize some variables set by options.
1200ac_init_help=
1201ac_init_version=false
1202ac_unrecognized_opts=
1203ac_unrecognized_sep=
1204# The variables have the same names as the options, with
1205# dashes changed to underlines.
1206cache_file=/dev/null
1207exec_prefix=NONE
1208no_create=
1209no_recursion=
1210prefix=NONE
1211program_prefix=NONE
1212program_suffix=NONE
1213program_transform_name=s,x,x,
1214silent=
1215site=
1216srcdir=
1217verbose=
1218x_includes=NONE
1219x_libraries=NONE
1220
1221# Installation directory options.
1222# These are left unexpanded so users can "make install exec_prefix=/foo"
1223# and all the variables that are supposed to be based on exec_prefix
1224# by default will actually change.
1225# Use braces instead of parens because sh, perl, etc. also accept them.
1226# (The list follows the same order as the GNU Coding Standards.)
1227bindir='${exec_prefix}/bin'
1228sbindir='${exec_prefix}/sbin'
1229libexecdir='${exec_prefix}/libexec'
1230datarootdir='${prefix}/share'
1231datadir='${datarootdir}'
1232sysconfdir='${prefix}/etc'
1233sharedstatedir='${prefix}/com'
1234localstatedir='${prefix}/var'
1235includedir='${prefix}/include'
1236oldincludedir='/usr/include'
1237docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1238infodir='${datarootdir}/info'
1239htmldir='${docdir}'
1240dvidir='${docdir}'
1241pdfdir='${docdir}'
1242psdir='${docdir}'
1243libdir='${exec_prefix}/lib'
1244localedir='${datarootdir}/locale'
1245mandir='${datarootdir}/man'
1246
1247ac_prev=
1248ac_dashdash=
1249for ac_option
1250do
1251  # If the previous option needs an argument, assign it.
1252  if test -n "$ac_prev"; then
1253    eval $ac_prev=\$ac_option
1254    ac_prev=
1255    continue
1256  fi
1257
1258  case $ac_option in
1259  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1260  *=)   ac_optarg= ;;
1261  *)    ac_optarg=yes ;;
1262  esac
1263
1264  # Accept the important Cygnus configure options, so we can diagnose typos.
1265
1266  case $ac_dashdash$ac_option in
1267  --)
1268    ac_dashdash=yes ;;
1269
1270  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1271    ac_prev=bindir ;;
1272  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1273    bindir=$ac_optarg ;;
1274
1275  -build | --build | --buil | --bui | --bu)
1276    ac_prev=build_alias ;;
1277  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1278    build_alias=$ac_optarg ;;
1279
1280  -cache-file | --cache-file | --cache-fil | --cache-fi \
1281  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1282    ac_prev=cache_file ;;
1283  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1284  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1285    cache_file=$ac_optarg ;;
1286
1287  --config-cache | -C)
1288    cache_file=config.cache ;;
1289
1290  -datadir | --datadir | --datadi | --datad)
1291    ac_prev=datadir ;;
1292  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1293    datadir=$ac_optarg ;;
1294
1295  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1296  | --dataroo | --dataro | --datar)
1297    ac_prev=datarootdir ;;
1298  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1299  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1300    datarootdir=$ac_optarg ;;
1301
1302  -disable-* | --disable-*)
1303    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1304    # Reject names that are not valid shell variable names.
1305    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1306      as_fn_error $? "invalid feature name: $ac_useropt"
1307    ac_useropt_orig=$ac_useropt
1308    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1309    case $ac_user_opts in
1310      *"
1311"enable_$ac_useropt"
1312"*) ;;
1313      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1314	 ac_unrecognized_sep=', ';;
1315    esac
1316    eval enable_$ac_useropt=no ;;
1317
1318  -docdir | --docdir | --docdi | --doc | --do)
1319    ac_prev=docdir ;;
1320  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1321    docdir=$ac_optarg ;;
1322
1323  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1324    ac_prev=dvidir ;;
1325  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1326    dvidir=$ac_optarg ;;
1327
1328  -enable-* | --enable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=\$ac_optarg ;;
1343
1344  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1345  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1346  | --exec | --exe | --ex)
1347    ac_prev=exec_prefix ;;
1348  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1349  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1350  | --exec=* | --exe=* | --ex=*)
1351    exec_prefix=$ac_optarg ;;
1352
1353  -gas | --gas | --ga | --g)
1354    # Obsolete; use --with-gas.
1355    with_gas=yes ;;
1356
1357  -help | --help | --hel | --he | -h)
1358    ac_init_help=long ;;
1359  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1360    ac_init_help=recursive ;;
1361  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1362    ac_init_help=short ;;
1363
1364  -host | --host | --hos | --ho)
1365    ac_prev=host_alias ;;
1366  -host=* | --host=* | --hos=* | --ho=*)
1367    host_alias=$ac_optarg ;;
1368
1369  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1370    ac_prev=htmldir ;;
1371  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1372  | --ht=*)
1373    htmldir=$ac_optarg ;;
1374
1375  -includedir | --includedir | --includedi | --included | --include \
1376  | --includ | --inclu | --incl | --inc)
1377    ac_prev=includedir ;;
1378  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1379  | --includ=* | --inclu=* | --incl=* | --inc=*)
1380    includedir=$ac_optarg ;;
1381
1382  -infodir | --infodir | --infodi | --infod | --info | --inf)
1383    ac_prev=infodir ;;
1384  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1385    infodir=$ac_optarg ;;
1386
1387  -libdir | --libdir | --libdi | --libd)
1388    ac_prev=libdir ;;
1389  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1390    libdir=$ac_optarg ;;
1391
1392  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1393  | --libexe | --libex | --libe)
1394    ac_prev=libexecdir ;;
1395  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1396  | --libexe=* | --libex=* | --libe=*)
1397    libexecdir=$ac_optarg ;;
1398
1399  -localedir | --localedir | --localedi | --localed | --locale)
1400    ac_prev=localedir ;;
1401  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1402    localedir=$ac_optarg ;;
1403
1404  -localstatedir | --localstatedir | --localstatedi | --localstated \
1405  | --localstate | --localstat | --localsta | --localst | --locals)
1406    ac_prev=localstatedir ;;
1407  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1408  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1409    localstatedir=$ac_optarg ;;
1410
1411  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1412    ac_prev=mandir ;;
1413  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1414    mandir=$ac_optarg ;;
1415
1416  -nfp | --nfp | --nf)
1417    # Obsolete; use --without-fp.
1418    with_fp=no ;;
1419
1420  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1421  | --no-cr | --no-c | -n)
1422    no_create=yes ;;
1423
1424  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1425  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1426    no_recursion=yes ;;
1427
1428  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1429  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1430  | --oldin | --oldi | --old | --ol | --o)
1431    ac_prev=oldincludedir ;;
1432  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1433  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1434  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1435    oldincludedir=$ac_optarg ;;
1436
1437  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1438    ac_prev=prefix ;;
1439  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1440    prefix=$ac_optarg ;;
1441
1442  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1443  | --program-pre | --program-pr | --program-p)
1444    ac_prev=program_prefix ;;
1445  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1446  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1447    program_prefix=$ac_optarg ;;
1448
1449  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1450  | --program-suf | --program-su | --program-s)
1451    ac_prev=program_suffix ;;
1452  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1453  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1454    program_suffix=$ac_optarg ;;
1455
1456  -program-transform-name | --program-transform-name \
1457  | --program-transform-nam | --program-transform-na \
1458  | --program-transform-n | --program-transform- \
1459  | --program-transform | --program-transfor \
1460  | --program-transfo | --program-transf \
1461  | --program-trans | --program-tran \
1462  | --progr-tra | --program-tr | --program-t)
1463    ac_prev=program_transform_name ;;
1464  -program-transform-name=* | --program-transform-name=* \
1465  | --program-transform-nam=* | --program-transform-na=* \
1466  | --program-transform-n=* | --program-transform-=* \
1467  | --program-transform=* | --program-transfor=* \
1468  | --program-transfo=* | --program-transf=* \
1469  | --program-trans=* | --program-tran=* \
1470  | --progr-tra=* | --program-tr=* | --program-t=*)
1471    program_transform_name=$ac_optarg ;;
1472
1473  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1474    ac_prev=pdfdir ;;
1475  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1476    pdfdir=$ac_optarg ;;
1477
1478  -psdir | --psdir | --psdi | --psd | --ps)
1479    ac_prev=psdir ;;
1480  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1481    psdir=$ac_optarg ;;
1482
1483  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1484  | -silent | --silent | --silen | --sile | --sil)
1485    silent=yes ;;
1486
1487  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1488    ac_prev=sbindir ;;
1489  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1490  | --sbi=* | --sb=*)
1491    sbindir=$ac_optarg ;;
1492
1493  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1494  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1495  | --sharedst | --shareds | --shared | --share | --shar \
1496  | --sha | --sh)
1497    ac_prev=sharedstatedir ;;
1498  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1499  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1500  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1501  | --sha=* | --sh=*)
1502    sharedstatedir=$ac_optarg ;;
1503
1504  -site | --site | --sit)
1505    ac_prev=site ;;
1506  -site=* | --site=* | --sit=*)
1507    site=$ac_optarg ;;
1508
1509  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1510    ac_prev=srcdir ;;
1511  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1512    srcdir=$ac_optarg ;;
1513
1514  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1515  | --syscon | --sysco | --sysc | --sys | --sy)
1516    ac_prev=sysconfdir ;;
1517  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1518  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1519    sysconfdir=$ac_optarg ;;
1520
1521  -target | --target | --targe | --targ | --tar | --ta | --t)
1522    ac_prev=target_alias ;;
1523  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1524    target_alias=$ac_optarg ;;
1525
1526  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1527    verbose=yes ;;
1528
1529  -version | --version | --versio | --versi | --vers | -V)
1530    ac_init_version=: ;;
1531
1532  -with-* | --with-*)
1533    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1534    # Reject names that are not valid shell variable names.
1535    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1536      as_fn_error $? "invalid package name: $ac_useropt"
1537    ac_useropt_orig=$ac_useropt
1538    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1539    case $ac_user_opts in
1540      *"
1541"with_$ac_useropt"
1542"*) ;;
1543      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1544	 ac_unrecognized_sep=', ';;
1545    esac
1546    eval with_$ac_useropt=\$ac_optarg ;;
1547
1548  -without-* | --without-*)
1549    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1550    # Reject names that are not valid shell variable names.
1551    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1552      as_fn_error $? "invalid package name: $ac_useropt"
1553    ac_useropt_orig=$ac_useropt
1554    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1555    case $ac_user_opts in
1556      *"
1557"with_$ac_useropt"
1558"*) ;;
1559      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1560	 ac_unrecognized_sep=', ';;
1561    esac
1562    eval with_$ac_useropt=no ;;
1563
1564  --x)
1565    # Obsolete; use --with-x.
1566    with_x=yes ;;
1567
1568  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1569  | --x-incl | --x-inc | --x-in | --x-i)
1570    ac_prev=x_includes ;;
1571  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1572  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1573    x_includes=$ac_optarg ;;
1574
1575  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1576  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1577    ac_prev=x_libraries ;;
1578  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1579  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1580    x_libraries=$ac_optarg ;;
1581
1582  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1583Try \`$0 --help' for more information"
1584    ;;
1585
1586  *=*)
1587    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1588    # Reject names that are not valid shell variable names.
1589    case $ac_envvar in #(
1590      '' | [0-9]* | *[!_$as_cr_alnum]* )
1591      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1592    esac
1593    eval $ac_envvar=\$ac_optarg
1594    export $ac_envvar ;;
1595
1596  *)
1597    # FIXME: should be removed in autoconf 3.0.
1598    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1599    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1600      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1601    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1602    ;;
1603
1604  esac
1605done
1606
1607if test -n "$ac_prev"; then
1608  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1609  as_fn_error $? "missing argument to $ac_option"
1610fi
1611
1612if test -n "$ac_unrecognized_opts"; then
1613  case $enable_option_checking in
1614    no) ;;
1615    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1616    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1617  esac
1618fi
1619
1620# Check all directory arguments for consistency.
1621for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1622		datadir sysconfdir sharedstatedir localstatedir includedir \
1623		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1624		libdir localedir mandir
1625do
1626  eval ac_val=\$$ac_var
1627  # Remove trailing slashes.
1628  case $ac_val in
1629    */ )
1630      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1631      eval $ac_var=\$ac_val;;
1632  esac
1633  # Be sure to have absolute directory names.
1634  case $ac_val in
1635    [\\/$]* | ?:[\\/]* )  continue;;
1636    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1637  esac
1638  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1639done
1640
1641# There might be people who depend on the old broken behavior: `$host'
1642# used to hold the argument of --host etc.
1643# FIXME: To remove some day.
1644build=$build_alias
1645host=$host_alias
1646target=$target_alias
1647
1648# FIXME: To remove some day.
1649if test "x$host_alias" != x; then
1650  if test "x$build_alias" = x; then
1651    cross_compiling=maybe
1652  elif test "x$build_alias" != "x$host_alias"; then
1653    cross_compiling=yes
1654  fi
1655fi
1656
1657ac_tool_prefix=
1658test -n "$host_alias" && ac_tool_prefix=$host_alias-
1659
1660test "$silent" = yes && exec 6>/dev/null
1661
1662
1663ac_pwd=`pwd` && test -n "$ac_pwd" &&
1664ac_ls_di=`ls -di .` &&
1665ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1666  as_fn_error $? "working directory cannot be determined"
1667test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1668  as_fn_error $? "pwd does not report name of working directory"
1669
1670
1671# Find the source files, if location was not specified.
1672if test -z "$srcdir"; then
1673  ac_srcdir_defaulted=yes
1674  # Try the directory containing this script, then the parent directory.
1675  ac_confdir=`$as_dirname -- "$as_myself" ||
1676$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1677	 X"$as_myself" : 'X\(//\)[^/]' \| \
1678	 X"$as_myself" : 'X\(//\)$' \| \
1679	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1680$as_echo X"$as_myself" |
1681    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1682	    s//\1/
1683	    q
1684	  }
1685	  /^X\(\/\/\)[^/].*/{
1686	    s//\1/
1687	    q
1688	  }
1689	  /^X\(\/\/\)$/{
1690	    s//\1/
1691	    q
1692	  }
1693	  /^X\(\/\).*/{
1694	    s//\1/
1695	    q
1696	  }
1697	  s/.*/./; q'`
1698  srcdir=$ac_confdir
1699  if test ! -r "$srcdir/$ac_unique_file"; then
1700    srcdir=..
1701  fi
1702else
1703  ac_srcdir_defaulted=no
1704fi
1705if test ! -r "$srcdir/$ac_unique_file"; then
1706  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1707  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1708fi
1709ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1710ac_abs_confdir=`(
1711	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1712	pwd)`
1713# When building in place, set srcdir=.
1714if test "$ac_abs_confdir" = "$ac_pwd"; then
1715  srcdir=.
1716fi
1717# Remove unnecessary trailing slashes from srcdir.
1718# Double slashes in file names in object file debugging info
1719# mess up M-x gdb in Emacs.
1720case $srcdir in
1721*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1722esac
1723for ac_var in $ac_precious_vars; do
1724  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1725  eval ac_env_${ac_var}_value=\$${ac_var}
1726  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1727  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1728done
1729
1730#
1731# Report the --help message.
1732#
1733if test "$ac_init_help" = "long"; then
1734  # Omit some internal or obsolete options to make the list less imposing.
1735  # This message is too long to be a string in the A/UX 3.1 sh.
1736  cat <<_ACEOF
1737\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1738
1739Usage: $0 [OPTION]... [VAR=VALUE]...
1740
1741To assign environment variables (e.g., CC, CFLAGS...), specify them as
1742VAR=VALUE.  See below for descriptions of some of the useful variables.
1743
1744Defaults for the options are specified in brackets.
1745
1746Configuration:
1747  -h, --help              display this help and exit
1748      --help=short        display options specific to this package
1749      --help=recursive    display the short help of all the included packages
1750  -V, --version           display version information and exit
1751  -q, --quiet, --silent   do not print \`checking ...' messages
1752      --cache-file=FILE   cache test results in FILE [disabled]
1753  -C, --config-cache      alias for \`--cache-file=config.cache'
1754  -n, --no-create         do not create output files
1755      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1756
1757Installation directories:
1758  --prefix=PREFIX         install architecture-independent files in PREFIX
1759                          [$ac_default_prefix]
1760  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1761                          [PREFIX]
1762
1763By default, \`make install' will install all the files in
1764\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1765an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1766for instance \`--prefix=\$HOME'.
1767
1768For better control, use the options below.
1769
1770Fine tuning of the installation directories:
1771  --bindir=DIR            user executables [EPREFIX/bin]
1772  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1773  --libexecdir=DIR        program executables [EPREFIX/libexec]
1774  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1775  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1776  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1777  --libdir=DIR            object code libraries [EPREFIX/lib]
1778  --includedir=DIR        C header files [PREFIX/include]
1779  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1780  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1781  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1782  --infodir=DIR           info documentation [DATAROOTDIR/info]
1783  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1784  --mandir=DIR            man documentation [DATAROOTDIR/man]
1785  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1786  --htmldir=DIR           html documentation [DOCDIR]
1787  --dvidir=DIR            dvi documentation [DOCDIR]
1788  --pdfdir=DIR            pdf documentation [DOCDIR]
1789  --psdir=DIR             ps documentation [DOCDIR]
1790_ACEOF
1791
1792  cat <<\_ACEOF
1793
1794X features:
1795  --x-includes=DIR    X include files are in DIR
1796  --x-libraries=DIR   X library files are in DIR
1797
1798System types:
1799  --build=BUILD     configure for building on BUILD [guessed]
1800  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1801  --target=TARGET   configure for building compilers for TARGET [HOST]
1802_ACEOF
1803fi
1804
1805if test -n "$ac_init_help"; then
1806  case $ac_init_help in
1807     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1808   esac
1809  cat <<\_ACEOF
1810
1811Optional Features:
1812  --disable-option-checking  ignore unrecognized --enable/--with options
1813  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1814  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1815  --enable-openjdk-only   suppress building custom source even if present
1816                          [disabled]
1817  --enable-debug          set the debug level to fastdebug (shorthand for
1818                          --with-debug-level=fastdebug) [disabled]
1819  --disable-headful       disable building headful support (graphical UI
1820                          support) [enabled]
1821  --enable-hotspot-test-in-build
1822                          run the Queens test after Hotspot build [disabled]
1823  --enable-unlimited-crypto
1824                          Enable unlimited crypto policy [disabled]
1825  --enable-rmiconnector-iiop
1826                          enable the JMX RMIConnector iiop transport
1827                          [disabled]
1828  --disable-debug-symbols disable generation of debug symbols [enabled]
1829  --disable-zip-debug-info
1830                          disable zipping of debug-info files [enabled]
1831  --enable-macosx-runtime-support
1832                          Deprecated. Option is kept for backwards
1833                          compatibility and is ignored
1834  --disable-freetype-bundling
1835                          disable bundling of the freetype library with the
1836                          build result [enabled on Windows or when using
1837                          --with-freetype, disabled otherwise]
1838  --enable-sjavac         use sjavac to do fast incremental compiles
1839                          [disabled]
1840  --disable-precompiled-headers
1841                          disable using precompiled headers when compiling C++
1842                          [enabled]
1843  --enable-ccache         enable using ccache to speed up recompilations
1844                          [disabled]
1845
1846Optional Packages:
1847  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1848  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1849  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1850                          support it), e.g. --with-target-bits=32 [guessed]
1851  --with-sys-root         pass this sys-root to the compilers and tools (for
1852                          cross-compiling)
1853  --with-tools-dir        search this directory for compilers and tools (for
1854                          cross-compiling)
1855  --with-devkit           use this directory as base for tools-dir and
1856                          sys-root (for cross-compiling)
1857  --with-custom-make-dir  Deprecated. Option is kept for backwards
1858                          compatibility and is ignored
1859  --with-jdk-variant      JDK variant to build (normal) [normal]
1860  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1861  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1862                          client, minimal1, kernel, zero, zeroshark, core)
1863                          [server]
1864  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1865                          optimized (HotSpot build only)) [release]
1866  --with-conf-name        use this as the name of the configuration [generated
1867                          from important configuration options]
1868  --with-builddeps-conf   use this configuration file for the builddeps
1869  --with-builddeps-server download and use build dependencies from this server
1870                          url
1871  --with-builddeps-dir    store downloaded build dependencies here
1872                          [/localhome/builddeps]
1873  --with-builddeps-group  chgrp the downloaded build dependencies to this
1874                          group
1875  --with-cacerts-file     specify alternative cacerts file
1876  --with-milestone        Set milestone value for build [internal]
1877  --with-update-version   Set update version value for build [b00]
1878  --with-user-release-suffix
1879                          Add a custom string to the version string if build
1880                          number is not set.[username_builddateb00]
1881  --with-build-number     Set build number value for build [b00]
1882  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1883  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1884                          invocations of boot JDK, overriding the default
1885                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1886                          -enableassertions"
1887  --with-add-source-root  for each and every source directory, look in this
1888                          additional source root for the same directory; if it
1889                          exists and have files in it, include it in the build
1890  --with-override-source-root
1891                          for each and every source directory, look in this
1892                          override source root for the same directory; if it
1893                          exists, use that directory instead and ignore the
1894                          directory in the original source root
1895  --with-adds-and-overrides
1896                          use the subdirs 'adds' and 'overrides' in the
1897                          specified directory as add-source-root and
1898                          override-source-root
1899  --with-override-langtools
1900                          use this langtools dir for the build
1901  --with-override-corba   use this corba dir for the build
1902  --with-override-jaxp    use this jaxp dir for the build
1903  --with-override-jaxws   use this jaxws dir for the build
1904  --with-override-hotspot use this hotspot dir for the build
1905  --with-override-nashorn use this nashorn dir for the build
1906  --with-override-jdk     use this jdk dir for the build
1907  --with-import-hotspot   import hotspot binaries from this jdk image or
1908                          hotspot build dist dir instead of building from
1909                          source
1910  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1911                          to show possible values [platform dependent]
1912  --with-jtreg            Regression Test Harness [probed]
1913  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1914  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1915  --with-extra-ldflags    extra flags to be used when linking jdk
1916  --with-x                use the X Window System
1917  --with-cups             specify prefix directory for the cups package
1918                          (expecting the headers under PATH/include)
1919  --with-cups-include     specify directory for the cups include files
1920  --with-freetype         specify prefix directory for the freetype package
1921                          (expecting the libraries under PATH/lib and the
1922                          headers under PATH/include)
1923  --with-freetype-include specify directory for the freetype include files
1924  --with-freetype-lib     specify directory for the freetype library
1925  --with-alsa             specify prefix directory for the alsa package
1926                          (expecting the libraries under PATH/lib and the
1927                          headers under PATH/include)
1928  --with-alsa-include     specify directory for the alsa include files
1929  --with-alsa-lib         specify directory for the alsa library
1930  --with-giflib           use giflib from build system or OpenJDK source
1931                          (system, bundled) [bundled]
1932  --with-libpng           use libpng from build system or OpenJDK source
1933                          (system, bundled) [bundled]
1934  --with-zlib             use zlib from build system or OpenJDK source
1935                          (system, bundled) [bundled]
1936  --with-stdc++lib=<static>,<dynamic>,<default>
1937                          force linking of the C++ runtime on Linux to either
1938                          static or dynamic, default is static with dynamic as
1939                          fallback
1940  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1941                          only) [probed]
1942  --with-dxsdk            Deprecated. Option is kept for backwards
1943                          compatibility and is ignored
1944  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1945                          compatibility and is ignored
1946  --with-dxsdk-include    Deprecated. Option is kept for backwards
1947                          compatibility and is ignored
1948  --with-num-cores        number of cores in the build system, e.g.
1949                          --with-num-cores=8 [probed]
1950  --with-memory-size      memory (in MB) available in the build system, e.g.
1951                          --with-memory-size=1024 [probed]
1952  --with-jobs             number of parallel jobs to let make run [calculated
1953                          based on cores and memory]
1954  --with-sjavac-server-java
1955                          use this java binary for running the sjavac
1956                          background server [Boot JDK java]
1957  --with-ccache-dir       where to store ccache files [~/.ccache]
1958
1959Some influential environment variables:
1960  BASENAME    Override default value for BASENAME
1961  BASH        Override default value for BASH
1962  CAT         Override default value for CAT
1963  CHMOD       Override default value for CHMOD
1964  CMP         Override default value for CMP
1965  COMM        Override default value for COMM
1966  CP          Override default value for CP
1967  CPIO        Override default value for CPIO
1968  CUT         Override default value for CUT
1969  DATE        Override default value for DATE
1970  DIFF        Override default value for DIFF
1971  DIRNAME     Override default value for DIRNAME
1972  ECHO        Override default value for ECHO
1973  EXPR        Override default value for EXPR
1974  FILE        Override default value for FILE
1975  FIND        Override default value for FIND
1976  HEAD        Override default value for HEAD
1977  LN          Override default value for LN
1978  LS          Override default value for LS
1979  MKDIR       Override default value for MKDIR
1980  MKTEMP      Override default value for MKTEMP
1981  MV          Override default value for MV
1982  NAWK        Override default value for NAWK
1983  PRINTF      Override default value for PRINTF
1984  RM          Override default value for RM
1985  SH          Override default value for SH
1986  SORT        Override default value for SORT
1987  TAIL        Override default value for TAIL
1988  TAR         Override default value for TAR
1989  TEE         Override default value for TEE
1990  TOUCH       Override default value for TOUCH
1991  TR          Override default value for TR
1992  UNAME       Override default value for UNAME
1993  UNIQ        Override default value for UNIQ
1994  WC          Override default value for WC
1995  WHICH       Override default value for WHICH
1996  XARGS       Override default value for XARGS
1997  AWK         Override default value for AWK
1998  GREP        Override default value for GREP
1999  EGREP       Override default value for EGREP
2000  FGREP       Override default value for FGREP
2001  SED         Override default value for SED
2002  CYGPATH     Override default value for CYGPATH
2003  READLINK    Override default value for READLINK
2004  DF          Override default value for DF
2005  SETFILE     Override default value for SETFILE
2006  UNZIP       Override default value for UNZIP
2007  ZIP         Override default value for ZIP
2008  LDD         Override default value for LDD
2009  OTOOL       Override default value for OTOOL
2010  READELF     Override default value for READELF
2011  HG          Override default value for HG
2012  STAT        Override default value for STAT
2013  TIME        Override default value for TIME
2014  DSYMUTIL    Override default value for DSYMUTIL
2015  XATTR       Override default value for XATTR
2016  CODESIGN    Override default value for CODESIGN
2017  PKG_CONFIG  path to pkg-config utility
2018  JAVA        Override default value for JAVA
2019  JAVAC       Override default value for JAVAC
2020  JAVAH       Override default value for JAVAH
2021  JAR         Override default value for JAR
2022  NATIVE2ASCII
2023              Override default value for NATIVE2ASCII
2024  JARSIGNER   Override default value for JARSIGNER
2025  CC          C compiler command
2026  CFLAGS      C compiler flags
2027  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2028              nonstandard directory <lib dir>
2029  LIBS        libraries to pass to the linker, e.g. -l<library>
2030  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2031              you have headers in a nonstandard directory <include dir>
2032  CXX         C++ compiler command
2033  CXXFLAGS    C++ compiler flags
2034  CPP         C preprocessor
2035  CXXCPP      C++ preprocessor
2036  AS          Override default value for AS
2037  AR          Override default value for AR
2038  OBJC        Objective C compiler command
2039  OBJCFLAGS   Objective C compiler flags
2040  LIPO        Override default value for LIPO
2041  STRIP       Override default value for STRIP
2042  NM          Override default value for NM
2043  GNM         Override default value for GNM
2044  MCS         Override default value for MCS
2045  OBJCOPY     Override default value for OBJCOPY
2046  OBJDUMP     Override default value for OBJDUMP
2047  BUILD_CC    Override default value for BUILD_CC
2048  BUILD_CXX   Override default value for BUILD_CXX
2049  BUILD_LD    Override default value for BUILD_LD
2050  JTREGEXE    Override default value for JTREGEXE
2051  XMKMF       Path to xmkmf, Makefile generator for X Window System
2052  FREETYPE_CFLAGS
2053              C compiler flags for FREETYPE, overriding pkg-config
2054  FREETYPE_LIBS
2055              linker flags for FREETYPE, overriding pkg-config
2056  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2057  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2058  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2059  PNG_LIBS    linker flags for PNG, overriding pkg-config
2060  LIBFFI_CFLAGS
2061              C compiler flags for LIBFFI, overriding pkg-config
2062  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2063  CCACHE      Override default value for CCACHE
2064
2065Use these variables to override the choices made by `configure' or to help
2066it to find libraries and programs with nonstandard names/locations.
2067
2068Report bugs to <build-dev@openjdk.java.net>.
2069OpenJDK home page: <http://openjdk.java.net>.
2070_ACEOF
2071ac_status=$?
2072fi
2073
2074if test "$ac_init_help" = "recursive"; then
2075  # If there are subdirs, report their specific --help.
2076  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2077    test -d "$ac_dir" ||
2078      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2079      continue
2080    ac_builddir=.
2081
2082case "$ac_dir" in
2083.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2084*)
2085  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2086  # A ".." for each directory in $ac_dir_suffix.
2087  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2088  case $ac_top_builddir_sub in
2089  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2090  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2091  esac ;;
2092esac
2093ac_abs_top_builddir=$ac_pwd
2094ac_abs_builddir=$ac_pwd$ac_dir_suffix
2095# for backward compatibility:
2096ac_top_builddir=$ac_top_build_prefix
2097
2098case $srcdir in
2099  .)  # We are building in place.
2100    ac_srcdir=.
2101    ac_top_srcdir=$ac_top_builddir_sub
2102    ac_abs_top_srcdir=$ac_pwd ;;
2103  [\\/]* | ?:[\\/]* )  # Absolute name.
2104    ac_srcdir=$srcdir$ac_dir_suffix;
2105    ac_top_srcdir=$srcdir
2106    ac_abs_top_srcdir=$srcdir ;;
2107  *) # Relative name.
2108    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2109    ac_top_srcdir=$ac_top_build_prefix$srcdir
2110    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2111esac
2112ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2113
2114    cd "$ac_dir" || { ac_status=$?; continue; }
2115    # Check for guested configure.
2116    if test -f "$ac_srcdir/configure.gnu"; then
2117      echo &&
2118      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2119    elif test -f "$ac_srcdir/configure"; then
2120      echo &&
2121      $SHELL "$ac_srcdir/configure" --help=recursive
2122    else
2123      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2124    fi || ac_status=$?
2125    cd "$ac_pwd" || { ac_status=$?; break; }
2126  done
2127fi
2128
2129test -n "$ac_init_help" && exit $ac_status
2130if $ac_init_version; then
2131  cat <<\_ACEOF
2132OpenJDK configure jdk9
2133generated by GNU Autoconf 2.69
2134
2135Copyright (C) 2012 Free Software Foundation, Inc.
2136This configure script is free software; the Free Software Foundation
2137gives unlimited permission to copy, distribute and modify it.
2138_ACEOF
2139  exit
2140fi
2141
2142## ------------------------ ##
2143## Autoconf initialization. ##
2144## ------------------------ ##
2145
2146# ac_fn_c_try_compile LINENO
2147# --------------------------
2148# Try to compile conftest.$ac_ext, and return whether this succeeded.
2149ac_fn_c_try_compile ()
2150{
2151  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152  rm -f conftest.$ac_objext
2153  if { { ac_try="$ac_compile"
2154case "(($ac_try" in
2155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156  *) ac_try_echo=$ac_try;;
2157esac
2158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159$as_echo "$ac_try_echo"; } >&5
2160  (eval "$ac_compile") 2>conftest.err
2161  ac_status=$?
2162  if test -s conftest.err; then
2163    grep -v '^ *+' conftest.err >conftest.er1
2164    cat conftest.er1 >&5
2165    mv -f conftest.er1 conftest.err
2166  fi
2167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2168  test $ac_status = 0; } && {
2169	 test -z "$ac_c_werror_flag" ||
2170	 test ! -s conftest.err
2171       } && test -s conftest.$ac_objext; then :
2172  ac_retval=0
2173else
2174  $as_echo "$as_me: failed program was:" >&5
2175sed 's/^/| /' conftest.$ac_ext >&5
2176
2177	ac_retval=1
2178fi
2179  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2180  as_fn_set_status $ac_retval
2181
2182} # ac_fn_c_try_compile
2183
2184# ac_fn_cxx_try_compile LINENO
2185# ----------------------------
2186# Try to compile conftest.$ac_ext, and return whether this succeeded.
2187ac_fn_cxx_try_compile ()
2188{
2189  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190  rm -f conftest.$ac_objext
2191  if { { ac_try="$ac_compile"
2192case "(($ac_try" in
2193  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2194  *) ac_try_echo=$ac_try;;
2195esac
2196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2197$as_echo "$ac_try_echo"; } >&5
2198  (eval "$ac_compile") 2>conftest.err
2199  ac_status=$?
2200  if test -s conftest.err; then
2201    grep -v '^ *+' conftest.err >conftest.er1
2202    cat conftest.er1 >&5
2203    mv -f conftest.er1 conftest.err
2204  fi
2205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206  test $ac_status = 0; } && {
2207	 test -z "$ac_cxx_werror_flag" ||
2208	 test ! -s conftest.err
2209       } && test -s conftest.$ac_objext; then :
2210  ac_retval=0
2211else
2212  $as_echo "$as_me: failed program was:" >&5
2213sed 's/^/| /' conftest.$ac_ext >&5
2214
2215	ac_retval=1
2216fi
2217  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2218  as_fn_set_status $ac_retval
2219
2220} # ac_fn_cxx_try_compile
2221
2222# ac_fn_c_try_cpp LINENO
2223# ----------------------
2224# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2225ac_fn_c_try_cpp ()
2226{
2227  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2228  if { { ac_try="$ac_cpp conftest.$ac_ext"
2229case "(($ac_try" in
2230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2231  *) ac_try_echo=$ac_try;;
2232esac
2233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2234$as_echo "$ac_try_echo"; } >&5
2235  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2236  ac_status=$?
2237  if test -s conftest.err; then
2238    grep -v '^ *+' conftest.err >conftest.er1
2239    cat conftest.er1 >&5
2240    mv -f conftest.er1 conftest.err
2241  fi
2242  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2243  test $ac_status = 0; } > conftest.i && {
2244	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2245	 test ! -s conftest.err
2246       }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: failed program was:" >&5
2250sed 's/^/| /' conftest.$ac_ext >&5
2251
2252    ac_retval=1
2253fi
2254  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2255  as_fn_set_status $ac_retval
2256
2257} # ac_fn_c_try_cpp
2258
2259# ac_fn_cxx_try_cpp LINENO
2260# ------------------------
2261# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2262ac_fn_cxx_try_cpp ()
2263{
2264  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265  if { { ac_try="$ac_cpp conftest.$ac_ext"
2266case "(($ac_try" in
2267  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2268  *) ac_try_echo=$ac_try;;
2269esac
2270eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2271$as_echo "$ac_try_echo"; } >&5
2272  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2273  ac_status=$?
2274  if test -s conftest.err; then
2275    grep -v '^ *+' conftest.err >conftest.er1
2276    cat conftest.er1 >&5
2277    mv -f conftest.er1 conftest.err
2278  fi
2279  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2280  test $ac_status = 0; } > conftest.i && {
2281	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2282	 test ! -s conftest.err
2283       }; then :
2284  ac_retval=0
2285else
2286  $as_echo "$as_me: failed program was:" >&5
2287sed 's/^/| /' conftest.$ac_ext >&5
2288
2289    ac_retval=1
2290fi
2291  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2292  as_fn_set_status $ac_retval
2293
2294} # ac_fn_cxx_try_cpp
2295
2296# ac_fn_objc_try_compile LINENO
2297# -----------------------------
2298# Try to compile conftest.$ac_ext, and return whether this succeeded.
2299ac_fn_objc_try_compile ()
2300{
2301  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302  rm -f conftest.$ac_objext
2303  if { { ac_try="$ac_compile"
2304case "(($ac_try" in
2305  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2306  *) ac_try_echo=$ac_try;;
2307esac
2308eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2309$as_echo "$ac_try_echo"; } >&5
2310  (eval "$ac_compile") 2>conftest.err
2311  ac_status=$?
2312  if test -s conftest.err; then
2313    grep -v '^ *+' conftest.err >conftest.er1
2314    cat conftest.er1 >&5
2315    mv -f conftest.er1 conftest.err
2316  fi
2317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2318  test $ac_status = 0; } && {
2319	 test -z "$ac_objc_werror_flag" ||
2320	 test ! -s conftest.err
2321       } && test -s conftest.$ac_objext; then :
2322  ac_retval=0
2323else
2324  $as_echo "$as_me: failed program was:" >&5
2325sed 's/^/| /' conftest.$ac_ext >&5
2326
2327	ac_retval=1
2328fi
2329  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2330  as_fn_set_status $ac_retval
2331
2332} # ac_fn_objc_try_compile
2333
2334# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2335# ---------------------------------------------------------
2336# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2337# the include files in INCLUDES and setting the cache variable VAR
2338# accordingly.
2339ac_fn_cxx_check_header_mongrel ()
2340{
2341  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342  if eval \${$3+:} false; then :
2343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2344$as_echo_n "checking for $2... " >&6; }
2345if eval \${$3+:} false; then :
2346  $as_echo_n "(cached) " >&6
2347fi
2348eval ac_res=\$$3
2349	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
2351else
2352  # Is the header compilable?
2353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2354$as_echo_n "checking $2 usability... " >&6; }
2355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h.  */
2357$4
2358#include <$2>
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_header_compiler=yes
2362else
2363  ac_header_compiler=no
2364fi
2365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2367$as_echo "$ac_header_compiler" >&6; }
2368
2369# Is the header present?
2370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2371$as_echo_n "checking $2 presence... " >&6; }
2372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h.  */
2374#include <$2>
2375_ACEOF
2376if ac_fn_cxx_try_cpp "$LINENO"; then :
2377  ac_header_preproc=yes
2378else
2379  ac_header_preproc=no
2380fi
2381rm -f conftest.err conftest.i conftest.$ac_ext
2382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2383$as_echo "$ac_header_preproc" >&6; }
2384
2385# So?  What about this header?
2386case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2387  yes:no: )
2388    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2389$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2390    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2391$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2392    ;;
2393  no:yes:* )
2394    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2395$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2396    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2397$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2399$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2401$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2402    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2403$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2404( $as_echo "## ----------------------------------------- ##
2405## Report this to build-dev@openjdk.java.net ##
2406## ----------------------------------------- ##"
2407     ) | sed "s/^/$as_me: WARNING:     /" >&2
2408    ;;
2409esac
2410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2411$as_echo_n "checking for $2... " >&6; }
2412if eval \${$3+:} false; then :
2413  $as_echo_n "(cached) " >&6
2414else
2415  eval "$3=\$ac_header_compiler"
2416fi
2417eval ac_res=\$$3
2418	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419$as_echo "$ac_res" >&6; }
2420fi
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422
2423} # ac_fn_cxx_check_header_mongrel
2424
2425# ac_fn_cxx_try_run LINENO
2426# ------------------------
2427# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2428# that executables *can* be run.
2429ac_fn_cxx_try_run ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  if { { ac_try="$ac_link"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_link") 2>&5
2440  ac_status=$?
2441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2443  { { case "(($ac_try" in
2444  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2445  *) ac_try_echo=$ac_try;;
2446esac
2447eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2448$as_echo "$ac_try_echo"; } >&5
2449  (eval "$ac_try") 2>&5
2450  ac_status=$?
2451  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2452  test $ac_status = 0; }; }; then :
2453  ac_retval=0
2454else
2455  $as_echo "$as_me: program exited with status $ac_status" >&5
2456       $as_echo "$as_me: failed program was:" >&5
2457sed 's/^/| /' conftest.$ac_ext >&5
2458
2459       ac_retval=$ac_status
2460fi
2461  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_run
2466
2467# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2468# ---------------------------------------------------------
2469# Tests whether HEADER exists and can be compiled using the include files in
2470# INCLUDES, setting the cache variable VAR accordingly.
2471ac_fn_cxx_check_header_compile ()
2472{
2473  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2475$as_echo_n "checking for $2... " >&6; }
2476if eval \${$3+:} false; then :
2477  $as_echo_n "(cached) " >&6
2478else
2479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2480/* end confdefs.h.  */
2481$4
2482#include <$2>
2483_ACEOF
2484if ac_fn_cxx_try_compile "$LINENO"; then :
2485  eval "$3=yes"
2486else
2487  eval "$3=no"
2488fi
2489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2490fi
2491eval ac_res=\$$3
2492	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2493$as_echo "$ac_res" >&6; }
2494  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2495
2496} # ac_fn_cxx_check_header_compile
2497
2498# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2499# ----------------------------------------------
2500# Tries to find the compile-time value of EXPR in a program that includes
2501# INCLUDES, setting VAR accordingly. Returns whether the value could be
2502# computed
2503ac_fn_cxx_compute_int ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if test "$cross_compiling" = yes; then
2507    # Depending upon the size, compute the lo and hi bounds.
2508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509/* end confdefs.h.  */
2510$4
2511int
2512main ()
2513{
2514static int test_array [1 - 2 * !(($2) >= 0)];
2515test_array [0] = 0;
2516return test_array [0];
2517
2518  ;
2519  return 0;
2520}
2521_ACEOF
2522if ac_fn_cxx_try_compile "$LINENO"; then :
2523  ac_lo=0 ac_mid=0
2524  while :; do
2525    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526/* end confdefs.h.  */
2527$4
2528int
2529main ()
2530{
2531static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2532test_array [0] = 0;
2533return test_array [0];
2534
2535  ;
2536  return 0;
2537}
2538_ACEOF
2539if ac_fn_cxx_try_compile "$LINENO"; then :
2540  ac_hi=$ac_mid; break
2541else
2542  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2543			if test $ac_lo -le $ac_mid; then
2544			  ac_lo= ac_hi=
2545			  break
2546			fi
2547			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2548fi
2549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2550  done
2551else
2552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2553/* end confdefs.h.  */
2554$4
2555int
2556main ()
2557{
2558static int test_array [1 - 2 * !(($2) < 0)];
2559test_array [0] = 0;
2560return test_array [0];
2561
2562  ;
2563  return 0;
2564}
2565_ACEOF
2566if ac_fn_cxx_try_compile "$LINENO"; then :
2567  ac_hi=-1 ac_mid=-1
2568  while :; do
2569    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572int
2573main ()
2574{
2575static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2576test_array [0] = 0;
2577return test_array [0];
2578
2579  ;
2580  return 0;
2581}
2582_ACEOF
2583if ac_fn_cxx_try_compile "$LINENO"; then :
2584  ac_lo=$ac_mid; break
2585else
2586  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2587			if test $ac_mid -le $ac_hi; then
2588			  ac_lo= ac_hi=
2589			  break
2590			fi
2591			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2592fi
2593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2594  done
2595else
2596  ac_lo= ac_hi=
2597fi
2598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599fi
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601# Binary search between lo and hi bounds.
2602while test "x$ac_lo" != "x$ac_hi"; do
2603  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607int
2608main ()
2609{
2610static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2611test_array [0] = 0;
2612return test_array [0];
2613
2614  ;
2615  return 0;
2616}
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  ac_hi=$ac_mid
2620else
2621  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624done
2625case $ac_lo in #((
2626?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2627'') ac_retval=1 ;;
2628esac
2629  else
2630    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* end confdefs.h.  */
2632$4
2633static long int longval () { return $2; }
2634static unsigned long int ulongval () { return $2; }
2635#include <stdio.h>
2636#include <stdlib.h>
2637int
2638main ()
2639{
2640
2641  FILE *f = fopen ("conftest.val", "w");
2642  if (! f)
2643    return 1;
2644  if (($2) < 0)
2645    {
2646      long int i = longval ();
2647      if (i != ($2))
2648	return 1;
2649      fprintf (f, "%ld", i);
2650    }
2651  else
2652    {
2653      unsigned long int i = ulongval ();
2654      if (i != ($2))
2655	return 1;
2656      fprintf (f, "%lu", i);
2657    }
2658  /* Do not output a trailing newline, as this causes \r\n confusion
2659     on some platforms.  */
2660  return ferror (f) || fclose (f) != 0;
2661
2662  ;
2663  return 0;
2664}
2665_ACEOF
2666if ac_fn_cxx_try_run "$LINENO"; then :
2667  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2668else
2669  ac_retval=1
2670fi
2671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2672  conftest.$ac_objext conftest.beam conftest.$ac_ext
2673rm -f conftest.val
2674
2675  fi
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677  as_fn_set_status $ac_retval
2678
2679} # ac_fn_cxx_compute_int
2680
2681# ac_fn_cxx_try_link LINENO
2682# -------------------------
2683# Try to link conftest.$ac_ext, and return whether this succeeded.
2684ac_fn_cxx_try_link ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  rm -f conftest.$ac_objext conftest$ac_exeext
2688  if { { ac_try="$ac_link"
2689case "(($ac_try" in
2690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691  *) ac_try_echo=$ac_try;;
2692esac
2693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694$as_echo "$ac_try_echo"; } >&5
2695  (eval "$ac_link") 2>conftest.err
2696  ac_status=$?
2697  if test -s conftest.err; then
2698    grep -v '^ *+' conftest.err >conftest.er1
2699    cat conftest.er1 >&5
2700    mv -f conftest.er1 conftest.err
2701  fi
2702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703  test $ac_status = 0; } && {
2704	 test -z "$ac_cxx_werror_flag" ||
2705	 test ! -s conftest.err
2706       } && test -s conftest$ac_exeext && {
2707	 test "$cross_compiling" = yes ||
2708	 test -x conftest$ac_exeext
2709       }; then :
2710  ac_retval=0
2711else
2712  $as_echo "$as_me: failed program was:" >&5
2713sed 's/^/| /' conftest.$ac_ext >&5
2714
2715	ac_retval=1
2716fi
2717  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2718  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2719  # interfere with the next link command; also delete a directory that is
2720  # left behind by Apple's compiler.  We do this before executing the actions.
2721  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2722  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2723  as_fn_set_status $ac_retval
2724
2725} # ac_fn_cxx_try_link
2726
2727# ac_fn_cxx_check_func LINENO FUNC VAR
2728# ------------------------------------
2729# Tests whether FUNC exists, setting the cache variable VAR accordingly
2730ac_fn_cxx_check_func ()
2731{
2732  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2734$as_echo_n "checking for $2... " >&6; }
2735if eval \${$3+:} false; then :
2736  $as_echo_n "(cached) " >&6
2737else
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2741   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2742#define $2 innocuous_$2
2743
2744/* System header to define __stub macros and hopefully few prototypes,
2745    which can conflict with char $2 (); below.
2746    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2747    <limits.h> exists even on freestanding compilers.  */
2748
2749#ifdef __STDC__
2750# include <limits.h>
2751#else
2752# include <assert.h>
2753#endif
2754
2755#undef $2
2756
2757/* Override any GCC internal prototype to avoid an error.
2758   Use char because int might match the return type of a GCC
2759   builtin and then its argument prototype would still apply.  */
2760#ifdef __cplusplus
2761extern "C"
2762#endif
2763char $2 ();
2764/* The GNU C library defines this for functions which it implements
2765    to always fail with ENOSYS.  Some functions are actually named
2766    something starting with __ and the normal name is an alias.  */
2767#if defined __stub_$2 || defined __stub___$2
2768choke me
2769#endif
2770
2771int
2772main ()
2773{
2774return $2 ();
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779if ac_fn_cxx_try_link "$LINENO"; then :
2780  eval "$3=yes"
2781else
2782  eval "$3=no"
2783fi
2784rm -f core conftest.err conftest.$ac_objext \
2785    conftest$ac_exeext conftest.$ac_ext
2786fi
2787eval ac_res=\$$3
2788	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2789$as_echo "$ac_res" >&6; }
2790  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791
2792} # ac_fn_cxx_check_func
2793
2794# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2795# -------------------------------------------------------
2796# Tests whether HEADER exists and can be compiled using the include files in
2797# INCLUDES, setting the cache variable VAR accordingly.
2798ac_fn_c_check_header_compile ()
2799{
2800  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2802$as_echo_n "checking for $2... " >&6; }
2803if eval \${$3+:} false; then :
2804  $as_echo_n "(cached) " >&6
2805else
2806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807/* end confdefs.h.  */
2808$4
2809#include <$2>
2810_ACEOF
2811if ac_fn_c_try_compile "$LINENO"; then :
2812  eval "$3=yes"
2813else
2814  eval "$3=no"
2815fi
2816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817fi
2818eval ac_res=\$$3
2819	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2820$as_echo "$ac_res" >&6; }
2821  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2822
2823} # ac_fn_c_check_header_compile
2824cat >config.log <<_ACEOF
2825This file contains any messages produced by compilers while
2826running configure, to aid debugging if configure makes a mistake.
2827
2828It was created by OpenJDK $as_me jdk9, which was
2829generated by GNU Autoconf 2.69.  Invocation command line was
2830
2831  $ $0 $@
2832
2833_ACEOF
2834exec 5>>config.log
2835{
2836cat <<_ASUNAME
2837## --------- ##
2838## Platform. ##
2839## --------- ##
2840
2841hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2842uname -m = `(uname -m) 2>/dev/null || echo unknown`
2843uname -r = `(uname -r) 2>/dev/null || echo unknown`
2844uname -s = `(uname -s) 2>/dev/null || echo unknown`
2845uname -v = `(uname -v) 2>/dev/null || echo unknown`
2846
2847/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2848/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2849
2850/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2851/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2852/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2853/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2854/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2855/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2856/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2857
2858_ASUNAME
2859
2860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2861for as_dir in $PATH
2862do
2863  IFS=$as_save_IFS
2864  test -z "$as_dir" && as_dir=.
2865    $as_echo "PATH: $as_dir"
2866  done
2867IFS=$as_save_IFS
2868
2869} >&5
2870
2871cat >&5 <<_ACEOF
2872
2873
2874## ----------- ##
2875## Core tests. ##
2876## ----------- ##
2877
2878_ACEOF
2879
2880
2881# Keep a trace of the command line.
2882# Strip out --no-create and --no-recursion so they do not pile up.
2883# Strip out --silent because we don't want to record it for future runs.
2884# Also quote any args containing shell meta-characters.
2885# Make two passes to allow for proper duplicate-argument suppression.
2886ac_configure_args=
2887ac_configure_args0=
2888ac_configure_args1=
2889ac_must_keep_next=false
2890for ac_pass in 1 2
2891do
2892  for ac_arg
2893  do
2894    case $ac_arg in
2895    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2896    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2897    | -silent | --silent | --silen | --sile | --sil)
2898      continue ;;
2899    *\'*)
2900      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2901    esac
2902    case $ac_pass in
2903    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2904    2)
2905      as_fn_append ac_configure_args1 " '$ac_arg'"
2906      if test $ac_must_keep_next = true; then
2907	ac_must_keep_next=false # Got value, back to normal.
2908      else
2909	case $ac_arg in
2910	  *=* | --config-cache | -C | -disable-* | --disable-* \
2911	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2912	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2913	  | -with-* | --with-* | -without-* | --without-* | --x)
2914	    case "$ac_configure_args0 " in
2915	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2916	    esac
2917	    ;;
2918	  -* ) ac_must_keep_next=true ;;
2919	esac
2920      fi
2921      as_fn_append ac_configure_args " '$ac_arg'"
2922      ;;
2923    esac
2924  done
2925done
2926{ ac_configure_args0=; unset ac_configure_args0;}
2927{ ac_configure_args1=; unset ac_configure_args1;}
2928
2929# When interrupted or exit'd, cleanup temporary files, and complete
2930# config.log.  We remove comments because anyway the quotes in there
2931# would cause problems or look ugly.
2932# WARNING: Use '\'' to represent an apostrophe within the trap.
2933# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2934trap 'exit_status=$?
2935  # Save into config.log some information that might help in debugging.
2936  {
2937    echo
2938
2939    $as_echo "## ---------------- ##
2940## Cache variables. ##
2941## ---------------- ##"
2942    echo
2943    # The following way of writing the cache mishandles newlines in values,
2944(
2945  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2946    eval ac_val=\$$ac_var
2947    case $ac_val in #(
2948    *${as_nl}*)
2949      case $ac_var in #(
2950      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2951$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2952      esac
2953      case $ac_var in #(
2954      _ | IFS | as_nl) ;; #(
2955      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2956      *) { eval $ac_var=; unset $ac_var;} ;;
2957      esac ;;
2958    esac
2959  done
2960  (set) 2>&1 |
2961    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2962    *${as_nl}ac_space=\ *)
2963      sed -n \
2964	"s/'\''/'\''\\\\'\'''\''/g;
2965	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2966      ;; #(
2967    *)
2968      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2969      ;;
2970    esac |
2971    sort
2972)
2973    echo
2974
2975    $as_echo "## ----------------- ##
2976## Output variables. ##
2977## ----------------- ##"
2978    echo
2979    for ac_var in $ac_subst_vars
2980    do
2981      eval ac_val=\$$ac_var
2982      case $ac_val in
2983      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2984      esac
2985      $as_echo "$ac_var='\''$ac_val'\''"
2986    done | sort
2987    echo
2988
2989    if test -n "$ac_subst_files"; then
2990      $as_echo "## ------------------- ##
2991## File substitutions. ##
2992## ------------------- ##"
2993      echo
2994      for ac_var in $ac_subst_files
2995      do
2996	eval ac_val=\$$ac_var
2997	case $ac_val in
2998	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2999	esac
3000	$as_echo "$ac_var='\''$ac_val'\''"
3001      done | sort
3002      echo
3003    fi
3004
3005    if test -s confdefs.h; then
3006      $as_echo "## ----------- ##
3007## confdefs.h. ##
3008## ----------- ##"
3009      echo
3010      cat confdefs.h
3011      echo
3012    fi
3013    test "$ac_signal" != 0 &&
3014      $as_echo "$as_me: caught signal $ac_signal"
3015    $as_echo "$as_me: exit $exit_status"
3016  } >&5
3017  rm -f core *.core core.conftest.* &&
3018    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3019    exit $exit_status
3020' 0
3021for ac_signal in 1 2 13 15; do
3022  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3023done
3024ac_signal=0
3025
3026# confdefs.h avoids OS command line length limits that DEFS can exceed.
3027rm -f -r conftest* confdefs.h
3028
3029$as_echo "/* confdefs.h */" > confdefs.h
3030
3031# Predefined preprocessor variables.
3032
3033cat >>confdefs.h <<_ACEOF
3034#define PACKAGE_NAME "$PACKAGE_NAME"
3035_ACEOF
3036
3037cat >>confdefs.h <<_ACEOF
3038#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3039_ACEOF
3040
3041cat >>confdefs.h <<_ACEOF
3042#define PACKAGE_VERSION "$PACKAGE_VERSION"
3043_ACEOF
3044
3045cat >>confdefs.h <<_ACEOF
3046#define PACKAGE_STRING "$PACKAGE_STRING"
3047_ACEOF
3048
3049cat >>confdefs.h <<_ACEOF
3050#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3051_ACEOF
3052
3053cat >>confdefs.h <<_ACEOF
3054#define PACKAGE_URL "$PACKAGE_URL"
3055_ACEOF
3056
3057
3058# Let the site file select an alternate cache file if it wants to.
3059# Prefer an explicitly selected file to automatically selected ones.
3060ac_site_file1=NONE
3061ac_site_file2=NONE
3062if test -n "$CONFIG_SITE"; then
3063  # We do not want a PATH search for config.site.
3064  case $CONFIG_SITE in #((
3065    -*)  ac_site_file1=./$CONFIG_SITE;;
3066    */*) ac_site_file1=$CONFIG_SITE;;
3067    *)   ac_site_file1=./$CONFIG_SITE;;
3068  esac
3069elif test "x$prefix" != xNONE; then
3070  ac_site_file1=$prefix/share/config.site
3071  ac_site_file2=$prefix/etc/config.site
3072else
3073  ac_site_file1=$ac_default_prefix/share/config.site
3074  ac_site_file2=$ac_default_prefix/etc/config.site
3075fi
3076for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3077do
3078  test "x$ac_site_file" = xNONE && continue
3079  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3080    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3081$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3082    sed 's/^/| /' "$ac_site_file" >&5
3083    . "$ac_site_file" \
3084      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086as_fn_error $? "failed to load site script $ac_site_file
3087See \`config.log' for more details" "$LINENO" 5; }
3088  fi
3089done
3090
3091if test -r "$cache_file"; then
3092  # Some versions of bash will fail to source /dev/null (special files
3093  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3094  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3095    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3096$as_echo "$as_me: loading cache $cache_file" >&6;}
3097    case $cache_file in
3098      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3099      *)                      . "./$cache_file";;
3100    esac
3101  fi
3102else
3103  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3104$as_echo "$as_me: creating cache $cache_file" >&6;}
3105  >$cache_file
3106fi
3107
3108# Check that the precious variables saved in the cache have kept the same
3109# value.
3110ac_cache_corrupted=false
3111for ac_var in $ac_precious_vars; do
3112  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3113  eval ac_new_set=\$ac_env_${ac_var}_set
3114  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3115  eval ac_new_val=\$ac_env_${ac_var}_value
3116  case $ac_old_set,$ac_new_set in
3117    set,)
3118      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3119$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3120      ac_cache_corrupted=: ;;
3121    ,set)
3122      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3123$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3124      ac_cache_corrupted=: ;;
3125    ,);;
3126    *)
3127      if test "x$ac_old_val" != "x$ac_new_val"; then
3128	# differences in whitespace do not lead to failure.
3129	ac_old_val_w=`echo x $ac_old_val`
3130	ac_new_val_w=`echo x $ac_new_val`
3131	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3132	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3133$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3134	  ac_cache_corrupted=:
3135	else
3136	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3137$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3138	  eval $ac_var=\$ac_old_val
3139	fi
3140	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3141$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3142	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3143$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3144      fi;;
3145  esac
3146  # Pass precious variables to config.status.
3147  if test "$ac_new_set" = set; then
3148    case $ac_new_val in
3149    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    *) ac_arg=$ac_var=$ac_new_val ;;
3151    esac
3152    case " $ac_configure_args " in
3153      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3154      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3155    esac
3156  fi
3157done
3158if $ac_cache_corrupted; then
3159  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3161  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3162$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3163  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3164fi
3165## -------------------- ##
3166## Main body of script. ##
3167## -------------------- ##
3168
3169ac_ext=c
3170ac_cpp='$CPP $CPPFLAGS'
3171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174
3175
3176
3177ac_aux_dir=
3178for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3179  if test -f "$ac_dir/install-sh"; then
3180    ac_aux_dir=$ac_dir
3181    ac_install_sh="$ac_aux_dir/install-sh -c"
3182    break
3183  elif test -f "$ac_dir/install.sh"; then
3184    ac_aux_dir=$ac_dir
3185    ac_install_sh="$ac_aux_dir/install.sh -c"
3186    break
3187  elif test -f "$ac_dir/shtool"; then
3188    ac_aux_dir=$ac_dir
3189    ac_install_sh="$ac_aux_dir/shtool install -c"
3190    break
3191  fi
3192done
3193if test -z "$ac_aux_dir"; then
3194  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
3195fi
3196
3197# These three variables are undocumented and unsupported,
3198# and are intended to be withdrawn in a future Autoconf release.
3199# They can cause serious problems if a builder's source tree is in a directory
3200# whose full name contains unusual characters.
3201ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3202ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3203ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3204
3205
3206# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3207
3208#
3209# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3210# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3211#
3212# This code is free software; you can redistribute it and/or modify it
3213# under the terms of the GNU General Public License version 2 only, as
3214# published by the Free Software Foundation.  Oracle designates this
3215# particular file as subject to the "Classpath" exception as provided
3216# by Oracle in the LICENSE file that accompanied this code.
3217#
3218# This code is distributed in the hope that it will be useful, but WITHOUT
3219# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3220# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3221# version 2 for more details (a copy is included in the LICENSE file that
3222# accompanied this code).
3223#
3224# You should have received a copy of the GNU General Public License version
3225# 2 along with this work; if not, write to the Free Software Foundation,
3226# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3227#
3228# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3229# or visit www.oracle.com if you need additional information or have any
3230# questions.
3231#
3232
3233#
3234# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3235#
3236# This program is free software; you can redistribute it and/or modify
3237# it under the terms of the GNU General Public License as published by
3238# the Free Software Foundation; either version 2 of the License, or
3239# (at your option) any later version.
3240#
3241# This program is distributed in the hope that it will be useful, but
3242# WITHOUT ANY WARRANTY; without even the implied warranty of
3243# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3244# General Public License for more details.
3245#
3246# You should have received a copy of the GNU General Public License
3247# along with this program; if not, write to the Free Software
3248# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3249#
3250# As a special exception to the GNU General Public License, if you
3251# distribute this file as part of a program that contains a
3252# configuration script generated by Autoconf, you may include it under
3253# the same distribution terms that you use for the rest of that program.
3254
3255# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3256# ----------------------------------
3257# PKG_PROG_PKG_CONFIG
3258
3259# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3260#
3261# Check to see whether a particular set of modules exists.  Similar
3262# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3263#
3264#
3265# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3266# this or PKG_CHECK_MODULES is called, or make sure to call
3267# PKG_CHECK_EXISTS manually
3268# --------------------------------------------------------------
3269
3270
3271
3272# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3273# ---------------------------------------------
3274# _PKG_CONFIG
3275
3276# _PKG_SHORT_ERRORS_SUPPORTED
3277# -----------------------------
3278# _PKG_SHORT_ERRORS_SUPPORTED
3279
3280
3281# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3282# [ACTION-IF-NOT-FOUND])
3283#
3284#
3285# Note that if there is a possibility the first call to
3286# PKG_CHECK_MODULES might not happen, you should be sure to include an
3287# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3288#
3289#
3290# --------------------------------------------------------------
3291# PKG_CHECK_MODULES
3292
3293
3294# Include these first...
3295#
3296# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298#
3299# This code is free software; you can redistribute it and/or modify it
3300# under the terms of the GNU General Public License version 2 only, as
3301# published by the Free Software Foundation.  Oracle designates this
3302# particular file as subject to the "Classpath" exception as provided
3303# by Oracle in the LICENSE file that accompanied this code.
3304#
3305# This code is distributed in the hope that it will be useful, but WITHOUT
3306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308# version 2 for more details (a copy is included in the LICENSE file that
3309# accompanied this code).
3310#
3311# You should have received a copy of the GNU General Public License version
3312# 2 along with this work; if not, write to the Free Software Foundation,
3313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314#
3315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316# or visit www.oracle.com if you need additional information or have any
3317# questions.
3318#
3319
3320# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3321# If so, then append $1 to $2 \
3322# Also set JVM_ARG_OK to true/false depending on outcome.
3323
3324
3325# Appends a string to a path variable, only adding the : when needed.
3326
3327
3328# This will make sure the given variable points to a full and proper
3329# path. This means:
3330# 1) There will be no spaces in the path. On posix platforms,
3331#    spaces in the path will result in an error. On Windows,
3332#    the path will be rewritten using short-style to be space-free.
3333# 2) The path will be absolute, and it will be in unix-style (on
3334#     cygwin).
3335# $1: The name of the variable to fix
3336
3337
3338# This will make sure the given variable points to a executable
3339# with a full and proper path. This means:
3340# 1) There will be no spaces in the path. On posix platforms,
3341#    spaces in the path will result in an error. On Windows,
3342#    the path will be rewritten using short-style to be space-free.
3343# 2) The path will be absolute, and it will be in unix-style (on
3344#     cygwin).
3345# Any arguments given to the executable is preserved.
3346# If the input variable does not have a directory specification, then
3347# it need to be in the PATH.
3348# $1: The name of the variable to fix
3349
3350
3351
3352
3353# Register a --with argument but mark it as deprecated
3354# $1: The name of the with argument to deprecate, not including --with-
3355
3356
3357# Register a --enable argument but mark it as deprecated
3358# $1: The name of the with argument to deprecate, not including --enable-
3359# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3360
3361
3362
3363
3364# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3365# $1: variable to check
3366
3367
3368# Check that there are no unprocessed overridden variables left.
3369# If so, they are an incorrect argument and we will exit with an error.
3370
3371
3372# Setup a tool for the given variable. If correctly specified by the user,
3373# use that value, otherwise search for the tool using the supplied code snippet.
3374# $1: variable to set
3375# $2: code snippet to call to look for the tool
3376
3377
3378# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3379# $1: variable to set
3380# $2: executable name (or list of names) to look for
3381
3382
3383# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3384# $1: variable to set
3385# $2: executable name (or list of names) to look for
3386
3387
3388# Like BASIC_PATH_PROGS but fails if no tool was found.
3389# $1: variable to set
3390# $2: executable name (or list of names) to look for
3391
3392
3393# Like BASIC_SETUP_TOOL but fails if no tool was found.
3394# $1: variable to set
3395# $2: autoconf macro to call to look for the special tool
3396
3397
3398# Setup the most fundamental tools that relies on not much else to set up,
3399# but is used by much of the early bootstrap code.
3400
3401
3402# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3403
3404
3405
3406
3407
3408
3409
3410#%%% Simple tools %%%
3411
3412# Check if we have found a usable version of make
3413# $1: the path to a potential make binary (or empty)
3414# $2: the description on how we found this
3415
3416
3417# Goes looking for a usable version of GNU make.
3418
3419
3420
3421
3422
3423
3424# Check if build directory is on local disk. If not possible to determine,
3425# we prefer to claim it's local.
3426# Argument 1: directory to test
3427# Argument 2: what to do if it is on local disk
3428# Argument 3: what to do otherwise (remote disk or failure)
3429
3430
3431# Check that source files have basic read permissions set. This might
3432# not be the case in cygwin in certain conditions.
3433
3434
3435
3436
3437#
3438# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3439# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3440#
3441# This code is free software; you can redistribute it and/or modify it
3442# under the terms of the GNU General Public License version 2 only, as
3443# published by the Free Software Foundation.  Oracle designates this
3444# particular file as subject to the "Classpath" exception as provided
3445# by Oracle in the LICENSE file that accompanied this code.
3446#
3447# This code is distributed in the hope that it will be useful, but WITHOUT
3448# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3449# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3450# version 2 for more details (a copy is included in the LICENSE file that
3451# accompanied this code).
3452#
3453# You should have received a copy of the GNU General Public License version
3454# 2 along with this work; if not, write to the Free Software Foundation,
3455# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3456#
3457# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3458# or visit www.oracle.com if you need additional information or have any
3459# questions.
3460#
3461
3462
3463
3464
3465
3466# Helper function which possibly converts a path using DOS-style short mode.
3467# If so, the updated path is stored in $new_path.
3468# $1: The path to check
3469
3470
3471# Helper function which possibly converts a path using DOS-style short mode.
3472# If so, the updated path is stored in $new_path.
3473# $1: The path to check
3474
3475
3476# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3477# and could probably be heavily simplified. However, all changes in this
3478# area tend to need lot of testing in different scenarios, and in lack of
3479# proper unit testing, cleaning this up has not been deemed worth the effort
3480# at the moment.
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3491
3492
3493
3494
3495#
3496# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498#
3499# This code is free software; you can redistribute it and/or modify it
3500# under the terms of the GNU General Public License version 2 only, as
3501# published by the Free Software Foundation.  Oracle designates this
3502# particular file as subject to the "Classpath" exception as provided
3503# by Oracle in the LICENSE file that accompanied this code.
3504#
3505# This code is distributed in the hope that it will be useful, but WITHOUT
3506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508# version 2 for more details (a copy is included in the LICENSE file that
3509# accompanied this code).
3510#
3511# You should have received a copy of the GNU General Public License version
3512# 2 along with this work; if not, write to the Free Software Foundation,
3513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514#
3515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516# or visit www.oracle.com if you need additional information or have any
3517# questions.
3518#
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530# ... then the rest
3531#
3532# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3533# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3534#
3535# This code is free software; you can redistribute it and/or modify it
3536# under the terms of the GNU General Public License version 2 only, as
3537# published by the Free Software Foundation.  Oracle designates this
3538# particular file as subject to the "Classpath" exception as provided
3539# by Oracle in the LICENSE file that accompanied this code.
3540#
3541# This code is distributed in the hope that it will be useful, but WITHOUT
3542# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3543# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3544# version 2 for more details (a copy is included in the LICENSE file that
3545# accompanied this code).
3546#
3547# You should have received a copy of the GNU General Public License version
3548# 2 along with this work; if not, write to the Free Software Foundation,
3549# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3550#
3551# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3552# or visit www.oracle.com if you need additional information or have any
3553# questions.
3554#
3555
3556########################################################################
3557# This file handles detection of the Boot JDK. The Boot JDK detection
3558# process has been developed as a response to solve a complex real-world
3559# problem. Initially, it was simple, but it has grown as platform after
3560# platform, idiosyncracy after idiosyncracy has been supported.
3561#
3562# The basic idea is this:
3563# 1) You need an acceptable *) JDK to use as a Boot JDK
3564# 2) There are several ways to locate a JDK, that are mostly platform
3565#    dependent **)
3566# 3) You can have multiple JDKs installed
3567# 4) If possible, configure should try to dig out an acceptable JDK
3568#    automatically, without having to resort to command-line options
3569#
3570# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3571#     javac) and not a JRE, etc.
3572#
3573# **) On Windows we typically use a well-known path.
3574#     On MacOSX we typically use the tool java_home.
3575#     On Linux we typically find javac in the $PATH, and then follow a
3576#     chain of symlinks that often ends up in a real JDK.
3577#
3578# This leads to the code where we check in different ways to locate a
3579# JDK, and if one is found, check if it is acceptable. If not, we print
3580# our reasons for rejecting it (useful when debugging non-working
3581# configure situations) and continue checking the next one.
3582########################################################################
3583
3584# Execute the check given as argument, and verify the result
3585# If the Boot JDK was previously found, do nothing
3586# $1 A command line (typically autoconf macro) to execute
3587
3588
3589# Test: Is bootjdk explicitely set by command line arguments?
3590
3591
3592# Test: Is bootjdk available from builddeps?
3593
3594
3595# Test: Is $JAVA_HOME set?
3596
3597
3598# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3599
3600
3601# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3602# $1: Argument to the java_home binary (optional)
3603
3604
3605# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3606
3607
3608# Look for a jdk in the given path. If there are multiple, try to select the newest.
3609# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3610# $1 = Path to directory containing jdk installations.
3611# $2 = String to append to the found JDK directory to get the proper JDK home
3612
3613
3614# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3615# environmental variable as base for where to look.
3616# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3617
3618
3619# Test: Is there a JDK installed in default, well-known locations?
3620
3621
3622# Check that a command-line tool in the Boot JDK is correct
3623# $1 = name of variable to assign
3624# $2 = name of binary
3625
3626
3627###############################################################################
3628#
3629# We need a Boot JDK to bootstrap the build.
3630#
3631
3632
3633
3634
3635
3636#
3637# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3638# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3639#
3640# This code is free software; you can redistribute it and/or modify it
3641# under the terms of the GNU General Public License version 2 only, as
3642# published by the Free Software Foundation.  Oracle designates this
3643# particular file as subject to the "Classpath" exception as provided
3644# by Oracle in the LICENSE file that accompanied this code.
3645#
3646# This code is distributed in the hope that it will be useful, but WITHOUT
3647# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3648# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3649# version 2 for more details (a copy is included in the LICENSE file that
3650# accompanied this code).
3651#
3652# You should have received a copy of the GNU General Public License version
3653# 2 along with this work; if not, write to the Free Software Foundation,
3654# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3655#
3656# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3657# or visit www.oracle.com if you need additional information or have any
3658# questions.
3659#
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705
3706
3707
3708
3709# Documentation on common flags used for solstudio in HIGHEST.
3710#
3711# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3712#          done with care, there are some assumptions below that need to
3713#          be understood about the use of pointers, and IEEE behavior.
3714#
3715# -fns: Use non-standard floating point mode (not IEEE 754)
3716# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3717# -fsingle: Use single precision floating point with 'float'
3718# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3719#   (Source with excessing pointer casting and data access with mixed
3720#    pointer types are not recommended)
3721# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3722#   (If you expect perfect errno behavior, do not use this)
3723# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3724# -xrestrict: Pointer parameters to functions do not overlap
3725#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3726#    If you pass in multiple pointers to the same data, do not use this)
3727# -xlibmil: Inline some library routines
3728#   (If you expect perfect errno behavior, do not use this)
3729# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3730#   (If you expect perfect errno behavior, do not use this)
3731#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3732
3733    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3734    # Bug?
3735    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3736    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3737    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3738    #fi
3739
3740
3741
3742
3743
3744
3745# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3746#                                   [RUN-IF-FALSE])
3747# ------------------------------------------------------------
3748# Check that the c and c++ compilers support an argument
3749
3750
3751
3752
3753#
3754# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3756#
3757# This code is free software; you can redistribute it and/or modify it
3758# under the terms of the GNU General Public License version 2 only, as
3759# published by the Free Software Foundation.  Oracle designates this
3760# particular file as subject to the "Classpath" exception as provided
3761# by Oracle in the LICENSE file that accompanied this code.
3762#
3763# This code is distributed in the hope that it will be useful, but WITHOUT
3764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3766# version 2 for more details (a copy is included in the LICENSE file that
3767# accompanied this code).
3768#
3769# You should have received a copy of the GNU General Public License version
3770# 2 along with this work; if not, write to the Free Software Foundation,
3771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3772#
3773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3774# or visit www.oracle.com if you need additional information or have any
3775# questions.
3776#
3777
3778
3779
3780
3781
3782cygwin_help() {
3783  case $1 in
3784    unzip)
3785      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3787      ;;
3788    zip)
3789      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3790      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3791      ;;
3792    make)
3793      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3794      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3795      ;;
3796    freetype)
3797      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3798        HELP_MSG="To install freetype, run:
3799wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3800chmod +x /tmp/freetype-setup.exe
3801/tmp/freetype-setup.exe
3802Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3803After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3804      else
3805        HELP_MSG="You need to build a 64-bit version of freetype.
3806This is not readily available.
3807You can find source code and build instructions on
3808http://www.freetype.org/
3809If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3810      fi
3811      ;;
3812  esac
3813}
3814
3815msys_help() {
3816  PKGHANDLER_COMMAND=""
3817}
3818
3819apt_help() {
3820  case $1 in
3821    devkit)
3822      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3823    openjdk)
3824      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3825    alsa)
3826      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3827    cups)
3828      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3829    freetype)
3830      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3831    pulse)
3832      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3833    x11)
3834      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3835    ccache)
3836      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3837  esac
3838}
3839
3840yum_help() {
3841  case $1 in
3842    devkit)
3843      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3844    openjdk)
3845      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3846    alsa)
3847      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3848    cups)
3849      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3850    freetype)
3851      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3852    pulse)
3853      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3854    x11)
3855      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3856    ccache)
3857      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3858  esac
3859}
3860
3861port_help() {
3862  PKGHANDLER_COMMAND=""
3863}
3864
3865pkgutil_help() {
3866  PKGHANDLER_COMMAND=""
3867}
3868
3869pkgadd_help() {
3870  PKGHANDLER_COMMAND=""
3871}
3872
3873# This function will check if we're called from the "configure" wrapper while
3874# printing --help. If so, we will print out additional information that can
3875# only be extracted within the autoconf script, and then exit. This must be
3876# called at the very beginning in configure.ac.
3877
3878
3879
3880
3881#
3882# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3883# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3884#
3885# This code is free software; you can redistribute it and/or modify it
3886# under the terms of the GNU General Public License version 2 only, as
3887# published by the Free Software Foundation.  Oracle designates this
3888# particular file as subject to the "Classpath" exception as provided
3889# by Oracle in the LICENSE file that accompanied this code.
3890#
3891# This code is distributed in the hope that it will be useful, but WITHOUT
3892# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3893# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3894# version 2 for more details (a copy is included in the LICENSE file that
3895# accompanied this code).
3896#
3897# You should have received a copy of the GNU General Public License version
3898# 2 along with this work; if not, write to the Free Software Foundation,
3899# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3900#
3901# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3902# or visit www.oracle.com if you need additional information or have any
3903# questions.
3904#
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915###############################################################################
3916#
3917# Should we build only OpenJDK even if closed sources are present?
3918#
3919
3920
3921
3922
3923###############################################################################
3924#
3925# Setup version numbers
3926#
3927
3928
3929
3930
3931
3932
3933#
3934# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3935# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3936#
3937# This code is free software; you can redistribute it and/or modify it
3938# under the terms of the GNU General Public License version 2 only, as
3939# published by the Free Software Foundation.  Oracle designates this
3940# particular file as subject to the "Classpath" exception as provided
3941# by Oracle in the LICENSE file that accompanied this code.
3942#
3943# This code is distributed in the hope that it will be useful, but WITHOUT
3944# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3945# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3946# version 2 for more details (a copy is included in the LICENSE file that
3947# accompanied this code).
3948#
3949# You should have received a copy of the GNU General Public License version
3950# 2 along with this work; if not, write to the Free Software Foundation,
3951# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3952#
3953# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3954# or visit www.oracle.com if you need additional information or have any
3955# questions.
3956#
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4002# Converts autoconf style CPU name to OpenJDK style, into
4003# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4004
4005
4006# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4007# Converts autoconf style OS name to OpenJDK style, into
4008# VAR_OS and VAR_OS_API.
4009
4010
4011# Expects $host_os $host_cpu $build_os and $build_cpu
4012# and $with_target_bits to have been setup!
4013#
4014# Translate the standard triplet(quadruplet) definition
4015# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4016# OPENJDK_BUILD_OS, etc.
4017
4018
4019# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4020# accordingly. Must be done after setting up build and target system, but before
4021# doing anything else with these values.
4022
4023
4024# Setup the legacy variables, for controlling the old makefiles.
4025#
4026
4027
4028
4029
4030#%%% Build and target systems %%%
4031
4032
4033
4034
4035# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4036# Add -mX to various FLAGS variables.
4037
4038
4039
4040
4041
4042
4043#
4044# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4045# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4046#
4047# This code is free software; you can redistribute it and/or modify it
4048# under the terms of the GNU General Public License version 2 only, as
4049# published by the Free Software Foundation.  Oracle designates this
4050# particular file as subject to the "Classpath" exception as provided
4051# by Oracle in the LICENSE file that accompanied this code.
4052#
4053# This code is distributed in the hope that it will be useful, but WITHOUT
4054# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4055# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4056# version 2 for more details (a copy is included in the LICENSE file that
4057# accompanied this code).
4058#
4059# You should have received a copy of the GNU General Public License version
4060# 2 along with this work; if not, write to the Free Software Foundation,
4061# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4062#
4063# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4064# or visit www.oracle.com if you need additional information or have any
4065# questions.
4066#
4067
4068
4069
4070
4071
4072
4073
4074
4075#
4076# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4077# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4078#
4079# This code is free software; you can redistribute it and/or modify it
4080# under the terms of the GNU General Public License version 2 only, as
4081# published by the Free Software Foundation.  Oracle designates this
4082# particular file as subject to the "Classpath" exception as provided
4083# by Oracle in the LICENSE file that accompanied this code.
4084#
4085# This code is distributed in the hope that it will be useful, but WITHOUT
4086# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4087# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4088# version 2 for more details (a copy is included in the LICENSE file that
4089# accompanied this code).
4090#
4091# You should have received a copy of the GNU General Public License version
4092# 2 along with this work; if not, write to the Free Software Foundation,
4093# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4094#
4095# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4096# or visit www.oracle.com if you need additional information or have any
4097# questions.
4098#
4099
4100########################################################################
4101# This file is responsible for detecting, verifying and setting up the
4102# toolchain, i.e. the compiler, linker and related utilities. It will setup
4103# proper paths to the binaries, but it will not setup any flags.
4104#
4105# The binaries used is determined by the toolchain type, which is the family of
4106# compilers and related tools that are used.
4107########################################################################
4108
4109
4110# All valid toolchains, regardless of platform (used by help.m4)
4111VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4112
4113# These toolchains are valid on different platforms
4114VALID_TOOLCHAINS_linux="gcc clang"
4115VALID_TOOLCHAINS_solaris="solstudio"
4116VALID_TOOLCHAINS_macosx="gcc clang"
4117VALID_TOOLCHAINS_aix="xlc"
4118VALID_TOOLCHAINS_windows="microsoft"
4119
4120# Toolchain descriptions
4121TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4122TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4123TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4124TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4125TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4126
4127# Setup a number of variables describing how native output files are
4128# named on this platform/toolchain.
4129
4130
4131# Determine which toolchain type to use, and make sure it is valid for this
4132# platform. Setup various information about the selected toolchain.
4133
4134
4135# Before we start detecting the toolchain executables, we might need some
4136# special setup, e.g. additional paths etc.
4137
4138
4139# Restore path, etc
4140
4141
4142# Check if a compiler is of the toolchain type we expect, and save the version
4143# information from it. If the compiler does not match the expected type,
4144# this function will abort using AC_MSG_ERROR. If it matches, the version will
4145# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4146# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4147#
4148# $1 = compiler to test (CC or CXX)
4149# $2 = human readable name of compiler (C or C++)
4150
4151
4152# Try to locate the given C or C++ compiler in the path, or otherwise.
4153#
4154# $1 = compiler to test (CC or CXX)
4155# $2 = human readable name of compiler (C or C++)
4156# $3 = list of compiler names to search for
4157
4158
4159# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4160# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4161# archiver (AR). Verify that the compilers are correct according to the
4162# toolchain type.
4163
4164
4165# Setup additional tools that is considered a part of the toolchain, but not the
4166# core part. Many of these are highly platform-specific and do not exist,
4167# and/or are not needed on all platforms.
4168
4169
4170# Setup the build tools (i.e, the compiler and linker used to build programs
4171# that should be run on the build platform, not the target platform, as a build
4172# helper). Since the non-cross-compile case uses the normal, target compilers
4173# for this, we can only do this after these have been setup.
4174
4175
4176# Setup legacy variables that are still needed as alternative ways to refer to
4177# parts of the toolchain.
4178
4179
4180# Do some additional checks on the detected tools.
4181
4182
4183# Setup the JTReg Regression Test Harness.
4184
4185
4186#
4187# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4188# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4189#
4190# This code is free software; you can redistribute it and/or modify it
4191# under the terms of the GNU General Public License version 2 only, as
4192# published by the Free Software Foundation.  Oracle designates this
4193# particular file as subject to the "Classpath" exception as provided
4194# by Oracle in the LICENSE file that accompanied this code.
4195#
4196# This code is distributed in the hope that it will be useful, but WITHOUT
4197# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4198# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4199# version 2 for more details (a copy is included in the LICENSE file that
4200# accompanied this code).
4201#
4202# You should have received a copy of the GNU General Public License version
4203# 2 along with this work; if not, write to the Free Software Foundation,
4204# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4205#
4206# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4207# or visit www.oracle.com if you need additional information or have any
4208# questions.
4209#
4210
4211
4212
4213
4214
4215
4216
4217# Check if the VS env variables were setup prior to running configure.
4218# If not, then find vcvarsall.bat and run it automatically, and integrate
4219# the set env variables into the spec file.
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230# This line needs to be here, verbatim, after all includes and the dummy hook
4231# definitions. It is replaced with custom functionality when building
4232# custom sources.
4233#CUSTOM_AUTOCONF_INCLUDE
4234
4235# Do not change or remove the following line, it is needed for consistency checks:
4236DATE_WHEN_GENERATED=1396463189
4237
4238###############################################################################
4239#
4240# Initialization / Boot-strapping
4241#
4242# The bootstrapping process needs to solve the "chicken or the egg" problem,
4243# thus it jumps back and forth, each time gaining something needed later on.
4244#
4245###############################################################################
4246
4247# If we are requested to print additional help, do that and then exit.
4248# This must be the very first call.
4249
4250  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4251    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4252    $PRINTF "Which are valid to use depends on the build platform.\n"
4253    for toolchain in $VALID_TOOLCHAINS_all; do
4254      # Use indirect variable referencing
4255      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4256      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4257      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4258    done
4259
4260    # And now exit directly
4261    exit 0
4262  fi
4263
4264
4265# Basic initialization that must happen first of all in the normal process.
4266
4267  # Save the original command line. This is passed to us by the wrapper configure script.
4268
4269  DATE_WHEN_CONFIGURED=`LANG=C date`
4270
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4272$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4273  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4274$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4275
4276
4277  # Start with tools that do not need have cross compilation support
4278  # and can be expected to be found in the default PATH. These tools are
4279  # used by configure. Nor are these tools expected to be found in the
4280  # devkit from the builddeps server either, since they are
4281  # needed to download the devkit.
4282
4283  # First are all the simple required tools.
4284
4285
4286
4287  # Publish this variable in the help.
4288
4289
4290  if test "x$BASENAME" = x; then
4291    # The variable is not set by user, try to locate tool using the code snippet
4292    for ac_prog in basename
4293do
4294  # Extract the first word of "$ac_prog", so it can be a program name with args.
4295set dummy $ac_prog; ac_word=$2
4296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4297$as_echo_n "checking for $ac_word... " >&6; }
4298if ${ac_cv_path_BASENAME+:} false; then :
4299  $as_echo_n "(cached) " >&6
4300else
4301  case $BASENAME in
4302  [\\/]* | ?:[\\/]*)
4303  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4304  ;;
4305  *)
4306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307for as_dir in $PATH
4308do
4309  IFS=$as_save_IFS
4310  test -z "$as_dir" && as_dir=.
4311    for ac_exec_ext in '' $ac_executable_extensions; do
4312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4313    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4315    break 2
4316  fi
4317done
4318  done
4319IFS=$as_save_IFS
4320
4321  ;;
4322esac
4323fi
4324BASENAME=$ac_cv_path_BASENAME
4325if test -n "$BASENAME"; then
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4327$as_echo "$BASENAME" >&6; }
4328else
4329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4330$as_echo "no" >&6; }
4331fi
4332
4333
4334  test -n "$BASENAME" && break
4335done
4336
4337  else
4338    # The variable is set, but is it from the command line or the environment?
4339
4340    # Try to remove the string !BASENAME! from our list.
4341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4343      # If it failed, the variable was not from the command line. Ignore it,
4344      # but warn the user (except for BASH, which is always set by the calling BASH).
4345      if test "xBASENAME" != xBASH; then
4346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4347$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4348      fi
4349      # Try to locate tool using the code snippet
4350      for ac_prog in basename
4351do
4352  # Extract the first word of "$ac_prog", so it can be a program name with args.
4353set dummy $ac_prog; ac_word=$2
4354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355$as_echo_n "checking for $ac_word... " >&6; }
4356if ${ac_cv_path_BASENAME+:} false; then :
4357  $as_echo_n "(cached) " >&6
4358else
4359  case $BASENAME in
4360  [\\/]* | ?:[\\/]*)
4361  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4362  ;;
4363  *)
4364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367  IFS=$as_save_IFS
4368  test -z "$as_dir" && as_dir=.
4369    for ac_exec_ext in '' $ac_executable_extensions; do
4370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4371    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4373    break 2
4374  fi
4375done
4376  done
4377IFS=$as_save_IFS
4378
4379  ;;
4380esac
4381fi
4382BASENAME=$ac_cv_path_BASENAME
4383if test -n "$BASENAME"; then
4384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4385$as_echo "$BASENAME" >&6; }
4386else
4387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
4389fi
4390
4391
4392  test -n "$BASENAME" && break
4393done
4394
4395    else
4396      # If it succeeded, then it was overridden by the user. We will use it
4397      # for the tool.
4398
4399      # First remove it from the list of overridden variables, so we can test
4400      # for unknown variables in the end.
4401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4402
4403      # Check if the provided tool contains a complete path.
4404      tool_specified="$BASENAME"
4405      tool_basename="${tool_specified##*/}"
4406      if test "x$tool_basename" = "x$tool_specified"; then
4407        # A command without a complete path is provided, search $PATH.
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4409$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4410        # Extract the first word of "$tool_basename", so it can be a program name with args.
4411set dummy $tool_basename; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if ${ac_cv_path_BASENAME+:} false; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $BASENAME in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4429    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440BASENAME=$ac_cv_path_BASENAME
4441if test -n "$BASENAME"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4443$as_echo "$BASENAME" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450        if test "x$BASENAME" = x; then
4451          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4452        fi
4453      else
4454        # Otherwise we believe it is a complete path. Use it as it is.
4455        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4456$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4458$as_echo_n "checking for BASENAME... " >&6; }
4459        if test ! -x "$tool_specified"; then
4460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4461$as_echo "not found" >&6; }
4462          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4463        fi
4464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4465$as_echo "$tool_specified" >&6; }
4466      fi
4467    fi
4468  fi
4469
4470
4471
4472  if test "x$BASENAME" = x; then
4473    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4474  fi
4475
4476
4477
4478
4479
4480  # Publish this variable in the help.
4481
4482
4483  if test "x$BASH" = x; then
4484    # The variable is not set by user, try to locate tool using the code snippet
4485    for ac_prog in bash
4486do
4487  # Extract the first word of "$ac_prog", so it can be a program name with args.
4488set dummy $ac_prog; ac_word=$2
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490$as_echo_n "checking for $ac_word... " >&6; }
4491if ${ac_cv_path_BASH+:} false; then :
4492  $as_echo_n "(cached) " >&6
4493else
4494  case $BASH in
4495  [\\/]* | ?:[\\/]*)
4496  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4497  ;;
4498  *)
4499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in $PATH
4501do
4502  IFS=$as_save_IFS
4503  test -z "$as_dir" && as_dir=.
4504    for ac_exec_ext in '' $ac_executable_extensions; do
4505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4506    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508    break 2
4509  fi
4510done
4511  done
4512IFS=$as_save_IFS
4513
4514  ;;
4515esac
4516fi
4517BASH=$ac_cv_path_BASH
4518if test -n "$BASH"; then
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4520$as_echo "$BASH" >&6; }
4521else
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523$as_echo "no" >&6; }
4524fi
4525
4526
4527  test -n "$BASH" && break
4528done
4529
4530  else
4531    # The variable is set, but is it from the command line or the environment?
4532
4533    # Try to remove the string !BASH! from our list.
4534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4536      # If it failed, the variable was not from the command line. Ignore it,
4537      # but warn the user (except for BASH, which is always set by the calling BASH).
4538      if test "xBASH" != xBASH; then
4539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4540$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4541      fi
4542      # Try to locate tool using the code snippet
4543      for ac_prog in bash
4544do
4545  # Extract the first word of "$ac_prog", so it can be a program name with args.
4546set dummy $ac_prog; ac_word=$2
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548$as_echo_n "checking for $ac_word... " >&6; }
4549if ${ac_cv_path_BASH+:} false; then :
4550  $as_echo_n "(cached) " >&6
4551else
4552  case $BASH in
4553  [\\/]* | ?:[\\/]*)
4554  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4555  ;;
4556  *)
4557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH
4559do
4560  IFS=$as_save_IFS
4561  test -z "$as_dir" && as_dir=.
4562    for ac_exec_ext in '' $ac_executable_extensions; do
4563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566    break 2
4567  fi
4568done
4569  done
4570IFS=$as_save_IFS
4571
4572  ;;
4573esac
4574fi
4575BASH=$ac_cv_path_BASH
4576if test -n "$BASH"; then
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4578$as_echo "$BASH" >&6; }
4579else
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582fi
4583
4584
4585  test -n "$BASH" && break
4586done
4587
4588    else
4589      # If it succeeded, then it was overridden by the user. We will use it
4590      # for the tool.
4591
4592      # First remove it from the list of overridden variables, so we can test
4593      # for unknown variables in the end.
4594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4595
4596      # Check if the provided tool contains a complete path.
4597      tool_specified="$BASH"
4598      tool_basename="${tool_specified##*/}"
4599      if test "x$tool_basename" = "x$tool_specified"; then
4600        # A command without a complete path is provided, search $PATH.
4601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4602$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4603        # Extract the first word of "$tool_basename", so it can be a program name with args.
4604set dummy $tool_basename; ac_word=$2
4605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4606$as_echo_n "checking for $ac_word... " >&6; }
4607if ${ac_cv_path_BASH+:} false; then :
4608  $as_echo_n "(cached) " >&6
4609else
4610  case $BASH in
4611  [\\/]* | ?:[\\/]*)
4612  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4613  ;;
4614  *)
4615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4616for as_dir in $PATH
4617do
4618  IFS=$as_save_IFS
4619  test -z "$as_dir" && as_dir=.
4620    for ac_exec_ext in '' $ac_executable_extensions; do
4621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4622    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4624    break 2
4625  fi
4626done
4627  done
4628IFS=$as_save_IFS
4629
4630  ;;
4631esac
4632fi
4633BASH=$ac_cv_path_BASH
4634if test -n "$BASH"; then
4635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4636$as_echo "$BASH" >&6; }
4637else
4638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4639$as_echo "no" >&6; }
4640fi
4641
4642
4643        if test "x$BASH" = x; then
4644          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4645        fi
4646      else
4647        # Otherwise we believe it is a complete path. Use it as it is.
4648        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4649$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4651$as_echo_n "checking for BASH... " >&6; }
4652        if test ! -x "$tool_specified"; then
4653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4654$as_echo "not found" >&6; }
4655          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4656        fi
4657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4658$as_echo "$tool_specified" >&6; }
4659      fi
4660    fi
4661  fi
4662
4663
4664
4665  if test "x$BASH" = x; then
4666    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4667  fi
4668
4669
4670
4671
4672
4673  # Publish this variable in the help.
4674
4675
4676  if test "x$CAT" = x; then
4677    # The variable is not set by user, try to locate tool using the code snippet
4678    for ac_prog in cat
4679do
4680  # Extract the first word of "$ac_prog", so it can be a program name with args.
4681set dummy $ac_prog; ac_word=$2
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683$as_echo_n "checking for $ac_word... " >&6; }
4684if ${ac_cv_path_CAT+:} false; then :
4685  $as_echo_n "(cached) " >&6
4686else
4687  case $CAT in
4688  [\\/]* | ?:[\\/]*)
4689  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4690  ;;
4691  *)
4692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693for as_dir in $PATH
4694do
4695  IFS=$as_save_IFS
4696  test -z "$as_dir" && as_dir=.
4697    for ac_exec_ext in '' $ac_executable_extensions; do
4698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701    break 2
4702  fi
4703done
4704  done
4705IFS=$as_save_IFS
4706
4707  ;;
4708esac
4709fi
4710CAT=$ac_cv_path_CAT
4711if test -n "$CAT"; then
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4713$as_echo "$CAT" >&6; }
4714else
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716$as_echo "no" >&6; }
4717fi
4718
4719
4720  test -n "$CAT" && break
4721done
4722
4723  else
4724    # The variable is set, but is it from the command line or the environment?
4725
4726    # Try to remove the string !CAT! from our list.
4727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4729      # If it failed, the variable was not from the command line. Ignore it,
4730      # but warn the user (except for BASH, which is always set by the calling BASH).
4731      if test "xCAT" != xBASH; then
4732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4733$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4734      fi
4735      # Try to locate tool using the code snippet
4736      for ac_prog in cat
4737do
4738  # Extract the first word of "$ac_prog", so it can be a program name with args.
4739set dummy $ac_prog; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_CAT+:} false; then :
4743  $as_echo_n "(cached) " >&6
4744else
4745  case $CAT in
4746  [\\/]* | ?:[\\/]*)
4747  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4748  ;;
4749  *)
4750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753  IFS=$as_save_IFS
4754  test -z "$as_dir" && as_dir=.
4755    for ac_exec_ext in '' $ac_executable_extensions; do
4756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4757    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759    break 2
4760  fi
4761done
4762  done
4763IFS=$as_save_IFS
4764
4765  ;;
4766esac
4767fi
4768CAT=$ac_cv_path_CAT
4769if test -n "$CAT"; then
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4771$as_echo "$CAT" >&6; }
4772else
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777
4778  test -n "$CAT" && break
4779done
4780
4781    else
4782      # If it succeeded, then it was overridden by the user. We will use it
4783      # for the tool.
4784
4785      # First remove it from the list of overridden variables, so we can test
4786      # for unknown variables in the end.
4787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4788
4789      # Check if the provided tool contains a complete path.
4790      tool_specified="$CAT"
4791      tool_basename="${tool_specified##*/}"
4792      if test "x$tool_basename" = "x$tool_specified"; then
4793        # A command without a complete path is provided, search $PATH.
4794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4795$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4796        # Extract the first word of "$tool_basename", so it can be a program name with args.
4797set dummy $tool_basename; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if ${ac_cv_path_CAT+:} false; then :
4801  $as_echo_n "(cached) " >&6
4802else
4803  case $CAT in
4804  [\\/]* | ?:[\\/]*)
4805  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4806  ;;
4807  *)
4808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in $PATH
4810do
4811  IFS=$as_save_IFS
4812  test -z "$as_dir" && as_dir=.
4813    for ac_exec_ext in '' $ac_executable_extensions; do
4814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4815    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4817    break 2
4818  fi
4819done
4820  done
4821IFS=$as_save_IFS
4822
4823  ;;
4824esac
4825fi
4826CAT=$ac_cv_path_CAT
4827if test -n "$CAT"; then
4828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4829$as_echo "$CAT" >&6; }
4830else
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834
4835
4836        if test "x$CAT" = x; then
4837          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4838        fi
4839      else
4840        # Otherwise we believe it is a complete path. Use it as it is.
4841        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4842$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4844$as_echo_n "checking for CAT... " >&6; }
4845        if test ! -x "$tool_specified"; then
4846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4847$as_echo "not found" >&6; }
4848          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4849        fi
4850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4851$as_echo "$tool_specified" >&6; }
4852      fi
4853    fi
4854  fi
4855
4856
4857
4858  if test "x$CAT" = x; then
4859    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4860  fi
4861
4862
4863
4864
4865
4866  # Publish this variable in the help.
4867
4868
4869  if test "x$CHMOD" = x; then
4870    # The variable is not set by user, try to locate tool using the code snippet
4871    for ac_prog in chmod
4872do
4873  # Extract the first word of "$ac_prog", so it can be a program name with args.
4874set dummy $ac_prog; ac_word=$2
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_CHMOD+:} false; then :
4878  $as_echo_n "(cached) " >&6
4879else
4880  case $CHMOD in
4881  [\\/]* | ?:[\\/]*)
4882  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4883  ;;
4884  *)
4885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in $PATH
4887do
4888  IFS=$as_save_IFS
4889  test -z "$as_dir" && as_dir=.
4890    for ac_exec_ext in '' $ac_executable_extensions; do
4891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4892    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894    break 2
4895  fi
4896done
4897  done
4898IFS=$as_save_IFS
4899
4900  ;;
4901esac
4902fi
4903CHMOD=$ac_cv_path_CHMOD
4904if test -n "$CHMOD"; then
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4906$as_echo "$CHMOD" >&6; }
4907else
4908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913  test -n "$CHMOD" && break
4914done
4915
4916  else
4917    # The variable is set, but is it from the command line or the environment?
4918
4919    # Try to remove the string !CHMOD! from our list.
4920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4922      # If it failed, the variable was not from the command line. Ignore it,
4923      # but warn the user (except for BASH, which is always set by the calling BASH).
4924      if test "xCHMOD" != xBASH; then
4925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4926$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4927      fi
4928      # Try to locate tool using the code snippet
4929      for ac_prog in chmod
4930do
4931  # Extract the first word of "$ac_prog", so it can be a program name with args.
4932set dummy $ac_prog; ac_word=$2
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
4935if ${ac_cv_path_CHMOD+:} false; then :
4936  $as_echo_n "(cached) " >&6
4937else
4938  case $CHMOD in
4939  [\\/]* | ?:[\\/]*)
4940  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4941  ;;
4942  *)
4943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in $PATH
4945do
4946  IFS=$as_save_IFS
4947  test -z "$as_dir" && as_dir=.
4948    for ac_exec_ext in '' $ac_executable_extensions; do
4949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4950    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952    break 2
4953  fi
4954done
4955  done
4956IFS=$as_save_IFS
4957
4958  ;;
4959esac
4960fi
4961CHMOD=$ac_cv_path_CHMOD
4962if test -n "$CHMOD"; then
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4964$as_echo "$CHMOD" >&6; }
4965else
4966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
4970
4971  test -n "$CHMOD" && break
4972done
4973
4974    else
4975      # If it succeeded, then it was overridden by the user. We will use it
4976      # for the tool.
4977
4978      # First remove it from the list of overridden variables, so we can test
4979      # for unknown variables in the end.
4980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4981
4982      # Check if the provided tool contains a complete path.
4983      tool_specified="$CHMOD"
4984      tool_basename="${tool_specified##*/}"
4985      if test "x$tool_basename" = "x$tool_specified"; then
4986        # A command without a complete path is provided, search $PATH.
4987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4988$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4989        # Extract the first word of "$tool_basename", so it can be a program name with args.
4990set dummy $tool_basename; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CHMOD+:} false; then :
4994  $as_echo_n "(cached) " >&6
4995else
4996  case $CHMOD in
4997  [\\/]* | ?:[\\/]*)
4998  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4999  ;;
5000  *)
5001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in $PATH
5003do
5004  IFS=$as_save_IFS
5005  test -z "$as_dir" && as_dir=.
5006    for ac_exec_ext in '' $ac_executable_extensions; do
5007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010    break 2
5011  fi
5012done
5013  done
5014IFS=$as_save_IFS
5015
5016  ;;
5017esac
5018fi
5019CHMOD=$ac_cv_path_CHMOD
5020if test -n "$CHMOD"; then
5021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5022$as_echo "$CHMOD" >&6; }
5023else
5024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029        if test "x$CHMOD" = x; then
5030          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5031        fi
5032      else
5033        # Otherwise we believe it is a complete path. Use it as it is.
5034        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5035$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5037$as_echo_n "checking for CHMOD... " >&6; }
5038        if test ! -x "$tool_specified"; then
5039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5040$as_echo "not found" >&6; }
5041          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5042        fi
5043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5044$as_echo "$tool_specified" >&6; }
5045      fi
5046    fi
5047  fi
5048
5049
5050
5051  if test "x$CHMOD" = x; then
5052    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5053  fi
5054
5055
5056
5057
5058
5059  # Publish this variable in the help.
5060
5061
5062  if test "x$CMP" = x; then
5063    # The variable is not set by user, try to locate tool using the code snippet
5064    for ac_prog in cmp
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if ${ac_cv_path_CMP+:} false; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $CMP in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5085    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096CMP=$ac_cv_path_CMP
5097if test -n "$CMP"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5099$as_echo "$CMP" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$CMP" && break
5107done
5108
5109  else
5110    # The variable is set, but is it from the command line or the environment?
5111
5112    # Try to remove the string !CMP! from our list.
5113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5115      # If it failed, the variable was not from the command line. Ignore it,
5116      # but warn the user (except for BASH, which is always set by the calling BASH).
5117      if test "xCMP" != xBASH; then
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5119$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5120      fi
5121      # Try to locate tool using the code snippet
5122      for ac_prog in cmp
5123do
5124  # Extract the first word of "$ac_prog", so it can be a program name with args.
5125set dummy $ac_prog; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if ${ac_cv_path_CMP+:} false; then :
5129  $as_echo_n "(cached) " >&6
5130else
5131  case $CMP in
5132  [\\/]* | ?:[\\/]*)
5133  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5134  ;;
5135  *)
5136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139  IFS=$as_save_IFS
5140  test -z "$as_dir" && as_dir=.
5141    for ac_exec_ext in '' $ac_executable_extensions; do
5142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5143    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145    break 2
5146  fi
5147done
5148  done
5149IFS=$as_save_IFS
5150
5151  ;;
5152esac
5153fi
5154CMP=$ac_cv_path_CMP
5155if test -n "$CMP"; then
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5157$as_echo "$CMP" >&6; }
5158else
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164  test -n "$CMP" && break
5165done
5166
5167    else
5168      # If it succeeded, then it was overridden by the user. We will use it
5169      # for the tool.
5170
5171      # First remove it from the list of overridden variables, so we can test
5172      # for unknown variables in the end.
5173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5174
5175      # Check if the provided tool contains a complete path.
5176      tool_specified="$CMP"
5177      tool_basename="${tool_specified##*/}"
5178      if test "x$tool_basename" = "x$tool_specified"; then
5179        # A command without a complete path is provided, search $PATH.
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5181$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5182        # Extract the first word of "$tool_basename", so it can be a program name with args.
5183set dummy $tool_basename; ac_word=$2
5184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5185$as_echo_n "checking for $ac_word... " >&6; }
5186if ${ac_cv_path_CMP+:} false; then :
5187  $as_echo_n "(cached) " >&6
5188else
5189  case $CMP in
5190  [\\/]* | ?:[\\/]*)
5191  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5192  ;;
5193  *)
5194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5195for as_dir in $PATH
5196do
5197  IFS=$as_save_IFS
5198  test -z "$as_dir" && as_dir=.
5199    for ac_exec_ext in '' $ac_executable_extensions; do
5200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5201    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5203    break 2
5204  fi
5205done
5206  done
5207IFS=$as_save_IFS
5208
5209  ;;
5210esac
5211fi
5212CMP=$ac_cv_path_CMP
5213if test -n "$CMP"; then
5214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5215$as_echo "$CMP" >&6; }
5216else
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5218$as_echo "no" >&6; }
5219fi
5220
5221
5222        if test "x$CMP" = x; then
5223          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5224        fi
5225      else
5226        # Otherwise we believe it is a complete path. Use it as it is.
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5228$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5230$as_echo_n "checking for CMP... " >&6; }
5231        if test ! -x "$tool_specified"; then
5232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5233$as_echo "not found" >&6; }
5234          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5235        fi
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5237$as_echo "$tool_specified" >&6; }
5238      fi
5239    fi
5240  fi
5241
5242
5243
5244  if test "x$CMP" = x; then
5245    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5246  fi
5247
5248
5249
5250
5251
5252  # Publish this variable in the help.
5253
5254
5255  if test "x$COMM" = x; then
5256    # The variable is not set by user, try to locate tool using the code snippet
5257    for ac_prog in comm
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_COMM+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $COMM in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289COMM=$ac_cv_path_COMM
5290if test -n "$COMM"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5292$as_echo "$COMM" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$COMM" && break
5300done
5301
5302  else
5303    # The variable is set, but is it from the command line or the environment?
5304
5305    # Try to remove the string !COMM! from our list.
5306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5308      # If it failed, the variable was not from the command line. Ignore it,
5309      # but warn the user (except for BASH, which is always set by the calling BASH).
5310      if test "xCOMM" != xBASH; then
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5312$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5313      fi
5314      # Try to locate tool using the code snippet
5315      for ac_prog in comm
5316do
5317  # Extract the first word of "$ac_prog", so it can be a program name with args.
5318set dummy $ac_prog; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_COMM+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $COMM in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347COMM=$ac_cv_path_COMM
5348if test -n "$COMM"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5350$as_echo "$COMM" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357  test -n "$COMM" && break
5358done
5359
5360    else
5361      # If it succeeded, then it was overridden by the user. We will use it
5362      # for the tool.
5363
5364      # First remove it from the list of overridden variables, so we can test
5365      # for unknown variables in the end.
5366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5367
5368      # Check if the provided tool contains a complete path.
5369      tool_specified="$COMM"
5370      tool_basename="${tool_specified##*/}"
5371      if test "x$tool_basename" = "x$tool_specified"; then
5372        # A command without a complete path is provided, search $PATH.
5373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5374$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5375        # Extract the first word of "$tool_basename", so it can be a program name with args.
5376set dummy $tool_basename; ac_word=$2
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378$as_echo_n "checking for $ac_word... " >&6; }
5379if ${ac_cv_path_COMM+:} false; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  case $COMM in
5383  [\\/]* | ?:[\\/]*)
5384  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5385  ;;
5386  *)
5387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388for as_dir in $PATH
5389do
5390  IFS=$as_save_IFS
5391  test -z "$as_dir" && as_dir=.
5392    for ac_exec_ext in '' $ac_executable_extensions; do
5393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5394    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396    break 2
5397  fi
5398done
5399  done
5400IFS=$as_save_IFS
5401
5402  ;;
5403esac
5404fi
5405COMM=$ac_cv_path_COMM
5406if test -n "$COMM"; then
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5408$as_echo "$COMM" >&6; }
5409else
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413
5414
5415        if test "x$COMM" = x; then
5416          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5417        fi
5418      else
5419        # Otherwise we believe it is a complete path. Use it as it is.
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5421$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5423$as_echo_n "checking for COMM... " >&6; }
5424        if test ! -x "$tool_specified"; then
5425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5426$as_echo "not found" >&6; }
5427          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5428        fi
5429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5430$as_echo "$tool_specified" >&6; }
5431      fi
5432    fi
5433  fi
5434
5435
5436
5437  if test "x$COMM" = x; then
5438    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5439  fi
5440
5441
5442
5443
5444
5445  # Publish this variable in the help.
5446
5447
5448  if test "x$CP" = x; then
5449    # The variable is not set by user, try to locate tool using the code snippet
5450    for ac_prog in cp
5451do
5452  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453set dummy $ac_prog; ac_word=$2
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455$as_echo_n "checking for $ac_word... " >&6; }
5456if ${ac_cv_path_CP+:} false; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  case $CP in
5460  [\\/]* | ?:[\\/]*)
5461  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5462  ;;
5463  *)
5464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465for as_dir in $PATH
5466do
5467  IFS=$as_save_IFS
5468  test -z "$as_dir" && as_dir=.
5469    for ac_exec_ext in '' $ac_executable_extensions; do
5470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473    break 2
5474  fi
5475done
5476  done
5477IFS=$as_save_IFS
5478
5479  ;;
5480esac
5481fi
5482CP=$ac_cv_path_CP
5483if test -n "$CP"; then
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5485$as_echo "$CP" >&6; }
5486else
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
5489fi
5490
5491
5492  test -n "$CP" && break
5493done
5494
5495  else
5496    # The variable is set, but is it from the command line or the environment?
5497
5498    # Try to remove the string !CP! from our list.
5499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5501      # If it failed, the variable was not from the command line. Ignore it,
5502      # but warn the user (except for BASH, which is always set by the calling BASH).
5503      if test "xCP" != xBASH; then
5504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5505$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5506      fi
5507      # Try to locate tool using the code snippet
5508      for ac_prog in cp
5509do
5510  # Extract the first word of "$ac_prog", so it can be a program name with args.
5511set dummy $ac_prog; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if ${ac_cv_path_CP+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $CP in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540CP=$ac_cv_path_CP
5541if test -n "$CP"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5543$as_echo "$CP" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550  test -n "$CP" && break
5551done
5552
5553    else
5554      # If it succeeded, then it was overridden by the user. We will use it
5555      # for the tool.
5556
5557      # First remove it from the list of overridden variables, so we can test
5558      # for unknown variables in the end.
5559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5560
5561      # Check if the provided tool contains a complete path.
5562      tool_specified="$CP"
5563      tool_basename="${tool_specified##*/}"
5564      if test "x$tool_basename" = "x$tool_specified"; then
5565        # A command without a complete path is provided, search $PATH.
5566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5567$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5568        # Extract the first word of "$tool_basename", so it can be a program name with args.
5569set dummy $tool_basename; ac_word=$2
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
5572if ${ac_cv_path_CP+:} false; then :
5573  $as_echo_n "(cached) " >&6
5574else
5575  case $CP in
5576  [\\/]* | ?:[\\/]*)
5577  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5578  ;;
5579  *)
5580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581for as_dir in $PATH
5582do
5583  IFS=$as_save_IFS
5584  test -z "$as_dir" && as_dir=.
5585    for ac_exec_ext in '' $ac_executable_extensions; do
5586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5587    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5589    break 2
5590  fi
5591done
5592  done
5593IFS=$as_save_IFS
5594
5595  ;;
5596esac
5597fi
5598CP=$ac_cv_path_CP
5599if test -n "$CP"; then
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5601$as_echo "$CP" >&6; }
5602else
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605fi
5606
5607
5608        if test "x$CP" = x; then
5609          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5610        fi
5611      else
5612        # Otherwise we believe it is a complete path. Use it as it is.
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5614$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5616$as_echo_n "checking for CP... " >&6; }
5617        if test ! -x "$tool_specified"; then
5618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5619$as_echo "not found" >&6; }
5620          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5621        fi
5622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5623$as_echo "$tool_specified" >&6; }
5624      fi
5625    fi
5626  fi
5627
5628
5629
5630  if test "x$CP" = x; then
5631    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5632  fi
5633
5634
5635
5636
5637
5638  # Publish this variable in the help.
5639
5640
5641  if test "x$CPIO" = x; then
5642    # The variable is not set by user, try to locate tool using the code snippet
5643    for ac_prog in cpio
5644do
5645  # Extract the first word of "$ac_prog", so it can be a program name with args.
5646set dummy $ac_prog; ac_word=$2
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648$as_echo_n "checking for $ac_word... " >&6; }
5649if ${ac_cv_path_CPIO+:} false; then :
5650  $as_echo_n "(cached) " >&6
5651else
5652  case $CPIO in
5653  [\\/]* | ?:[\\/]*)
5654  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5655  ;;
5656  *)
5657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658for as_dir in $PATH
5659do
5660  IFS=$as_save_IFS
5661  test -z "$as_dir" && as_dir=.
5662    for ac_exec_ext in '' $ac_executable_extensions; do
5663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5664    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666    break 2
5667  fi
5668done
5669  done
5670IFS=$as_save_IFS
5671
5672  ;;
5673esac
5674fi
5675CPIO=$ac_cv_path_CPIO
5676if test -n "$CPIO"; then
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5678$as_echo "$CPIO" >&6; }
5679else
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681$as_echo "no" >&6; }
5682fi
5683
5684
5685  test -n "$CPIO" && break
5686done
5687
5688  else
5689    # The variable is set, but is it from the command line or the environment?
5690
5691    # Try to remove the string !CPIO! from our list.
5692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5694      # If it failed, the variable was not from the command line. Ignore it,
5695      # but warn the user (except for BASH, which is always set by the calling BASH).
5696      if test "xCPIO" != xBASH; then
5697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5698$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5699      fi
5700      # Try to locate tool using the code snippet
5701      for ac_prog in cpio
5702do
5703  # Extract the first word of "$ac_prog", so it can be a program name with args.
5704set dummy $ac_prog; ac_word=$2
5705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5706$as_echo_n "checking for $ac_word... " >&6; }
5707if ${ac_cv_path_CPIO+:} false; then :
5708  $as_echo_n "(cached) " >&6
5709else
5710  case $CPIO in
5711  [\\/]* | ?:[\\/]*)
5712  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5713  ;;
5714  *)
5715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718  IFS=$as_save_IFS
5719  test -z "$as_dir" && as_dir=.
5720    for ac_exec_ext in '' $ac_executable_extensions; do
5721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5722    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5724    break 2
5725  fi
5726done
5727  done
5728IFS=$as_save_IFS
5729
5730  ;;
5731esac
5732fi
5733CPIO=$ac_cv_path_CPIO
5734if test -n "$CPIO"; then
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5736$as_echo "$CPIO" >&6; }
5737else
5738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
5740fi
5741
5742
5743  test -n "$CPIO" && break
5744done
5745
5746    else
5747      # If it succeeded, then it was overridden by the user. We will use it
5748      # for the tool.
5749
5750      # First remove it from the list of overridden variables, so we can test
5751      # for unknown variables in the end.
5752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5753
5754      # Check if the provided tool contains a complete path.
5755      tool_specified="$CPIO"
5756      tool_basename="${tool_specified##*/}"
5757      if test "x$tool_basename" = "x$tool_specified"; then
5758        # A command without a complete path is provided, search $PATH.
5759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5760$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5761        # Extract the first word of "$tool_basename", so it can be a program name with args.
5762set dummy $tool_basename; ac_word=$2
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5764$as_echo_n "checking for $ac_word... " >&6; }
5765if ${ac_cv_path_CPIO+:} false; then :
5766  $as_echo_n "(cached) " >&6
5767else
5768  case $CPIO in
5769  [\\/]* | ?:[\\/]*)
5770  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5771  ;;
5772  *)
5773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774for as_dir in $PATH
5775do
5776  IFS=$as_save_IFS
5777  test -z "$as_dir" && as_dir=.
5778    for ac_exec_ext in '' $ac_executable_extensions; do
5779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5780    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5782    break 2
5783  fi
5784done
5785  done
5786IFS=$as_save_IFS
5787
5788  ;;
5789esac
5790fi
5791CPIO=$ac_cv_path_CPIO
5792if test -n "$CPIO"; then
5793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5794$as_echo "$CPIO" >&6; }
5795else
5796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797$as_echo "no" >&6; }
5798fi
5799
5800
5801        if test "x$CPIO" = x; then
5802          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5803        fi
5804      else
5805        # Otherwise we believe it is a complete path. Use it as it is.
5806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5807$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5809$as_echo_n "checking for CPIO... " >&6; }
5810        if test ! -x "$tool_specified"; then
5811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5812$as_echo "not found" >&6; }
5813          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5814        fi
5815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5816$as_echo "$tool_specified" >&6; }
5817      fi
5818    fi
5819  fi
5820
5821
5822
5823  if test "x$CPIO" = x; then
5824    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5825  fi
5826
5827
5828
5829
5830
5831  # Publish this variable in the help.
5832
5833
5834  if test "x$CUT" = x; then
5835    # The variable is not set by user, try to locate tool using the code snippet
5836    for ac_prog in cut
5837do
5838  # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_path_CUT+:} false; then :
5843  $as_echo_n "(cached) " >&6
5844else
5845  case $CUT in
5846  [\\/]* | ?:[\\/]*)
5847  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5848  ;;
5849  *)
5850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853  IFS=$as_save_IFS
5854  test -z "$as_dir" && as_dir=.
5855    for ac_exec_ext in '' $ac_executable_extensions; do
5856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859    break 2
5860  fi
5861done
5862  done
5863IFS=$as_save_IFS
5864
5865  ;;
5866esac
5867fi
5868CUT=$ac_cv_path_CUT
5869if test -n "$CUT"; then
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5871$as_echo "$CUT" >&6; }
5872else
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
5875fi
5876
5877
5878  test -n "$CUT" && break
5879done
5880
5881  else
5882    # The variable is set, but is it from the command line or the environment?
5883
5884    # Try to remove the string !CUT! from our list.
5885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5887      # If it failed, the variable was not from the command line. Ignore it,
5888      # but warn the user (except for BASH, which is always set by the calling BASH).
5889      if test "xCUT" != xBASH; then
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5891$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5892      fi
5893      # Try to locate tool using the code snippet
5894      for ac_prog in cut
5895do
5896  # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_CUT+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $CUT in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926CUT=$ac_cv_path_CUT
5927if test -n "$CUT"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5929$as_echo "$CUT" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936  test -n "$CUT" && break
5937done
5938
5939    else
5940      # If it succeeded, then it was overridden by the user. We will use it
5941      # for the tool.
5942
5943      # First remove it from the list of overridden variables, so we can test
5944      # for unknown variables in the end.
5945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5946
5947      # Check if the provided tool contains a complete path.
5948      tool_specified="$CUT"
5949      tool_basename="${tool_specified##*/}"
5950      if test "x$tool_basename" = "x$tool_specified"; then
5951        # A command without a complete path is provided, search $PATH.
5952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5953$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5954        # Extract the first word of "$tool_basename", so it can be a program name with args.
5955set dummy $tool_basename; ac_word=$2
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5957$as_echo_n "checking for $ac_word... " >&6; }
5958if ${ac_cv_path_CUT+:} false; then :
5959  $as_echo_n "(cached) " >&6
5960else
5961  case $CUT in
5962  [\\/]* | ?:[\\/]*)
5963  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5964  ;;
5965  *)
5966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969  IFS=$as_save_IFS
5970  test -z "$as_dir" && as_dir=.
5971    for ac_exec_ext in '' $ac_executable_extensions; do
5972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5973    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975    break 2
5976  fi
5977done
5978  done
5979IFS=$as_save_IFS
5980
5981  ;;
5982esac
5983fi
5984CUT=$ac_cv_path_CUT
5985if test -n "$CUT"; then
5986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5987$as_echo "$CUT" >&6; }
5988else
5989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990$as_echo "no" >&6; }
5991fi
5992
5993
5994        if test "x$CUT" = x; then
5995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5996        fi
5997      else
5998        # Otherwise we believe it is a complete path. Use it as it is.
5999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6000$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6002$as_echo_n "checking for CUT... " >&6; }
6003        if test ! -x "$tool_specified"; then
6004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6005$as_echo "not found" >&6; }
6006          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6007        fi
6008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6009$as_echo "$tool_specified" >&6; }
6010      fi
6011    fi
6012  fi
6013
6014
6015
6016  if test "x$CUT" = x; then
6017    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6018  fi
6019
6020
6021
6022
6023
6024  # Publish this variable in the help.
6025
6026
6027  if test "x$DATE" = x; then
6028    # The variable is not set by user, try to locate tool using the code snippet
6029    for ac_prog in date
6030do
6031  # Extract the first word of "$ac_prog", so it can be a program name with args.
6032set dummy $ac_prog; ac_word=$2
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
6035if ${ac_cv_path_DATE+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  case $DATE in
6039  [\\/]* | ?:[\\/]*)
6040  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6041  ;;
6042  *)
6043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046  IFS=$as_save_IFS
6047  test -z "$as_dir" && as_dir=.
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052    break 2
6053  fi
6054done
6055  done
6056IFS=$as_save_IFS
6057
6058  ;;
6059esac
6060fi
6061DATE=$ac_cv_path_DATE
6062if test -n "$DATE"; then
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6064$as_echo "$DATE" >&6; }
6065else
6066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071  test -n "$DATE" && break
6072done
6073
6074  else
6075    # The variable is set, but is it from the command line or the environment?
6076
6077    # Try to remove the string !DATE! from our list.
6078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6080      # If it failed, the variable was not from the command line. Ignore it,
6081      # but warn the user (except for BASH, which is always set by the calling BASH).
6082      if test "xDATE" != xBASH; then
6083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6084$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6085      fi
6086      # Try to locate tool using the code snippet
6087      for ac_prog in date
6088do
6089  # Extract the first word of "$ac_prog", so it can be a program name with args.
6090set dummy $ac_prog; ac_word=$2
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092$as_echo_n "checking for $ac_word... " >&6; }
6093if ${ac_cv_path_DATE+:} false; then :
6094  $as_echo_n "(cached) " >&6
6095else
6096  case $DATE in
6097  [\\/]* | ?:[\\/]*)
6098  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6099  ;;
6100  *)
6101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104  IFS=$as_save_IFS
6105  test -z "$as_dir" && as_dir=.
6106    for ac_exec_ext in '' $ac_executable_extensions; do
6107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6108    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110    break 2
6111  fi
6112done
6113  done
6114IFS=$as_save_IFS
6115
6116  ;;
6117esac
6118fi
6119DATE=$ac_cv_path_DATE
6120if test -n "$DATE"; then
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6122$as_echo "$DATE" >&6; }
6123else
6124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125$as_echo "no" >&6; }
6126fi
6127
6128
6129  test -n "$DATE" && break
6130done
6131
6132    else
6133      # If it succeeded, then it was overridden by the user. We will use it
6134      # for the tool.
6135
6136      # First remove it from the list of overridden variables, so we can test
6137      # for unknown variables in the end.
6138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6139
6140      # Check if the provided tool contains a complete path.
6141      tool_specified="$DATE"
6142      tool_basename="${tool_specified##*/}"
6143      if test "x$tool_basename" = "x$tool_specified"; then
6144        # A command without a complete path is provided, search $PATH.
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6146$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6147        # Extract the first word of "$tool_basename", so it can be a program name with args.
6148set dummy $tool_basename; ac_word=$2
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150$as_echo_n "checking for $ac_word... " >&6; }
6151if ${ac_cv_path_DATE+:} false; then :
6152  $as_echo_n "(cached) " >&6
6153else
6154  case $DATE in
6155  [\\/]* | ?:[\\/]*)
6156  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6157  ;;
6158  *)
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_exec_ext in '' $ac_executable_extensions; do
6165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168    break 2
6169  fi
6170done
6171  done
6172IFS=$as_save_IFS
6173
6174  ;;
6175esac
6176fi
6177DATE=$ac_cv_path_DATE
6178if test -n "$DATE"; then
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6180$as_echo "$DATE" >&6; }
6181else
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
6184fi
6185
6186
6187        if test "x$DATE" = x; then
6188          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6189        fi
6190      else
6191        # Otherwise we believe it is a complete path. Use it as it is.
6192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6193$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6195$as_echo_n "checking for DATE... " >&6; }
6196        if test ! -x "$tool_specified"; then
6197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6198$as_echo "not found" >&6; }
6199          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6200        fi
6201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6202$as_echo "$tool_specified" >&6; }
6203      fi
6204    fi
6205  fi
6206
6207
6208
6209  if test "x$DATE" = x; then
6210    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6211  fi
6212
6213
6214
6215
6216
6217  # Publish this variable in the help.
6218
6219
6220  if test "x$DIFF" = x; then
6221    # The variable is not set by user, try to locate tool using the code snippet
6222    for ac_prog in gdiff diff
6223do
6224  # Extract the first word of "$ac_prog", so it can be a program name with args.
6225set dummy $ac_prog; ac_word=$2
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227$as_echo_n "checking for $ac_word... " >&6; }
6228if ${ac_cv_path_DIFF+:} false; then :
6229  $as_echo_n "(cached) " >&6
6230else
6231  case $DIFF in
6232  [\\/]* | ?:[\\/]*)
6233  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6234  ;;
6235  *)
6236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239  IFS=$as_save_IFS
6240  test -z "$as_dir" && as_dir=.
6241    for ac_exec_ext in '' $ac_executable_extensions; do
6242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6243    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245    break 2
6246  fi
6247done
6248  done
6249IFS=$as_save_IFS
6250
6251  ;;
6252esac
6253fi
6254DIFF=$ac_cv_path_DIFF
6255if test -n "$DIFF"; then
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6257$as_echo "$DIFF" >&6; }
6258else
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260$as_echo "no" >&6; }
6261fi
6262
6263
6264  test -n "$DIFF" && break
6265done
6266
6267  else
6268    # The variable is set, but is it from the command line or the environment?
6269
6270    # Try to remove the string !DIFF! from our list.
6271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6273      # If it failed, the variable was not from the command line. Ignore it,
6274      # but warn the user (except for BASH, which is always set by the calling BASH).
6275      if test "xDIFF" != xBASH; then
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6277$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6278      fi
6279      # Try to locate tool using the code snippet
6280      for ac_prog in gdiff diff
6281do
6282  # Extract the first word of "$ac_prog", so it can be a program name with args.
6283set dummy $ac_prog; ac_word=$2
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285$as_echo_n "checking for $ac_word... " >&6; }
6286if ${ac_cv_path_DIFF+:} false; then :
6287  $as_echo_n "(cached) " >&6
6288else
6289  case $DIFF in
6290  [\\/]* | ?:[\\/]*)
6291  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6292  ;;
6293  *)
6294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295for as_dir in $PATH
6296do
6297  IFS=$as_save_IFS
6298  test -z "$as_dir" && as_dir=.
6299    for ac_exec_ext in '' $ac_executable_extensions; do
6300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6303    break 2
6304  fi
6305done
6306  done
6307IFS=$as_save_IFS
6308
6309  ;;
6310esac
6311fi
6312DIFF=$ac_cv_path_DIFF
6313if test -n "$DIFF"; then
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6315$as_echo "$DIFF" >&6; }
6316else
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
6319fi
6320
6321
6322  test -n "$DIFF" && break
6323done
6324
6325    else
6326      # If it succeeded, then it was overridden by the user. We will use it
6327      # for the tool.
6328
6329      # First remove it from the list of overridden variables, so we can test
6330      # for unknown variables in the end.
6331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6332
6333      # Check if the provided tool contains a complete path.
6334      tool_specified="$DIFF"
6335      tool_basename="${tool_specified##*/}"
6336      if test "x$tool_basename" = "x$tool_specified"; then
6337        # A command without a complete path is provided, search $PATH.
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6339$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6340        # Extract the first word of "$tool_basename", so it can be a program name with args.
6341set dummy $tool_basename; ac_word=$2
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6343$as_echo_n "checking for $ac_word... " >&6; }
6344if ${ac_cv_path_DIFF+:} false; then :
6345  $as_echo_n "(cached) " >&6
6346else
6347  case $DIFF in
6348  [\\/]* | ?:[\\/]*)
6349  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6350  ;;
6351  *)
6352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6353for as_dir in $PATH
6354do
6355  IFS=$as_save_IFS
6356  test -z "$as_dir" && as_dir=.
6357    for ac_exec_ext in '' $ac_executable_extensions; do
6358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6359    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6361    break 2
6362  fi
6363done
6364  done
6365IFS=$as_save_IFS
6366
6367  ;;
6368esac
6369fi
6370DIFF=$ac_cv_path_DIFF
6371if test -n "$DIFF"; then
6372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6373$as_echo "$DIFF" >&6; }
6374else
6375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376$as_echo "no" >&6; }
6377fi
6378
6379
6380        if test "x$DIFF" = x; then
6381          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6382        fi
6383      else
6384        # Otherwise we believe it is a complete path. Use it as it is.
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6386$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6388$as_echo_n "checking for DIFF... " >&6; }
6389        if test ! -x "$tool_specified"; then
6390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6391$as_echo "not found" >&6; }
6392          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6393        fi
6394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6395$as_echo "$tool_specified" >&6; }
6396      fi
6397    fi
6398  fi
6399
6400
6401
6402  if test "x$DIFF" = x; then
6403    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6404  fi
6405
6406
6407
6408
6409
6410  # Publish this variable in the help.
6411
6412
6413  if test "x$DIRNAME" = x; then
6414    # The variable is not set by user, try to locate tool using the code snippet
6415    for ac_prog in dirname
6416do
6417  # Extract the first word of "$ac_prog", so it can be a program name with args.
6418set dummy $ac_prog; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if ${ac_cv_path_DIRNAME+:} false; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $DIRNAME in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6436    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447DIRNAME=$ac_cv_path_DIRNAME
6448if test -n "$DIRNAME"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6450$as_echo "$DIRNAME" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457  test -n "$DIRNAME" && break
6458done
6459
6460  else
6461    # The variable is set, but is it from the command line or the environment?
6462
6463    # Try to remove the string !DIRNAME! from our list.
6464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6466      # If it failed, the variable was not from the command line. Ignore it,
6467      # but warn the user (except for BASH, which is always set by the calling BASH).
6468      if test "xDIRNAME" != xBASH; then
6469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6470$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6471      fi
6472      # Try to locate tool using the code snippet
6473      for ac_prog in dirname
6474do
6475  # Extract the first word of "$ac_prog", so it can be a program name with args.
6476set dummy $ac_prog; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if ${ac_cv_path_DIRNAME+:} false; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $DIRNAME in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505DIRNAME=$ac_cv_path_DIRNAME
6506if test -n "$DIRNAME"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6508$as_echo "$DIRNAME" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515  test -n "$DIRNAME" && break
6516done
6517
6518    else
6519      # If it succeeded, then it was overridden by the user. We will use it
6520      # for the tool.
6521
6522      # First remove it from the list of overridden variables, so we can test
6523      # for unknown variables in the end.
6524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6525
6526      # Check if the provided tool contains a complete path.
6527      tool_specified="$DIRNAME"
6528      tool_basename="${tool_specified##*/}"
6529      if test "x$tool_basename" = "x$tool_specified"; then
6530        # A command without a complete path is provided, search $PATH.
6531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6532$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6533        # Extract the first word of "$tool_basename", so it can be a program name with args.
6534set dummy $tool_basename; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_DIRNAME+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $DIRNAME in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563DIRNAME=$ac_cv_path_DIRNAME
6564if test -n "$DIRNAME"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6566$as_echo "$DIRNAME" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573        if test "x$DIRNAME" = x; then
6574          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6575        fi
6576      else
6577        # Otherwise we believe it is a complete path. Use it as it is.
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6579$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6581$as_echo_n "checking for DIRNAME... " >&6; }
6582        if test ! -x "$tool_specified"; then
6583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6584$as_echo "not found" >&6; }
6585          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6586        fi
6587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6588$as_echo "$tool_specified" >&6; }
6589      fi
6590    fi
6591  fi
6592
6593
6594
6595  if test "x$DIRNAME" = x; then
6596    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6597  fi
6598
6599
6600
6601
6602
6603  # Publish this variable in the help.
6604
6605
6606  if test "x$ECHO" = x; then
6607    # The variable is not set by user, try to locate tool using the code snippet
6608    for ac_prog in echo
6609do
6610  # Extract the first word of "$ac_prog", so it can be a program name with args.
6611set dummy $ac_prog; ac_word=$2
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613$as_echo_n "checking for $ac_word... " >&6; }
6614if ${ac_cv_path_ECHO+:} false; then :
6615  $as_echo_n "(cached) " >&6
6616else
6617  case $ECHO in
6618  [\\/]* | ?:[\\/]*)
6619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6620  ;;
6621  *)
6622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6623for as_dir in $PATH
6624do
6625  IFS=$as_save_IFS
6626  test -z "$as_dir" && as_dir=.
6627    for ac_exec_ext in '' $ac_executable_extensions; do
6628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6631    break 2
6632  fi
6633done
6634  done
6635IFS=$as_save_IFS
6636
6637  ;;
6638esac
6639fi
6640ECHO=$ac_cv_path_ECHO
6641if test -n "$ECHO"; then
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6643$as_echo "$ECHO" >&6; }
6644else
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646$as_echo "no" >&6; }
6647fi
6648
6649
6650  test -n "$ECHO" && break
6651done
6652
6653  else
6654    # The variable is set, but is it from the command line or the environment?
6655
6656    # Try to remove the string !ECHO! from our list.
6657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6659      # If it failed, the variable was not from the command line. Ignore it,
6660      # but warn the user (except for BASH, which is always set by the calling BASH).
6661      if test "xECHO" != xBASH; then
6662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6663$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6664      fi
6665      # Try to locate tool using the code snippet
6666      for ac_prog in echo
6667do
6668  # Extract the first word of "$ac_prog", so it can be a program name with args.
6669set dummy $ac_prog; ac_word=$2
6670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671$as_echo_n "checking for $ac_word... " >&6; }
6672if ${ac_cv_path_ECHO+:} false; then :
6673  $as_echo_n "(cached) " >&6
6674else
6675  case $ECHO in
6676  [\\/]* | ?:[\\/]*)
6677  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6678  ;;
6679  *)
6680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681for as_dir in $PATH
6682do
6683  IFS=$as_save_IFS
6684  test -z "$as_dir" && as_dir=.
6685    for ac_exec_ext in '' $ac_executable_extensions; do
6686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6687    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6689    break 2
6690  fi
6691done
6692  done
6693IFS=$as_save_IFS
6694
6695  ;;
6696esac
6697fi
6698ECHO=$ac_cv_path_ECHO
6699if test -n "$ECHO"; then
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6701$as_echo "$ECHO" >&6; }
6702else
6703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6704$as_echo "no" >&6; }
6705fi
6706
6707
6708  test -n "$ECHO" && break
6709done
6710
6711    else
6712      # If it succeeded, then it was overridden by the user. We will use it
6713      # for the tool.
6714
6715      # First remove it from the list of overridden variables, so we can test
6716      # for unknown variables in the end.
6717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6718
6719      # Check if the provided tool contains a complete path.
6720      tool_specified="$ECHO"
6721      tool_basename="${tool_specified##*/}"
6722      if test "x$tool_basename" = "x$tool_specified"; then
6723        # A command without a complete path is provided, search $PATH.
6724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6725$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6726        # Extract the first word of "$tool_basename", so it can be a program name with args.
6727set dummy $tool_basename; ac_word=$2
6728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6729$as_echo_n "checking for $ac_word... " >&6; }
6730if ${ac_cv_path_ECHO+:} false; then :
6731  $as_echo_n "(cached) " >&6
6732else
6733  case $ECHO in
6734  [\\/]* | ?:[\\/]*)
6735  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6736  ;;
6737  *)
6738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6739for as_dir in $PATH
6740do
6741  IFS=$as_save_IFS
6742  test -z "$as_dir" && as_dir=.
6743    for ac_exec_ext in '' $ac_executable_extensions; do
6744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6745    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6747    break 2
6748  fi
6749done
6750  done
6751IFS=$as_save_IFS
6752
6753  ;;
6754esac
6755fi
6756ECHO=$ac_cv_path_ECHO
6757if test -n "$ECHO"; then
6758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6759$as_echo "$ECHO" >&6; }
6760else
6761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762$as_echo "no" >&6; }
6763fi
6764
6765
6766        if test "x$ECHO" = x; then
6767          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6768        fi
6769      else
6770        # Otherwise we believe it is a complete path. Use it as it is.
6771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6772$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6774$as_echo_n "checking for ECHO... " >&6; }
6775        if test ! -x "$tool_specified"; then
6776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6777$as_echo "not found" >&6; }
6778          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6779        fi
6780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6781$as_echo "$tool_specified" >&6; }
6782      fi
6783    fi
6784  fi
6785
6786
6787
6788  if test "x$ECHO" = x; then
6789    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6790  fi
6791
6792
6793
6794
6795
6796  # Publish this variable in the help.
6797
6798
6799  if test "x$EXPR" = x; then
6800    # The variable is not set by user, try to locate tool using the code snippet
6801    for ac_prog in expr
6802do
6803  # Extract the first word of "$ac_prog", so it can be a program name with args.
6804set dummy $ac_prog; ac_word=$2
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806$as_echo_n "checking for $ac_word... " >&6; }
6807if ${ac_cv_path_EXPR+:} false; then :
6808  $as_echo_n "(cached) " >&6
6809else
6810  case $EXPR in
6811  [\\/]* | ?:[\\/]*)
6812  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6813  ;;
6814  *)
6815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816for as_dir in $PATH
6817do
6818  IFS=$as_save_IFS
6819  test -z "$as_dir" && as_dir=.
6820    for ac_exec_ext in '' $ac_executable_extensions; do
6821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824    break 2
6825  fi
6826done
6827  done
6828IFS=$as_save_IFS
6829
6830  ;;
6831esac
6832fi
6833EXPR=$ac_cv_path_EXPR
6834if test -n "$EXPR"; then
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6836$as_echo "$EXPR" >&6; }
6837else
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
6842
6843  test -n "$EXPR" && break
6844done
6845
6846  else
6847    # The variable is set, but is it from the command line or the environment?
6848
6849    # Try to remove the string !EXPR! from our list.
6850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6852      # If it failed, the variable was not from the command line. Ignore it,
6853      # but warn the user (except for BASH, which is always set by the calling BASH).
6854      if test "xEXPR" != xBASH; then
6855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6856$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6857      fi
6858      # Try to locate tool using the code snippet
6859      for ac_prog in expr
6860do
6861  # Extract the first word of "$ac_prog", so it can be a program name with args.
6862set dummy $ac_prog; ac_word=$2
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6864$as_echo_n "checking for $ac_word... " >&6; }
6865if ${ac_cv_path_EXPR+:} false; then :
6866  $as_echo_n "(cached) " >&6
6867else
6868  case $EXPR in
6869  [\\/]* | ?:[\\/]*)
6870  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6871  ;;
6872  *)
6873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6874for as_dir in $PATH
6875do
6876  IFS=$as_save_IFS
6877  test -z "$as_dir" && as_dir=.
6878    for ac_exec_ext in '' $ac_executable_extensions; do
6879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6880    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6882    break 2
6883  fi
6884done
6885  done
6886IFS=$as_save_IFS
6887
6888  ;;
6889esac
6890fi
6891EXPR=$ac_cv_path_EXPR
6892if test -n "$EXPR"; then
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6894$as_echo "$EXPR" >&6; }
6895else
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897$as_echo "no" >&6; }
6898fi
6899
6900
6901  test -n "$EXPR" && break
6902done
6903
6904    else
6905      # If it succeeded, then it was overridden by the user. We will use it
6906      # for the tool.
6907
6908      # First remove it from the list of overridden variables, so we can test
6909      # for unknown variables in the end.
6910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6911
6912      # Check if the provided tool contains a complete path.
6913      tool_specified="$EXPR"
6914      tool_basename="${tool_specified##*/}"
6915      if test "x$tool_basename" = "x$tool_specified"; then
6916        # A command without a complete path is provided, search $PATH.
6917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6918$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6919        # Extract the first word of "$tool_basename", so it can be a program name with args.
6920set dummy $tool_basename; ac_word=$2
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6922$as_echo_n "checking for $ac_word... " >&6; }
6923if ${ac_cv_path_EXPR+:} false; then :
6924  $as_echo_n "(cached) " >&6
6925else
6926  case $EXPR in
6927  [\\/]* | ?:[\\/]*)
6928  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6929  ;;
6930  *)
6931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6932for as_dir in $PATH
6933do
6934  IFS=$as_save_IFS
6935  test -z "$as_dir" && as_dir=.
6936    for ac_exec_ext in '' $ac_executable_extensions; do
6937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6938    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6940    break 2
6941  fi
6942done
6943  done
6944IFS=$as_save_IFS
6945
6946  ;;
6947esac
6948fi
6949EXPR=$ac_cv_path_EXPR
6950if test -n "$EXPR"; then
6951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6952$as_echo "$EXPR" >&6; }
6953else
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6955$as_echo "no" >&6; }
6956fi
6957
6958
6959        if test "x$EXPR" = x; then
6960          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6961        fi
6962      else
6963        # Otherwise we believe it is a complete path. Use it as it is.
6964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6965$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6967$as_echo_n "checking for EXPR... " >&6; }
6968        if test ! -x "$tool_specified"; then
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6970$as_echo "not found" >&6; }
6971          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6972        fi
6973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6974$as_echo "$tool_specified" >&6; }
6975      fi
6976    fi
6977  fi
6978
6979
6980
6981  if test "x$EXPR" = x; then
6982    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6983  fi
6984
6985
6986
6987
6988
6989  # Publish this variable in the help.
6990
6991
6992  if test "x$FILE" = x; then
6993    # The variable is not set by user, try to locate tool using the code snippet
6994    for ac_prog in file
6995do
6996  # Extract the first word of "$ac_prog", so it can be a program name with args.
6997set dummy $ac_prog; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_FILE+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $FILE in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026FILE=$ac_cv_path_FILE
7027if test -n "$FILE"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7029$as_echo "$FILE" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035
7036  test -n "$FILE" && break
7037done
7038
7039  else
7040    # The variable is set, but is it from the command line or the environment?
7041
7042    # Try to remove the string !FILE! from our list.
7043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7045      # If it failed, the variable was not from the command line. Ignore it,
7046      # but warn the user (except for BASH, which is always set by the calling BASH).
7047      if test "xFILE" != xBASH; then
7048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7049$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7050      fi
7051      # Try to locate tool using the code snippet
7052      for ac_prog in file
7053do
7054  # Extract the first word of "$ac_prog", so it can be a program name with args.
7055set dummy $ac_prog; ac_word=$2
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7057$as_echo_n "checking for $ac_word... " >&6; }
7058if ${ac_cv_path_FILE+:} false; then :
7059  $as_echo_n "(cached) " >&6
7060else
7061  case $FILE in
7062  [\\/]* | ?:[\\/]*)
7063  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7064  ;;
7065  *)
7066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067for as_dir in $PATH
7068do
7069  IFS=$as_save_IFS
7070  test -z "$as_dir" && as_dir=.
7071    for ac_exec_ext in '' $ac_executable_extensions; do
7072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7073    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7075    break 2
7076  fi
7077done
7078  done
7079IFS=$as_save_IFS
7080
7081  ;;
7082esac
7083fi
7084FILE=$ac_cv_path_FILE
7085if test -n "$FILE"; then
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7087$as_echo "$FILE" >&6; }
7088else
7089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7090$as_echo "no" >&6; }
7091fi
7092
7093
7094  test -n "$FILE" && break
7095done
7096
7097    else
7098      # If it succeeded, then it was overridden by the user. We will use it
7099      # for the tool.
7100
7101      # First remove it from the list of overridden variables, so we can test
7102      # for unknown variables in the end.
7103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7104
7105      # Check if the provided tool contains a complete path.
7106      tool_specified="$FILE"
7107      tool_basename="${tool_specified##*/}"
7108      if test "x$tool_basename" = "x$tool_specified"; then
7109        # A command without a complete path is provided, search $PATH.
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7111$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7112        # Extract the first word of "$tool_basename", so it can be a program name with args.
7113set dummy $tool_basename; ac_word=$2
7114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7115$as_echo_n "checking for $ac_word... " >&6; }
7116if ${ac_cv_path_FILE+:} false; then :
7117  $as_echo_n "(cached) " >&6
7118else
7119  case $FILE in
7120  [\\/]* | ?:[\\/]*)
7121  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7122  ;;
7123  *)
7124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7125for as_dir in $PATH
7126do
7127  IFS=$as_save_IFS
7128  test -z "$as_dir" && as_dir=.
7129    for ac_exec_ext in '' $ac_executable_extensions; do
7130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7131    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7133    break 2
7134  fi
7135done
7136  done
7137IFS=$as_save_IFS
7138
7139  ;;
7140esac
7141fi
7142FILE=$ac_cv_path_FILE
7143if test -n "$FILE"; then
7144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7145$as_echo "$FILE" >&6; }
7146else
7147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148$as_echo "no" >&6; }
7149fi
7150
7151
7152        if test "x$FILE" = x; then
7153          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7154        fi
7155      else
7156        # Otherwise we believe it is a complete path. Use it as it is.
7157        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7158$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7160$as_echo_n "checking for FILE... " >&6; }
7161        if test ! -x "$tool_specified"; then
7162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7163$as_echo "not found" >&6; }
7164          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7165        fi
7166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7167$as_echo "$tool_specified" >&6; }
7168      fi
7169    fi
7170  fi
7171
7172
7173
7174  if test "x$FILE" = x; then
7175    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7176  fi
7177
7178
7179
7180
7181
7182  # Publish this variable in the help.
7183
7184
7185  if test "x$FIND" = x; then
7186    # The variable is not set by user, try to locate tool using the code snippet
7187    for ac_prog in find
7188do
7189  # Extract the first word of "$ac_prog", so it can be a program name with args.
7190set dummy $ac_prog; ac_word=$2
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192$as_echo_n "checking for $ac_word... " >&6; }
7193if ${ac_cv_path_FIND+:} false; then :
7194  $as_echo_n "(cached) " >&6
7195else
7196  case $FIND in
7197  [\\/]* | ?:[\\/]*)
7198  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7199  ;;
7200  *)
7201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202for as_dir in $PATH
7203do
7204  IFS=$as_save_IFS
7205  test -z "$as_dir" && as_dir=.
7206    for ac_exec_ext in '' $ac_executable_extensions; do
7207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210    break 2
7211  fi
7212done
7213  done
7214IFS=$as_save_IFS
7215
7216  ;;
7217esac
7218fi
7219FIND=$ac_cv_path_FIND
7220if test -n "$FIND"; then
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7222$as_echo "$FIND" >&6; }
7223else
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225$as_echo "no" >&6; }
7226fi
7227
7228
7229  test -n "$FIND" && break
7230done
7231
7232  else
7233    # The variable is set, but is it from the command line or the environment?
7234
7235    # Try to remove the string !FIND! from our list.
7236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7238      # If it failed, the variable was not from the command line. Ignore it,
7239      # but warn the user (except for BASH, which is always set by the calling BASH).
7240      if test "xFIND" != xBASH; then
7241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7242$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7243      fi
7244      # Try to locate tool using the code snippet
7245      for ac_prog in find
7246do
7247  # Extract the first word of "$ac_prog", so it can be a program name with args.
7248set dummy $ac_prog; ac_word=$2
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250$as_echo_n "checking for $ac_word... " >&6; }
7251if ${ac_cv_path_FIND+:} false; then :
7252  $as_echo_n "(cached) " >&6
7253else
7254  case $FIND in
7255  [\\/]* | ?:[\\/]*)
7256  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7257  ;;
7258  *)
7259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262  IFS=$as_save_IFS
7263  test -z "$as_dir" && as_dir=.
7264    for ac_exec_ext in '' $ac_executable_extensions; do
7265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268    break 2
7269  fi
7270done
7271  done
7272IFS=$as_save_IFS
7273
7274  ;;
7275esac
7276fi
7277FIND=$ac_cv_path_FIND
7278if test -n "$FIND"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7280$as_echo "$FIND" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287  test -n "$FIND" && break
7288done
7289
7290    else
7291      # If it succeeded, then it was overridden by the user. We will use it
7292      # for the tool.
7293
7294      # First remove it from the list of overridden variables, so we can test
7295      # for unknown variables in the end.
7296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7297
7298      # Check if the provided tool contains a complete path.
7299      tool_specified="$FIND"
7300      tool_basename="${tool_specified##*/}"
7301      if test "x$tool_basename" = "x$tool_specified"; then
7302        # A command without a complete path is provided, search $PATH.
7303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7304$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7305        # Extract the first word of "$tool_basename", so it can be a program name with args.
7306set dummy $tool_basename; ac_word=$2
7307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7308$as_echo_n "checking for $ac_word... " >&6; }
7309if ${ac_cv_path_FIND+:} false; then :
7310  $as_echo_n "(cached) " >&6
7311else
7312  case $FIND in
7313  [\\/]* | ?:[\\/]*)
7314  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7315  ;;
7316  *)
7317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7318for as_dir in $PATH
7319do
7320  IFS=$as_save_IFS
7321  test -z "$as_dir" && as_dir=.
7322    for ac_exec_ext in '' $ac_executable_extensions; do
7323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7324    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7326    break 2
7327  fi
7328done
7329  done
7330IFS=$as_save_IFS
7331
7332  ;;
7333esac
7334fi
7335FIND=$ac_cv_path_FIND
7336if test -n "$FIND"; then
7337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7338$as_echo "$FIND" >&6; }
7339else
7340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7341$as_echo "no" >&6; }
7342fi
7343
7344
7345        if test "x$FIND" = x; then
7346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7347        fi
7348      else
7349        # Otherwise we believe it is a complete path. Use it as it is.
7350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7351$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7353$as_echo_n "checking for FIND... " >&6; }
7354        if test ! -x "$tool_specified"; then
7355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7356$as_echo "not found" >&6; }
7357          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7358        fi
7359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7360$as_echo "$tool_specified" >&6; }
7361      fi
7362    fi
7363  fi
7364
7365
7366
7367  if test "x$FIND" = x; then
7368    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7369  fi
7370
7371
7372
7373
7374
7375  # Publish this variable in the help.
7376
7377
7378  if test "x$HEAD" = x; then
7379    # The variable is not set by user, try to locate tool using the code snippet
7380    for ac_prog in head
7381do
7382  # Extract the first word of "$ac_prog", so it can be a program name with args.
7383set dummy $ac_prog; ac_word=$2
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385$as_echo_n "checking for $ac_word... " >&6; }
7386if ${ac_cv_path_HEAD+:} false; then :
7387  $as_echo_n "(cached) " >&6
7388else
7389  case $HEAD in
7390  [\\/]* | ?:[\\/]*)
7391  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7392  ;;
7393  *)
7394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395for as_dir in $PATH
7396do
7397  IFS=$as_save_IFS
7398  test -z "$as_dir" && as_dir=.
7399    for ac_exec_ext in '' $ac_executable_extensions; do
7400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403    break 2
7404  fi
7405done
7406  done
7407IFS=$as_save_IFS
7408
7409  ;;
7410esac
7411fi
7412HEAD=$ac_cv_path_HEAD
7413if test -n "$HEAD"; then
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7415$as_echo "$HEAD" >&6; }
7416else
7417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418$as_echo "no" >&6; }
7419fi
7420
7421
7422  test -n "$HEAD" && break
7423done
7424
7425  else
7426    # The variable is set, but is it from the command line or the environment?
7427
7428    # Try to remove the string !HEAD! from our list.
7429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7431      # If it failed, the variable was not from the command line. Ignore it,
7432      # but warn the user (except for BASH, which is always set by the calling BASH).
7433      if test "xHEAD" != xBASH; then
7434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7435$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7436      fi
7437      # Try to locate tool using the code snippet
7438      for ac_prog in head
7439do
7440  # Extract the first word of "$ac_prog", so it can be a program name with args.
7441set dummy $ac_prog; ac_word=$2
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7443$as_echo_n "checking for $ac_word... " >&6; }
7444if ${ac_cv_path_HEAD+:} false; then :
7445  $as_echo_n "(cached) " >&6
7446else
7447  case $HEAD in
7448  [\\/]* | ?:[\\/]*)
7449  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7450  ;;
7451  *)
7452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7453for as_dir in $PATH
7454do
7455  IFS=$as_save_IFS
7456  test -z "$as_dir" && as_dir=.
7457    for ac_exec_ext in '' $ac_executable_extensions; do
7458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7459    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7461    break 2
7462  fi
7463done
7464  done
7465IFS=$as_save_IFS
7466
7467  ;;
7468esac
7469fi
7470HEAD=$ac_cv_path_HEAD
7471if test -n "$HEAD"; then
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7473$as_echo "$HEAD" >&6; }
7474else
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476$as_echo "no" >&6; }
7477fi
7478
7479
7480  test -n "$HEAD" && break
7481done
7482
7483    else
7484      # If it succeeded, then it was overridden by the user. We will use it
7485      # for the tool.
7486
7487      # First remove it from the list of overridden variables, so we can test
7488      # for unknown variables in the end.
7489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7490
7491      # Check if the provided tool contains a complete path.
7492      tool_specified="$HEAD"
7493      tool_basename="${tool_specified##*/}"
7494      if test "x$tool_basename" = "x$tool_specified"; then
7495        # A command without a complete path is provided, search $PATH.
7496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7497$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7498        # Extract the first word of "$tool_basename", so it can be a program name with args.
7499set dummy $tool_basename; ac_word=$2
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501$as_echo_n "checking for $ac_word... " >&6; }
7502if ${ac_cv_path_HEAD+:} false; then :
7503  $as_echo_n "(cached) " >&6
7504else
7505  case $HEAD in
7506  [\\/]* | ?:[\\/]*)
7507  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7508  ;;
7509  *)
7510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525  ;;
7526esac
7527fi
7528HEAD=$ac_cv_path_HEAD
7529if test -n "$HEAD"; then
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7531$as_echo "$HEAD" >&6; }
7532else
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
7536
7537
7538        if test "x$HEAD" = x; then
7539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7540        fi
7541      else
7542        # Otherwise we believe it is a complete path. Use it as it is.
7543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7544$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7546$as_echo_n "checking for HEAD... " >&6; }
7547        if test ! -x "$tool_specified"; then
7548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7549$as_echo "not found" >&6; }
7550          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7551        fi
7552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7553$as_echo "$tool_specified" >&6; }
7554      fi
7555    fi
7556  fi
7557
7558
7559
7560  if test "x$HEAD" = x; then
7561    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7562  fi
7563
7564
7565
7566
7567
7568  # Publish this variable in the help.
7569
7570
7571  if test "x$LN" = x; then
7572    # The variable is not set by user, try to locate tool using the code snippet
7573    for ac_prog in ln
7574do
7575  # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_LN+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $LN in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605LN=$ac_cv_path_LN
7606if test -n "$LN"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7608$as_echo "$LN" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615  test -n "$LN" && break
7616done
7617
7618  else
7619    # The variable is set, but is it from the command line or the environment?
7620
7621    # Try to remove the string !LN! from our list.
7622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7624      # If it failed, the variable was not from the command line. Ignore it,
7625      # but warn the user (except for BASH, which is always set by the calling BASH).
7626      if test "xLN" != xBASH; then
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7628$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7629      fi
7630      # Try to locate tool using the code snippet
7631      for ac_prog in ln
7632do
7633  # Extract the first word of "$ac_prog", so it can be a program name with args.
7634set dummy $ac_prog; ac_word=$2
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636$as_echo_n "checking for $ac_word... " >&6; }
7637if ${ac_cv_path_LN+:} false; then :
7638  $as_echo_n "(cached) " >&6
7639else
7640  case $LN in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  test -z "$as_dir" && as_dir=.
7650    for ac_exec_ext in '' $ac_executable_extensions; do
7651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654    break 2
7655  fi
7656done
7657  done
7658IFS=$as_save_IFS
7659
7660  ;;
7661esac
7662fi
7663LN=$ac_cv_path_LN
7664if test -n "$LN"; then
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7666$as_echo "$LN" >&6; }
7667else
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
7670fi
7671
7672
7673  test -n "$LN" && break
7674done
7675
7676    else
7677      # If it succeeded, then it was overridden by the user. We will use it
7678      # for the tool.
7679
7680      # First remove it from the list of overridden variables, so we can test
7681      # for unknown variables in the end.
7682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7683
7684      # Check if the provided tool contains a complete path.
7685      tool_specified="$LN"
7686      tool_basename="${tool_specified##*/}"
7687      if test "x$tool_basename" = "x$tool_specified"; then
7688        # A command without a complete path is provided, search $PATH.
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7690$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7691        # Extract the first word of "$tool_basename", so it can be a program name with args.
7692set dummy $tool_basename; ac_word=$2
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7694$as_echo_n "checking for $ac_word... " >&6; }
7695if ${ac_cv_path_LN+:} false; then :
7696  $as_echo_n "(cached) " >&6
7697else
7698  case $LN in
7699  [\\/]* | ?:[\\/]*)
7700  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7701  ;;
7702  *)
7703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7704for as_dir in $PATH
7705do
7706  IFS=$as_save_IFS
7707  test -z "$as_dir" && as_dir=.
7708    for ac_exec_ext in '' $ac_executable_extensions; do
7709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7710    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7712    break 2
7713  fi
7714done
7715  done
7716IFS=$as_save_IFS
7717
7718  ;;
7719esac
7720fi
7721LN=$ac_cv_path_LN
7722if test -n "$LN"; then
7723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7724$as_echo "$LN" >&6; }
7725else
7726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7727$as_echo "no" >&6; }
7728fi
7729
7730
7731        if test "x$LN" = x; then
7732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7733        fi
7734      else
7735        # Otherwise we believe it is a complete path. Use it as it is.
7736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7737$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7739$as_echo_n "checking for LN... " >&6; }
7740        if test ! -x "$tool_specified"; then
7741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7742$as_echo "not found" >&6; }
7743          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7744        fi
7745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7746$as_echo "$tool_specified" >&6; }
7747      fi
7748    fi
7749  fi
7750
7751
7752
7753  if test "x$LN" = x; then
7754    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7755  fi
7756
7757
7758
7759
7760
7761  # Publish this variable in the help.
7762
7763
7764  if test "x$LS" = x; then
7765    # The variable is not set by user, try to locate tool using the code snippet
7766    for ac_prog in ls
7767do
7768  # Extract the first word of "$ac_prog", so it can be a program name with args.
7769set dummy $ac_prog; ac_word=$2
7770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7771$as_echo_n "checking for $ac_word... " >&6; }
7772if ${ac_cv_path_LS+:} false; then :
7773  $as_echo_n "(cached) " >&6
7774else
7775  case $LS in
7776  [\\/]* | ?:[\\/]*)
7777  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7778  ;;
7779  *)
7780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781for as_dir in $PATH
7782do
7783  IFS=$as_save_IFS
7784  test -z "$as_dir" && as_dir=.
7785    for ac_exec_ext in '' $ac_executable_extensions; do
7786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7787    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7789    break 2
7790  fi
7791done
7792  done
7793IFS=$as_save_IFS
7794
7795  ;;
7796esac
7797fi
7798LS=$ac_cv_path_LS
7799if test -n "$LS"; then
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7801$as_echo "$LS" >&6; }
7802else
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804$as_echo "no" >&6; }
7805fi
7806
7807
7808  test -n "$LS" && break
7809done
7810
7811  else
7812    # The variable is set, but is it from the command line or the environment?
7813
7814    # Try to remove the string !LS! from our list.
7815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7817      # If it failed, the variable was not from the command line. Ignore it,
7818      # but warn the user (except for BASH, which is always set by the calling BASH).
7819      if test "xLS" != xBASH; then
7820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7821$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7822      fi
7823      # Try to locate tool using the code snippet
7824      for ac_prog in ls
7825do
7826  # Extract the first word of "$ac_prog", so it can be a program name with args.
7827set dummy $ac_prog; ac_word=$2
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7829$as_echo_n "checking for $ac_word... " >&6; }
7830if ${ac_cv_path_LS+:} false; then :
7831  $as_echo_n "(cached) " >&6
7832else
7833  case $LS in
7834  [\\/]* | ?:[\\/]*)
7835  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7836  ;;
7837  *)
7838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7839for as_dir in $PATH
7840do
7841  IFS=$as_save_IFS
7842  test -z "$as_dir" && as_dir=.
7843    for ac_exec_ext in '' $ac_executable_extensions; do
7844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7845    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7847    break 2
7848  fi
7849done
7850  done
7851IFS=$as_save_IFS
7852
7853  ;;
7854esac
7855fi
7856LS=$ac_cv_path_LS
7857if test -n "$LS"; then
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7859$as_echo "$LS" >&6; }
7860else
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863fi
7864
7865
7866  test -n "$LS" && break
7867done
7868
7869    else
7870      # If it succeeded, then it was overridden by the user. We will use it
7871      # for the tool.
7872
7873      # First remove it from the list of overridden variables, so we can test
7874      # for unknown variables in the end.
7875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7876
7877      # Check if the provided tool contains a complete path.
7878      tool_specified="$LS"
7879      tool_basename="${tool_specified##*/}"
7880      if test "x$tool_basename" = "x$tool_specified"; then
7881        # A command without a complete path is provided, search $PATH.
7882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7883$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7884        # Extract the first word of "$tool_basename", so it can be a program name with args.
7885set dummy $tool_basename; ac_word=$2
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887$as_echo_n "checking for $ac_word... " >&6; }
7888if ${ac_cv_path_LS+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  case $LS in
7892  [\\/]* | ?:[\\/]*)
7893  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7894  ;;
7895  *)
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  test -z "$as_dir" && as_dir=.
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911  ;;
7912esac
7913fi
7914LS=$ac_cv_path_LS
7915if test -n "$LS"; then
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7917$as_echo "$LS" >&6; }
7918else
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920$as_echo "no" >&6; }
7921fi
7922
7923
7924        if test "x$LS" = x; then
7925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7926        fi
7927      else
7928        # Otherwise we believe it is a complete path. Use it as it is.
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7930$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7932$as_echo_n "checking for LS... " >&6; }
7933        if test ! -x "$tool_specified"; then
7934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7935$as_echo "not found" >&6; }
7936          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7937        fi
7938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7939$as_echo "$tool_specified" >&6; }
7940      fi
7941    fi
7942  fi
7943
7944
7945
7946  if test "x$LS" = x; then
7947    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7948  fi
7949
7950
7951
7952
7953
7954  # Publish this variable in the help.
7955
7956
7957  if test "x$MKDIR" = x; then
7958    # The variable is not set by user, try to locate tool using the code snippet
7959    for ac_prog in mkdir
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_MKDIR+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $MKDIR in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991MKDIR=$ac_cv_path_MKDIR
7992if test -n "$MKDIR"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7994$as_echo "$MKDIR" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$MKDIR" && break
8002done
8003
8004  else
8005    # The variable is set, but is it from the command line or the environment?
8006
8007    # Try to remove the string !MKDIR! from our list.
8008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8010      # If it failed, the variable was not from the command line. Ignore it,
8011      # but warn the user (except for BASH, which is always set by the calling BASH).
8012      if test "xMKDIR" != xBASH; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8014$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8015      fi
8016      # Try to locate tool using the code snippet
8017      for ac_prog in mkdir
8018do
8019  # Extract the first word of "$ac_prog", so it can be a program name with args.
8020set dummy $ac_prog; ac_word=$2
8021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if ${ac_cv_path_MKDIR+:} false; then :
8024  $as_echo_n "(cached) " >&6
8025else
8026  case $MKDIR in
8027  [\\/]* | ?:[\\/]*)
8028  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034  IFS=$as_save_IFS
8035  test -z "$as_dir" && as_dir=.
8036    for ac_exec_ext in '' $ac_executable_extensions; do
8037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040    break 2
8041  fi
8042done
8043  done
8044IFS=$as_save_IFS
8045
8046  ;;
8047esac
8048fi
8049MKDIR=$ac_cv_path_MKDIR
8050if test -n "$MKDIR"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8052$as_echo "$MKDIR" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$MKDIR" && break
8060done
8061
8062    else
8063      # If it succeeded, then it was overridden by the user. We will use it
8064      # for the tool.
8065
8066      # First remove it from the list of overridden variables, so we can test
8067      # for unknown variables in the end.
8068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8069
8070      # Check if the provided tool contains a complete path.
8071      tool_specified="$MKDIR"
8072      tool_basename="${tool_specified##*/}"
8073      if test "x$tool_basename" = "x$tool_specified"; then
8074        # A command without a complete path is provided, search $PATH.
8075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8076$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8077        # Extract the first word of "$tool_basename", so it can be a program name with args.
8078set dummy $tool_basename; ac_word=$2
8079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8080$as_echo_n "checking for $ac_word... " >&6; }
8081if ${ac_cv_path_MKDIR+:} false; then :
8082  $as_echo_n "(cached) " >&6
8083else
8084  case $MKDIR in
8085  [\\/]* | ?:[\\/]*)
8086  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8087  ;;
8088  *)
8089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8090for as_dir in $PATH
8091do
8092  IFS=$as_save_IFS
8093  test -z "$as_dir" && as_dir=.
8094    for ac_exec_ext in '' $ac_executable_extensions; do
8095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8096    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8098    break 2
8099  fi
8100done
8101  done
8102IFS=$as_save_IFS
8103
8104  ;;
8105esac
8106fi
8107MKDIR=$ac_cv_path_MKDIR
8108if test -n "$MKDIR"; then
8109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8110$as_echo "$MKDIR" >&6; }
8111else
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8113$as_echo "no" >&6; }
8114fi
8115
8116
8117        if test "x$MKDIR" = x; then
8118          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8119        fi
8120      else
8121        # Otherwise we believe it is a complete path. Use it as it is.
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8123$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8125$as_echo_n "checking for MKDIR... " >&6; }
8126        if test ! -x "$tool_specified"; then
8127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8128$as_echo "not found" >&6; }
8129          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8130        fi
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8132$as_echo "$tool_specified" >&6; }
8133      fi
8134    fi
8135  fi
8136
8137
8138
8139  if test "x$MKDIR" = x; then
8140    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8141  fi
8142
8143
8144
8145
8146
8147  # Publish this variable in the help.
8148
8149
8150  if test "x$MKTEMP" = x; then
8151    # The variable is not set by user, try to locate tool using the code snippet
8152    for ac_prog in mktemp
8153do
8154  # Extract the first word of "$ac_prog", so it can be a program name with args.
8155set dummy $ac_prog; ac_word=$2
8156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157$as_echo_n "checking for $ac_word... " >&6; }
8158if ${ac_cv_path_MKTEMP+:} false; then :
8159  $as_echo_n "(cached) " >&6
8160else
8161  case $MKTEMP in
8162  [\\/]* | ?:[\\/]*)
8163  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8164  ;;
8165  *)
8166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167for as_dir in $PATH
8168do
8169  IFS=$as_save_IFS
8170  test -z "$as_dir" && as_dir=.
8171    for ac_exec_ext in '' $ac_executable_extensions; do
8172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8173    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8175    break 2
8176  fi
8177done
8178  done
8179IFS=$as_save_IFS
8180
8181  ;;
8182esac
8183fi
8184MKTEMP=$ac_cv_path_MKTEMP
8185if test -n "$MKTEMP"; then
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8187$as_echo "$MKTEMP" >&6; }
8188else
8189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190$as_echo "no" >&6; }
8191fi
8192
8193
8194  test -n "$MKTEMP" && break
8195done
8196
8197  else
8198    # The variable is set, but is it from the command line or the environment?
8199
8200    # Try to remove the string !MKTEMP! from our list.
8201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8203      # If it failed, the variable was not from the command line. Ignore it,
8204      # but warn the user (except for BASH, which is always set by the calling BASH).
8205      if test "xMKTEMP" != xBASH; then
8206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8207$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8208      fi
8209      # Try to locate tool using the code snippet
8210      for ac_prog in mktemp
8211do
8212  # Extract the first word of "$ac_prog", so it can be a program name with args.
8213set dummy $ac_prog; ac_word=$2
8214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215$as_echo_n "checking for $ac_word... " >&6; }
8216if ${ac_cv_path_MKTEMP+:} false; then :
8217  $as_echo_n "(cached) " >&6
8218else
8219  case $MKTEMP in
8220  [\\/]* | ?:[\\/]*)
8221  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8222  ;;
8223  *)
8224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225for as_dir in $PATH
8226do
8227  IFS=$as_save_IFS
8228  test -z "$as_dir" && as_dir=.
8229    for ac_exec_ext in '' $ac_executable_extensions; do
8230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8231    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8233    break 2
8234  fi
8235done
8236  done
8237IFS=$as_save_IFS
8238
8239  ;;
8240esac
8241fi
8242MKTEMP=$ac_cv_path_MKTEMP
8243if test -n "$MKTEMP"; then
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8245$as_echo "$MKTEMP" >&6; }
8246else
8247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248$as_echo "no" >&6; }
8249fi
8250
8251
8252  test -n "$MKTEMP" && break
8253done
8254
8255    else
8256      # If it succeeded, then it was overridden by the user. We will use it
8257      # for the tool.
8258
8259      # First remove it from the list of overridden variables, so we can test
8260      # for unknown variables in the end.
8261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8262
8263      # Check if the provided tool contains a complete path.
8264      tool_specified="$MKTEMP"
8265      tool_basename="${tool_specified##*/}"
8266      if test "x$tool_basename" = "x$tool_specified"; then
8267        # A command without a complete path is provided, search $PATH.
8268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8269$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8270        # Extract the first word of "$tool_basename", so it can be a program name with args.
8271set dummy $tool_basename; ac_word=$2
8272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8273$as_echo_n "checking for $ac_word... " >&6; }
8274if ${ac_cv_path_MKTEMP+:} false; then :
8275  $as_echo_n "(cached) " >&6
8276else
8277  case $MKTEMP in
8278  [\\/]* | ?:[\\/]*)
8279  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8280  ;;
8281  *)
8282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8283for as_dir in $PATH
8284do
8285  IFS=$as_save_IFS
8286  test -z "$as_dir" && as_dir=.
8287    for ac_exec_ext in '' $ac_executable_extensions; do
8288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8289    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8291    break 2
8292  fi
8293done
8294  done
8295IFS=$as_save_IFS
8296
8297  ;;
8298esac
8299fi
8300MKTEMP=$ac_cv_path_MKTEMP
8301if test -n "$MKTEMP"; then
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8303$as_echo "$MKTEMP" >&6; }
8304else
8305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8306$as_echo "no" >&6; }
8307fi
8308
8309
8310        if test "x$MKTEMP" = x; then
8311          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8312        fi
8313      else
8314        # Otherwise we believe it is a complete path. Use it as it is.
8315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8316$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8318$as_echo_n "checking for MKTEMP... " >&6; }
8319        if test ! -x "$tool_specified"; then
8320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8321$as_echo "not found" >&6; }
8322          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8323        fi
8324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8325$as_echo "$tool_specified" >&6; }
8326      fi
8327    fi
8328  fi
8329
8330
8331
8332  if test "x$MKTEMP" = x; then
8333    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8334  fi
8335
8336
8337
8338
8339
8340  # Publish this variable in the help.
8341
8342
8343  if test "x$MV" = x; then
8344    # The variable is not set by user, try to locate tool using the code snippet
8345    for ac_prog in mv
8346do
8347  # Extract the first word of "$ac_prog", so it can be a program name with args.
8348set dummy $ac_prog; ac_word=$2
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350$as_echo_n "checking for $ac_word... " >&6; }
8351if ${ac_cv_path_MV+:} false; then :
8352  $as_echo_n "(cached) " >&6
8353else
8354  case $MV in
8355  [\\/]* | ?:[\\/]*)
8356  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8357  ;;
8358  *)
8359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8360for as_dir in $PATH
8361do
8362  IFS=$as_save_IFS
8363  test -z "$as_dir" && as_dir=.
8364    for ac_exec_ext in '' $ac_executable_extensions; do
8365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8366    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8368    break 2
8369  fi
8370done
8371  done
8372IFS=$as_save_IFS
8373
8374  ;;
8375esac
8376fi
8377MV=$ac_cv_path_MV
8378if test -n "$MV"; then
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8380$as_echo "$MV" >&6; }
8381else
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383$as_echo "no" >&6; }
8384fi
8385
8386
8387  test -n "$MV" && break
8388done
8389
8390  else
8391    # The variable is set, but is it from the command line or the environment?
8392
8393    # Try to remove the string !MV! from our list.
8394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8396      # If it failed, the variable was not from the command line. Ignore it,
8397      # but warn the user (except for BASH, which is always set by the calling BASH).
8398      if test "xMV" != xBASH; then
8399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8400$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8401      fi
8402      # Try to locate tool using the code snippet
8403      for ac_prog in mv
8404do
8405  # Extract the first word of "$ac_prog", so it can be a program name with args.
8406set dummy $ac_prog; ac_word=$2
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
8409if ${ac_cv_path_MV+:} false; then :
8410  $as_echo_n "(cached) " >&6
8411else
8412  case $MV in
8413  [\\/]* | ?:[\\/]*)
8414  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8415  ;;
8416  *)
8417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420  IFS=$as_save_IFS
8421  test -z "$as_dir" && as_dir=.
8422    for ac_exec_ext in '' $ac_executable_extensions; do
8423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8424    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8426    break 2
8427  fi
8428done
8429  done
8430IFS=$as_save_IFS
8431
8432  ;;
8433esac
8434fi
8435MV=$ac_cv_path_MV
8436if test -n "$MV"; then
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8438$as_echo "$MV" >&6; }
8439else
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
8442fi
8443
8444
8445  test -n "$MV" && break
8446done
8447
8448    else
8449      # If it succeeded, then it was overridden by the user. We will use it
8450      # for the tool.
8451
8452      # First remove it from the list of overridden variables, so we can test
8453      # for unknown variables in the end.
8454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8455
8456      # Check if the provided tool contains a complete path.
8457      tool_specified="$MV"
8458      tool_basename="${tool_specified##*/}"
8459      if test "x$tool_basename" = "x$tool_specified"; then
8460        # A command without a complete path is provided, search $PATH.
8461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8462$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8463        # Extract the first word of "$tool_basename", so it can be a program name with args.
8464set dummy $tool_basename; ac_word=$2
8465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8466$as_echo_n "checking for $ac_word... " >&6; }
8467if ${ac_cv_path_MV+:} false; then :
8468  $as_echo_n "(cached) " >&6
8469else
8470  case $MV in
8471  [\\/]* | ?:[\\/]*)
8472  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8473  ;;
8474  *)
8475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8476for as_dir in $PATH
8477do
8478  IFS=$as_save_IFS
8479  test -z "$as_dir" && as_dir=.
8480    for ac_exec_ext in '' $ac_executable_extensions; do
8481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8482    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8484    break 2
8485  fi
8486done
8487  done
8488IFS=$as_save_IFS
8489
8490  ;;
8491esac
8492fi
8493MV=$ac_cv_path_MV
8494if test -n "$MV"; then
8495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8496$as_echo "$MV" >&6; }
8497else
8498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8499$as_echo "no" >&6; }
8500fi
8501
8502
8503        if test "x$MV" = x; then
8504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8505        fi
8506      else
8507        # Otherwise we believe it is a complete path. Use it as it is.
8508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8509$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8511$as_echo_n "checking for MV... " >&6; }
8512        if test ! -x "$tool_specified"; then
8513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8514$as_echo "not found" >&6; }
8515          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8516        fi
8517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8518$as_echo "$tool_specified" >&6; }
8519      fi
8520    fi
8521  fi
8522
8523
8524
8525  if test "x$MV" = x; then
8526    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8527  fi
8528
8529
8530
8531
8532
8533  # Publish this variable in the help.
8534
8535
8536  if test "x$NAWK" = x; then
8537    # The variable is not set by user, try to locate tool using the code snippet
8538    for ac_prog in nawk gawk awk
8539do
8540  # Extract the first word of "$ac_prog", so it can be a program name with args.
8541set dummy $ac_prog; ac_word=$2
8542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543$as_echo_n "checking for $ac_word... " >&6; }
8544if ${ac_cv_path_NAWK+:} false; then :
8545  $as_echo_n "(cached) " >&6
8546else
8547  case $NAWK in
8548  [\\/]* | ?:[\\/]*)
8549  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8550  ;;
8551  *)
8552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553for as_dir in $PATH
8554do
8555  IFS=$as_save_IFS
8556  test -z "$as_dir" && as_dir=.
8557    for ac_exec_ext in '' $ac_executable_extensions; do
8558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8559    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8561    break 2
8562  fi
8563done
8564  done
8565IFS=$as_save_IFS
8566
8567  ;;
8568esac
8569fi
8570NAWK=$ac_cv_path_NAWK
8571if test -n "$NAWK"; then
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8573$as_echo "$NAWK" >&6; }
8574else
8575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8576$as_echo "no" >&6; }
8577fi
8578
8579
8580  test -n "$NAWK" && break
8581done
8582
8583  else
8584    # The variable is set, but is it from the command line or the environment?
8585
8586    # Try to remove the string !NAWK! from our list.
8587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8589      # If it failed, the variable was not from the command line. Ignore it,
8590      # but warn the user (except for BASH, which is always set by the calling BASH).
8591      if test "xNAWK" != xBASH; then
8592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8593$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8594      fi
8595      # Try to locate tool using the code snippet
8596      for ac_prog in nawk gawk awk
8597do
8598  # Extract the first word of "$ac_prog", so it can be a program name with args.
8599set dummy $ac_prog; ac_word=$2
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if ${ac_cv_path_NAWK+:} false; then :
8603  $as_echo_n "(cached) " >&6
8604else
8605  case $NAWK in
8606  [\\/]* | ?:[\\/]*)
8607  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8608  ;;
8609  *)
8610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613  IFS=$as_save_IFS
8614  test -z "$as_dir" && as_dir=.
8615    for ac_exec_ext in '' $ac_executable_extensions; do
8616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8617    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619    break 2
8620  fi
8621done
8622  done
8623IFS=$as_save_IFS
8624
8625  ;;
8626esac
8627fi
8628NAWK=$ac_cv_path_NAWK
8629if test -n "$NAWK"; then
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8631$as_echo "$NAWK" >&6; }
8632else
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634$as_echo "no" >&6; }
8635fi
8636
8637
8638  test -n "$NAWK" && break
8639done
8640
8641    else
8642      # If it succeeded, then it was overridden by the user. We will use it
8643      # for the tool.
8644
8645      # First remove it from the list of overridden variables, so we can test
8646      # for unknown variables in the end.
8647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8648
8649      # Check if the provided tool contains a complete path.
8650      tool_specified="$NAWK"
8651      tool_basename="${tool_specified##*/}"
8652      if test "x$tool_basename" = "x$tool_specified"; then
8653        # A command without a complete path is provided, search $PATH.
8654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8655$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8656        # Extract the first word of "$tool_basename", so it can be a program name with args.
8657set dummy $tool_basename; ac_word=$2
8658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659$as_echo_n "checking for $ac_word... " >&6; }
8660if ${ac_cv_path_NAWK+:} false; then :
8661  $as_echo_n "(cached) " >&6
8662else
8663  case $NAWK in
8664  [\\/]* | ?:[\\/]*)
8665  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8666  ;;
8667  *)
8668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669for as_dir in $PATH
8670do
8671  IFS=$as_save_IFS
8672  test -z "$as_dir" && as_dir=.
8673    for ac_exec_ext in '' $ac_executable_extensions; do
8674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8675    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8677    break 2
8678  fi
8679done
8680  done
8681IFS=$as_save_IFS
8682
8683  ;;
8684esac
8685fi
8686NAWK=$ac_cv_path_NAWK
8687if test -n "$NAWK"; then
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8689$as_echo "$NAWK" >&6; }
8690else
8691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692$as_echo "no" >&6; }
8693fi
8694
8695
8696        if test "x$NAWK" = x; then
8697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8698        fi
8699      else
8700        # Otherwise we believe it is a complete path. Use it as it is.
8701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8702$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8704$as_echo_n "checking for NAWK... " >&6; }
8705        if test ! -x "$tool_specified"; then
8706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8707$as_echo "not found" >&6; }
8708          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8709        fi
8710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8711$as_echo "$tool_specified" >&6; }
8712      fi
8713    fi
8714  fi
8715
8716
8717
8718  if test "x$NAWK" = x; then
8719    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8720  fi
8721
8722
8723
8724
8725
8726  # Publish this variable in the help.
8727
8728
8729  if test "x$PRINTF" = x; then
8730    # The variable is not set by user, try to locate tool using the code snippet
8731    for ac_prog in printf
8732do
8733  # Extract the first word of "$ac_prog", so it can be a program name with args.
8734set dummy $ac_prog; ac_word=$2
8735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8736$as_echo_n "checking for $ac_word... " >&6; }
8737if ${ac_cv_path_PRINTF+:} false; then :
8738  $as_echo_n "(cached) " >&6
8739else
8740  case $PRINTF in
8741  [\\/]* | ?:[\\/]*)
8742  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8743  ;;
8744  *)
8745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746for as_dir in $PATH
8747do
8748  IFS=$as_save_IFS
8749  test -z "$as_dir" && as_dir=.
8750    for ac_exec_ext in '' $ac_executable_extensions; do
8751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8752    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8754    break 2
8755  fi
8756done
8757  done
8758IFS=$as_save_IFS
8759
8760  ;;
8761esac
8762fi
8763PRINTF=$ac_cv_path_PRINTF
8764if test -n "$PRINTF"; then
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8766$as_echo "$PRINTF" >&6; }
8767else
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8769$as_echo "no" >&6; }
8770fi
8771
8772
8773  test -n "$PRINTF" && break
8774done
8775
8776  else
8777    # The variable is set, but is it from the command line or the environment?
8778
8779    # Try to remove the string !PRINTF! from our list.
8780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8782      # If it failed, the variable was not from the command line. Ignore it,
8783      # but warn the user (except for BASH, which is always set by the calling BASH).
8784      if test "xPRINTF" != xBASH; then
8785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8786$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8787      fi
8788      # Try to locate tool using the code snippet
8789      for ac_prog in printf
8790do
8791  # Extract the first word of "$ac_prog", so it can be a program name with args.
8792set dummy $ac_prog; ac_word=$2
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8794$as_echo_n "checking for $ac_word... " >&6; }
8795if ${ac_cv_path_PRINTF+:} false; then :
8796  $as_echo_n "(cached) " >&6
8797else
8798  case $PRINTF in
8799  [\\/]* | ?:[\\/]*)
8800  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8801  ;;
8802  *)
8803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8804for as_dir in $PATH
8805do
8806  IFS=$as_save_IFS
8807  test -z "$as_dir" && as_dir=.
8808    for ac_exec_ext in '' $ac_executable_extensions; do
8809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8810    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8812    break 2
8813  fi
8814done
8815  done
8816IFS=$as_save_IFS
8817
8818  ;;
8819esac
8820fi
8821PRINTF=$ac_cv_path_PRINTF
8822if test -n "$PRINTF"; then
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8824$as_echo "$PRINTF" >&6; }
8825else
8826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
8828fi
8829
8830
8831  test -n "$PRINTF" && break
8832done
8833
8834    else
8835      # If it succeeded, then it was overridden by the user. We will use it
8836      # for the tool.
8837
8838      # First remove it from the list of overridden variables, so we can test
8839      # for unknown variables in the end.
8840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8841
8842      # Check if the provided tool contains a complete path.
8843      tool_specified="$PRINTF"
8844      tool_basename="${tool_specified##*/}"
8845      if test "x$tool_basename" = "x$tool_specified"; then
8846        # A command without a complete path is provided, search $PATH.
8847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8848$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8849        # Extract the first word of "$tool_basename", so it can be a program name with args.
8850set dummy $tool_basename; ac_word=$2
8851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8852$as_echo_n "checking for $ac_word... " >&6; }
8853if ${ac_cv_path_PRINTF+:} false; then :
8854  $as_echo_n "(cached) " >&6
8855else
8856  case $PRINTF in
8857  [\\/]* | ?:[\\/]*)
8858  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8859  ;;
8860  *)
8861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8862for as_dir in $PATH
8863do
8864  IFS=$as_save_IFS
8865  test -z "$as_dir" && as_dir=.
8866    for ac_exec_ext in '' $ac_executable_extensions; do
8867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8868    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8870    break 2
8871  fi
8872done
8873  done
8874IFS=$as_save_IFS
8875
8876  ;;
8877esac
8878fi
8879PRINTF=$ac_cv_path_PRINTF
8880if test -n "$PRINTF"; then
8881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8882$as_echo "$PRINTF" >&6; }
8883else
8884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8885$as_echo "no" >&6; }
8886fi
8887
8888
8889        if test "x$PRINTF" = x; then
8890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8891        fi
8892      else
8893        # Otherwise we believe it is a complete path. Use it as it is.
8894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8895$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8897$as_echo_n "checking for PRINTF... " >&6; }
8898        if test ! -x "$tool_specified"; then
8899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8900$as_echo "not found" >&6; }
8901          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8902        fi
8903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8904$as_echo "$tool_specified" >&6; }
8905      fi
8906    fi
8907  fi
8908
8909
8910
8911  if test "x$PRINTF" = x; then
8912    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8913  fi
8914
8915
8916
8917
8918
8919  # Publish this variable in the help.
8920
8921
8922  if test "x$RM" = x; then
8923    # The variable is not set by user, try to locate tool using the code snippet
8924    for ac_prog in rm
8925do
8926  # Extract the first word of "$ac_prog", so it can be a program name with args.
8927set dummy $ac_prog; ac_word=$2
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929$as_echo_n "checking for $ac_word... " >&6; }
8930if ${ac_cv_path_RM+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  case $RM in
8934  [\\/]* | ?:[\\/]*)
8935  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8936  ;;
8937  *)
8938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939for as_dir in $PATH
8940do
8941  IFS=$as_save_IFS
8942  test -z "$as_dir" && as_dir=.
8943    for ac_exec_ext in '' $ac_executable_extensions; do
8944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947    break 2
8948  fi
8949done
8950  done
8951IFS=$as_save_IFS
8952
8953  ;;
8954esac
8955fi
8956RM=$ac_cv_path_RM
8957if test -n "$RM"; then
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8959$as_echo "$RM" >&6; }
8960else
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
8963fi
8964
8965
8966  test -n "$RM" && break
8967done
8968
8969  else
8970    # The variable is set, but is it from the command line or the environment?
8971
8972    # Try to remove the string !RM! from our list.
8973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8975      # If it failed, the variable was not from the command line. Ignore it,
8976      # but warn the user (except for BASH, which is always set by the calling BASH).
8977      if test "xRM" != xBASH; then
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8979$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8980      fi
8981      # Try to locate tool using the code snippet
8982      for ac_prog in rm
8983do
8984  # Extract the first word of "$ac_prog", so it can be a program name with args.
8985set dummy $ac_prog; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_path_RM+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  case $RM in
8992  [\\/]* | ?:[\\/]*)
8993  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8994  ;;
8995  *)
8996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997for as_dir in $PATH
8998do
8999  IFS=$as_save_IFS
9000  test -z "$as_dir" && as_dir=.
9001    for ac_exec_ext in '' $ac_executable_extensions; do
9002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005    break 2
9006  fi
9007done
9008  done
9009IFS=$as_save_IFS
9010
9011  ;;
9012esac
9013fi
9014RM=$ac_cv_path_RM
9015if test -n "$RM"; then
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9017$as_echo "$RM" >&6; }
9018else
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020$as_echo "no" >&6; }
9021fi
9022
9023
9024  test -n "$RM" && break
9025done
9026
9027    else
9028      # If it succeeded, then it was overridden by the user. We will use it
9029      # for the tool.
9030
9031      # First remove it from the list of overridden variables, so we can test
9032      # for unknown variables in the end.
9033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9034
9035      # Check if the provided tool contains a complete path.
9036      tool_specified="$RM"
9037      tool_basename="${tool_specified##*/}"
9038      if test "x$tool_basename" = "x$tool_specified"; then
9039        # A command without a complete path is provided, search $PATH.
9040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9041$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9042        # Extract the first word of "$tool_basename", so it can be a program name with args.
9043set dummy $tool_basename; ac_word=$2
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9045$as_echo_n "checking for $ac_word... " >&6; }
9046if ${ac_cv_path_RM+:} false; then :
9047  $as_echo_n "(cached) " >&6
9048else
9049  case $RM in
9050  [\\/]* | ?:[\\/]*)
9051  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9052  ;;
9053  *)
9054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055for as_dir in $PATH
9056do
9057  IFS=$as_save_IFS
9058  test -z "$as_dir" && as_dir=.
9059    for ac_exec_ext in '' $ac_executable_extensions; do
9060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9061    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9063    break 2
9064  fi
9065done
9066  done
9067IFS=$as_save_IFS
9068
9069  ;;
9070esac
9071fi
9072RM=$ac_cv_path_RM
9073if test -n "$RM"; then
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9075$as_echo "$RM" >&6; }
9076else
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078$as_echo "no" >&6; }
9079fi
9080
9081
9082        if test "x$RM" = x; then
9083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9084        fi
9085      else
9086        # Otherwise we believe it is a complete path. Use it as it is.
9087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9088$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9090$as_echo_n "checking for RM... " >&6; }
9091        if test ! -x "$tool_specified"; then
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9093$as_echo "not found" >&6; }
9094          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9095        fi
9096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9097$as_echo "$tool_specified" >&6; }
9098      fi
9099    fi
9100  fi
9101
9102
9103
9104  if test "x$RM" = x; then
9105    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9106  fi
9107
9108
9109
9110
9111
9112  # Publish this variable in the help.
9113
9114
9115  if test "x$SH" = x; then
9116    # The variable is not set by user, try to locate tool using the code snippet
9117    for ac_prog in sh
9118do
9119  # Extract the first word of "$ac_prog", so it can be a program name with args.
9120set dummy $ac_prog; ac_word=$2
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9122$as_echo_n "checking for $ac_word... " >&6; }
9123if ${ac_cv_path_SH+:} false; then :
9124  $as_echo_n "(cached) " >&6
9125else
9126  case $SH in
9127  [\\/]* | ?:[\\/]*)
9128  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9129  ;;
9130  *)
9131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132for as_dir in $PATH
9133do
9134  IFS=$as_save_IFS
9135  test -z "$as_dir" && as_dir=.
9136    for ac_exec_ext in '' $ac_executable_extensions; do
9137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9138    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9140    break 2
9141  fi
9142done
9143  done
9144IFS=$as_save_IFS
9145
9146  ;;
9147esac
9148fi
9149SH=$ac_cv_path_SH
9150if test -n "$SH"; then
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9152$as_echo "$SH" >&6; }
9153else
9154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155$as_echo "no" >&6; }
9156fi
9157
9158
9159  test -n "$SH" && break
9160done
9161
9162  else
9163    # The variable is set, but is it from the command line or the environment?
9164
9165    # Try to remove the string !SH! from our list.
9166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9168      # If it failed, the variable was not from the command line. Ignore it,
9169      # but warn the user (except for BASH, which is always set by the calling BASH).
9170      if test "xSH" != xBASH; then
9171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9172$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9173      fi
9174      # Try to locate tool using the code snippet
9175      for ac_prog in sh
9176do
9177  # Extract the first word of "$ac_prog", so it can be a program name with args.
9178set dummy $ac_prog; ac_word=$2
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9180$as_echo_n "checking for $ac_word... " >&6; }
9181if ${ac_cv_path_SH+:} false; then :
9182  $as_echo_n "(cached) " >&6
9183else
9184  case $SH in
9185  [\\/]* | ?:[\\/]*)
9186  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9187  ;;
9188  *)
9189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9190for as_dir in $PATH
9191do
9192  IFS=$as_save_IFS
9193  test -z "$as_dir" && as_dir=.
9194    for ac_exec_ext in '' $ac_executable_extensions; do
9195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9196    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9198    break 2
9199  fi
9200done
9201  done
9202IFS=$as_save_IFS
9203
9204  ;;
9205esac
9206fi
9207SH=$ac_cv_path_SH
9208if test -n "$SH"; then
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9210$as_echo "$SH" >&6; }
9211else
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9213$as_echo "no" >&6; }
9214fi
9215
9216
9217  test -n "$SH" && break
9218done
9219
9220    else
9221      # If it succeeded, then it was overridden by the user. We will use it
9222      # for the tool.
9223
9224      # First remove it from the list of overridden variables, so we can test
9225      # for unknown variables in the end.
9226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9227
9228      # Check if the provided tool contains a complete path.
9229      tool_specified="$SH"
9230      tool_basename="${tool_specified##*/}"
9231      if test "x$tool_basename" = "x$tool_specified"; then
9232        # A command without a complete path is provided, search $PATH.
9233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9234$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9235        # Extract the first word of "$tool_basename", so it can be a program name with args.
9236set dummy $tool_basename; ac_word=$2
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9238$as_echo_n "checking for $ac_word... " >&6; }
9239if ${ac_cv_path_SH+:} false; then :
9240  $as_echo_n "(cached) " >&6
9241else
9242  case $SH in
9243  [\\/]* | ?:[\\/]*)
9244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9245  ;;
9246  *)
9247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9248for as_dir in $PATH
9249do
9250  IFS=$as_save_IFS
9251  test -z "$as_dir" && as_dir=.
9252    for ac_exec_ext in '' $ac_executable_extensions; do
9253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9256    break 2
9257  fi
9258done
9259  done
9260IFS=$as_save_IFS
9261
9262  ;;
9263esac
9264fi
9265SH=$ac_cv_path_SH
9266if test -n "$SH"; then
9267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9268$as_echo "$SH" >&6; }
9269else
9270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
9272fi
9273
9274
9275        if test "x$SH" = x; then
9276          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9277        fi
9278      else
9279        # Otherwise we believe it is a complete path. Use it as it is.
9280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9281$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9283$as_echo_n "checking for SH... " >&6; }
9284        if test ! -x "$tool_specified"; then
9285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9286$as_echo "not found" >&6; }
9287          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9288        fi
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9290$as_echo "$tool_specified" >&6; }
9291      fi
9292    fi
9293  fi
9294
9295
9296
9297  if test "x$SH" = x; then
9298    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9299  fi
9300
9301
9302
9303
9304
9305  # Publish this variable in the help.
9306
9307
9308  if test "x$SORT" = x; then
9309    # The variable is not set by user, try to locate tool using the code snippet
9310    for ac_prog in sort
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_SORT+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $SORT in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342SORT=$ac_cv_path_SORT
9343if test -n "$SORT"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9345$as_echo "$SORT" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$SORT" && break
9353done
9354
9355  else
9356    # The variable is set, but is it from the command line or the environment?
9357
9358    # Try to remove the string !SORT! from our list.
9359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9361      # If it failed, the variable was not from the command line. Ignore it,
9362      # but warn the user (except for BASH, which is always set by the calling BASH).
9363      if test "xSORT" != xBASH; then
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9365$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9366      fi
9367      # Try to locate tool using the code snippet
9368      for ac_prog in sort
9369do
9370  # Extract the first word of "$ac_prog", so it can be a program name with args.
9371set dummy $ac_prog; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_SORT+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $SORT in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400SORT=$ac_cv_path_SORT
9401if test -n "$SORT"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9403$as_echo "$SORT" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410  test -n "$SORT" && break
9411done
9412
9413    else
9414      # If it succeeded, then it was overridden by the user. We will use it
9415      # for the tool.
9416
9417      # First remove it from the list of overridden variables, so we can test
9418      # for unknown variables in the end.
9419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9420
9421      # Check if the provided tool contains a complete path.
9422      tool_specified="$SORT"
9423      tool_basename="${tool_specified##*/}"
9424      if test "x$tool_basename" = "x$tool_specified"; then
9425        # A command without a complete path is provided, search $PATH.
9426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9427$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9428        # Extract the first word of "$tool_basename", so it can be a program name with args.
9429set dummy $tool_basename; ac_word=$2
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9431$as_echo_n "checking for $ac_word... " >&6; }
9432if ${ac_cv_path_SORT+:} false; then :
9433  $as_echo_n "(cached) " >&6
9434else
9435  case $SORT in
9436  [\\/]* | ?:[\\/]*)
9437  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9438  ;;
9439  *)
9440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441for as_dir in $PATH
9442do
9443  IFS=$as_save_IFS
9444  test -z "$as_dir" && as_dir=.
9445    for ac_exec_ext in '' $ac_executable_extensions; do
9446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9447    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9449    break 2
9450  fi
9451done
9452  done
9453IFS=$as_save_IFS
9454
9455  ;;
9456esac
9457fi
9458SORT=$ac_cv_path_SORT
9459if test -n "$SORT"; then
9460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9461$as_echo "$SORT" >&6; }
9462else
9463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464$as_echo "no" >&6; }
9465fi
9466
9467
9468        if test "x$SORT" = x; then
9469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9470        fi
9471      else
9472        # Otherwise we believe it is a complete path. Use it as it is.
9473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9474$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9476$as_echo_n "checking for SORT... " >&6; }
9477        if test ! -x "$tool_specified"; then
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9479$as_echo "not found" >&6; }
9480          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9481        fi
9482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9483$as_echo "$tool_specified" >&6; }
9484      fi
9485    fi
9486  fi
9487
9488
9489
9490  if test "x$SORT" = x; then
9491    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9492  fi
9493
9494
9495
9496
9497
9498  # Publish this variable in the help.
9499
9500
9501  if test "x$TAIL" = x; then
9502    # The variable is not set by user, try to locate tool using the code snippet
9503    for ac_prog in tail
9504do
9505  # Extract the first word of "$ac_prog", so it can be a program name with args.
9506set dummy $ac_prog; ac_word=$2
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508$as_echo_n "checking for $ac_word... " >&6; }
9509if ${ac_cv_path_TAIL+:} false; then :
9510  $as_echo_n "(cached) " >&6
9511else
9512  case $TAIL in
9513  [\\/]* | ?:[\\/]*)
9514  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9515  ;;
9516  *)
9517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9518for as_dir in $PATH
9519do
9520  IFS=$as_save_IFS
9521  test -z "$as_dir" && as_dir=.
9522    for ac_exec_ext in '' $ac_executable_extensions; do
9523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9524    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9526    break 2
9527  fi
9528done
9529  done
9530IFS=$as_save_IFS
9531
9532  ;;
9533esac
9534fi
9535TAIL=$ac_cv_path_TAIL
9536if test -n "$TAIL"; then
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9538$as_echo "$TAIL" >&6; }
9539else
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
9542fi
9543
9544
9545  test -n "$TAIL" && break
9546done
9547
9548  else
9549    # The variable is set, but is it from the command line or the environment?
9550
9551    # Try to remove the string !TAIL! from our list.
9552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9554      # If it failed, the variable was not from the command line. Ignore it,
9555      # but warn the user (except for BASH, which is always set by the calling BASH).
9556      if test "xTAIL" != xBASH; then
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9558$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9559      fi
9560      # Try to locate tool using the code snippet
9561      for ac_prog in tail
9562do
9563  # Extract the first word of "$ac_prog", so it can be a program name with args.
9564set dummy $ac_prog; ac_word=$2
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566$as_echo_n "checking for $ac_word... " >&6; }
9567if ${ac_cv_path_TAIL+:} false; then :
9568  $as_echo_n "(cached) " >&6
9569else
9570  case $TAIL in
9571  [\\/]* | ?:[\\/]*)
9572  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9573  ;;
9574  *)
9575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9576for as_dir in $PATH
9577do
9578  IFS=$as_save_IFS
9579  test -z "$as_dir" && as_dir=.
9580    for ac_exec_ext in '' $ac_executable_extensions; do
9581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9582    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9584    break 2
9585  fi
9586done
9587  done
9588IFS=$as_save_IFS
9589
9590  ;;
9591esac
9592fi
9593TAIL=$ac_cv_path_TAIL
9594if test -n "$TAIL"; then
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9596$as_echo "$TAIL" >&6; }
9597else
9598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599$as_echo "no" >&6; }
9600fi
9601
9602
9603  test -n "$TAIL" && break
9604done
9605
9606    else
9607      # If it succeeded, then it was overridden by the user. We will use it
9608      # for the tool.
9609
9610      # First remove it from the list of overridden variables, so we can test
9611      # for unknown variables in the end.
9612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9613
9614      # Check if the provided tool contains a complete path.
9615      tool_specified="$TAIL"
9616      tool_basename="${tool_specified##*/}"
9617      if test "x$tool_basename" = "x$tool_specified"; then
9618        # A command without a complete path is provided, search $PATH.
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9620$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9621        # Extract the first word of "$tool_basename", so it can be a program name with args.
9622set dummy $tool_basename; ac_word=$2
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9624$as_echo_n "checking for $ac_word... " >&6; }
9625if ${ac_cv_path_TAIL+:} false; then :
9626  $as_echo_n "(cached) " >&6
9627else
9628  case $TAIL in
9629  [\\/]* | ?:[\\/]*)
9630  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9631  ;;
9632  *)
9633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9634for as_dir in $PATH
9635do
9636  IFS=$as_save_IFS
9637  test -z "$as_dir" && as_dir=.
9638    for ac_exec_ext in '' $ac_executable_extensions; do
9639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9640    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9642    break 2
9643  fi
9644done
9645  done
9646IFS=$as_save_IFS
9647
9648  ;;
9649esac
9650fi
9651TAIL=$ac_cv_path_TAIL
9652if test -n "$TAIL"; then
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9654$as_echo "$TAIL" >&6; }
9655else
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657$as_echo "no" >&6; }
9658fi
9659
9660
9661        if test "x$TAIL" = x; then
9662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9663        fi
9664      else
9665        # Otherwise we believe it is a complete path. Use it as it is.
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9667$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9669$as_echo_n "checking for TAIL... " >&6; }
9670        if test ! -x "$tool_specified"; then
9671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9672$as_echo "not found" >&6; }
9673          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9674        fi
9675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9676$as_echo "$tool_specified" >&6; }
9677      fi
9678    fi
9679  fi
9680
9681
9682
9683  if test "x$TAIL" = x; then
9684    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9685  fi
9686
9687
9688
9689
9690
9691  # Publish this variable in the help.
9692
9693
9694  if test "x$TAR" = x; then
9695    # The variable is not set by user, try to locate tool using the code snippet
9696    for ac_prog in tar
9697do
9698  # Extract the first word of "$ac_prog", so it can be a program name with args.
9699set dummy $ac_prog; ac_word=$2
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9701$as_echo_n "checking for $ac_word... " >&6; }
9702if ${ac_cv_path_TAR+:} false; then :
9703  $as_echo_n "(cached) " >&6
9704else
9705  case $TAR in
9706  [\\/]* | ?:[\\/]*)
9707  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9708  ;;
9709  *)
9710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713  IFS=$as_save_IFS
9714  test -z "$as_dir" && as_dir=.
9715    for ac_exec_ext in '' $ac_executable_extensions; do
9716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719    break 2
9720  fi
9721done
9722  done
9723IFS=$as_save_IFS
9724
9725  ;;
9726esac
9727fi
9728TAR=$ac_cv_path_TAR
9729if test -n "$TAR"; then
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9731$as_echo "$TAR" >&6; }
9732else
9733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
9735fi
9736
9737
9738  test -n "$TAR" && break
9739done
9740
9741  else
9742    # The variable is set, but is it from the command line or the environment?
9743
9744    # Try to remove the string !TAR! from our list.
9745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9747      # If it failed, the variable was not from the command line. Ignore it,
9748      # but warn the user (except for BASH, which is always set by the calling BASH).
9749      if test "xTAR" != xBASH; then
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9751$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9752      fi
9753      # Try to locate tool using the code snippet
9754      for ac_prog in tar
9755do
9756  # Extract the first word of "$ac_prog", so it can be a program name with args.
9757set dummy $ac_prog; ac_word=$2
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759$as_echo_n "checking for $ac_word... " >&6; }
9760if ${ac_cv_path_TAR+:} false; then :
9761  $as_echo_n "(cached) " >&6
9762else
9763  case $TAR in
9764  [\\/]* | ?:[\\/]*)
9765  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9766  ;;
9767  *)
9768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771  IFS=$as_save_IFS
9772  test -z "$as_dir" && as_dir=.
9773    for ac_exec_ext in '' $ac_executable_extensions; do
9774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777    break 2
9778  fi
9779done
9780  done
9781IFS=$as_save_IFS
9782
9783  ;;
9784esac
9785fi
9786TAR=$ac_cv_path_TAR
9787if test -n "$TAR"; then
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9789$as_echo "$TAR" >&6; }
9790else
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793fi
9794
9795
9796  test -n "$TAR" && break
9797done
9798
9799    else
9800      # If it succeeded, then it was overridden by the user. We will use it
9801      # for the tool.
9802
9803      # First remove it from the list of overridden variables, so we can test
9804      # for unknown variables in the end.
9805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9806
9807      # Check if the provided tool contains a complete path.
9808      tool_specified="$TAR"
9809      tool_basename="${tool_specified##*/}"
9810      if test "x$tool_basename" = "x$tool_specified"; then
9811        # A command without a complete path is provided, search $PATH.
9812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9813$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9814        # Extract the first word of "$tool_basename", so it can be a program name with args.
9815set dummy $tool_basename; ac_word=$2
9816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9817$as_echo_n "checking for $ac_word... " >&6; }
9818if ${ac_cv_path_TAR+:} false; then :
9819  $as_echo_n "(cached) " >&6
9820else
9821  case $TAR in
9822  [\\/]* | ?:[\\/]*)
9823  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9824  ;;
9825  *)
9826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827for as_dir in $PATH
9828do
9829  IFS=$as_save_IFS
9830  test -z "$as_dir" && as_dir=.
9831    for ac_exec_ext in '' $ac_executable_extensions; do
9832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835    break 2
9836  fi
9837done
9838  done
9839IFS=$as_save_IFS
9840
9841  ;;
9842esac
9843fi
9844TAR=$ac_cv_path_TAR
9845if test -n "$TAR"; then
9846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9847$as_echo "$TAR" >&6; }
9848else
9849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9850$as_echo "no" >&6; }
9851fi
9852
9853
9854        if test "x$TAR" = x; then
9855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9856        fi
9857      else
9858        # Otherwise we believe it is a complete path. Use it as it is.
9859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9860$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9862$as_echo_n "checking for TAR... " >&6; }
9863        if test ! -x "$tool_specified"; then
9864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9865$as_echo "not found" >&6; }
9866          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9867        fi
9868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9869$as_echo "$tool_specified" >&6; }
9870      fi
9871    fi
9872  fi
9873
9874
9875
9876  if test "x$TAR" = x; then
9877    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9878  fi
9879
9880
9881
9882
9883
9884  # Publish this variable in the help.
9885
9886
9887  if test "x$TEE" = x; then
9888    # The variable is not set by user, try to locate tool using the code snippet
9889    for ac_prog in tee
9890do
9891  # Extract the first word of "$ac_prog", so it can be a program name with args.
9892set dummy $ac_prog; ac_word=$2
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894$as_echo_n "checking for $ac_word... " >&6; }
9895if ${ac_cv_path_TEE+:} false; then :
9896  $as_echo_n "(cached) " >&6
9897else
9898  case $TEE in
9899  [\\/]* | ?:[\\/]*)
9900  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9901  ;;
9902  *)
9903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904for as_dir in $PATH
9905do
9906  IFS=$as_save_IFS
9907  test -z "$as_dir" && as_dir=.
9908    for ac_exec_ext in '' $ac_executable_extensions; do
9909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912    break 2
9913  fi
9914done
9915  done
9916IFS=$as_save_IFS
9917
9918  ;;
9919esac
9920fi
9921TEE=$ac_cv_path_TEE
9922if test -n "$TEE"; then
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9924$as_echo "$TEE" >&6; }
9925else
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928fi
9929
9930
9931  test -n "$TEE" && break
9932done
9933
9934  else
9935    # The variable is set, but is it from the command line or the environment?
9936
9937    # Try to remove the string !TEE! from our list.
9938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9940      # If it failed, the variable was not from the command line. Ignore it,
9941      # but warn the user (except for BASH, which is always set by the calling BASH).
9942      if test "xTEE" != xBASH; then
9943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9944$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9945      fi
9946      # Try to locate tool using the code snippet
9947      for ac_prog in tee
9948do
9949  # Extract the first word of "$ac_prog", so it can be a program name with args.
9950set dummy $ac_prog; ac_word=$2
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952$as_echo_n "checking for $ac_word... " >&6; }
9953if ${ac_cv_path_TEE+:} false; then :
9954  $as_echo_n "(cached) " >&6
9955else
9956  case $TEE in
9957  [\\/]* | ?:[\\/]*)
9958  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9959  ;;
9960  *)
9961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962for as_dir in $PATH
9963do
9964  IFS=$as_save_IFS
9965  test -z "$as_dir" && as_dir=.
9966    for ac_exec_ext in '' $ac_executable_extensions; do
9967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970    break 2
9971  fi
9972done
9973  done
9974IFS=$as_save_IFS
9975
9976  ;;
9977esac
9978fi
9979TEE=$ac_cv_path_TEE
9980if test -n "$TEE"; then
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9982$as_echo "$TEE" >&6; }
9983else
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986fi
9987
9988
9989  test -n "$TEE" && break
9990done
9991
9992    else
9993      # If it succeeded, then it was overridden by the user. We will use it
9994      # for the tool.
9995
9996      # First remove it from the list of overridden variables, so we can test
9997      # for unknown variables in the end.
9998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9999
10000      # Check if the provided tool contains a complete path.
10001      tool_specified="$TEE"
10002      tool_basename="${tool_specified##*/}"
10003      if test "x$tool_basename" = "x$tool_specified"; then
10004        # A command without a complete path is provided, search $PATH.
10005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10006$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10007        # Extract the first word of "$tool_basename", so it can be a program name with args.
10008set dummy $tool_basename; ac_word=$2
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10010$as_echo_n "checking for $ac_word... " >&6; }
10011if ${ac_cv_path_TEE+:} false; then :
10012  $as_echo_n "(cached) " >&6
10013else
10014  case $TEE in
10015  [\\/]* | ?:[\\/]*)
10016  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10017  ;;
10018  *)
10019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  test -z "$as_dir" && as_dir=.
10024    for ac_exec_ext in '' $ac_executable_extensions; do
10025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10026    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10028    break 2
10029  fi
10030done
10031  done
10032IFS=$as_save_IFS
10033
10034  ;;
10035esac
10036fi
10037TEE=$ac_cv_path_TEE
10038if test -n "$TEE"; then
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10040$as_echo "$TEE" >&6; }
10041else
10042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044fi
10045
10046
10047        if test "x$TEE" = x; then
10048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10049        fi
10050      else
10051        # Otherwise we believe it is a complete path. Use it as it is.
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10053$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10055$as_echo_n "checking for TEE... " >&6; }
10056        if test ! -x "$tool_specified"; then
10057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10058$as_echo "not found" >&6; }
10059          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10060        fi
10061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10062$as_echo "$tool_specified" >&6; }
10063      fi
10064    fi
10065  fi
10066
10067
10068
10069  if test "x$TEE" = x; then
10070    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10071  fi
10072
10073
10074
10075
10076
10077  # Publish this variable in the help.
10078
10079
10080  if test "x$TOUCH" = x; then
10081    # The variable is not set by user, try to locate tool using the code snippet
10082    for ac_prog in touch
10083do
10084  # Extract the first word of "$ac_prog", so it can be a program name with args.
10085set dummy $ac_prog; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if ${ac_cv_path_TOUCH+:} false; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  case $TOUCH in
10092  [\\/]* | ?:[\\/]*)
10093  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10094  ;;
10095  *)
10096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097for as_dir in $PATH
10098do
10099  IFS=$as_save_IFS
10100  test -z "$as_dir" && as_dir=.
10101    for ac_exec_ext in '' $ac_executable_extensions; do
10102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105    break 2
10106  fi
10107done
10108  done
10109IFS=$as_save_IFS
10110
10111  ;;
10112esac
10113fi
10114TOUCH=$ac_cv_path_TOUCH
10115if test -n "$TOUCH"; then
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10117$as_echo "$TOUCH" >&6; }
10118else
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124  test -n "$TOUCH" && break
10125done
10126
10127  else
10128    # The variable is set, but is it from the command line or the environment?
10129
10130    # Try to remove the string !TOUCH! from our list.
10131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10133      # If it failed, the variable was not from the command line. Ignore it,
10134      # but warn the user (except for BASH, which is always set by the calling BASH).
10135      if test "xTOUCH" != xBASH; then
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10137$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10138      fi
10139      # Try to locate tool using the code snippet
10140      for ac_prog in touch
10141do
10142  # Extract the first word of "$ac_prog", so it can be a program name with args.
10143set dummy $ac_prog; ac_word=$2
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145$as_echo_n "checking for $ac_word... " >&6; }
10146if ${ac_cv_path_TOUCH+:} false; then :
10147  $as_echo_n "(cached) " >&6
10148else
10149  case $TOUCH in
10150  [\\/]* | ?:[\\/]*)
10151  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10152  ;;
10153  *)
10154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155for as_dir in $PATH
10156do
10157  IFS=$as_save_IFS
10158  test -z "$as_dir" && as_dir=.
10159    for ac_exec_ext in '' $ac_executable_extensions; do
10160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163    break 2
10164  fi
10165done
10166  done
10167IFS=$as_save_IFS
10168
10169  ;;
10170esac
10171fi
10172TOUCH=$ac_cv_path_TOUCH
10173if test -n "$TOUCH"; then
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10175$as_echo "$TOUCH" >&6; }
10176else
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
10179fi
10180
10181
10182  test -n "$TOUCH" && break
10183done
10184
10185    else
10186      # If it succeeded, then it was overridden by the user. We will use it
10187      # for the tool.
10188
10189      # First remove it from the list of overridden variables, so we can test
10190      # for unknown variables in the end.
10191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10192
10193      # Check if the provided tool contains a complete path.
10194      tool_specified="$TOUCH"
10195      tool_basename="${tool_specified##*/}"
10196      if test "x$tool_basename" = "x$tool_specified"; then
10197        # A command without a complete path is provided, search $PATH.
10198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10199$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10200        # Extract the first word of "$tool_basename", so it can be a program name with args.
10201set dummy $tool_basename; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_TOUCH+:} false; then :
10205  $as_echo_n "(cached) " >&6
10206else
10207  case $TOUCH in
10208  [\\/]* | ?:[\\/]*)
10209  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10210  ;;
10211  *)
10212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215  IFS=$as_save_IFS
10216  test -z "$as_dir" && as_dir=.
10217    for ac_exec_ext in '' $ac_executable_extensions; do
10218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221    break 2
10222  fi
10223done
10224  done
10225IFS=$as_save_IFS
10226
10227  ;;
10228esac
10229fi
10230TOUCH=$ac_cv_path_TOUCH
10231if test -n "$TOUCH"; then
10232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10233$as_echo "$TOUCH" >&6; }
10234else
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240        if test "x$TOUCH" = x; then
10241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10242        fi
10243      else
10244        # Otherwise we believe it is a complete path. Use it as it is.
10245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10246$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10248$as_echo_n "checking for TOUCH... " >&6; }
10249        if test ! -x "$tool_specified"; then
10250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10251$as_echo "not found" >&6; }
10252          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10253        fi
10254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10255$as_echo "$tool_specified" >&6; }
10256      fi
10257    fi
10258  fi
10259
10260
10261
10262  if test "x$TOUCH" = x; then
10263    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10264  fi
10265
10266
10267
10268
10269
10270  # Publish this variable in the help.
10271
10272
10273  if test "x$TR" = x; then
10274    # The variable is not set by user, try to locate tool using the code snippet
10275    for ac_prog in tr
10276do
10277  # Extract the first word of "$ac_prog", so it can be a program name with args.
10278set dummy $ac_prog; ac_word=$2
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280$as_echo_n "checking for $ac_word... " >&6; }
10281if ${ac_cv_path_TR+:} false; then :
10282  $as_echo_n "(cached) " >&6
10283else
10284  case $TR in
10285  [\\/]* | ?:[\\/]*)
10286  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10287  ;;
10288  *)
10289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290for as_dir in $PATH
10291do
10292  IFS=$as_save_IFS
10293  test -z "$as_dir" && as_dir=.
10294    for ac_exec_ext in '' $ac_executable_extensions; do
10295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10296    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298    break 2
10299  fi
10300done
10301  done
10302IFS=$as_save_IFS
10303
10304  ;;
10305esac
10306fi
10307TR=$ac_cv_path_TR
10308if test -n "$TR"; then
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10310$as_echo "$TR" >&6; }
10311else
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314fi
10315
10316
10317  test -n "$TR" && break
10318done
10319
10320  else
10321    # The variable is set, but is it from the command line or the environment?
10322
10323    # Try to remove the string !TR! from our list.
10324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10326      # If it failed, the variable was not from the command line. Ignore it,
10327      # but warn the user (except for BASH, which is always set by the calling BASH).
10328      if test "xTR" != xBASH; then
10329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10330$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10331      fi
10332      # Try to locate tool using the code snippet
10333      for ac_prog in tr
10334do
10335  # Extract the first word of "$ac_prog", so it can be a program name with args.
10336set dummy $ac_prog; ac_word=$2
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10338$as_echo_n "checking for $ac_word... " >&6; }
10339if ${ac_cv_path_TR+:} false; then :
10340  $as_echo_n "(cached) " >&6
10341else
10342  case $TR in
10343  [\\/]* | ?:[\\/]*)
10344  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10345  ;;
10346  *)
10347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10348for as_dir in $PATH
10349do
10350  IFS=$as_save_IFS
10351  test -z "$as_dir" && as_dir=.
10352    for ac_exec_ext in '' $ac_executable_extensions; do
10353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10354    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10356    break 2
10357  fi
10358done
10359  done
10360IFS=$as_save_IFS
10361
10362  ;;
10363esac
10364fi
10365TR=$ac_cv_path_TR
10366if test -n "$TR"; then
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10368$as_echo "$TR" >&6; }
10369else
10370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371$as_echo "no" >&6; }
10372fi
10373
10374
10375  test -n "$TR" && break
10376done
10377
10378    else
10379      # If it succeeded, then it was overridden by the user. We will use it
10380      # for the tool.
10381
10382      # First remove it from the list of overridden variables, so we can test
10383      # for unknown variables in the end.
10384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10385
10386      # Check if the provided tool contains a complete path.
10387      tool_specified="$TR"
10388      tool_basename="${tool_specified##*/}"
10389      if test "x$tool_basename" = "x$tool_specified"; then
10390        # A command without a complete path is provided, search $PATH.
10391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10392$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10393        # Extract the first word of "$tool_basename", so it can be a program name with args.
10394set dummy $tool_basename; ac_word=$2
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10396$as_echo_n "checking for $ac_word... " >&6; }
10397if ${ac_cv_path_TR+:} false; then :
10398  $as_echo_n "(cached) " >&6
10399else
10400  case $TR in
10401  [\\/]* | ?:[\\/]*)
10402  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10403  ;;
10404  *)
10405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10406for as_dir in $PATH
10407do
10408  IFS=$as_save_IFS
10409  test -z "$as_dir" && as_dir=.
10410    for ac_exec_ext in '' $ac_executable_extensions; do
10411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10412    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10414    break 2
10415  fi
10416done
10417  done
10418IFS=$as_save_IFS
10419
10420  ;;
10421esac
10422fi
10423TR=$ac_cv_path_TR
10424if test -n "$TR"; then
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10426$as_echo "$TR" >&6; }
10427else
10428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
10430fi
10431
10432
10433        if test "x$TR" = x; then
10434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10435        fi
10436      else
10437        # Otherwise we believe it is a complete path. Use it as it is.
10438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10439$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10441$as_echo_n "checking for TR... " >&6; }
10442        if test ! -x "$tool_specified"; then
10443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10444$as_echo "not found" >&6; }
10445          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10446        fi
10447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10448$as_echo "$tool_specified" >&6; }
10449      fi
10450    fi
10451  fi
10452
10453
10454
10455  if test "x$TR" = x; then
10456    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10457  fi
10458
10459
10460
10461
10462
10463  # Publish this variable in the help.
10464
10465
10466  if test "x$UNAME" = x; then
10467    # The variable is not set by user, try to locate tool using the code snippet
10468    for ac_prog in uname
10469do
10470  # Extract the first word of "$ac_prog", so it can be a program name with args.
10471set dummy $ac_prog; ac_word=$2
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473$as_echo_n "checking for $ac_word... " >&6; }
10474if ${ac_cv_path_UNAME+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $UNAME in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10480  ;;
10481  *)
10482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485  IFS=$as_save_IFS
10486  test -z "$as_dir" && as_dir=.
10487    for ac_exec_ext in '' $ac_executable_extensions; do
10488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491    break 2
10492  fi
10493done
10494  done
10495IFS=$as_save_IFS
10496
10497  ;;
10498esac
10499fi
10500UNAME=$ac_cv_path_UNAME
10501if test -n "$UNAME"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10503$as_echo "$UNAME" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510  test -n "$UNAME" && break
10511done
10512
10513  else
10514    # The variable is set, but is it from the command line or the environment?
10515
10516    # Try to remove the string !UNAME! from our list.
10517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10519      # If it failed, the variable was not from the command line. Ignore it,
10520      # but warn the user (except for BASH, which is always set by the calling BASH).
10521      if test "xUNAME" != xBASH; then
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10523$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10524      fi
10525      # Try to locate tool using the code snippet
10526      for ac_prog in uname
10527do
10528  # Extract the first word of "$ac_prog", so it can be a program name with args.
10529set dummy $ac_prog; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_UNAME+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $UNAME in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558UNAME=$ac_cv_path_UNAME
10559if test -n "$UNAME"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10561$as_echo "$UNAME" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568  test -n "$UNAME" && break
10569done
10570
10571    else
10572      # If it succeeded, then it was overridden by the user. We will use it
10573      # for the tool.
10574
10575      # First remove it from the list of overridden variables, so we can test
10576      # for unknown variables in the end.
10577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10578
10579      # Check if the provided tool contains a complete path.
10580      tool_specified="$UNAME"
10581      tool_basename="${tool_specified##*/}"
10582      if test "x$tool_basename" = "x$tool_specified"; then
10583        # A command without a complete path is provided, search $PATH.
10584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10585$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10586        # Extract the first word of "$tool_basename", so it can be a program name with args.
10587set dummy $tool_basename; ac_word=$2
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10589$as_echo_n "checking for $ac_word... " >&6; }
10590if ${ac_cv_path_UNAME+:} false; then :
10591  $as_echo_n "(cached) " >&6
10592else
10593  case $UNAME in
10594  [\\/]* | ?:[\\/]*)
10595  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10596  ;;
10597  *)
10598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10599for as_dir in $PATH
10600do
10601  IFS=$as_save_IFS
10602  test -z "$as_dir" && as_dir=.
10603    for ac_exec_ext in '' $ac_executable_extensions; do
10604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10605    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10607    break 2
10608  fi
10609done
10610  done
10611IFS=$as_save_IFS
10612
10613  ;;
10614esac
10615fi
10616UNAME=$ac_cv_path_UNAME
10617if test -n "$UNAME"; then
10618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10619$as_echo "$UNAME" >&6; }
10620else
10621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
10623fi
10624
10625
10626        if test "x$UNAME" = x; then
10627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10628        fi
10629      else
10630        # Otherwise we believe it is a complete path. Use it as it is.
10631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10632$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10634$as_echo_n "checking for UNAME... " >&6; }
10635        if test ! -x "$tool_specified"; then
10636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10637$as_echo "not found" >&6; }
10638          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10639        fi
10640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10641$as_echo "$tool_specified" >&6; }
10642      fi
10643    fi
10644  fi
10645
10646
10647
10648  if test "x$UNAME" = x; then
10649    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10650  fi
10651
10652
10653
10654
10655
10656  # Publish this variable in the help.
10657
10658
10659  if test "x$UNIQ" = x; then
10660    # The variable is not set by user, try to locate tool using the code snippet
10661    for ac_prog in uniq
10662do
10663  # Extract the first word of "$ac_prog", so it can be a program name with args.
10664set dummy $ac_prog; ac_word=$2
10665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10666$as_echo_n "checking for $ac_word... " >&6; }
10667if ${ac_cv_path_UNIQ+:} false; then :
10668  $as_echo_n "(cached) " >&6
10669else
10670  case $UNIQ in
10671  [\\/]* | ?:[\\/]*)
10672  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10673  ;;
10674  *)
10675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10676for as_dir in $PATH
10677do
10678  IFS=$as_save_IFS
10679  test -z "$as_dir" && as_dir=.
10680    for ac_exec_ext in '' $ac_executable_extensions; do
10681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10682    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10684    break 2
10685  fi
10686done
10687  done
10688IFS=$as_save_IFS
10689
10690  ;;
10691esac
10692fi
10693UNIQ=$ac_cv_path_UNIQ
10694if test -n "$UNIQ"; then
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10696$as_echo "$UNIQ" >&6; }
10697else
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700fi
10701
10702
10703  test -n "$UNIQ" && break
10704done
10705
10706  else
10707    # The variable is set, but is it from the command line or the environment?
10708
10709    # Try to remove the string !UNIQ! from our list.
10710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10712      # If it failed, the variable was not from the command line. Ignore it,
10713      # but warn the user (except for BASH, which is always set by the calling BASH).
10714      if test "xUNIQ" != xBASH; then
10715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10716$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10717      fi
10718      # Try to locate tool using the code snippet
10719      for ac_prog in uniq
10720do
10721  # Extract the first word of "$ac_prog", so it can be a program name with args.
10722set dummy $ac_prog; ac_word=$2
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10724$as_echo_n "checking for $ac_word... " >&6; }
10725if ${ac_cv_path_UNIQ+:} false; then :
10726  $as_echo_n "(cached) " >&6
10727else
10728  case $UNIQ in
10729  [\\/]* | ?:[\\/]*)
10730  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10731  ;;
10732  *)
10733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734for as_dir in $PATH
10735do
10736  IFS=$as_save_IFS
10737  test -z "$as_dir" && as_dir=.
10738    for ac_exec_ext in '' $ac_executable_extensions; do
10739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10740    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742    break 2
10743  fi
10744done
10745  done
10746IFS=$as_save_IFS
10747
10748  ;;
10749esac
10750fi
10751UNIQ=$ac_cv_path_UNIQ
10752if test -n "$UNIQ"; then
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10754$as_echo "$UNIQ" >&6; }
10755else
10756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
10758fi
10759
10760
10761  test -n "$UNIQ" && break
10762done
10763
10764    else
10765      # If it succeeded, then it was overridden by the user. We will use it
10766      # for the tool.
10767
10768      # First remove it from the list of overridden variables, so we can test
10769      # for unknown variables in the end.
10770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10771
10772      # Check if the provided tool contains a complete path.
10773      tool_specified="$UNIQ"
10774      tool_basename="${tool_specified##*/}"
10775      if test "x$tool_basename" = "x$tool_specified"; then
10776        # A command without a complete path is provided, search $PATH.
10777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10778$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10779        # Extract the first word of "$tool_basename", so it can be a program name with args.
10780set dummy $tool_basename; ac_word=$2
10781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10782$as_echo_n "checking for $ac_word... " >&6; }
10783if ${ac_cv_path_UNIQ+:} false; then :
10784  $as_echo_n "(cached) " >&6
10785else
10786  case $UNIQ in
10787  [\\/]* | ?:[\\/]*)
10788  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10789  ;;
10790  *)
10791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792for as_dir in $PATH
10793do
10794  IFS=$as_save_IFS
10795  test -z "$as_dir" && as_dir=.
10796    for ac_exec_ext in '' $ac_executable_extensions; do
10797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10798    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10800    break 2
10801  fi
10802done
10803  done
10804IFS=$as_save_IFS
10805
10806  ;;
10807esac
10808fi
10809UNIQ=$ac_cv_path_UNIQ
10810if test -n "$UNIQ"; then
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10812$as_echo "$UNIQ" >&6; }
10813else
10814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816fi
10817
10818
10819        if test "x$UNIQ" = x; then
10820          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10821        fi
10822      else
10823        # Otherwise we believe it is a complete path. Use it as it is.
10824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10825$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10827$as_echo_n "checking for UNIQ... " >&6; }
10828        if test ! -x "$tool_specified"; then
10829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10830$as_echo "not found" >&6; }
10831          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10832        fi
10833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10834$as_echo "$tool_specified" >&6; }
10835      fi
10836    fi
10837  fi
10838
10839
10840
10841  if test "x$UNIQ" = x; then
10842    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10843  fi
10844
10845
10846
10847
10848
10849  # Publish this variable in the help.
10850
10851
10852  if test "x$WC" = x; then
10853    # The variable is not set by user, try to locate tool using the code snippet
10854    for ac_prog in wc
10855do
10856  # Extract the first word of "$ac_prog", so it can be a program name with args.
10857set dummy $ac_prog; ac_word=$2
10858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10859$as_echo_n "checking for $ac_word... " >&6; }
10860if ${ac_cv_path_WC+:} false; then :
10861  $as_echo_n "(cached) " >&6
10862else
10863  case $WC in
10864  [\\/]* | ?:[\\/]*)
10865  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10866  ;;
10867  *)
10868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10869for as_dir in $PATH
10870do
10871  IFS=$as_save_IFS
10872  test -z "$as_dir" && as_dir=.
10873    for ac_exec_ext in '' $ac_executable_extensions; do
10874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10875    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10877    break 2
10878  fi
10879done
10880  done
10881IFS=$as_save_IFS
10882
10883  ;;
10884esac
10885fi
10886WC=$ac_cv_path_WC
10887if test -n "$WC"; then
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10889$as_echo "$WC" >&6; }
10890else
10891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892$as_echo "no" >&6; }
10893fi
10894
10895
10896  test -n "$WC" && break
10897done
10898
10899  else
10900    # The variable is set, but is it from the command line or the environment?
10901
10902    # Try to remove the string !WC! from our list.
10903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10905      # If it failed, the variable was not from the command line. Ignore it,
10906      # but warn the user (except for BASH, which is always set by the calling BASH).
10907      if test "xWC" != xBASH; then
10908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10909$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10910      fi
10911      # Try to locate tool using the code snippet
10912      for ac_prog in wc
10913do
10914  # Extract the first word of "$ac_prog", so it can be a program name with args.
10915set dummy $ac_prog; ac_word=$2
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10917$as_echo_n "checking for $ac_word... " >&6; }
10918if ${ac_cv_path_WC+:} false; then :
10919  $as_echo_n "(cached) " >&6
10920else
10921  case $WC in
10922  [\\/]* | ?:[\\/]*)
10923  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10924  ;;
10925  *)
10926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10927for as_dir in $PATH
10928do
10929  IFS=$as_save_IFS
10930  test -z "$as_dir" && as_dir=.
10931    for ac_exec_ext in '' $ac_executable_extensions; do
10932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10933    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10935    break 2
10936  fi
10937done
10938  done
10939IFS=$as_save_IFS
10940
10941  ;;
10942esac
10943fi
10944WC=$ac_cv_path_WC
10945if test -n "$WC"; then
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10947$as_echo "$WC" >&6; }
10948else
10949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
10951fi
10952
10953
10954  test -n "$WC" && break
10955done
10956
10957    else
10958      # If it succeeded, then it was overridden by the user. We will use it
10959      # for the tool.
10960
10961      # First remove it from the list of overridden variables, so we can test
10962      # for unknown variables in the end.
10963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10964
10965      # Check if the provided tool contains a complete path.
10966      tool_specified="$WC"
10967      tool_basename="${tool_specified##*/}"
10968      if test "x$tool_basename" = "x$tool_specified"; then
10969        # A command without a complete path is provided, search $PATH.
10970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10971$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10972        # Extract the first word of "$tool_basename", so it can be a program name with args.
10973set dummy $tool_basename; ac_word=$2
10974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10975$as_echo_n "checking for $ac_word... " >&6; }
10976if ${ac_cv_path_WC+:} false; then :
10977  $as_echo_n "(cached) " >&6
10978else
10979  case $WC in
10980  [\\/]* | ?:[\\/]*)
10981  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10982  ;;
10983  *)
10984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10985for as_dir in $PATH
10986do
10987  IFS=$as_save_IFS
10988  test -z "$as_dir" && as_dir=.
10989    for ac_exec_ext in '' $ac_executable_extensions; do
10990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10991    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10993    break 2
10994  fi
10995done
10996  done
10997IFS=$as_save_IFS
10998
10999  ;;
11000esac
11001fi
11002WC=$ac_cv_path_WC
11003if test -n "$WC"; then
11004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11005$as_echo "$WC" >&6; }
11006else
11007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008$as_echo "no" >&6; }
11009fi
11010
11011
11012        if test "x$WC" = x; then
11013          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11014        fi
11015      else
11016        # Otherwise we believe it is a complete path. Use it as it is.
11017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11018$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11020$as_echo_n "checking for WC... " >&6; }
11021        if test ! -x "$tool_specified"; then
11022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11023$as_echo "not found" >&6; }
11024          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11025        fi
11026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11027$as_echo "$tool_specified" >&6; }
11028      fi
11029    fi
11030  fi
11031
11032
11033
11034  if test "x$WC" = x; then
11035    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11036  fi
11037
11038
11039
11040
11041
11042  # Publish this variable in the help.
11043
11044
11045  if test "x$WHICH" = x; then
11046    # The variable is not set by user, try to locate tool using the code snippet
11047    for ac_prog in which
11048do
11049  # Extract the first word of "$ac_prog", so it can be a program name with args.
11050set dummy $ac_prog; ac_word=$2
11051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11052$as_echo_n "checking for $ac_word... " >&6; }
11053if ${ac_cv_path_WHICH+:} false; then :
11054  $as_echo_n "(cached) " >&6
11055else
11056  case $WHICH in
11057  [\\/]* | ?:[\\/]*)
11058  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11059  ;;
11060  *)
11061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11062for as_dir in $PATH
11063do
11064  IFS=$as_save_IFS
11065  test -z "$as_dir" && as_dir=.
11066    for ac_exec_ext in '' $ac_executable_extensions; do
11067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11068    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11070    break 2
11071  fi
11072done
11073  done
11074IFS=$as_save_IFS
11075
11076  ;;
11077esac
11078fi
11079WHICH=$ac_cv_path_WHICH
11080if test -n "$WHICH"; then
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11082$as_echo "$WHICH" >&6; }
11083else
11084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11085$as_echo "no" >&6; }
11086fi
11087
11088
11089  test -n "$WHICH" && break
11090done
11091
11092  else
11093    # The variable is set, but is it from the command line or the environment?
11094
11095    # Try to remove the string !WHICH! from our list.
11096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11098      # If it failed, the variable was not from the command line. Ignore it,
11099      # but warn the user (except for BASH, which is always set by the calling BASH).
11100      if test "xWHICH" != xBASH; then
11101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11102$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11103      fi
11104      # Try to locate tool using the code snippet
11105      for ac_prog in which
11106do
11107  # Extract the first word of "$ac_prog", so it can be a program name with args.
11108set dummy $ac_prog; ac_word=$2
11109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11110$as_echo_n "checking for $ac_word... " >&6; }
11111if ${ac_cv_path_WHICH+:} false; then :
11112  $as_echo_n "(cached) " >&6
11113else
11114  case $WHICH in
11115  [\\/]* | ?:[\\/]*)
11116  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11117  ;;
11118  *)
11119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11120for as_dir in $PATH
11121do
11122  IFS=$as_save_IFS
11123  test -z "$as_dir" && as_dir=.
11124    for ac_exec_ext in '' $ac_executable_extensions; do
11125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11126    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11128    break 2
11129  fi
11130done
11131  done
11132IFS=$as_save_IFS
11133
11134  ;;
11135esac
11136fi
11137WHICH=$ac_cv_path_WHICH
11138if test -n "$WHICH"; then
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11140$as_echo "$WHICH" >&6; }
11141else
11142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11143$as_echo "no" >&6; }
11144fi
11145
11146
11147  test -n "$WHICH" && break
11148done
11149
11150    else
11151      # If it succeeded, then it was overridden by the user. We will use it
11152      # for the tool.
11153
11154      # First remove it from the list of overridden variables, so we can test
11155      # for unknown variables in the end.
11156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11157
11158      # Check if the provided tool contains a complete path.
11159      tool_specified="$WHICH"
11160      tool_basename="${tool_specified##*/}"
11161      if test "x$tool_basename" = "x$tool_specified"; then
11162        # A command without a complete path is provided, search $PATH.
11163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11164$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11165        # Extract the first word of "$tool_basename", so it can be a program name with args.
11166set dummy $tool_basename; ac_word=$2
11167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11168$as_echo_n "checking for $ac_word... " >&6; }
11169if ${ac_cv_path_WHICH+:} false; then :
11170  $as_echo_n "(cached) " >&6
11171else
11172  case $WHICH in
11173  [\\/]* | ?:[\\/]*)
11174  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11175  ;;
11176  *)
11177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11178for as_dir in $PATH
11179do
11180  IFS=$as_save_IFS
11181  test -z "$as_dir" && as_dir=.
11182    for ac_exec_ext in '' $ac_executable_extensions; do
11183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11184    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11186    break 2
11187  fi
11188done
11189  done
11190IFS=$as_save_IFS
11191
11192  ;;
11193esac
11194fi
11195WHICH=$ac_cv_path_WHICH
11196if test -n "$WHICH"; then
11197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11198$as_echo "$WHICH" >&6; }
11199else
11200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
11202fi
11203
11204
11205        if test "x$WHICH" = x; then
11206          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11207        fi
11208      else
11209        # Otherwise we believe it is a complete path. Use it as it is.
11210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11211$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11213$as_echo_n "checking for WHICH... " >&6; }
11214        if test ! -x "$tool_specified"; then
11215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11216$as_echo "not found" >&6; }
11217          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11218        fi
11219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11220$as_echo "$tool_specified" >&6; }
11221      fi
11222    fi
11223  fi
11224
11225
11226
11227  if test "x$WHICH" = x; then
11228    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11229  fi
11230
11231
11232
11233
11234
11235  # Publish this variable in the help.
11236
11237
11238  if test "x$XARGS" = x; then
11239    # The variable is not set by user, try to locate tool using the code snippet
11240    for ac_prog in xargs
11241do
11242  # Extract the first word of "$ac_prog", so it can be a program name with args.
11243set dummy $ac_prog; ac_word=$2
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11245$as_echo_n "checking for $ac_word... " >&6; }
11246if ${ac_cv_path_XARGS+:} false; then :
11247  $as_echo_n "(cached) " >&6
11248else
11249  case $XARGS in
11250  [\\/]* | ?:[\\/]*)
11251  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11252  ;;
11253  *)
11254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11255for as_dir in $PATH
11256do
11257  IFS=$as_save_IFS
11258  test -z "$as_dir" && as_dir=.
11259    for ac_exec_ext in '' $ac_executable_extensions; do
11260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11261    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11263    break 2
11264  fi
11265done
11266  done
11267IFS=$as_save_IFS
11268
11269  ;;
11270esac
11271fi
11272XARGS=$ac_cv_path_XARGS
11273if test -n "$XARGS"; then
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11275$as_echo "$XARGS" >&6; }
11276else
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
11279fi
11280
11281
11282  test -n "$XARGS" && break
11283done
11284
11285  else
11286    # The variable is set, but is it from the command line or the environment?
11287
11288    # Try to remove the string !XARGS! from our list.
11289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11291      # If it failed, the variable was not from the command line. Ignore it,
11292      # but warn the user (except for BASH, which is always set by the calling BASH).
11293      if test "xXARGS" != xBASH; then
11294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11295$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11296      fi
11297      # Try to locate tool using the code snippet
11298      for ac_prog in xargs
11299do
11300  # Extract the first word of "$ac_prog", so it can be a program name with args.
11301set dummy $ac_prog; ac_word=$2
11302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11303$as_echo_n "checking for $ac_word... " >&6; }
11304if ${ac_cv_path_XARGS+:} false; then :
11305  $as_echo_n "(cached) " >&6
11306else
11307  case $XARGS in
11308  [\\/]* | ?:[\\/]*)
11309  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11310  ;;
11311  *)
11312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11313for as_dir in $PATH
11314do
11315  IFS=$as_save_IFS
11316  test -z "$as_dir" && as_dir=.
11317    for ac_exec_ext in '' $ac_executable_extensions; do
11318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11319    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11321    break 2
11322  fi
11323done
11324  done
11325IFS=$as_save_IFS
11326
11327  ;;
11328esac
11329fi
11330XARGS=$ac_cv_path_XARGS
11331if test -n "$XARGS"; then
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11333$as_echo "$XARGS" >&6; }
11334else
11335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
11337fi
11338
11339
11340  test -n "$XARGS" && break
11341done
11342
11343    else
11344      # If it succeeded, then it was overridden by the user. We will use it
11345      # for the tool.
11346
11347      # First remove it from the list of overridden variables, so we can test
11348      # for unknown variables in the end.
11349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11350
11351      # Check if the provided tool contains a complete path.
11352      tool_specified="$XARGS"
11353      tool_basename="${tool_specified##*/}"
11354      if test "x$tool_basename" = "x$tool_specified"; then
11355        # A command without a complete path is provided, search $PATH.
11356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11357$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11358        # Extract the first word of "$tool_basename", so it can be a program name with args.
11359set dummy $tool_basename; ac_word=$2
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11361$as_echo_n "checking for $ac_word... " >&6; }
11362if ${ac_cv_path_XARGS+:} false; then :
11363  $as_echo_n "(cached) " >&6
11364else
11365  case $XARGS in
11366  [\\/]* | ?:[\\/]*)
11367  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11368  ;;
11369  *)
11370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11371for as_dir in $PATH
11372do
11373  IFS=$as_save_IFS
11374  test -z "$as_dir" && as_dir=.
11375    for ac_exec_ext in '' $ac_executable_extensions; do
11376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11377    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11379    break 2
11380  fi
11381done
11382  done
11383IFS=$as_save_IFS
11384
11385  ;;
11386esac
11387fi
11388XARGS=$ac_cv_path_XARGS
11389if test -n "$XARGS"; then
11390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11391$as_echo "$XARGS" >&6; }
11392else
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394$as_echo "no" >&6; }
11395fi
11396
11397
11398        if test "x$XARGS" = x; then
11399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11400        fi
11401      else
11402        # Otherwise we believe it is a complete path. Use it as it is.
11403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11404$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11406$as_echo_n "checking for XARGS... " >&6; }
11407        if test ! -x "$tool_specified"; then
11408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11409$as_echo "not found" >&6; }
11410          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11411        fi
11412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11413$as_echo "$tool_specified" >&6; }
11414      fi
11415    fi
11416  fi
11417
11418
11419
11420  if test "x$XARGS" = x; then
11421    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11422  fi
11423
11424
11425
11426  # Then required tools that require some special treatment.
11427
11428
11429  # Publish this variable in the help.
11430
11431
11432  if test "x$AWK" = x; then
11433    # The variable is not set by user, try to locate tool using the code snippet
11434    for ac_prog in gawk mawk nawk awk
11435do
11436  # Extract the first word of "$ac_prog", so it can be a program name with args.
11437set dummy $ac_prog; ac_word=$2
11438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11439$as_echo_n "checking for $ac_word... " >&6; }
11440if ${ac_cv_prog_AWK+:} false; then :
11441  $as_echo_n "(cached) " >&6
11442else
11443  if test -n "$AWK"; then
11444  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11445else
11446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11447for as_dir in $PATH
11448do
11449  IFS=$as_save_IFS
11450  test -z "$as_dir" && as_dir=.
11451    for ac_exec_ext in '' $ac_executable_extensions; do
11452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11453    ac_cv_prog_AWK="$ac_prog"
11454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11455    break 2
11456  fi
11457done
11458  done
11459IFS=$as_save_IFS
11460
11461fi
11462fi
11463AWK=$ac_cv_prog_AWK
11464if test -n "$AWK"; then
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11466$as_echo "$AWK" >&6; }
11467else
11468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470fi
11471
11472
11473  test -n "$AWK" && break
11474done
11475
11476  else
11477    # The variable is set, but is it from the command line or the environment?
11478
11479    # Try to remove the string !AWK! from our list.
11480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11482      # If it failed, the variable was not from the command line. Ignore it,
11483      # but warn the user (except for BASH, which is always set by the calling BASH).
11484      if test "xAWK" != xBASH; then
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11486$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11487      fi
11488      # Try to locate tool using the code snippet
11489      for ac_prog in gawk mawk nawk awk
11490do
11491  # Extract the first word of "$ac_prog", so it can be a program name with args.
11492set dummy $ac_prog; ac_word=$2
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11494$as_echo_n "checking for $ac_word... " >&6; }
11495if ${ac_cv_prog_AWK+:} false; then :
11496  $as_echo_n "(cached) " >&6
11497else
11498  if test -n "$AWK"; then
11499  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11500else
11501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_prog_AWK="$ac_prog"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516fi
11517fi
11518AWK=$ac_cv_prog_AWK
11519if test -n "$AWK"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11521$as_echo "$AWK" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528  test -n "$AWK" && break
11529done
11530
11531    else
11532      # If it succeeded, then it was overridden by the user. We will use it
11533      # for the tool.
11534
11535      # First remove it from the list of overridden variables, so we can test
11536      # for unknown variables in the end.
11537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11538
11539      # Check if the provided tool contains a complete path.
11540      tool_specified="$AWK"
11541      tool_basename="${tool_specified##*/}"
11542      if test "x$tool_basename" = "x$tool_specified"; then
11543        # A command without a complete path is provided, search $PATH.
11544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11545$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11546        # Extract the first word of "$tool_basename", so it can be a program name with args.
11547set dummy $tool_basename; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_AWK+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $AWK in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576AWK=$ac_cv_path_AWK
11577if test -n "$AWK"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11579$as_echo "$AWK" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586        if test "x$AWK" = x; then
11587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11588        fi
11589      else
11590        # Otherwise we believe it is a complete path. Use it as it is.
11591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11592$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11594$as_echo_n "checking for AWK... " >&6; }
11595        if test ! -x "$tool_specified"; then
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11597$as_echo "not found" >&6; }
11598          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11599        fi
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11601$as_echo "$tool_specified" >&6; }
11602      fi
11603    fi
11604  fi
11605
11606
11607  if test "x$AWK" = x; then
11608    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11609  fi
11610
11611
11612
11613
11614  # Publish this variable in the help.
11615
11616
11617  if test "x$GREP" = x; then
11618    # The variable is not set by user, try to locate tool using the code snippet
11619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11620$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11621if ${ac_cv_path_GREP+:} false; then :
11622  $as_echo_n "(cached) " >&6
11623else
11624  if test -z "$GREP"; then
11625  ac_path_GREP_found=false
11626  # Loop through the user's path and test for each of PROGNAME-LIST
11627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11629do
11630  IFS=$as_save_IFS
11631  test -z "$as_dir" && as_dir=.
11632    for ac_prog in grep ggrep; do
11633    for ac_exec_ext in '' $ac_executable_extensions; do
11634      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11635      as_fn_executable_p "$ac_path_GREP" || continue
11636# Check for GNU ac_path_GREP and select it if it is found.
11637  # Check for GNU $ac_path_GREP
11638case `"$ac_path_GREP" --version 2>&1` in
11639*GNU*)
11640  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11641*)
11642  ac_count=0
11643  $as_echo_n 0123456789 >"conftest.in"
11644  while :
11645  do
11646    cat "conftest.in" "conftest.in" >"conftest.tmp"
11647    mv "conftest.tmp" "conftest.in"
11648    cp "conftest.in" "conftest.nl"
11649    $as_echo 'GREP' >> "conftest.nl"
11650    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11651    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11652    as_fn_arith $ac_count + 1 && ac_count=$as_val
11653    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11654      # Best one so far, save it but keep looking for a better one
11655      ac_cv_path_GREP="$ac_path_GREP"
11656      ac_path_GREP_max=$ac_count
11657    fi
11658    # 10*(2^10) chars as input seems more than enough
11659    test $ac_count -gt 10 && break
11660  done
11661  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11662esac
11663
11664      $ac_path_GREP_found && break 3
11665    done
11666  done
11667  done
11668IFS=$as_save_IFS
11669  if test -z "$ac_cv_path_GREP"; then
11670    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11671  fi
11672else
11673  ac_cv_path_GREP=$GREP
11674fi
11675
11676fi
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11678$as_echo "$ac_cv_path_GREP" >&6; }
11679 GREP="$ac_cv_path_GREP"
11680
11681
11682  else
11683    # The variable is set, but is it from the command line or the environment?
11684
11685    # Try to remove the string !GREP! from our list.
11686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11688      # If it failed, the variable was not from the command line. Ignore it,
11689      # but warn the user (except for BASH, which is always set by the calling BASH).
11690      if test "xGREP" != xBASH; then
11691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11692$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11693      fi
11694      # Try to locate tool using the code snippet
11695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11696$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11697if ${ac_cv_path_GREP+:} false; then :
11698  $as_echo_n "(cached) " >&6
11699else
11700  if test -z "$GREP"; then
11701  ac_path_GREP_found=false
11702  # Loop through the user's path and test for each of PROGNAME-LIST
11703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11704for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11705do
11706  IFS=$as_save_IFS
11707  test -z "$as_dir" && as_dir=.
11708    for ac_prog in grep ggrep; do
11709    for ac_exec_ext in '' $ac_executable_extensions; do
11710      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11711      as_fn_executable_p "$ac_path_GREP" || continue
11712# Check for GNU ac_path_GREP and select it if it is found.
11713  # Check for GNU $ac_path_GREP
11714case `"$ac_path_GREP" --version 2>&1` in
11715*GNU*)
11716  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11717*)
11718  ac_count=0
11719  $as_echo_n 0123456789 >"conftest.in"
11720  while :
11721  do
11722    cat "conftest.in" "conftest.in" >"conftest.tmp"
11723    mv "conftest.tmp" "conftest.in"
11724    cp "conftest.in" "conftest.nl"
11725    $as_echo 'GREP' >> "conftest.nl"
11726    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11727    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11728    as_fn_arith $ac_count + 1 && ac_count=$as_val
11729    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11730      # Best one so far, save it but keep looking for a better one
11731      ac_cv_path_GREP="$ac_path_GREP"
11732      ac_path_GREP_max=$ac_count
11733    fi
11734    # 10*(2^10) chars as input seems more than enough
11735    test $ac_count -gt 10 && break
11736  done
11737  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11738esac
11739
11740      $ac_path_GREP_found && break 3
11741    done
11742  done
11743  done
11744IFS=$as_save_IFS
11745  if test -z "$ac_cv_path_GREP"; then
11746    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11747  fi
11748else
11749  ac_cv_path_GREP=$GREP
11750fi
11751
11752fi
11753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11754$as_echo "$ac_cv_path_GREP" >&6; }
11755 GREP="$ac_cv_path_GREP"
11756
11757
11758    else
11759      # If it succeeded, then it was overridden by the user. We will use it
11760      # for the tool.
11761
11762      # First remove it from the list of overridden variables, so we can test
11763      # for unknown variables in the end.
11764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11765
11766      # Check if the provided tool contains a complete path.
11767      tool_specified="$GREP"
11768      tool_basename="${tool_specified##*/}"
11769      if test "x$tool_basename" = "x$tool_specified"; then
11770        # A command without a complete path is provided, search $PATH.
11771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11772$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11773        # Extract the first word of "$tool_basename", so it can be a program name with args.
11774set dummy $tool_basename; ac_word=$2
11775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11776$as_echo_n "checking for $ac_word... " >&6; }
11777if ${ac_cv_path_GREP+:} false; then :
11778  $as_echo_n "(cached) " >&6
11779else
11780  case $GREP in
11781  [\\/]* | ?:[\\/]*)
11782  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11783  ;;
11784  *)
11785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11786for as_dir in $PATH
11787do
11788  IFS=$as_save_IFS
11789  test -z "$as_dir" && as_dir=.
11790    for ac_exec_ext in '' $ac_executable_extensions; do
11791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11792    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11794    break 2
11795  fi
11796done
11797  done
11798IFS=$as_save_IFS
11799
11800  ;;
11801esac
11802fi
11803GREP=$ac_cv_path_GREP
11804if test -n "$GREP"; then
11805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11806$as_echo "$GREP" >&6; }
11807else
11808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11809$as_echo "no" >&6; }
11810fi
11811
11812
11813        if test "x$GREP" = x; then
11814          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11815        fi
11816      else
11817        # Otherwise we believe it is a complete path. Use it as it is.
11818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11819$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11821$as_echo_n "checking for GREP... " >&6; }
11822        if test ! -x "$tool_specified"; then
11823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11824$as_echo "not found" >&6; }
11825          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11826        fi
11827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11828$as_echo "$tool_specified" >&6; }
11829      fi
11830    fi
11831  fi
11832
11833
11834  if test "x$GREP" = x; then
11835    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11836  fi
11837
11838
11839
11840
11841  # Publish this variable in the help.
11842
11843
11844  if test "x$EGREP" = x; then
11845    # The variable is not set by user, try to locate tool using the code snippet
11846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11847$as_echo_n "checking for egrep... " >&6; }
11848if ${ac_cv_path_EGREP+:} false; then :
11849  $as_echo_n "(cached) " >&6
11850else
11851  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11852   then ac_cv_path_EGREP="$GREP -E"
11853   else
11854     if test -z "$EGREP"; then
11855  ac_path_EGREP_found=false
11856  # Loop through the user's path and test for each of PROGNAME-LIST
11857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11858for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11859do
11860  IFS=$as_save_IFS
11861  test -z "$as_dir" && as_dir=.
11862    for ac_prog in egrep; do
11863    for ac_exec_ext in '' $ac_executable_extensions; do
11864      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11865      as_fn_executable_p "$ac_path_EGREP" || continue
11866# Check for GNU ac_path_EGREP and select it if it is found.
11867  # Check for GNU $ac_path_EGREP
11868case `"$ac_path_EGREP" --version 2>&1` in
11869*GNU*)
11870  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11871*)
11872  ac_count=0
11873  $as_echo_n 0123456789 >"conftest.in"
11874  while :
11875  do
11876    cat "conftest.in" "conftest.in" >"conftest.tmp"
11877    mv "conftest.tmp" "conftest.in"
11878    cp "conftest.in" "conftest.nl"
11879    $as_echo 'EGREP' >> "conftest.nl"
11880    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11881    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11882    as_fn_arith $ac_count + 1 && ac_count=$as_val
11883    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11884      # Best one so far, save it but keep looking for a better one
11885      ac_cv_path_EGREP="$ac_path_EGREP"
11886      ac_path_EGREP_max=$ac_count
11887    fi
11888    # 10*(2^10) chars as input seems more than enough
11889    test $ac_count -gt 10 && break
11890  done
11891  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11892esac
11893
11894      $ac_path_EGREP_found && break 3
11895    done
11896  done
11897  done
11898IFS=$as_save_IFS
11899  if test -z "$ac_cv_path_EGREP"; then
11900    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11901  fi
11902else
11903  ac_cv_path_EGREP=$EGREP
11904fi
11905
11906   fi
11907fi
11908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11909$as_echo "$ac_cv_path_EGREP" >&6; }
11910 EGREP="$ac_cv_path_EGREP"
11911
11912
11913  else
11914    # The variable is set, but is it from the command line or the environment?
11915
11916    # Try to remove the string !EGREP! from our list.
11917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11919      # If it failed, the variable was not from the command line. Ignore it,
11920      # but warn the user (except for BASH, which is always set by the calling BASH).
11921      if test "xEGREP" != xBASH; then
11922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11923$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11924      fi
11925      # Try to locate tool using the code snippet
11926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11927$as_echo_n "checking for egrep... " >&6; }
11928if ${ac_cv_path_EGREP+:} false; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11932   then ac_cv_path_EGREP="$GREP -E"
11933   else
11934     if test -z "$EGREP"; then
11935  ac_path_EGREP_found=false
11936  # Loop through the user's path and test for each of PROGNAME-LIST
11937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11938for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11939do
11940  IFS=$as_save_IFS
11941  test -z "$as_dir" && as_dir=.
11942    for ac_prog in egrep; do
11943    for ac_exec_ext in '' $ac_executable_extensions; do
11944      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11945      as_fn_executable_p "$ac_path_EGREP" || continue
11946# Check for GNU ac_path_EGREP and select it if it is found.
11947  # Check for GNU $ac_path_EGREP
11948case `"$ac_path_EGREP" --version 2>&1` in
11949*GNU*)
11950  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11951*)
11952  ac_count=0
11953  $as_echo_n 0123456789 >"conftest.in"
11954  while :
11955  do
11956    cat "conftest.in" "conftest.in" >"conftest.tmp"
11957    mv "conftest.tmp" "conftest.in"
11958    cp "conftest.in" "conftest.nl"
11959    $as_echo 'EGREP' >> "conftest.nl"
11960    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11961    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11962    as_fn_arith $ac_count + 1 && ac_count=$as_val
11963    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11964      # Best one so far, save it but keep looking for a better one
11965      ac_cv_path_EGREP="$ac_path_EGREP"
11966      ac_path_EGREP_max=$ac_count
11967    fi
11968    # 10*(2^10) chars as input seems more than enough
11969    test $ac_count -gt 10 && break
11970  done
11971  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11972esac
11973
11974      $ac_path_EGREP_found && break 3
11975    done
11976  done
11977  done
11978IFS=$as_save_IFS
11979  if test -z "$ac_cv_path_EGREP"; then
11980    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11981  fi
11982else
11983  ac_cv_path_EGREP=$EGREP
11984fi
11985
11986   fi
11987fi
11988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11989$as_echo "$ac_cv_path_EGREP" >&6; }
11990 EGREP="$ac_cv_path_EGREP"
11991
11992
11993    else
11994      # If it succeeded, then it was overridden by the user. We will use it
11995      # for the tool.
11996
11997      # First remove it from the list of overridden variables, so we can test
11998      # for unknown variables in the end.
11999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12000
12001      # Check if the provided tool contains a complete path.
12002      tool_specified="$EGREP"
12003      tool_basename="${tool_specified##*/}"
12004      if test "x$tool_basename" = "x$tool_specified"; then
12005        # A command without a complete path is provided, search $PATH.
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12007$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12008        # Extract the first word of "$tool_basename", so it can be a program name with args.
12009set dummy $tool_basename; ac_word=$2
12010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12011$as_echo_n "checking for $ac_word... " >&6; }
12012if ${ac_cv_path_EGREP+:} false; then :
12013  $as_echo_n "(cached) " >&6
12014else
12015  case $EGREP in
12016  [\\/]* | ?:[\\/]*)
12017  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12018  ;;
12019  *)
12020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12021for as_dir in $PATH
12022do
12023  IFS=$as_save_IFS
12024  test -z "$as_dir" && as_dir=.
12025    for ac_exec_ext in '' $ac_executable_extensions; do
12026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12027    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12029    break 2
12030  fi
12031done
12032  done
12033IFS=$as_save_IFS
12034
12035  ;;
12036esac
12037fi
12038EGREP=$ac_cv_path_EGREP
12039if test -n "$EGREP"; then
12040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12041$as_echo "$EGREP" >&6; }
12042else
12043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12044$as_echo "no" >&6; }
12045fi
12046
12047
12048        if test "x$EGREP" = x; then
12049          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12050        fi
12051      else
12052        # Otherwise we believe it is a complete path. Use it as it is.
12053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12054$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12056$as_echo_n "checking for EGREP... " >&6; }
12057        if test ! -x "$tool_specified"; then
12058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12059$as_echo "not found" >&6; }
12060          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12061        fi
12062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12063$as_echo "$tool_specified" >&6; }
12064      fi
12065    fi
12066  fi
12067
12068
12069  if test "x$EGREP" = x; then
12070    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12071  fi
12072
12073
12074
12075
12076  # Publish this variable in the help.
12077
12078
12079  if test "x$FGREP" = x; then
12080    # The variable is not set by user, try to locate tool using the code snippet
12081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12082$as_echo_n "checking for fgrep... " >&6; }
12083if ${ac_cv_path_FGREP+:} false; then :
12084  $as_echo_n "(cached) " >&6
12085else
12086  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12087   then ac_cv_path_FGREP="$GREP -F"
12088   else
12089     if test -z "$FGREP"; then
12090  ac_path_FGREP_found=false
12091  # Loop through the user's path and test for each of PROGNAME-LIST
12092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12093for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12094do
12095  IFS=$as_save_IFS
12096  test -z "$as_dir" && as_dir=.
12097    for ac_prog in fgrep; do
12098    for ac_exec_ext in '' $ac_executable_extensions; do
12099      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12100      as_fn_executable_p "$ac_path_FGREP" || continue
12101# Check for GNU ac_path_FGREP and select it if it is found.
12102  # Check for GNU $ac_path_FGREP
12103case `"$ac_path_FGREP" --version 2>&1` in
12104*GNU*)
12105  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12106*)
12107  ac_count=0
12108  $as_echo_n 0123456789 >"conftest.in"
12109  while :
12110  do
12111    cat "conftest.in" "conftest.in" >"conftest.tmp"
12112    mv "conftest.tmp" "conftest.in"
12113    cp "conftest.in" "conftest.nl"
12114    $as_echo 'FGREP' >> "conftest.nl"
12115    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12116    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12117    as_fn_arith $ac_count + 1 && ac_count=$as_val
12118    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12119      # Best one so far, save it but keep looking for a better one
12120      ac_cv_path_FGREP="$ac_path_FGREP"
12121      ac_path_FGREP_max=$ac_count
12122    fi
12123    # 10*(2^10) chars as input seems more than enough
12124    test $ac_count -gt 10 && break
12125  done
12126  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12127esac
12128
12129      $ac_path_FGREP_found && break 3
12130    done
12131  done
12132  done
12133IFS=$as_save_IFS
12134  if test -z "$ac_cv_path_FGREP"; then
12135    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12136  fi
12137else
12138  ac_cv_path_FGREP=$FGREP
12139fi
12140
12141   fi
12142fi
12143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12144$as_echo "$ac_cv_path_FGREP" >&6; }
12145 FGREP="$ac_cv_path_FGREP"
12146
12147
12148  else
12149    # The variable is set, but is it from the command line or the environment?
12150
12151    # Try to remove the string !FGREP! from our list.
12152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12154      # If it failed, the variable was not from the command line. Ignore it,
12155      # but warn the user (except for BASH, which is always set by the calling BASH).
12156      if test "xFGREP" != xBASH; then
12157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12158$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12159      fi
12160      # Try to locate tool using the code snippet
12161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12162$as_echo_n "checking for fgrep... " >&6; }
12163if ${ac_cv_path_FGREP+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12167   then ac_cv_path_FGREP="$GREP -F"
12168   else
12169     if test -z "$FGREP"; then
12170  ac_path_FGREP_found=false
12171  # Loop through the user's path and test for each of PROGNAME-LIST
12172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12174do
12175  IFS=$as_save_IFS
12176  test -z "$as_dir" && as_dir=.
12177    for ac_prog in fgrep; do
12178    for ac_exec_ext in '' $ac_executable_extensions; do
12179      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12180      as_fn_executable_p "$ac_path_FGREP" || continue
12181# Check for GNU ac_path_FGREP and select it if it is found.
12182  # Check for GNU $ac_path_FGREP
12183case `"$ac_path_FGREP" --version 2>&1` in
12184*GNU*)
12185  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12186*)
12187  ac_count=0
12188  $as_echo_n 0123456789 >"conftest.in"
12189  while :
12190  do
12191    cat "conftest.in" "conftest.in" >"conftest.tmp"
12192    mv "conftest.tmp" "conftest.in"
12193    cp "conftest.in" "conftest.nl"
12194    $as_echo 'FGREP' >> "conftest.nl"
12195    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12196    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12197    as_fn_arith $ac_count + 1 && ac_count=$as_val
12198    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12199      # Best one so far, save it but keep looking for a better one
12200      ac_cv_path_FGREP="$ac_path_FGREP"
12201      ac_path_FGREP_max=$ac_count
12202    fi
12203    # 10*(2^10) chars as input seems more than enough
12204    test $ac_count -gt 10 && break
12205  done
12206  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12207esac
12208
12209      $ac_path_FGREP_found && break 3
12210    done
12211  done
12212  done
12213IFS=$as_save_IFS
12214  if test -z "$ac_cv_path_FGREP"; then
12215    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12216  fi
12217else
12218  ac_cv_path_FGREP=$FGREP
12219fi
12220
12221   fi
12222fi
12223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12224$as_echo "$ac_cv_path_FGREP" >&6; }
12225 FGREP="$ac_cv_path_FGREP"
12226
12227
12228    else
12229      # If it succeeded, then it was overridden by the user. We will use it
12230      # for the tool.
12231
12232      # First remove it from the list of overridden variables, so we can test
12233      # for unknown variables in the end.
12234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12235
12236      # Check if the provided tool contains a complete path.
12237      tool_specified="$FGREP"
12238      tool_basename="${tool_specified##*/}"
12239      if test "x$tool_basename" = "x$tool_specified"; then
12240        # A command without a complete path is provided, search $PATH.
12241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12242$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12243        # Extract the first word of "$tool_basename", so it can be a program name with args.
12244set dummy $tool_basename; ac_word=$2
12245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12246$as_echo_n "checking for $ac_word... " >&6; }
12247if ${ac_cv_path_FGREP+:} false; then :
12248  $as_echo_n "(cached) " >&6
12249else
12250  case $FGREP in
12251  [\\/]* | ?:[\\/]*)
12252  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12253  ;;
12254  *)
12255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12256for as_dir in $PATH
12257do
12258  IFS=$as_save_IFS
12259  test -z "$as_dir" && as_dir=.
12260    for ac_exec_ext in '' $ac_executable_extensions; do
12261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12262    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12264    break 2
12265  fi
12266done
12267  done
12268IFS=$as_save_IFS
12269
12270  ;;
12271esac
12272fi
12273FGREP=$ac_cv_path_FGREP
12274if test -n "$FGREP"; then
12275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12276$as_echo "$FGREP" >&6; }
12277else
12278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12279$as_echo "no" >&6; }
12280fi
12281
12282
12283        if test "x$FGREP" = x; then
12284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12285        fi
12286      else
12287        # Otherwise we believe it is a complete path. Use it as it is.
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12289$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12291$as_echo_n "checking for FGREP... " >&6; }
12292        if test ! -x "$tool_specified"; then
12293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12294$as_echo "not found" >&6; }
12295          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12296        fi
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12298$as_echo "$tool_specified" >&6; }
12299      fi
12300    fi
12301  fi
12302
12303
12304  if test "x$FGREP" = x; then
12305    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12306  fi
12307
12308
12309
12310
12311  # Publish this variable in the help.
12312
12313
12314  if test "x$SED" = x; then
12315    # The variable is not set by user, try to locate tool using the code snippet
12316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12317$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12318if ${ac_cv_path_SED+:} false; then :
12319  $as_echo_n "(cached) " >&6
12320else
12321            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12322     for ac_i in 1 2 3 4 5 6 7; do
12323       ac_script="$ac_script$as_nl$ac_script"
12324     done
12325     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12326     { ac_script=; unset ac_script;}
12327     if test -z "$SED"; then
12328  ac_path_SED_found=false
12329  # Loop through the user's path and test for each of PROGNAME-LIST
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_prog in sed gsed; do
12336    for ac_exec_ext in '' $ac_executable_extensions; do
12337      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12338      as_fn_executable_p "$ac_path_SED" || continue
12339# Check for GNU ac_path_SED and select it if it is found.
12340  # Check for GNU $ac_path_SED
12341case `"$ac_path_SED" --version 2>&1` in
12342*GNU*)
12343  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12344*)
12345  ac_count=0
12346  $as_echo_n 0123456789 >"conftest.in"
12347  while :
12348  do
12349    cat "conftest.in" "conftest.in" >"conftest.tmp"
12350    mv "conftest.tmp" "conftest.in"
12351    cp "conftest.in" "conftest.nl"
12352    $as_echo '' >> "conftest.nl"
12353    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12354    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12355    as_fn_arith $ac_count + 1 && ac_count=$as_val
12356    if test $ac_count -gt ${ac_path_SED_max-0}; then
12357      # Best one so far, save it but keep looking for a better one
12358      ac_cv_path_SED="$ac_path_SED"
12359      ac_path_SED_max=$ac_count
12360    fi
12361    # 10*(2^10) chars as input seems more than enough
12362    test $ac_count -gt 10 && break
12363  done
12364  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12365esac
12366
12367      $ac_path_SED_found && break 3
12368    done
12369  done
12370  done
12371IFS=$as_save_IFS
12372  if test -z "$ac_cv_path_SED"; then
12373    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12374  fi
12375else
12376  ac_cv_path_SED=$SED
12377fi
12378
12379fi
12380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12381$as_echo "$ac_cv_path_SED" >&6; }
12382 SED="$ac_cv_path_SED"
12383  rm -f conftest.sed
12384
12385  else
12386    # The variable is set, but is it from the command line or the environment?
12387
12388    # Try to remove the string !SED! from our list.
12389    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12390    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12391      # If it failed, the variable was not from the command line. Ignore it,
12392      # but warn the user (except for BASH, which is always set by the calling BASH).
12393      if test "xSED" != xBASH; then
12394        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12395$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12396      fi
12397      # Try to locate tool using the code snippet
12398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12399$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12400if ${ac_cv_path_SED+:} false; then :
12401  $as_echo_n "(cached) " >&6
12402else
12403            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12404     for ac_i in 1 2 3 4 5 6 7; do
12405       ac_script="$ac_script$as_nl$ac_script"
12406     done
12407     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12408     { ac_script=; unset ac_script;}
12409     if test -z "$SED"; then
12410  ac_path_SED_found=false
12411  # Loop through the user's path and test for each of PROGNAME-LIST
12412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12413for as_dir in $PATH
12414do
12415  IFS=$as_save_IFS
12416  test -z "$as_dir" && as_dir=.
12417    for ac_prog in sed gsed; do
12418    for ac_exec_ext in '' $ac_executable_extensions; do
12419      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12420      as_fn_executable_p "$ac_path_SED" || continue
12421# Check for GNU ac_path_SED and select it if it is found.
12422  # Check for GNU $ac_path_SED
12423case `"$ac_path_SED" --version 2>&1` in
12424*GNU*)
12425  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12426*)
12427  ac_count=0
12428  $as_echo_n 0123456789 >"conftest.in"
12429  while :
12430  do
12431    cat "conftest.in" "conftest.in" >"conftest.tmp"
12432    mv "conftest.tmp" "conftest.in"
12433    cp "conftest.in" "conftest.nl"
12434    $as_echo '' >> "conftest.nl"
12435    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12436    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12437    as_fn_arith $ac_count + 1 && ac_count=$as_val
12438    if test $ac_count -gt ${ac_path_SED_max-0}; then
12439      # Best one so far, save it but keep looking for a better one
12440      ac_cv_path_SED="$ac_path_SED"
12441      ac_path_SED_max=$ac_count
12442    fi
12443    # 10*(2^10) chars as input seems more than enough
12444    test $ac_count -gt 10 && break
12445  done
12446  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12447esac
12448
12449      $ac_path_SED_found && break 3
12450    done
12451  done
12452  done
12453IFS=$as_save_IFS
12454  if test -z "$ac_cv_path_SED"; then
12455    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12456  fi
12457else
12458  ac_cv_path_SED=$SED
12459fi
12460
12461fi
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12463$as_echo "$ac_cv_path_SED" >&6; }
12464 SED="$ac_cv_path_SED"
12465  rm -f conftest.sed
12466
12467    else
12468      # If it succeeded, then it was overridden by the user. We will use it
12469      # for the tool.
12470
12471      # First remove it from the list of overridden variables, so we can test
12472      # for unknown variables in the end.
12473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12474
12475      # Check if the provided tool contains a complete path.
12476      tool_specified="$SED"
12477      tool_basename="${tool_specified##*/}"
12478      if test "x$tool_basename" = "x$tool_specified"; then
12479        # A command without a complete path is provided, search $PATH.
12480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12481$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12482        # Extract the first word of "$tool_basename", so it can be a program name with args.
12483set dummy $tool_basename; ac_word=$2
12484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12485$as_echo_n "checking for $ac_word... " >&6; }
12486if ${ac_cv_path_SED+:} false; then :
12487  $as_echo_n "(cached) " >&6
12488else
12489  case $SED in
12490  [\\/]* | ?:[\\/]*)
12491  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12492  ;;
12493  *)
12494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12495for as_dir in $PATH
12496do
12497  IFS=$as_save_IFS
12498  test -z "$as_dir" && as_dir=.
12499    for ac_exec_ext in '' $ac_executable_extensions; do
12500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12501    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12503    break 2
12504  fi
12505done
12506  done
12507IFS=$as_save_IFS
12508
12509  ;;
12510esac
12511fi
12512SED=$ac_cv_path_SED
12513if test -n "$SED"; then
12514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12515$as_echo "$SED" >&6; }
12516else
12517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12518$as_echo "no" >&6; }
12519fi
12520
12521
12522        if test "x$SED" = x; then
12523          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12524        fi
12525      else
12526        # Otherwise we believe it is a complete path. Use it as it is.
12527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12528$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12530$as_echo_n "checking for SED... " >&6; }
12531        if test ! -x "$tool_specified"; then
12532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12533$as_echo "not found" >&6; }
12534          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12535        fi
12536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12537$as_echo "$tool_specified" >&6; }
12538      fi
12539    fi
12540  fi
12541
12542
12543  if test "x$SED" = x; then
12544    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12545  fi
12546
12547
12548
12549  # Always force rm.
12550  RM="$RM -f"
12551
12552  # pwd behaves differently on various platforms and some don't support the -L flag.
12553  # Always use the bash builtin pwd to get uniform behavior.
12554  THEPWDCMD=pwd
12555
12556  # These are not required on all platforms
12557
12558
12559  # Publish this variable in the help.
12560
12561
12562  if test "x$CYGPATH" = x; then
12563    # The variable is not set by user, try to locate tool using the code snippet
12564    for ac_prog in cygpath
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_CYGPATH+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $CYGPATH in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596CYGPATH=$ac_cv_path_CYGPATH
12597if test -n "$CYGPATH"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12599$as_echo "$CYGPATH" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$CYGPATH" && break
12607done
12608
12609  else
12610    # The variable is set, but is it from the command line or the environment?
12611
12612    # Try to remove the string !CYGPATH! from our list.
12613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12615      # If it failed, the variable was not from the command line. Ignore it,
12616      # but warn the user (except for BASH, which is always set by the calling BASH).
12617      if test "xCYGPATH" != xBASH; then
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12619$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12620      fi
12621      # Try to locate tool using the code snippet
12622      for ac_prog in cygpath
12623do
12624  # Extract the first word of "$ac_prog", so it can be a program name with args.
12625set dummy $ac_prog; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_CYGPATH+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $CYGPATH in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654CYGPATH=$ac_cv_path_CYGPATH
12655if test -n "$CYGPATH"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12657$as_echo "$CYGPATH" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664  test -n "$CYGPATH" && break
12665done
12666
12667    else
12668      # If it succeeded, then it was overridden by the user. We will use it
12669      # for the tool.
12670
12671      # First remove it from the list of overridden variables, so we can test
12672      # for unknown variables in the end.
12673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12674
12675      # Check if the provided tool contains a complete path.
12676      tool_specified="$CYGPATH"
12677      tool_basename="${tool_specified##*/}"
12678      if test "x$tool_basename" = "x$tool_specified"; then
12679        # A command without a complete path is provided, search $PATH.
12680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12681$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12682        # Extract the first word of "$tool_basename", so it can be a program name with args.
12683set dummy $tool_basename; ac_word=$2
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12685$as_echo_n "checking for $ac_word... " >&6; }
12686if ${ac_cv_path_CYGPATH+:} false; then :
12687  $as_echo_n "(cached) " >&6
12688else
12689  case $CYGPATH in
12690  [\\/]* | ?:[\\/]*)
12691  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12692  ;;
12693  *)
12694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695for as_dir in $PATH
12696do
12697  IFS=$as_save_IFS
12698  test -z "$as_dir" && as_dir=.
12699    for ac_exec_ext in '' $ac_executable_extensions; do
12700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12701    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12703    break 2
12704  fi
12705done
12706  done
12707IFS=$as_save_IFS
12708
12709  ;;
12710esac
12711fi
12712CYGPATH=$ac_cv_path_CYGPATH
12713if test -n "$CYGPATH"; then
12714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12715$as_echo "$CYGPATH" >&6; }
12716else
12717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718$as_echo "no" >&6; }
12719fi
12720
12721
12722        if test "x$CYGPATH" = x; then
12723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12724        fi
12725      else
12726        # Otherwise we believe it is a complete path. Use it as it is.
12727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12728$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12730$as_echo_n "checking for CYGPATH... " >&6; }
12731        if test ! -x "$tool_specified"; then
12732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12733$as_echo "not found" >&6; }
12734          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12735        fi
12736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12737$as_echo "$tool_specified" >&6; }
12738      fi
12739    fi
12740  fi
12741
12742
12743
12744
12745  # Publish this variable in the help.
12746
12747
12748  if test "x$READLINK" = x; then
12749    # The variable is not set by user, try to locate tool using the code snippet
12750    for ac_prog in greadlink readlink
12751do
12752  # Extract the first word of "$ac_prog", so it can be a program name with args.
12753set dummy $ac_prog; ac_word=$2
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12755$as_echo_n "checking for $ac_word... " >&6; }
12756if ${ac_cv_path_READLINK+:} false; then :
12757  $as_echo_n "(cached) " >&6
12758else
12759  case $READLINK in
12760  [\\/]* | ?:[\\/]*)
12761  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12762  ;;
12763  *)
12764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12765for as_dir in $PATH
12766do
12767  IFS=$as_save_IFS
12768  test -z "$as_dir" && as_dir=.
12769    for ac_exec_ext in '' $ac_executable_extensions; do
12770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12771    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12773    break 2
12774  fi
12775done
12776  done
12777IFS=$as_save_IFS
12778
12779  ;;
12780esac
12781fi
12782READLINK=$ac_cv_path_READLINK
12783if test -n "$READLINK"; then
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12785$as_echo "$READLINK" >&6; }
12786else
12787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12788$as_echo "no" >&6; }
12789fi
12790
12791
12792  test -n "$READLINK" && break
12793done
12794
12795  else
12796    # The variable is set, but is it from the command line or the environment?
12797
12798    # Try to remove the string !READLINK! from our list.
12799    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12800    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12801      # If it failed, the variable was not from the command line. Ignore it,
12802      # but warn the user (except for BASH, which is always set by the calling BASH).
12803      if test "xREADLINK" != xBASH; then
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12805$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12806      fi
12807      # Try to locate tool using the code snippet
12808      for ac_prog in greadlink readlink
12809do
12810  # Extract the first word of "$ac_prog", so it can be a program name with args.
12811set dummy $ac_prog; ac_word=$2
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12813$as_echo_n "checking for $ac_word... " >&6; }
12814if ${ac_cv_path_READLINK+:} false; then :
12815  $as_echo_n "(cached) " >&6
12816else
12817  case $READLINK in
12818  [\\/]* | ?:[\\/]*)
12819  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12820  ;;
12821  *)
12822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12823for as_dir in $PATH
12824do
12825  IFS=$as_save_IFS
12826  test -z "$as_dir" && as_dir=.
12827    for ac_exec_ext in '' $ac_executable_extensions; do
12828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12829    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12831    break 2
12832  fi
12833done
12834  done
12835IFS=$as_save_IFS
12836
12837  ;;
12838esac
12839fi
12840READLINK=$ac_cv_path_READLINK
12841if test -n "$READLINK"; then
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12843$as_echo "$READLINK" >&6; }
12844else
12845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
12847fi
12848
12849
12850  test -n "$READLINK" && break
12851done
12852
12853    else
12854      # If it succeeded, then it was overridden by the user. We will use it
12855      # for the tool.
12856
12857      # First remove it from the list of overridden variables, so we can test
12858      # for unknown variables in the end.
12859      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12860
12861      # Check if the provided tool contains a complete path.
12862      tool_specified="$READLINK"
12863      tool_basename="${tool_specified##*/}"
12864      if test "x$tool_basename" = "x$tool_specified"; then
12865        # A command without a complete path is provided, search $PATH.
12866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12867$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12868        # Extract the first word of "$tool_basename", so it can be a program name with args.
12869set dummy $tool_basename; ac_word=$2
12870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12871$as_echo_n "checking for $ac_word... " >&6; }
12872if ${ac_cv_path_READLINK+:} false; then :
12873  $as_echo_n "(cached) " >&6
12874else
12875  case $READLINK in
12876  [\\/]* | ?:[\\/]*)
12877  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12878  ;;
12879  *)
12880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12881for as_dir in $PATH
12882do
12883  IFS=$as_save_IFS
12884  test -z "$as_dir" && as_dir=.
12885    for ac_exec_ext in '' $ac_executable_extensions; do
12886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12887    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12889    break 2
12890  fi
12891done
12892  done
12893IFS=$as_save_IFS
12894
12895  ;;
12896esac
12897fi
12898READLINK=$ac_cv_path_READLINK
12899if test -n "$READLINK"; then
12900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12901$as_echo "$READLINK" >&6; }
12902else
12903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12904$as_echo "no" >&6; }
12905fi
12906
12907
12908        if test "x$READLINK" = x; then
12909          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12910        fi
12911      else
12912        # Otherwise we believe it is a complete path. Use it as it is.
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12914$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12916$as_echo_n "checking for READLINK... " >&6; }
12917        if test ! -x "$tool_specified"; then
12918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12919$as_echo "not found" >&6; }
12920          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12921        fi
12922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12923$as_echo "$tool_specified" >&6; }
12924      fi
12925    fi
12926  fi
12927
12928
12929
12930
12931  # Publish this variable in the help.
12932
12933
12934  if test "x$DF" = x; then
12935    # The variable is not set by user, try to locate tool using the code snippet
12936    for ac_prog in df
12937do
12938  # Extract the first word of "$ac_prog", so it can be a program name with args.
12939set dummy $ac_prog; ac_word=$2
12940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12941$as_echo_n "checking for $ac_word... " >&6; }
12942if ${ac_cv_path_DF+:} false; then :
12943  $as_echo_n "(cached) " >&6
12944else
12945  case $DF in
12946  [\\/]* | ?:[\\/]*)
12947  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12948  ;;
12949  *)
12950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12951for as_dir in $PATH
12952do
12953  IFS=$as_save_IFS
12954  test -z "$as_dir" && as_dir=.
12955    for ac_exec_ext in '' $ac_executable_extensions; do
12956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12957    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12959    break 2
12960  fi
12961done
12962  done
12963IFS=$as_save_IFS
12964
12965  ;;
12966esac
12967fi
12968DF=$ac_cv_path_DF
12969if test -n "$DF"; then
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12971$as_echo "$DF" >&6; }
12972else
12973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12974$as_echo "no" >&6; }
12975fi
12976
12977
12978  test -n "$DF" && break
12979done
12980
12981  else
12982    # The variable is set, but is it from the command line or the environment?
12983
12984    # Try to remove the string !DF! from our list.
12985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12987      # If it failed, the variable was not from the command line. Ignore it,
12988      # but warn the user (except for BASH, which is always set by the calling BASH).
12989      if test "xDF" != xBASH; then
12990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12991$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12992      fi
12993      # Try to locate tool using the code snippet
12994      for ac_prog in df
12995do
12996  # Extract the first word of "$ac_prog", so it can be a program name with args.
12997set dummy $ac_prog; ac_word=$2
12998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12999$as_echo_n "checking for $ac_word... " >&6; }
13000if ${ac_cv_path_DF+:} false; then :
13001  $as_echo_n "(cached) " >&6
13002else
13003  case $DF in
13004  [\\/]* | ?:[\\/]*)
13005  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13006  ;;
13007  *)
13008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13009for as_dir in $PATH
13010do
13011  IFS=$as_save_IFS
13012  test -z "$as_dir" && as_dir=.
13013    for ac_exec_ext in '' $ac_executable_extensions; do
13014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13015    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13017    break 2
13018  fi
13019done
13020  done
13021IFS=$as_save_IFS
13022
13023  ;;
13024esac
13025fi
13026DF=$ac_cv_path_DF
13027if test -n "$DF"; then
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13029$as_echo "$DF" >&6; }
13030else
13031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13032$as_echo "no" >&6; }
13033fi
13034
13035
13036  test -n "$DF" && break
13037done
13038
13039    else
13040      # If it succeeded, then it was overridden by the user. We will use it
13041      # for the tool.
13042
13043      # First remove it from the list of overridden variables, so we can test
13044      # for unknown variables in the end.
13045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13046
13047      # Check if the provided tool contains a complete path.
13048      tool_specified="$DF"
13049      tool_basename="${tool_specified##*/}"
13050      if test "x$tool_basename" = "x$tool_specified"; then
13051        # A command without a complete path is provided, search $PATH.
13052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13053$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13054        # Extract the first word of "$tool_basename", so it can be a program name with args.
13055set dummy $tool_basename; ac_word=$2
13056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13057$as_echo_n "checking for $ac_word... " >&6; }
13058if ${ac_cv_path_DF+:} false; then :
13059  $as_echo_n "(cached) " >&6
13060else
13061  case $DF in
13062  [\\/]* | ?:[\\/]*)
13063  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13064  ;;
13065  *)
13066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13067for as_dir in $PATH
13068do
13069  IFS=$as_save_IFS
13070  test -z "$as_dir" && as_dir=.
13071    for ac_exec_ext in '' $ac_executable_extensions; do
13072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13073    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13075    break 2
13076  fi
13077done
13078  done
13079IFS=$as_save_IFS
13080
13081  ;;
13082esac
13083fi
13084DF=$ac_cv_path_DF
13085if test -n "$DF"; then
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13087$as_echo "$DF" >&6; }
13088else
13089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13090$as_echo "no" >&6; }
13091fi
13092
13093
13094        if test "x$DF" = x; then
13095          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13096        fi
13097      else
13098        # Otherwise we believe it is a complete path. Use it as it is.
13099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13100$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13102$as_echo_n "checking for DF... " >&6; }
13103        if test ! -x "$tool_specified"; then
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13105$as_echo "not found" >&6; }
13106          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13107        fi
13108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13109$as_echo "$tool_specified" >&6; }
13110      fi
13111    fi
13112  fi
13113
13114
13115
13116
13117  # Publish this variable in the help.
13118
13119
13120  if test "x$SETFILE" = x; then
13121    # The variable is not set by user, try to locate tool using the code snippet
13122    for ac_prog in SetFile
13123do
13124  # Extract the first word of "$ac_prog", so it can be a program name with args.
13125set dummy $ac_prog; ac_word=$2
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13127$as_echo_n "checking for $ac_word... " >&6; }
13128if ${ac_cv_path_SETFILE+:} false; then :
13129  $as_echo_n "(cached) " >&6
13130else
13131  case $SETFILE in
13132  [\\/]* | ?:[\\/]*)
13133  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13134  ;;
13135  *)
13136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137for as_dir in $PATH
13138do
13139  IFS=$as_save_IFS
13140  test -z "$as_dir" && as_dir=.
13141    for ac_exec_ext in '' $ac_executable_extensions; do
13142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13143    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13145    break 2
13146  fi
13147done
13148  done
13149IFS=$as_save_IFS
13150
13151  ;;
13152esac
13153fi
13154SETFILE=$ac_cv_path_SETFILE
13155if test -n "$SETFILE"; then
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13157$as_echo "$SETFILE" >&6; }
13158else
13159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13160$as_echo "no" >&6; }
13161fi
13162
13163
13164  test -n "$SETFILE" && break
13165done
13166
13167  else
13168    # The variable is set, but is it from the command line or the environment?
13169
13170    # Try to remove the string !SETFILE! from our list.
13171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13173      # If it failed, the variable was not from the command line. Ignore it,
13174      # but warn the user (except for BASH, which is always set by the calling BASH).
13175      if test "xSETFILE" != xBASH; then
13176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13177$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13178      fi
13179      # Try to locate tool using the code snippet
13180      for ac_prog in SetFile
13181do
13182  # Extract the first word of "$ac_prog", so it can be a program name with args.
13183set dummy $ac_prog; ac_word=$2
13184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13185$as_echo_n "checking for $ac_word... " >&6; }
13186if ${ac_cv_path_SETFILE+:} false; then :
13187  $as_echo_n "(cached) " >&6
13188else
13189  case $SETFILE in
13190  [\\/]* | ?:[\\/]*)
13191  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13192  ;;
13193  *)
13194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13195for as_dir in $PATH
13196do
13197  IFS=$as_save_IFS
13198  test -z "$as_dir" && as_dir=.
13199    for ac_exec_ext in '' $ac_executable_extensions; do
13200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13201    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13203    break 2
13204  fi
13205done
13206  done
13207IFS=$as_save_IFS
13208
13209  ;;
13210esac
13211fi
13212SETFILE=$ac_cv_path_SETFILE
13213if test -n "$SETFILE"; then
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13215$as_echo "$SETFILE" >&6; }
13216else
13217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13218$as_echo "no" >&6; }
13219fi
13220
13221
13222  test -n "$SETFILE" && break
13223done
13224
13225    else
13226      # If it succeeded, then it was overridden by the user. We will use it
13227      # for the tool.
13228
13229      # First remove it from the list of overridden variables, so we can test
13230      # for unknown variables in the end.
13231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13232
13233      # Check if the provided tool contains a complete path.
13234      tool_specified="$SETFILE"
13235      tool_basename="${tool_specified##*/}"
13236      if test "x$tool_basename" = "x$tool_specified"; then
13237        # A command without a complete path is provided, search $PATH.
13238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13239$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13240        # Extract the first word of "$tool_basename", so it can be a program name with args.
13241set dummy $tool_basename; ac_word=$2
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243$as_echo_n "checking for $ac_word... " >&6; }
13244if ${ac_cv_path_SETFILE+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247  case $SETFILE in
13248  [\\/]* | ?:[\\/]*)
13249  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13250  ;;
13251  *)
13252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255  IFS=$as_save_IFS
13256  test -z "$as_dir" && as_dir=.
13257    for ac_exec_ext in '' $ac_executable_extensions; do
13258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261    break 2
13262  fi
13263done
13264  done
13265IFS=$as_save_IFS
13266
13267  ;;
13268esac
13269fi
13270SETFILE=$ac_cv_path_SETFILE
13271if test -n "$SETFILE"; then
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13273$as_echo "$SETFILE" >&6; }
13274else
13275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276$as_echo "no" >&6; }
13277fi
13278
13279
13280        if test "x$SETFILE" = x; then
13281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282        fi
13283      else
13284        # Otherwise we believe it is a complete path. Use it as it is.
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13286$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13288$as_echo_n "checking for SETFILE... " >&6; }
13289        if test ! -x "$tool_specified"; then
13290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291$as_echo "not found" >&6; }
13292          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13293        fi
13294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295$as_echo "$tool_specified" >&6; }
13296      fi
13297    fi
13298  fi
13299
13300
13301
13302
13303# Now we can determine OpenJDK build and target platforms. This is required to
13304# have early on.
13305# Make sure we can run config.sub.
13306$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13307  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13308
13309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13310$as_echo_n "checking build system type... " >&6; }
13311if ${ac_cv_build+:} false; then :
13312  $as_echo_n "(cached) " >&6
13313else
13314  ac_build_alias=$build_alias
13315test "x$ac_build_alias" = x &&
13316  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13317test "x$ac_build_alias" = x &&
13318  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13319ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13320  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13321
13322fi
13323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13324$as_echo "$ac_cv_build" >&6; }
13325case $ac_cv_build in
13326*-*-*) ;;
13327*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13328esac
13329build=$ac_cv_build
13330ac_save_IFS=$IFS; IFS='-'
13331set x $ac_cv_build
13332shift
13333build_cpu=$1
13334build_vendor=$2
13335shift; shift
13336# Remember, the first character of IFS is used to create $*,
13337# except with old shells:
13338build_os=$*
13339IFS=$ac_save_IFS
13340case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13341
13342
13343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13344$as_echo_n "checking host system type... " >&6; }
13345if ${ac_cv_host+:} false; then :
13346  $as_echo_n "(cached) " >&6
13347else
13348  if test "x$host_alias" = x; then
13349  ac_cv_host=$ac_cv_build
13350else
13351  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13352    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13353fi
13354
13355fi
13356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13357$as_echo "$ac_cv_host" >&6; }
13358case $ac_cv_host in
13359*-*-*) ;;
13360*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13361esac
13362host=$ac_cv_host
13363ac_save_IFS=$IFS; IFS='-'
13364set x $ac_cv_host
13365shift
13366host_cpu=$1
13367host_vendor=$2
13368shift; shift
13369# Remember, the first character of IFS is used to create $*,
13370# except with old shells:
13371host_os=$*
13372IFS=$ac_save_IFS
13373case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13374
13375
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13377$as_echo_n "checking target system type... " >&6; }
13378if ${ac_cv_target+:} false; then :
13379  $as_echo_n "(cached) " >&6
13380else
13381  if test "x$target_alias" = x; then
13382  ac_cv_target=$ac_cv_host
13383else
13384  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13385    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13386fi
13387
13388fi
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13390$as_echo "$ac_cv_target" >&6; }
13391case $ac_cv_target in
13392*-*-*) ;;
13393*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13394esac
13395target=$ac_cv_target
13396ac_save_IFS=$IFS; IFS='-'
13397set x $ac_cv_target
13398shift
13399target_cpu=$1
13400target_vendor=$2
13401shift; shift
13402# Remember, the first character of IFS is used to create $*,
13403# except with old shells:
13404target_os=$*
13405IFS=$ac_save_IFS
13406case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13407
13408
13409# The aliases save the names the user supplied, while $host etc.
13410# will get canonicalized.
13411test -n "$target_alias" &&
13412  test "$program_prefix$program_suffix$program_transform_name" = \
13413    NONENONEs,x,x, &&
13414  program_prefix=${target_alias}-
13415
13416  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13417  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13418  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13419  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13420  # to use the configure naming style.
13421
13422
13423
13424
13425
13426  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13427  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13428  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13429  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13430  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13431  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13432
13433
13434
13435  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13436
13437  case "$build_os" in
13438    *linux*)
13439      VAR_OS=linux
13440      VAR_OS_API=posix
13441      VAR_OS_ENV=linux
13442      ;;
13443    *solaris*)
13444      VAR_OS=solaris
13445      VAR_OS_API=posix
13446      VAR_OS_ENV=solaris
13447      ;;
13448    *darwin*)
13449      VAR_OS=macosx
13450      VAR_OS_API=posix
13451      VAR_OS_ENV=macosx
13452      ;;
13453    *bsd*)
13454      VAR_OS=bsd
13455      VAR_OS_API=posix
13456      VAR_OS_ENV=bsd
13457      ;;
13458    *cygwin*)
13459      VAR_OS=windows
13460      VAR_OS_API=winapi
13461      VAR_OS_ENV=windows.cygwin
13462      ;;
13463    *mingw*)
13464      VAR_OS=windows
13465      VAR_OS_API=winapi
13466      VAR_OS_ENV=windows.msys
13467      ;;
13468    *aix*)
13469      VAR_OS=aix
13470      VAR_OS_API=posix
13471      VAR_OS_ENV=aix
13472      ;;
13473    *)
13474      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13475      ;;
13476  esac
13477
13478
13479  # First argument is the cpu name from the trip/quad
13480  case "$build_cpu" in
13481    x86_64)
13482      VAR_CPU=x86_64
13483      VAR_CPU_ARCH=x86
13484      VAR_CPU_BITS=64
13485      VAR_CPU_ENDIAN=little
13486      ;;
13487    i?86)
13488      VAR_CPU=x86
13489      VAR_CPU_ARCH=x86
13490      VAR_CPU_BITS=32
13491      VAR_CPU_ENDIAN=little
13492      ;;
13493    arm*)
13494      VAR_CPU=arm
13495      VAR_CPU_ARCH=arm
13496      VAR_CPU_BITS=32
13497      VAR_CPU_ENDIAN=little
13498      ;;
13499    powerpc)
13500      VAR_CPU=ppc
13501      VAR_CPU_ARCH=ppc
13502      VAR_CPU_BITS=32
13503      VAR_CPU_ENDIAN=big
13504      ;;
13505    powerpc64)
13506      VAR_CPU=ppc64
13507      VAR_CPU_ARCH=ppc
13508      VAR_CPU_BITS=64
13509      VAR_CPU_ENDIAN=big
13510      ;;
13511    powerpc64le)
13512      VAR_CPU=ppc64
13513      VAR_CPU_ARCH=ppc
13514      VAR_CPU_BITS=64
13515      VAR_CPU_ENDIAN=little
13516      ;;
13517    s390)
13518      VAR_CPU=s390
13519      VAR_CPU_ARCH=s390
13520      VAR_CPU_BITS=32
13521      VAR_CPU_ENDIAN=big
13522      ;;
13523    s390x)
13524      VAR_CPU=s390x
13525      VAR_CPU_ARCH=s390
13526      VAR_CPU_BITS=64
13527      VAR_CPU_ENDIAN=big
13528      ;;
13529    sparc)
13530      VAR_CPU=sparc
13531      VAR_CPU_ARCH=sparc
13532      VAR_CPU_BITS=32
13533      VAR_CPU_ENDIAN=big
13534      ;;
13535    sparcv9)
13536      VAR_CPU=sparcv9
13537      VAR_CPU_ARCH=sparc
13538      VAR_CPU_BITS=64
13539      VAR_CPU_ENDIAN=big
13540      ;;
13541    *)
13542      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13543      ;;
13544  esac
13545
13546  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13547  OPENJDK_BUILD_OS="$VAR_OS"
13548  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13549  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13550  OPENJDK_BUILD_CPU="$VAR_CPU"
13551  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13552  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13553  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13554
13555
13556
13557
13558
13559
13560
13561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13562$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13564$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13565
13566  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13567
13568  case "$host_os" in
13569    *linux*)
13570      VAR_OS=linux
13571      VAR_OS_API=posix
13572      VAR_OS_ENV=linux
13573      ;;
13574    *solaris*)
13575      VAR_OS=solaris
13576      VAR_OS_API=posix
13577      VAR_OS_ENV=solaris
13578      ;;
13579    *darwin*)
13580      VAR_OS=macosx
13581      VAR_OS_API=posix
13582      VAR_OS_ENV=macosx
13583      ;;
13584    *bsd*)
13585      VAR_OS=bsd
13586      VAR_OS_API=posix
13587      VAR_OS_ENV=bsd
13588      ;;
13589    *cygwin*)
13590      VAR_OS=windows
13591      VAR_OS_API=winapi
13592      VAR_OS_ENV=windows.cygwin
13593      ;;
13594    *mingw*)
13595      VAR_OS=windows
13596      VAR_OS_API=winapi
13597      VAR_OS_ENV=windows.msys
13598      ;;
13599    *aix*)
13600      VAR_OS=aix
13601      VAR_OS_API=posix
13602      VAR_OS_ENV=aix
13603      ;;
13604    *)
13605      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13606      ;;
13607  esac
13608
13609
13610  # First argument is the cpu name from the trip/quad
13611  case "$host_cpu" in
13612    x86_64)
13613      VAR_CPU=x86_64
13614      VAR_CPU_ARCH=x86
13615      VAR_CPU_BITS=64
13616      VAR_CPU_ENDIAN=little
13617      ;;
13618    i?86)
13619      VAR_CPU=x86
13620      VAR_CPU_ARCH=x86
13621      VAR_CPU_BITS=32
13622      VAR_CPU_ENDIAN=little
13623      ;;
13624    arm*)
13625      VAR_CPU=arm
13626      VAR_CPU_ARCH=arm
13627      VAR_CPU_BITS=32
13628      VAR_CPU_ENDIAN=little
13629      ;;
13630    powerpc)
13631      VAR_CPU=ppc
13632      VAR_CPU_ARCH=ppc
13633      VAR_CPU_BITS=32
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    powerpc64)
13637      VAR_CPU=ppc64
13638      VAR_CPU_ARCH=ppc
13639      VAR_CPU_BITS=64
13640      VAR_CPU_ENDIAN=big
13641      ;;
13642    powerpc64le)
13643      VAR_CPU=ppc64
13644      VAR_CPU_ARCH=ppc
13645      VAR_CPU_BITS=64
13646      VAR_CPU_ENDIAN=little
13647      ;;
13648    s390)
13649      VAR_CPU=s390
13650      VAR_CPU_ARCH=s390
13651      VAR_CPU_BITS=32
13652      VAR_CPU_ENDIAN=big
13653      ;;
13654    s390x)
13655      VAR_CPU=s390x
13656      VAR_CPU_ARCH=s390
13657      VAR_CPU_BITS=64
13658      VAR_CPU_ENDIAN=big
13659      ;;
13660    sparc)
13661      VAR_CPU=sparc
13662      VAR_CPU_ARCH=sparc
13663      VAR_CPU_BITS=32
13664      VAR_CPU_ENDIAN=big
13665      ;;
13666    sparcv9)
13667      VAR_CPU=sparcv9
13668      VAR_CPU_ARCH=sparc
13669      VAR_CPU_BITS=64
13670      VAR_CPU_ENDIAN=big
13671      ;;
13672    *)
13673      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13674      ;;
13675  esac
13676
13677  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13678  OPENJDK_TARGET_OS="$VAR_OS"
13679  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13680  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13681  OPENJDK_TARGET_CPU="$VAR_CPU"
13682  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13683  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13684  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13685
13686
13687
13688
13689
13690
13691
13692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13693$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13695$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13696
13697
13698
13699# Check whether --with-target-bits was given.
13700if test "${with_target_bits+set}" = set; then :
13701  withval=$with_target_bits;
13702fi
13703
13704
13705  # We have three types of compiles:
13706  # native  == normal compilation, target system == build system
13707  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13708  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13709  #
13710  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13711    # We're doing a proper cross-compilation
13712    COMPILE_TYPE="cross"
13713  else
13714    COMPILE_TYPE="native"
13715  fi
13716
13717  if test "x$with_target_bits" != x; then
13718    if test "x$COMPILE_TYPE" = "xcross"; then
13719      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13720    fi
13721
13722    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13723      # A reduced build is requested
13724      COMPILE_TYPE="reduced"
13725      OPENJDK_TARGET_CPU_BITS=32
13726      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13727        OPENJDK_TARGET_CPU=x86
13728      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13729        OPENJDK_TARGET_CPU=sparc
13730      else
13731        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13732      fi
13733    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13734      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
13735    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13736      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13737$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13738    else
13739      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13740    fi
13741  fi
13742
13743
13744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13745$as_echo_n "checking compilation type... " >&6; }
13746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13747$as_echo "$COMPILE_TYPE" >&6; }
13748
13749
13750  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13751    REQUIRED_OS_NAME=SunOS
13752    REQUIRED_OS_VERSION=5.10
13753  fi
13754  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13755    REQUIRED_OS_NAME=Linux
13756    REQUIRED_OS_VERSION=2.6
13757  fi
13758  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13759    REQUIRED_OS_NAME=Windows
13760    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13761      REQUIRED_OS_VERSION=5.2
13762    else
13763      REQUIRED_OS_VERSION=5.1
13764    fi
13765  fi
13766  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13767    REQUIRED_OS_NAME=Darwin
13768    REQUIRED_OS_VERSION=11.2
13769  fi
13770
13771
13772
13773
13774
13775  # Also store the legacy naming of the cpu.
13776  # Ie i586 and amd64 instead of x86 and x86_64
13777  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13778  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13779    OPENJDK_TARGET_CPU_LEGACY="i586"
13780  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13781    # On all platforms except MacOSX replace x86_64 with amd64.
13782    OPENJDK_TARGET_CPU_LEGACY="amd64"
13783  fi
13784
13785
13786  # And the second legacy naming of the cpu.
13787  # Ie i386 and amd64 instead of x86 and x86_64.
13788  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13789  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13790    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13791  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13792    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13793  fi
13794
13795
13796  # This is the name of the cpu (but using i386 and amd64 instead of
13797  # x86 and x86_64, respectively), preceeded by a /, to be used when
13798  # locating libraries. On macosx, it's empty, though.
13799  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13800  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13801    OPENJDK_TARGET_CPU_LIBDIR=""
13802  fi
13803
13804
13805  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13806  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13807  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13808  OPENJDK_TARGET_CPU_ISADIR=""
13809  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13810    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13811      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13812    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13813      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13814    fi
13815  fi
13816
13817
13818  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13819  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13820  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13821    # On linux only, we replace x86 with i386.
13822    OPENJDK_TARGET_CPU_OSARCH="i386"
13823  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13824    # On all platforms except macosx, we replace x86_64 with amd64.
13825    OPENJDK_TARGET_CPU_OSARCH="amd64"
13826  fi
13827
13828
13829  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13830  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13831    OPENJDK_TARGET_CPU_JLI="i386"
13832  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13833    # On all platforms except macosx, we replace x86_64 with amd64.
13834    OPENJDK_TARGET_CPU_JLI="amd64"
13835  fi
13836  # Now setup the -D flags for building libjli.
13837  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13838  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13839    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13840      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13841    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13842      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13843    fi
13844  fi
13845
13846
13847  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13848  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13849    OPENJDK_TARGET_OS_API_DIR="solaris"
13850  fi
13851  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13852    OPENJDK_TARGET_OS_API_DIR="windows"
13853  fi
13854
13855
13856  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13857      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13858  else
13859      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13860  fi
13861
13862
13863  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13864    A_LP64="LP64:="
13865    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13866    # unpack200.exe
13867    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13868      ADD_LP64="-D_LP64=1"
13869    fi
13870  fi
13871  LP64=$A_LP64
13872
13873
13874  if test "x$COMPILE_TYPE" = "xcross"; then
13875    # FIXME: ... or should this include reduced builds..?
13876    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13877  else
13878    DEFINE_CROSS_COMPILE_ARCH=""
13879  fi
13880
13881
13882  # ZERO_ARCHDEF is used to enable architecture-specific code
13883  case "${OPENJDK_TARGET_CPU}" in
13884    ppc*)    ZERO_ARCHDEF=PPC   ;;
13885    s390*)   ZERO_ARCHDEF=S390  ;;
13886    sparc*)  ZERO_ARCHDEF=SPARC ;;
13887    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13888    x86)     ZERO_ARCHDEF=IA32  ;;
13889    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13890  esac
13891
13892
13893
13894
13895# Continue setting up basic stuff. Most remaining code require fundamental tools.
13896
13897  # Save the current directory this script was started from
13898  CURDIR="$PWD"
13899
13900  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13901    PATH_SEP=";"
13902
13903  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13904  if test $SRC_ROOT_LENGTH -gt 100; then
13905    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13906  fi
13907
13908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13910$as_echo_n "checking cygwin release... " >&6; }
13911    CYGWIN_VERSION=`$UNAME -r`
13912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13913$as_echo "$CYGWIN_VERSION" >&6; }
13914    WINDOWS_ENV_VENDOR='cygwin'
13915    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13916
13917    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13918    if test "x$CYGWIN_VERSION_OK" = x; then
13919      { $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
13920$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;}
13921      as_fn_error $? "Cannot continue" "$LINENO" 5
13922    fi
13923    if test "x$CYGPATH" = x; then
13924      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13925    fi
13926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13927$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13928    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13929    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13930    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13931    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13933$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13934    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13935    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13936    if test "x$test_cygdrive_prefix" = x; then
13937      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13938    fi
13939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13941$as_echo_n "checking msys release... " >&6; }
13942    MSYS_VERSION=`$UNAME -r`
13943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13944$as_echo "$MSYS_VERSION" >&6; }
13945
13946    WINDOWS_ENV_VENDOR='msys'
13947    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13948
13949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13950$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13951    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13952    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13953
13954  windows_path="$MSYS_ROOT_PATH"
13955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13956    unix_path=`$CYGPATH -u "$windows_path"`
13957    MSYS_ROOT_PATH="$unix_path"
13958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13960    MSYS_ROOT_PATH="$unix_path"
13961  fi
13962
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13964$as_echo "$MSYS_ROOT_PATH" >&6; }
13965    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13966  else
13967    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13968  fi
13969
13970  # Test if windows or unix (cygwin/msys) find is first in path.
13971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13972$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13973  FIND_BINARY_OUTPUT=`find --version 2>&1`
13974  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13976$as_echo "unix style" >&6; }
13977  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13979$as_echo "Windows" >&6; }
13980    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13981$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13982    { $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
13983$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13984    as_fn_error $? "Cannot continue" "$LINENO" 5
13985  else
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13987$as_echo "unknown" >&6; }
13988    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13989$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13990  fi
13991
13992  else
13993    PATH_SEP=":"
13994  fi
13995
13996
13997  # We get the top-level directory from the supporting wrappers.
13998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13999$as_echo_n "checking for top-level directory... " >&6; }
14000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14001$as_echo "$TOPDIR" >&6; }
14002
14003
14004  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14005
14006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14007
14008  # Input might be given as Windows format, start by converting to
14009  # unix format.
14010  path="$CURDIR"
14011  new_path=`$CYGPATH -u "$path"`
14012
14013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14016  # "foo.exe" is OK but "foo" is an error.
14017  #
14018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14019  # It is also a way to make sure we got the proper file name for the real test later on.
14020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14021  if test "x$test_shortpath" = x; then
14022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14023$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14024    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14025  fi
14026
14027  # Call helper function which possibly converts this using DOS-style short mode.
14028  # If so, the updated path is stored in $new_path.
14029
14030  input_path="$new_path"
14031  # Check if we need to convert this using DOS-style short mode. If the path
14032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14033  # take no chances and rewrite it.
14034  # Note: m4 eats our [], so we need to use [ and ] instead.
14035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14036  if test "x$has_forbidden_chars" != x; then
14037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14041      # Going to short mode and back again did indeed matter. Since short mode is
14042      # case insensitive, let's make it lowercase to improve readability.
14043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14044      # Now convert it back to Unix-stile (cygpath)
14045      input_path=`$CYGPATH -u "$shortmode_path"`
14046      new_path="$input_path"
14047    fi
14048  fi
14049
14050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14051  if test "x$test_cygdrive_prefix" = x; then
14052    # As a simple fix, exclude /usr/bin since it's not a real path.
14053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14055      # a path prefixed by /cygdrive for fixpath to work.
14056      new_path="$CYGWIN_ROOT_PATH$input_path"
14057    fi
14058  fi
14059
14060
14061  if test "x$path" != "x$new_path"; then
14062    CURDIR="$new_path"
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14064$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14065  fi
14066
14067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14068
14069  path="$CURDIR"
14070  has_colon=`$ECHO $path | $GREP ^.:`
14071  new_path="$path"
14072  if test "x$has_colon" = x; then
14073    # Not in mixed or Windows style, start by that.
14074    new_path=`cmd //c echo $path`
14075  fi
14076
14077
14078  input_path="$new_path"
14079  # Check if we need to convert this using DOS-style short mode. If the path
14080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14081  # take no chances and rewrite it.
14082  # Note: m4 eats our [], so we need to use [ and ] instead.
14083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14084  if test "x$has_forbidden_chars" != x; then
14085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14087  fi
14088
14089
14090  windows_path="$new_path"
14091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14092    unix_path=`$CYGPATH -u "$windows_path"`
14093    new_path="$unix_path"
14094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14096    new_path="$unix_path"
14097  fi
14098
14099  if test "x$path" != "x$new_path"; then
14100    CURDIR="$new_path"
14101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14102$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14103  fi
14104
14105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14107
14108  else
14109    # We're on a posix platform. Hooray! :)
14110    path="$CURDIR"
14111    has_space=`$ECHO "$path" | $GREP " "`
14112    if test "x$has_space" != x; then
14113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14114$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14115      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14116    fi
14117
14118    # Use eval to expand a potential ~
14119    eval path="$path"
14120    if test ! -f "$path" && test ! -d "$path"; then
14121      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14122    fi
14123
14124    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14125  fi
14126
14127
14128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14129
14130  # Input might be given as Windows format, start by converting to
14131  # unix format.
14132  path="$TOPDIR"
14133  new_path=`$CYGPATH -u "$path"`
14134
14135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14138  # "foo.exe" is OK but "foo" is an error.
14139  #
14140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14141  # It is also a way to make sure we got the proper file name for the real test later on.
14142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14143  if test "x$test_shortpath" = x; then
14144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14145$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14146    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14147  fi
14148
14149  # Call helper function which possibly converts this using DOS-style short mode.
14150  # If so, the updated path is stored in $new_path.
14151
14152  input_path="$new_path"
14153  # Check if we need to convert this using DOS-style short mode. If the path
14154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14155  # take no chances and rewrite it.
14156  # Note: m4 eats our [], so we need to use [ and ] instead.
14157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14158  if test "x$has_forbidden_chars" != x; then
14159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14163      # Going to short mode and back again did indeed matter. Since short mode is
14164      # case insensitive, let's make it lowercase to improve readability.
14165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14166      # Now convert it back to Unix-stile (cygpath)
14167      input_path=`$CYGPATH -u "$shortmode_path"`
14168      new_path="$input_path"
14169    fi
14170  fi
14171
14172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14173  if test "x$test_cygdrive_prefix" = x; then
14174    # As a simple fix, exclude /usr/bin since it's not a real path.
14175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14177      # a path prefixed by /cygdrive for fixpath to work.
14178      new_path="$CYGWIN_ROOT_PATH$input_path"
14179    fi
14180  fi
14181
14182
14183  if test "x$path" != "x$new_path"; then
14184    TOPDIR="$new_path"
14185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14186$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14187  fi
14188
14189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14190
14191  path="$TOPDIR"
14192  has_colon=`$ECHO $path | $GREP ^.:`
14193  new_path="$path"
14194  if test "x$has_colon" = x; then
14195    # Not in mixed or Windows style, start by that.
14196    new_path=`cmd //c echo $path`
14197  fi
14198
14199
14200  input_path="$new_path"
14201  # Check if we need to convert this using DOS-style short mode. If the path
14202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14203  # take no chances and rewrite it.
14204  # Note: m4 eats our [], so we need to use [ and ] instead.
14205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14206  if test "x$has_forbidden_chars" != x; then
14207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14209  fi
14210
14211
14212  windows_path="$new_path"
14213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14214    unix_path=`$CYGPATH -u "$windows_path"`
14215    new_path="$unix_path"
14216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14218    new_path="$unix_path"
14219  fi
14220
14221  if test "x$path" != "x$new_path"; then
14222    TOPDIR="$new_path"
14223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14224$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14225  fi
14226
14227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14229
14230  else
14231    # We're on a posix platform. Hooray! :)
14232    path="$TOPDIR"
14233    has_space=`$ECHO "$path" | $GREP " "`
14234    if test "x$has_space" != x; then
14235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14236$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14237      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14238    fi
14239
14240    # Use eval to expand a potential ~
14241    eval path="$path"
14242    if test ! -f "$path" && test ! -d "$path"; then
14243      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14244    fi
14245
14246    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14247  fi
14248
14249  # SRC_ROOT is a traditional alias for TOPDIR.
14250  SRC_ROOT=$TOPDIR
14251
14252  # Locate the directory of this script.
14253  AUTOCONF_DIR=$TOPDIR/common/autoconf
14254
14255  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14256    # Add extra search paths on solaris for utilities like ar and as etc...
14257    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14258  fi
14259
14260  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14261  # is not correct.
14262
14263# Check whether --with-sys-root was given.
14264if test "${with_sys_root+set}" = set; then :
14265  withval=$with_sys_root;
14266fi
14267
14268
14269  if test "x$with_sys_root" != x; then
14270    SYS_ROOT=$with_sys_root
14271  else
14272    SYS_ROOT=/
14273  fi
14274
14275
14276
14277# Check whether --with-tools-dir was given.
14278if test "${with_tools_dir+set}" = set; then :
14279  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14280
14281fi
14282
14283
14284
14285# Check whether --with-devkit was given.
14286if test "${with_devkit+set}" = set; then :
14287  withval=$with_devkit;
14288        if test "x$with_sys_root" != x; then
14289          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14290        fi
14291
14292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14293
14294  # Input might be given as Windows format, start by converting to
14295  # unix format.
14296  path="$with_devkit"
14297  new_path=`$CYGPATH -u "$path"`
14298
14299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14302  # "foo.exe" is OK but "foo" is an error.
14303  #
14304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14305  # It is also a way to make sure we got the proper file name for the real test later on.
14306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14307  if test "x$test_shortpath" = x; then
14308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14309$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14310    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14311  fi
14312
14313  # Call helper function which possibly converts this using DOS-style short mode.
14314  # If so, the updated path is stored in $new_path.
14315
14316  input_path="$new_path"
14317  # Check if we need to convert this using DOS-style short mode. If the path
14318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14319  # take no chances and rewrite it.
14320  # Note: m4 eats our [], so we need to use [ and ] instead.
14321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14322  if test "x$has_forbidden_chars" != x; then
14323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14327      # Going to short mode and back again did indeed matter. Since short mode is
14328      # case insensitive, let's make it lowercase to improve readability.
14329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14330      # Now convert it back to Unix-stile (cygpath)
14331      input_path=`$CYGPATH -u "$shortmode_path"`
14332      new_path="$input_path"
14333    fi
14334  fi
14335
14336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14337  if test "x$test_cygdrive_prefix" = x; then
14338    # As a simple fix, exclude /usr/bin since it's not a real path.
14339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14341      # a path prefixed by /cygdrive for fixpath to work.
14342      new_path="$CYGWIN_ROOT_PATH$input_path"
14343    fi
14344  fi
14345
14346
14347  if test "x$path" != "x$new_path"; then
14348    with_devkit="$new_path"
14349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14350$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14351  fi
14352
14353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14354
14355  path="$with_devkit"
14356  has_colon=`$ECHO $path | $GREP ^.:`
14357  new_path="$path"
14358  if test "x$has_colon" = x; then
14359    # Not in mixed or Windows style, start by that.
14360    new_path=`cmd //c echo $path`
14361  fi
14362
14363
14364  input_path="$new_path"
14365  # Check if we need to convert this using DOS-style short mode. If the path
14366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14367  # take no chances and rewrite it.
14368  # Note: m4 eats our [], so we need to use [ and ] instead.
14369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14370  if test "x$has_forbidden_chars" != x; then
14371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14373  fi
14374
14375
14376  windows_path="$new_path"
14377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14378    unix_path=`$CYGPATH -u "$windows_path"`
14379    new_path="$unix_path"
14380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14382    new_path="$unix_path"
14383  fi
14384
14385  if test "x$path" != "x$new_path"; then
14386    with_devkit="$new_path"
14387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14388$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14389  fi
14390
14391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14393
14394  else
14395    # We're on a posix platform. Hooray! :)
14396    path="$with_devkit"
14397    has_space=`$ECHO "$path" | $GREP " "`
14398    if test "x$has_space" != x; then
14399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14400$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14402    fi
14403
14404    # Use eval to expand a potential ~
14405    eval path="$path"
14406    if test ! -f "$path" && test ! -d "$path"; then
14407      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14408    fi
14409
14410    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14411  fi
14412
14413
14414  if test "x$TOOLS_DIR" = x; then
14415    TOOLS_DIR="$with_devkit/bin"
14416  else
14417    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14418  fi
14419
14420        if test -d "$with_devkit/$host_alias/libc"; then
14421          SYS_ROOT=$with_devkit/$host_alias/libc
14422        elif test -d "$with_devkit/$host/sys-root"; then
14423          SYS_ROOT=$with_devkit/$host/sys-root
14424        fi
14425
14426fi
14427
14428
14429
14430  # Setup default logging of stdout and stderr to build.log in the output root.
14431  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14432  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14433  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14434
14435
14436
14437
14438
14439# Check if it's a pure open build or if custom sources are to be used.
14440
14441  # Check whether --enable-openjdk-only was given.
14442if test "${enable_openjdk_only+set}" = set; then :
14443  enableval=$enable_openjdk_only;
14444else
14445  enable_openjdk_only="no"
14446fi
14447
14448
14449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14450$as_echo_n "checking for presence of closed sources... " >&6; }
14451  if test -d "$SRC_ROOT/jdk/src/closed"; then
14452    CLOSED_SOURCE_PRESENT=yes
14453  else
14454    CLOSED_SOURCE_PRESENT=no
14455  fi
14456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14457$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14458
14459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14460$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14461  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14463$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14464
14465  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14466    OPENJDK=true
14467    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14468      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14469$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14470    fi
14471  else
14472    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14473      OPENJDK=true
14474    else
14475      OPENJDK=false
14476    fi
14477  fi
14478
14479  if test "x$OPENJDK" = "xtrue"; then
14480    SET_OPENJDK="OPENJDK=true"
14481  fi
14482
14483
14484
14485  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14486  # the IncludeCustomExtension macro.
14487
14488
14489# Check whether --with-custom-make-dir was given.
14490if test "${with_custom_make_dir+set}" = set; then :
14491  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
14492$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14493fi
14494
14495
14496
14497
14498# These are needed to be able to create a configuration name (and thus the output directory)
14499
14500  ###############################################################################
14501  #
14502  # Check which variant of the JDK that we want to build.
14503  # Currently we have:
14504  #    normal:   standard edition
14505  # but the custom make system may add other variants
14506  #
14507  # Effectively the JDK variant gives a name to a specific set of
14508  # modules to compile into the JDK. In the future, these modules
14509  # might even be Jigsaw modules.
14510  #
14511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14512$as_echo_n "checking which variant of the JDK to build... " >&6; }
14513
14514# Check whether --with-jdk-variant was given.
14515if test "${with_jdk_variant+set}" = set; then :
14516  withval=$with_jdk_variant;
14517fi
14518
14519
14520  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14521    JDK_VARIANT="normal"
14522  else
14523    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14524  fi
14525
14526
14527
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14529$as_echo "$JDK_VARIANT" >&6; }
14530
14531
14532###############################################################################
14533#
14534# Check which interpreter of the JVM we want to build.
14535# Currently we have:
14536#    template: Template interpreter (the default)
14537#    cpp     : C++ interpreter
14538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14539$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14540
14541# Check whether --with-jvm-interpreter was given.
14542if test "${with_jvm_interpreter+set}" = set; then :
14543  withval=$with_jvm_interpreter;
14544fi
14545
14546
14547if test "x$with_jvm_interpreter" = x; then
14548     with_jvm_interpreter="template"
14549fi
14550
14551JVM_INTERPRETER="$with_jvm_interpreter"
14552
14553if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14554   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14555fi
14556
14557
14558
14559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14560$as_echo "$with_jvm_interpreter" >&6; }
14561
14562
14563
14564  ###############################################################################
14565  #
14566  # Check which variants of the JVM that we want to build.
14567  # Currently we have:
14568  #    server: normal interpreter and a tiered C1/C2 compiler
14569  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14570  #    minimal1: reduced form of client with optional VM services and features stripped out
14571  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14572  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14573  #    zero: no machine code interpreter, no compiler
14574  #    zeroshark: zero interpreter and shark/llvm compiler backend
14575#    core: interpreter only, no compiler (only works on some platforms)
14576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14577$as_echo_n "checking which variants of the JVM to build... " >&6; }
14578
14579# Check whether --with-jvm-variants was given.
14580if test "${with_jvm_variants+set}" = set; then :
14581  withval=$with_jvm_variants;
14582fi
14583
14584
14585  if test "x$with_jvm_variants" = x; then
14586    with_jvm_variants="server"
14587  fi
14588
14589  JVM_VARIANTS=",$with_jvm_variants,"
14590  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,//'`
14591
14592  if test "x$TEST_VARIANTS" != "x,"; then
14593     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14594  fi
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14596$as_echo "$with_jvm_variants" >&6; }
14597
14598  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14599  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14600  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14601  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14602  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14603  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14604  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14605
14606  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14607    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14608      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14609    fi
14610  fi
14611  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14612    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14613      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14614    fi
14615  fi
14616  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14617    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14618      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14619    fi
14620  fi
14621
14622  # Replace the commas with AND for use in the build directory name.
14623  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14624  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/'`
14625  if test "x$COUNT_VARIANTS" != "x,1"; then
14626    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14627  else
14628    BUILDING_MULTIPLE_JVM_VARIANTS=no
14629  fi
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640  INCLUDE_SA=true
14641  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14642    INCLUDE_SA=false
14643  fi
14644  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14645    INCLUDE_SA=false
14646  fi
14647  if test "x$VAR_CPU" = xppc64 ; then
14648    INCLUDE_SA=false
14649  fi
14650
14651
14652  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14653    MACOSX_UNIVERSAL="true"
14654  fi
14655
14656
14657
14658
14659  ###############################################################################
14660  #
14661  # Set the debug level
14662  #    release: no debug information, all optimizations, no asserts.
14663  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14664  #    fastdebug: debug information (-g), all optimizations, all asserts
14665  #    slowdebug: debug information (-g), no optimizations, all asserts
14666  #
14667  DEBUG_LEVEL="release"
14668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14669$as_echo_n "checking which debug level to use... " >&6; }
14670  # Check whether --enable-debug was given.
14671if test "${enable_debug+set}" = set; then :
14672  enableval=$enable_debug;
14673        ENABLE_DEBUG="${enableval}"
14674        DEBUG_LEVEL="fastdebug"
14675
14676else
14677  ENABLE_DEBUG="no"
14678fi
14679
14680
14681
14682# Check whether --with-debug-level was given.
14683if test "${with_debug_level+set}" = set; then :
14684  withval=$with_debug_level;
14685        DEBUG_LEVEL="${withval}"
14686        if test "x$ENABLE_DEBUG" = xyes; then
14687          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14688        fi
14689
14690fi
14691
14692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14693$as_echo "$DEBUG_LEVEL" >&6; }
14694
14695  if test "x$DEBUG_LEVEL" != xrelease && \
14696      test "x$DEBUG_LEVEL" != xoptimized && \
14697      test "x$DEBUG_LEVEL" != xfastdebug && \
14698      test "x$DEBUG_LEVEL" != xslowdebug; then
14699    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14700  fi
14701
14702
14703  ###############################################################################
14704  #
14705  # Setup legacy vars/targets and new vars to deal with different debug levels.
14706  #
14707
14708  case $DEBUG_LEVEL in
14709    release )
14710      VARIANT="OPT"
14711      FASTDEBUG="false"
14712      DEBUG_CLASSFILES="false"
14713      BUILD_VARIANT_RELEASE=""
14714      HOTSPOT_DEBUG_LEVEL="product"
14715      HOTSPOT_EXPORT="product"
14716      ;;
14717    fastdebug )
14718      VARIANT="DBG"
14719      FASTDEBUG="true"
14720      DEBUG_CLASSFILES="true"
14721      BUILD_VARIANT_RELEASE="-fastdebug"
14722      HOTSPOT_DEBUG_LEVEL="fastdebug"
14723      HOTSPOT_EXPORT="fastdebug"
14724      ;;
14725    slowdebug )
14726      VARIANT="DBG"
14727      FASTDEBUG="false"
14728      DEBUG_CLASSFILES="true"
14729      BUILD_VARIANT_RELEASE="-debug"
14730      HOTSPOT_DEBUG_LEVEL="jvmg"
14731      HOTSPOT_EXPORT="debug"
14732      ;;
14733    optimized )
14734      VARIANT="OPT"
14735      FASTDEBUG="false"
14736      DEBUG_CLASSFILES="false"
14737      BUILD_VARIANT_RELEASE="-optimized"
14738      HOTSPOT_DEBUG_LEVEL="optimized"
14739      HOTSPOT_EXPORT="optimized"
14740      ;;
14741  esac
14742
14743  # The debug level 'optimized' is a little special because it is currently only
14744  # applicable to the HotSpot build where it means to build a completely
14745  # optimized version of the VM without any debugging code (like for the
14746  # 'release' debug level which is called 'product' in the HotSpot build) but
14747  # with the exception that it can contain additional code which is otherwise
14748  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14749  # test new and/or experimental features which are not intended for customer
14750  # shipment. Because these new features need to be tested and benchmarked in
14751  # real world scenarios, we want to build the containing JDK at the 'release'
14752  # debug level.
14753  if test "x$DEBUG_LEVEL" = xoptimized; then
14754    DEBUG_LEVEL="release"
14755  fi
14756
14757  #####
14758  # Generate the legacy makefile targets for hotspot.
14759  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14760  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14761  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14762  # But until then ...
14763  HOTSPOT_TARGET=""
14764
14765  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14766    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14767  fi
14768
14769  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14770    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14771  fi
14772
14773  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14774    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14775  fi
14776
14777  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14778    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14779  fi
14780
14781  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14782    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14783  fi
14784
14785  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14786    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14787  fi
14788
14789  if test "x$JVM_VARIANT_CORE" = xtrue; then
14790    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14791  fi
14792
14793  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14794
14795  # On Macosx universal binaries are produced, but they only contain
14796  # 64 bit intel. This invalidates control of which jvms are built
14797  # from configure, but only server is valid anyway. Fix this
14798  # when hotspot makefiles are rewritten.
14799  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14800    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14801  fi
14802
14803  #####
14804
14805
14806
14807
14808
14809
14810
14811
14812# With basic setup done, call the custom early hook.
14813
14814
14815# To properly create a configuration name, we need to have the OpenJDK target
14816# and options (variants and debug level) parsed.
14817
14818
14819
14820# Check whether --with-conf-name was given.
14821if test "${with_conf_name+set}" = set; then :
14822  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14823fi
14824
14825
14826  # Test from where we are running configure, in or outside of src root.
14827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14828$as_echo_n "checking where to store configuration... " >&6; }
14829  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14830      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14831      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14832    # We are running configure from the src root.
14833    # Create a default ./build/target-variant-debuglevel output root.
14834    if test "x${CONF_NAME}" = x; then
14835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14836$as_echo "in default location" >&6; }
14837      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14838    else
14839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14840$as_echo "in build directory with custom name" >&6; }
14841    fi
14842    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14843    $MKDIR -p "$OUTPUT_ROOT"
14844    if test ! -d "$OUTPUT_ROOT"; then
14845      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14846    fi
14847  else
14848    # We are running configure from outside of the src dir.
14849    # Then use the current directory as output dir!
14850    # If configuration is situated in normal build directory, just use the build
14851    # directory name as configuration name, otherwise use the complete path.
14852    if test "x${CONF_NAME}" = x; then
14853      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14854    fi
14855    OUTPUT_ROOT="$CURDIR"
14856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14857$as_echo "in current directory" >&6; }
14858
14859    # WARNING: This might be a bad thing to do. You need to be sure you want to
14860    # have a configuration in this directory. Do some sanity checks!
14861
14862    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14863      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14864      # other files
14865      files_present=`$LS $OUTPUT_ROOT`
14866      # Configure has already touched config.log and confdefs.h in the current dir when this check
14867      # is performed.
14868      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14869      | $TR -d '\n'`
14870      if test "x$filtered_files" != x; then
14871        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14872$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14874$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14875        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14876$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14877        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14878$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14879        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14880$as_echo "$as_me: seriously mess up just about everything." >&6;}
14881        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14882$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14883        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14884$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14885        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14886      fi
14887    fi
14888  fi
14889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14890$as_echo_n "checking what configuration name to use... " >&6; }
14891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14892$as_echo "$CONF_NAME" >&6; }
14893
14894
14895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14896
14897  # Input might be given as Windows format, start by converting to
14898  # unix format.
14899  path="$OUTPUT_ROOT"
14900  new_path=`$CYGPATH -u "$path"`
14901
14902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14905  # "foo.exe" is OK but "foo" is an error.
14906  #
14907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14908  # It is also a way to make sure we got the proper file name for the real test later on.
14909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14910  if test "x$test_shortpath" = x; then
14911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14912$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14913    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14914  fi
14915
14916  # Call helper function which possibly converts this using DOS-style short mode.
14917  # If so, the updated path is stored in $new_path.
14918
14919  input_path="$new_path"
14920  # Check if we need to convert this using DOS-style short mode. If the path
14921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14922  # take no chances and rewrite it.
14923  # Note: m4 eats our [], so we need to use [ and ] instead.
14924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14925  if test "x$has_forbidden_chars" != x; then
14926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14930      # Going to short mode and back again did indeed matter. Since short mode is
14931      # case insensitive, let's make it lowercase to improve readability.
14932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14933      # Now convert it back to Unix-stile (cygpath)
14934      input_path=`$CYGPATH -u "$shortmode_path"`
14935      new_path="$input_path"
14936    fi
14937  fi
14938
14939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14940  if test "x$test_cygdrive_prefix" = x; then
14941    # As a simple fix, exclude /usr/bin since it's not a real path.
14942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14944      # a path prefixed by /cygdrive for fixpath to work.
14945      new_path="$CYGWIN_ROOT_PATH$input_path"
14946    fi
14947  fi
14948
14949
14950  if test "x$path" != "x$new_path"; then
14951    OUTPUT_ROOT="$new_path"
14952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14953$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14954  fi
14955
14956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14957
14958  path="$OUTPUT_ROOT"
14959  has_colon=`$ECHO $path | $GREP ^.:`
14960  new_path="$path"
14961  if test "x$has_colon" = x; then
14962    # Not in mixed or Windows style, start by that.
14963    new_path=`cmd //c echo $path`
14964  fi
14965
14966
14967  input_path="$new_path"
14968  # Check if we need to convert this using DOS-style short mode. If the path
14969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14970  # take no chances and rewrite it.
14971  # Note: m4 eats our [], so we need to use [ and ] instead.
14972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14973  if test "x$has_forbidden_chars" != x; then
14974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14976  fi
14977
14978
14979  windows_path="$new_path"
14980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14981    unix_path=`$CYGPATH -u "$windows_path"`
14982    new_path="$unix_path"
14983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14985    new_path="$unix_path"
14986  fi
14987
14988  if test "x$path" != "x$new_path"; then
14989    OUTPUT_ROOT="$new_path"
14990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14991$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14992  fi
14993
14994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14996
14997  else
14998    # We're on a posix platform. Hooray! :)
14999    path="$OUTPUT_ROOT"
15000    has_space=`$ECHO "$path" | $GREP " "`
15001    if test "x$has_space" != x; then
15002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15003$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15004      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15005    fi
15006
15007    # Use eval to expand a potential ~
15008    eval path="$path"
15009    if test ! -f "$path" && test ! -d "$path"; then
15010      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15011    fi
15012
15013    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15014  fi
15015
15016
15017  SPEC=$OUTPUT_ROOT/spec.gmk
15018
15019  CONF_NAME=$CONF_NAME
15020
15021  OUTPUT_ROOT=$OUTPUT_ROOT
15022
15023
15024  # Most of the probed defines are put into config.h
15025  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15026
15027  # The spec.gmk file contains all variables for the make system.
15028  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15029
15030  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15031  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15032
15033  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15034  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15035
15036  # The compare.sh is used to compare the build output to other builds.
15037  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15038
15039  # Spec.sh is currently used by compare-objects.sh
15040  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15041
15042  # The generated Makefile knows where the spec.gmk is and where the source is.
15043  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15044  # which will look for generated configurations
15045  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15046
15047
15048
15049# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15050
15051  for ac_prog in apt-get yum port pkgutil pkgadd
15052do
15053  # Extract the first word of "$ac_prog", so it can be a program name with args.
15054set dummy $ac_prog; ac_word=$2
15055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15056$as_echo_n "checking for $ac_word... " >&6; }
15057if ${ac_cv_prog_PKGHANDLER+:} false; then :
15058  $as_echo_n "(cached) " >&6
15059else
15060  if test -n "$PKGHANDLER"; then
15061  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15062else
15063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15064for as_dir in $PATH
15065do
15066  IFS=$as_save_IFS
15067  test -z "$as_dir" && as_dir=.
15068    for ac_exec_ext in '' $ac_executable_extensions; do
15069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15070    ac_cv_prog_PKGHANDLER="$ac_prog"
15071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15072    break 2
15073  fi
15074done
15075  done
15076IFS=$as_save_IFS
15077
15078fi
15079fi
15080PKGHANDLER=$ac_cv_prog_PKGHANDLER
15081if test -n "$PKGHANDLER"; then
15082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15083$as_echo "$PKGHANDLER" >&6; }
15084else
15085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15086$as_echo "no" >&6; }
15087fi
15088
15089
15090  test -n "$PKGHANDLER" && break
15091done
15092
15093
15094
15095# Setup tools that requires more complex handling, or that is not needed by the configure script.
15096
15097
15098  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15099  if test "x$MAKE" != x; then
15100    # User has supplied a make, test it.
15101    if test ! -f "$MAKE"; then
15102      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15103    fi
15104
15105  MAKE_CANDIDATE=""$MAKE""
15106  DESCRIPTION="user supplied MAKE=$MAKE"
15107  if test "x$MAKE_CANDIDATE" != x; then
15108    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15109$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15110    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15111    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15112    if test "x$IS_GNU_MAKE" = x; then
15113      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15114$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15115    else
15116      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15117      if test "x$IS_MODERN_MAKE" = x; then
15118        { $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
15119$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;}
15120      else
15121        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15122          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15123            MAKE_EXPECTED_ENV='cygwin'
15124          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15125            MAKE_EXPECTED_ENV='msys'
15126          else
15127            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15128          fi
15129          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15130          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15131        else
15132          # Not relevant for non-Windows
15133          IS_MAKE_CORRECT_ENV=true
15134        fi
15135        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15136          { $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
15137$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;}
15138        else
15139          FOUND_MAKE=$MAKE_CANDIDATE
15140
15141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15142
15143  # First separate the path from the arguments. This will split at the first
15144  # space.
15145  complete="$FOUND_MAKE"
15146  path="${complete%% *}"
15147  tmp="$complete EOL"
15148  arguments="${tmp#* }"
15149
15150  # Input might be given as Windows format, start by converting to
15151  # unix format.
15152  new_path=`$CYGPATH -u "$path"`
15153
15154  # Now try to locate executable using which
15155  new_path=`$WHICH "$new_path" 2> /dev/null`
15156  # bat and cmd files are not always considered executable in cygwin causing which
15157  # to not find them
15158  if test "x$new_path" = x \
15159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15161    new_path=`$CYGPATH -u "$path"`
15162  fi
15163  if test "x$new_path" = x; then
15164    # Oops. Which didn't find the executable.
15165    # The splitting of arguments from the executable at a space might have been incorrect,
15166    # since paths with space are more likely in Windows. Give it another try with the whole
15167    # argument.
15168    path="$complete"
15169    arguments="EOL"
15170    new_path=`$CYGPATH -u "$path"`
15171    new_path=`$WHICH "$new_path" 2> /dev/null`
15172    # bat and cmd files are not always considered executable in cygwin causing which
15173    # to not find them
15174    if test "x$new_path" = x \
15175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15177      new_path=`$CYGPATH -u "$path"`
15178    fi
15179    if test "x$new_path" = x; then
15180      # It's still not found. Now this is an unrecoverable error.
15181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15182$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15183      has_space=`$ECHO "$complete" | $GREP " "`
15184      if test "x$has_space" != x; then
15185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15187      fi
15188      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15189    fi
15190  fi
15191
15192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15195  # "foo.exe" is OK but "foo" is an error.
15196  #
15197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15198  # It is also a way to make sure we got the proper file name for the real test later on.
15199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15200  if test "x$test_shortpath" = x; then
15201    # Short path failed, file does not exist as specified.
15202    # Try adding .exe or .cmd
15203    if test -f "${new_path}.exe"; then
15204      input_to_shortpath="${new_path}.exe"
15205    elif test -f "${new_path}.cmd"; then
15206      input_to_shortpath="${new_path}.cmd"
15207    else
15208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15209$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15212      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15213    fi
15214  else
15215    input_to_shortpath="$new_path"
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  new_path="$input_to_shortpath"
15221
15222  input_path="$input_to_shortpath"
15223  # Check if we need to convert this using DOS-style short mode. If the path
15224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15225  # take no chances and rewrite it.
15226  # Note: m4 eats our [], so we need to use [ and ] instead.
15227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15228  if test "x$has_forbidden_chars" != x; then
15229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15233      # Going to short mode and back again did indeed matter. Since short mode is
15234      # case insensitive, let's make it lowercase to improve readability.
15235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15236      # Now convert it back to Unix-stile (cygpath)
15237      input_path=`$CYGPATH -u "$shortmode_path"`
15238      new_path="$input_path"
15239    fi
15240  fi
15241
15242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15243  if test "x$test_cygdrive_prefix" = x; then
15244    # As a simple fix, exclude /usr/bin since it's not a real path.
15245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15247      # a path prefixed by /cygdrive for fixpath to work.
15248      new_path="$CYGWIN_ROOT_PATH$input_path"
15249    fi
15250  fi
15251
15252  # remove trailing .exe if any
15253  new_path="${new_path/%.exe/}"
15254
15255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256
15257  # First separate the path from the arguments. This will split at the first
15258  # space.
15259  complete="$FOUND_MAKE"
15260  path="${complete%% *}"
15261  tmp="$complete EOL"
15262  arguments="${tmp#* }"
15263
15264  # Input might be given as Windows format, start by converting to
15265  # unix format.
15266  new_path="$path"
15267
15268  windows_path="$new_path"
15269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15270    unix_path=`$CYGPATH -u "$windows_path"`
15271    new_path="$unix_path"
15272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15274    new_path="$unix_path"
15275  fi
15276
15277
15278  # Now try to locate executable using which
15279  new_path=`$WHICH "$new_path" 2> /dev/null`
15280
15281  if test "x$new_path" = x; then
15282    # Oops. Which didn't find the executable.
15283    # The splitting of arguments from the executable at a space might have been incorrect,
15284    # since paths with space are more likely in Windows. Give it another try with the whole
15285    # argument.
15286    path="$complete"
15287    arguments="EOL"
15288    new_path="$path"
15289
15290  windows_path="$new_path"
15291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15292    unix_path=`$CYGPATH -u "$windows_path"`
15293    new_path="$unix_path"
15294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15296    new_path="$unix_path"
15297  fi
15298
15299
15300    new_path=`$WHICH "$new_path" 2> /dev/null`
15301
15302    if test "x$new_path" = x; then
15303      # It's still not found. Now this is an unrecoverable error.
15304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15305$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15306      has_space=`$ECHO "$complete" | $GREP " "`
15307      if test "x$has_space" != x; then
15308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15310      fi
15311      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15312    fi
15313  fi
15314
15315  # Now new_path has a complete unix path to the binary
15316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15317    # Keep paths in /bin as-is, but remove trailing .exe if any
15318    new_path="${new_path/%.exe/}"
15319    # Do not save /bin paths to all_fixpath_prefixes!
15320  else
15321    # Not in mixed or Windows style, start by that.
15322    new_path=`cmd //c echo $new_path`
15323
15324  input_path="$new_path"
15325  # Check if we need to convert this using DOS-style short mode. If the path
15326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15327  # take no chances and rewrite it.
15328  # Note: m4 eats our [], so we need to use [ and ] instead.
15329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15330  if test "x$has_forbidden_chars" != x; then
15331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15333  fi
15334
15335    # Output is in $new_path
15336
15337  windows_path="$new_path"
15338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15339    unix_path=`$CYGPATH -u "$windows_path"`
15340    new_path="$unix_path"
15341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15343    new_path="$unix_path"
15344  fi
15345
15346    # remove trailing .exe if any
15347    new_path="${new_path/%.exe/}"
15348
15349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15351  fi
15352
15353  else
15354    # We're on a posix platform. Hooray! :)
15355    # First separate the path from the arguments. This will split at the first
15356    # space.
15357    complete="$FOUND_MAKE"
15358    path="${complete%% *}"
15359    tmp="$complete EOL"
15360    arguments="${tmp#* }"
15361
15362    # Cannot rely on the command "which" here since it doesn't always work.
15363    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15364    if test -z "$is_absolute_path"; then
15365      # Path to executable is not absolute. Find it.
15366      IFS_save="$IFS"
15367      IFS=:
15368      for p in $PATH; do
15369        if test -f "$p/$path" && test -x "$p/$path"; then
15370          new_path="$p/$path"
15371          break
15372        fi
15373      done
15374      IFS="$IFS_save"
15375    else
15376      # This is an absolute path, we can use it without further modifications.
15377      new_path="$path"
15378    fi
15379
15380    if test "x$new_path" = x; then
15381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15382$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15383      has_space=`$ECHO "$complete" | $GREP " "`
15384      if test "x$has_space" != x; then
15385        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15387      fi
15388      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15389    fi
15390  fi
15391
15392  # Now join together the path and the arguments once again
15393  if test "x$arguments" != xEOL; then
15394    new_complete="$new_path ${arguments% *}"
15395  else
15396    new_complete="$new_path"
15397  fi
15398
15399  if test "x$complete" != "x$new_complete"; then
15400    FOUND_MAKE="$new_complete"
15401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15402$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15403  fi
15404
15405        fi
15406      fi
15407    fi
15408  fi
15409
15410    if test "x$FOUND_MAKE" = x; then
15411      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15412    fi
15413  else
15414    # Try our hardest to locate a correct version of GNU make
15415    for ac_prog in gmake
15416do
15417  # Extract the first word of "$ac_prog", so it can be a program name with args.
15418set dummy $ac_prog; ac_word=$2
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15420$as_echo_n "checking for $ac_word... " >&6; }
15421if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15422  $as_echo_n "(cached) " >&6
15423else
15424  case $CHECK_GMAKE in
15425  [\\/]* | ?:[\\/]*)
15426  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15427  ;;
15428  *)
15429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15430for as_dir in $PATH
15431do
15432  IFS=$as_save_IFS
15433  test -z "$as_dir" && as_dir=.
15434    for ac_exec_ext in '' $ac_executable_extensions; do
15435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15436    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15438    break 2
15439  fi
15440done
15441  done
15442IFS=$as_save_IFS
15443
15444  ;;
15445esac
15446fi
15447CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15448if test -n "$CHECK_GMAKE"; then
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15450$as_echo "$CHECK_GMAKE" >&6; }
15451else
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15453$as_echo "no" >&6; }
15454fi
15455
15456
15457  test -n "$CHECK_GMAKE" && break
15458done
15459
15460
15461  MAKE_CANDIDATE=""$CHECK_GMAKE""
15462  DESCRIPTION="gmake in PATH"
15463  if test "x$MAKE_CANDIDATE" != x; then
15464    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15465$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15466    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15467    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15468    if test "x$IS_GNU_MAKE" = x; then
15469      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15470$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15471    else
15472      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15473      if test "x$IS_MODERN_MAKE" = x; then
15474        { $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
15475$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;}
15476      else
15477        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15478          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15479            MAKE_EXPECTED_ENV='cygwin'
15480          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15481            MAKE_EXPECTED_ENV='msys'
15482          else
15483            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15484          fi
15485          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15486          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15487        else
15488          # Not relevant for non-Windows
15489          IS_MAKE_CORRECT_ENV=true
15490        fi
15491        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15492          { $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
15493$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;}
15494        else
15495          FOUND_MAKE=$MAKE_CANDIDATE
15496
15497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15498
15499  # First separate the path from the arguments. This will split at the first
15500  # space.
15501  complete="$FOUND_MAKE"
15502  path="${complete%% *}"
15503  tmp="$complete EOL"
15504  arguments="${tmp#* }"
15505
15506  # Input might be given as Windows format, start by converting to
15507  # unix format.
15508  new_path=`$CYGPATH -u "$path"`
15509
15510  # Now try to locate executable using which
15511  new_path=`$WHICH "$new_path" 2> /dev/null`
15512  # bat and cmd files are not always considered executable in cygwin causing which
15513  # to not find them
15514  if test "x$new_path" = x \
15515      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15516      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15517    new_path=`$CYGPATH -u "$path"`
15518  fi
15519  if test "x$new_path" = x; then
15520    # Oops. Which didn't find the executable.
15521    # The splitting of arguments from the executable at a space might have been incorrect,
15522    # since paths with space are more likely in Windows. Give it another try with the whole
15523    # argument.
15524    path="$complete"
15525    arguments="EOL"
15526    new_path=`$CYGPATH -u "$path"`
15527    new_path=`$WHICH "$new_path" 2> /dev/null`
15528    # bat and cmd files are not always considered executable in cygwin causing which
15529    # to not find them
15530    if test "x$new_path" = x \
15531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15533      new_path=`$CYGPATH -u "$path"`
15534    fi
15535    if test "x$new_path" = x; then
15536      # It's still not found. Now this is an unrecoverable error.
15537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15538$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15539      has_space=`$ECHO "$complete" | $GREP " "`
15540      if test "x$has_space" != x; then
15541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15543      fi
15544      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15545    fi
15546  fi
15547
15548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15551  # "foo.exe" is OK but "foo" is an error.
15552  #
15553  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15554  # It is also a way to make sure we got the proper file name for the real test later on.
15555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15556  if test "x$test_shortpath" = x; then
15557    # Short path failed, file does not exist as specified.
15558    # Try adding .exe or .cmd
15559    if test -f "${new_path}.exe"; then
15560      input_to_shortpath="${new_path}.exe"
15561    elif test -f "${new_path}.cmd"; then
15562      input_to_shortpath="${new_path}.cmd"
15563    else
15564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15566      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15567$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15568      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15569    fi
15570  else
15571    input_to_shortpath="$new_path"
15572  fi
15573
15574  # Call helper function which possibly converts this using DOS-style short mode.
15575  # If so, the updated path is stored in $new_path.
15576  new_path="$input_to_shortpath"
15577
15578  input_path="$input_to_shortpath"
15579  # Check if we need to convert this using DOS-style short mode. If the path
15580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15581  # take no chances and rewrite it.
15582  # Note: m4 eats our [], so we need to use [ and ] instead.
15583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15584  if test "x$has_forbidden_chars" != x; then
15585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15589      # Going to short mode and back again did indeed matter. Since short mode is
15590      # case insensitive, let's make it lowercase to improve readability.
15591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15592      # Now convert it back to Unix-stile (cygpath)
15593      input_path=`$CYGPATH -u "$shortmode_path"`
15594      new_path="$input_path"
15595    fi
15596  fi
15597
15598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15599  if test "x$test_cygdrive_prefix" = x; then
15600    # As a simple fix, exclude /usr/bin since it's not a real path.
15601    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15603      # a path prefixed by /cygdrive for fixpath to work.
15604      new_path="$CYGWIN_ROOT_PATH$input_path"
15605    fi
15606  fi
15607
15608  # remove trailing .exe if any
15609  new_path="${new_path/%.exe/}"
15610
15611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15612
15613  # First separate the path from the arguments. This will split at the first
15614  # space.
15615  complete="$FOUND_MAKE"
15616  path="${complete%% *}"
15617  tmp="$complete EOL"
15618  arguments="${tmp#* }"
15619
15620  # Input might be given as Windows format, start by converting to
15621  # unix format.
15622  new_path="$path"
15623
15624  windows_path="$new_path"
15625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15626    unix_path=`$CYGPATH -u "$windows_path"`
15627    new_path="$unix_path"
15628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15630    new_path="$unix_path"
15631  fi
15632
15633
15634  # Now try to locate executable using which
15635  new_path=`$WHICH "$new_path" 2> /dev/null`
15636
15637  if test "x$new_path" = x; then
15638    # Oops. Which didn't find the executable.
15639    # The splitting of arguments from the executable at a space might have been incorrect,
15640    # since paths with space are more likely in Windows. Give it another try with the whole
15641    # argument.
15642    path="$complete"
15643    arguments="EOL"
15644    new_path="$path"
15645
15646  windows_path="$new_path"
15647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15648    unix_path=`$CYGPATH -u "$windows_path"`
15649    new_path="$unix_path"
15650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15652    new_path="$unix_path"
15653  fi
15654
15655
15656    new_path=`$WHICH "$new_path" 2> /dev/null`
15657
15658    if test "x$new_path" = x; then
15659      # It's still not found. Now this is an unrecoverable error.
15660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15662      has_space=`$ECHO "$complete" | $GREP " "`
15663      if test "x$has_space" != x; then
15664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15666      fi
15667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15668    fi
15669  fi
15670
15671  # Now new_path has a complete unix path to the binary
15672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15673    # Keep paths in /bin as-is, but remove trailing .exe if any
15674    new_path="${new_path/%.exe/}"
15675    # Do not save /bin paths to all_fixpath_prefixes!
15676  else
15677    # Not in mixed or Windows style, start by that.
15678    new_path=`cmd //c echo $new_path`
15679
15680  input_path="$new_path"
15681  # Check if we need to convert this using DOS-style short mode. If the path
15682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15683  # take no chances and rewrite it.
15684  # Note: m4 eats our [], so we need to use [ and ] instead.
15685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15686  if test "x$has_forbidden_chars" != x; then
15687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15689  fi
15690
15691    # Output is in $new_path
15692
15693  windows_path="$new_path"
15694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15695    unix_path=`$CYGPATH -u "$windows_path"`
15696    new_path="$unix_path"
15697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15699    new_path="$unix_path"
15700  fi
15701
15702    # remove trailing .exe if any
15703    new_path="${new_path/%.exe/}"
15704
15705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15707  fi
15708
15709  else
15710    # We're on a posix platform. Hooray! :)
15711    # First separate the path from the arguments. This will split at the first
15712    # space.
15713    complete="$FOUND_MAKE"
15714    path="${complete%% *}"
15715    tmp="$complete EOL"
15716    arguments="${tmp#* }"
15717
15718    # Cannot rely on the command "which" here since it doesn't always work.
15719    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15720    if test -z "$is_absolute_path"; then
15721      # Path to executable is not absolute. Find it.
15722      IFS_save="$IFS"
15723      IFS=:
15724      for p in $PATH; do
15725        if test -f "$p/$path" && test -x "$p/$path"; then
15726          new_path="$p/$path"
15727          break
15728        fi
15729      done
15730      IFS="$IFS_save"
15731    else
15732      # This is an absolute path, we can use it without further modifications.
15733      new_path="$path"
15734    fi
15735
15736    if test "x$new_path" = x; then
15737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15738$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15739      has_space=`$ECHO "$complete" | $GREP " "`
15740      if test "x$has_space" != x; then
15741        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15743      fi
15744      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15745    fi
15746  fi
15747
15748  # Now join together the path and the arguments once again
15749  if test "x$arguments" != xEOL; then
15750    new_complete="$new_path ${arguments% *}"
15751  else
15752    new_complete="$new_path"
15753  fi
15754
15755  if test "x$complete" != "x$new_complete"; then
15756    FOUND_MAKE="$new_complete"
15757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15758$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15759  fi
15760
15761        fi
15762      fi
15763    fi
15764  fi
15765
15766
15767    if test "x$FOUND_MAKE" = x; then
15768      for ac_prog in make
15769do
15770  # Extract the first word of "$ac_prog", so it can be a program name with args.
15771set dummy $ac_prog; ac_word=$2
15772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15773$as_echo_n "checking for $ac_word... " >&6; }
15774if ${ac_cv_path_CHECK_MAKE+:} false; then :
15775  $as_echo_n "(cached) " >&6
15776else
15777  case $CHECK_MAKE in
15778  [\\/]* | ?:[\\/]*)
15779  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15780  ;;
15781  *)
15782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15783for as_dir in $PATH
15784do
15785  IFS=$as_save_IFS
15786  test -z "$as_dir" && as_dir=.
15787    for ac_exec_ext in '' $ac_executable_extensions; do
15788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15789    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15791    break 2
15792  fi
15793done
15794  done
15795IFS=$as_save_IFS
15796
15797  ;;
15798esac
15799fi
15800CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15801if test -n "$CHECK_MAKE"; then
15802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15803$as_echo "$CHECK_MAKE" >&6; }
15804else
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15806$as_echo "no" >&6; }
15807fi
15808
15809
15810  test -n "$CHECK_MAKE" && break
15811done
15812
15813
15814  MAKE_CANDIDATE=""$CHECK_MAKE""
15815  DESCRIPTION="make in PATH"
15816  if test "x$MAKE_CANDIDATE" != x; then
15817    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15818$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15819    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15820    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15821    if test "x$IS_GNU_MAKE" = x; then
15822      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15823$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15824    else
15825      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15826      if test "x$IS_MODERN_MAKE" = x; then
15827        { $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
15828$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;}
15829      else
15830        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15831          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15832            MAKE_EXPECTED_ENV='cygwin'
15833          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15834            MAKE_EXPECTED_ENV='msys'
15835          else
15836            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15837          fi
15838          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15839          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15840        else
15841          # Not relevant for non-Windows
15842          IS_MAKE_CORRECT_ENV=true
15843        fi
15844        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15845          { $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
15846$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;}
15847        else
15848          FOUND_MAKE=$MAKE_CANDIDATE
15849
15850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15851
15852  # First separate the path from the arguments. This will split at the first
15853  # space.
15854  complete="$FOUND_MAKE"
15855  path="${complete%% *}"
15856  tmp="$complete EOL"
15857  arguments="${tmp#* }"
15858
15859  # Input might be given as Windows format, start by converting to
15860  # unix format.
15861  new_path=`$CYGPATH -u "$path"`
15862
15863  # Now try to locate executable using which
15864  new_path=`$WHICH "$new_path" 2> /dev/null`
15865  # bat and cmd files are not always considered executable in cygwin causing which
15866  # to not find them
15867  if test "x$new_path" = x \
15868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15870    new_path=`$CYGPATH -u "$path"`
15871  fi
15872  if test "x$new_path" = x; then
15873    # Oops. Which didn't find the executable.
15874    # The splitting of arguments from the executable at a space might have been incorrect,
15875    # since paths with space are more likely in Windows. Give it another try with the whole
15876    # argument.
15877    path="$complete"
15878    arguments="EOL"
15879    new_path=`$CYGPATH -u "$path"`
15880    new_path=`$WHICH "$new_path" 2> /dev/null`
15881    # bat and cmd files are not always considered executable in cygwin causing which
15882    # to not find them
15883    if test "x$new_path" = x \
15884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15886      new_path=`$CYGPATH -u "$path"`
15887    fi
15888    if test "x$new_path" = x; then
15889      # It's still not found. Now this is an unrecoverable error.
15890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15892      has_space=`$ECHO "$complete" | $GREP " "`
15893      if test "x$has_space" != x; then
15894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15896      fi
15897      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15898    fi
15899  fi
15900
15901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15904  # "foo.exe" is OK but "foo" is an error.
15905  #
15906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15907  # It is also a way to make sure we got the proper file name for the real test later on.
15908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15909  if test "x$test_shortpath" = x; then
15910    # Short path failed, file does not exist as specified.
15911    # Try adding .exe or .cmd
15912    if test -f "${new_path}.exe"; then
15913      input_to_shortpath="${new_path}.exe"
15914    elif test -f "${new_path}.cmd"; then
15915      input_to_shortpath="${new_path}.cmd"
15916    else
15917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15918$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15921      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15922    fi
15923  else
15924    input_to_shortpath="$new_path"
15925  fi
15926
15927  # Call helper function which possibly converts this using DOS-style short mode.
15928  # If so, the updated path is stored in $new_path.
15929  new_path="$input_to_shortpath"
15930
15931  input_path="$input_to_shortpath"
15932  # Check if we need to convert this using DOS-style short mode. If the path
15933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15934  # take no chances and rewrite it.
15935  # Note: m4 eats our [], so we need to use [ and ] instead.
15936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15937  if test "x$has_forbidden_chars" != x; then
15938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15942      # Going to short mode and back again did indeed matter. Since short mode is
15943      # case insensitive, let's make it lowercase to improve readability.
15944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15945      # Now convert it back to Unix-stile (cygpath)
15946      input_path=`$CYGPATH -u "$shortmode_path"`
15947      new_path="$input_path"
15948    fi
15949  fi
15950
15951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15952  if test "x$test_cygdrive_prefix" = x; then
15953    # As a simple fix, exclude /usr/bin since it's not a real path.
15954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15956      # a path prefixed by /cygdrive for fixpath to work.
15957      new_path="$CYGWIN_ROOT_PATH$input_path"
15958    fi
15959  fi
15960
15961  # remove trailing .exe if any
15962  new_path="${new_path/%.exe/}"
15963
15964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15965
15966  # First separate the path from the arguments. This will split at the first
15967  # space.
15968  complete="$FOUND_MAKE"
15969  path="${complete%% *}"
15970  tmp="$complete EOL"
15971  arguments="${tmp#* }"
15972
15973  # Input might be given as Windows format, start by converting to
15974  # unix format.
15975  new_path="$path"
15976
15977  windows_path="$new_path"
15978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15979    unix_path=`$CYGPATH -u "$windows_path"`
15980    new_path="$unix_path"
15981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15983    new_path="$unix_path"
15984  fi
15985
15986
15987  # Now try to locate executable using which
15988  new_path=`$WHICH "$new_path" 2> /dev/null`
15989
15990  if test "x$new_path" = x; then
15991    # Oops. Which didn't find the executable.
15992    # The splitting of arguments from the executable at a space might have been incorrect,
15993    # since paths with space are more likely in Windows. Give it another try with the whole
15994    # argument.
15995    path="$complete"
15996    arguments="EOL"
15997    new_path="$path"
15998
15999  windows_path="$new_path"
16000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16001    unix_path=`$CYGPATH -u "$windows_path"`
16002    new_path="$unix_path"
16003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16005    new_path="$unix_path"
16006  fi
16007
16008
16009    new_path=`$WHICH "$new_path" 2> /dev/null`
16010
16011    if test "x$new_path" = x; then
16012      # It's still not found. Now this is an unrecoverable error.
16013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16014$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16015      has_space=`$ECHO "$complete" | $GREP " "`
16016      if test "x$has_space" != x; then
16017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16019      fi
16020      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16021    fi
16022  fi
16023
16024  # Now new_path has a complete unix path to the binary
16025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16026    # Keep paths in /bin as-is, but remove trailing .exe if any
16027    new_path="${new_path/%.exe/}"
16028    # Do not save /bin paths to all_fixpath_prefixes!
16029  else
16030    # Not in mixed or Windows style, start by that.
16031    new_path=`cmd //c echo $new_path`
16032
16033  input_path="$new_path"
16034  # Check if we need to convert this using DOS-style short mode. If the path
16035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16036  # take no chances and rewrite it.
16037  # Note: m4 eats our [], so we need to use [ and ] instead.
16038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16039  if test "x$has_forbidden_chars" != x; then
16040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16042  fi
16043
16044    # Output is in $new_path
16045
16046  windows_path="$new_path"
16047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16048    unix_path=`$CYGPATH -u "$windows_path"`
16049    new_path="$unix_path"
16050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16052    new_path="$unix_path"
16053  fi
16054
16055    # remove trailing .exe if any
16056    new_path="${new_path/%.exe/}"
16057
16058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16060  fi
16061
16062  else
16063    # We're on a posix platform. Hooray! :)
16064    # First separate the path from the arguments. This will split at the first
16065    # space.
16066    complete="$FOUND_MAKE"
16067    path="${complete%% *}"
16068    tmp="$complete EOL"
16069    arguments="${tmp#* }"
16070
16071    # Cannot rely on the command "which" here since it doesn't always work.
16072    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16073    if test -z "$is_absolute_path"; then
16074      # Path to executable is not absolute. Find it.
16075      IFS_save="$IFS"
16076      IFS=:
16077      for p in $PATH; do
16078        if test -f "$p/$path" && test -x "$p/$path"; then
16079          new_path="$p/$path"
16080          break
16081        fi
16082      done
16083      IFS="$IFS_save"
16084    else
16085      # This is an absolute path, we can use it without further modifications.
16086      new_path="$path"
16087    fi
16088
16089    if test "x$new_path" = x; then
16090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16092      has_space=`$ECHO "$complete" | $GREP " "`
16093      if test "x$has_space" != x; then
16094        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16096      fi
16097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16098    fi
16099  fi
16100
16101  # Now join together the path and the arguments once again
16102  if test "x$arguments" != xEOL; then
16103    new_complete="$new_path ${arguments% *}"
16104  else
16105    new_complete="$new_path"
16106  fi
16107
16108  if test "x$complete" != "x$new_complete"; then
16109    FOUND_MAKE="$new_complete"
16110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16111$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16112  fi
16113
16114        fi
16115      fi
16116    fi
16117  fi
16118
16119    fi
16120
16121    if test "x$FOUND_MAKE" = x; then
16122      if test "x$TOOLS_DIR" != x; then
16123        # We have a tools-dir, check that as well before giving up.
16124        OLD_PATH=$PATH
16125        PATH=$TOOLS_DIR:$PATH
16126        for ac_prog in gmake
16127do
16128  # Extract the first word of "$ac_prog", so it can be a program name with args.
16129set dummy $ac_prog; ac_word=$2
16130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16131$as_echo_n "checking for $ac_word... " >&6; }
16132if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16133  $as_echo_n "(cached) " >&6
16134else
16135  case $CHECK_TOOLSDIR_GMAKE in
16136  [\\/]* | ?:[\\/]*)
16137  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16138  ;;
16139  *)
16140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16141for as_dir in $PATH
16142do
16143  IFS=$as_save_IFS
16144  test -z "$as_dir" && as_dir=.
16145    for ac_exec_ext in '' $ac_executable_extensions; do
16146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16147    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16149    break 2
16150  fi
16151done
16152  done
16153IFS=$as_save_IFS
16154
16155  ;;
16156esac
16157fi
16158CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16159if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16161$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16162else
16163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16164$as_echo "no" >&6; }
16165fi
16166
16167
16168  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16169done
16170
16171
16172  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16173  DESCRIPTION="gmake in tools-dir"
16174  if test "x$MAKE_CANDIDATE" != x; then
16175    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16176$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16177    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16178    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16179    if test "x$IS_GNU_MAKE" = x; then
16180      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16181$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16182    else
16183      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16184      if test "x$IS_MODERN_MAKE" = x; then
16185        { $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
16186$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;}
16187      else
16188        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16189          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16190            MAKE_EXPECTED_ENV='cygwin'
16191          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16192            MAKE_EXPECTED_ENV='msys'
16193          else
16194            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16195          fi
16196          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16197          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16198        else
16199          # Not relevant for non-Windows
16200          IS_MAKE_CORRECT_ENV=true
16201        fi
16202        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16203          { $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
16204$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;}
16205        else
16206          FOUND_MAKE=$MAKE_CANDIDATE
16207
16208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16209
16210  # First separate the path from the arguments. This will split at the first
16211  # space.
16212  complete="$FOUND_MAKE"
16213  path="${complete%% *}"
16214  tmp="$complete EOL"
16215  arguments="${tmp#* }"
16216
16217  # Input might be given as Windows format, start by converting to
16218  # unix format.
16219  new_path=`$CYGPATH -u "$path"`
16220
16221  # Now try to locate executable using which
16222  new_path=`$WHICH "$new_path" 2> /dev/null`
16223  # bat and cmd files are not always considered executable in cygwin causing which
16224  # to not find them
16225  if test "x$new_path" = x \
16226      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16227      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16228    new_path=`$CYGPATH -u "$path"`
16229  fi
16230  if test "x$new_path" = x; then
16231    # Oops. Which didn't find the executable.
16232    # The splitting of arguments from the executable at a space might have been incorrect,
16233    # since paths with space are more likely in Windows. Give it another try with the whole
16234    # argument.
16235    path="$complete"
16236    arguments="EOL"
16237    new_path=`$CYGPATH -u "$path"`
16238    new_path=`$WHICH "$new_path" 2> /dev/null`
16239    # bat and cmd files are not always considered executable in cygwin causing which
16240    # to not find them
16241    if test "x$new_path" = x \
16242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16244      new_path=`$CYGPATH -u "$path"`
16245    fi
16246    if test "x$new_path" = x; then
16247      # It's still not found. Now this is an unrecoverable error.
16248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16250      has_space=`$ECHO "$complete" | $GREP " "`
16251      if test "x$has_space" != x; then
16252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16254      fi
16255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16256    fi
16257  fi
16258
16259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16262  # "foo.exe" is OK but "foo" is an error.
16263  #
16264  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16265  # It is also a way to make sure we got the proper file name for the real test later on.
16266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16267  if test "x$test_shortpath" = x; then
16268    # Short path failed, file does not exist as specified.
16269    # Try adding .exe or .cmd
16270    if test -f "${new_path}.exe"; then
16271      input_to_shortpath="${new_path}.exe"
16272    elif test -f "${new_path}.cmd"; then
16273      input_to_shortpath="${new_path}.cmd"
16274    else
16275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16276$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16279      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16280    fi
16281  else
16282    input_to_shortpath="$new_path"
16283  fi
16284
16285  # Call helper function which possibly converts this using DOS-style short mode.
16286  # If so, the updated path is stored in $new_path.
16287  new_path="$input_to_shortpath"
16288
16289  input_path="$input_to_shortpath"
16290  # Check if we need to convert this using DOS-style short mode. If the path
16291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16292  # take no chances and rewrite it.
16293  # Note: m4 eats our [], so we need to use [ and ] instead.
16294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16295  if test "x$has_forbidden_chars" != x; then
16296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16300      # Going to short mode and back again did indeed matter. Since short mode is
16301      # case insensitive, let's make it lowercase to improve readability.
16302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16303      # Now convert it back to Unix-stile (cygpath)
16304      input_path=`$CYGPATH -u "$shortmode_path"`
16305      new_path="$input_path"
16306    fi
16307  fi
16308
16309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16310  if test "x$test_cygdrive_prefix" = x; then
16311    # As a simple fix, exclude /usr/bin since it's not a real path.
16312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16314      # a path prefixed by /cygdrive for fixpath to work.
16315      new_path="$CYGWIN_ROOT_PATH$input_path"
16316    fi
16317  fi
16318
16319  # remove trailing .exe if any
16320  new_path="${new_path/%.exe/}"
16321
16322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323
16324  # First separate the path from the arguments. This will split at the first
16325  # space.
16326  complete="$FOUND_MAKE"
16327  path="${complete%% *}"
16328  tmp="$complete EOL"
16329  arguments="${tmp#* }"
16330
16331  # Input might be given as Windows format, start by converting to
16332  # unix format.
16333  new_path="$path"
16334
16335  windows_path="$new_path"
16336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16337    unix_path=`$CYGPATH -u "$windows_path"`
16338    new_path="$unix_path"
16339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16341    new_path="$unix_path"
16342  fi
16343
16344
16345  # Now try to locate executable using which
16346  new_path=`$WHICH "$new_path" 2> /dev/null`
16347
16348  if test "x$new_path" = x; then
16349    # Oops. Which didn't find the executable.
16350    # The splitting of arguments from the executable at a space might have been incorrect,
16351    # since paths with space are more likely in Windows. Give it another try with the whole
16352    # argument.
16353    path="$complete"
16354    arguments="EOL"
16355    new_path="$path"
16356
16357  windows_path="$new_path"
16358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359    unix_path=`$CYGPATH -u "$windows_path"`
16360    new_path="$unix_path"
16361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16363    new_path="$unix_path"
16364  fi
16365
16366
16367    new_path=`$WHICH "$new_path" 2> /dev/null`
16368
16369    if test "x$new_path" = x; then
16370      # It's still not found. Now this is an unrecoverable error.
16371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16372$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16373      has_space=`$ECHO "$complete" | $GREP " "`
16374      if test "x$has_space" != x; then
16375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16377      fi
16378      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16379    fi
16380  fi
16381
16382  # Now new_path has a complete unix path to the binary
16383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16384    # Keep paths in /bin as-is, but remove trailing .exe if any
16385    new_path="${new_path/%.exe/}"
16386    # Do not save /bin paths to all_fixpath_prefixes!
16387  else
16388    # Not in mixed or Windows style, start by that.
16389    new_path=`cmd //c echo $new_path`
16390
16391  input_path="$new_path"
16392  # Check if we need to convert this using DOS-style short mode. If the path
16393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16394  # take no chances and rewrite it.
16395  # Note: m4 eats our [], so we need to use [ and ] instead.
16396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16397  if test "x$has_forbidden_chars" != x; then
16398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16400  fi
16401
16402    # Output is in $new_path
16403
16404  windows_path="$new_path"
16405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16406    unix_path=`$CYGPATH -u "$windows_path"`
16407    new_path="$unix_path"
16408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16410    new_path="$unix_path"
16411  fi
16412
16413    # remove trailing .exe if any
16414    new_path="${new_path/%.exe/}"
16415
16416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16418  fi
16419
16420  else
16421    # We're on a posix platform. Hooray! :)
16422    # First separate the path from the arguments. This will split at the first
16423    # space.
16424    complete="$FOUND_MAKE"
16425    path="${complete%% *}"
16426    tmp="$complete EOL"
16427    arguments="${tmp#* }"
16428
16429    # Cannot rely on the command "which" here since it doesn't always work.
16430    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16431    if test -z "$is_absolute_path"; then
16432      # Path to executable is not absolute. Find it.
16433      IFS_save="$IFS"
16434      IFS=:
16435      for p in $PATH; do
16436        if test -f "$p/$path" && test -x "$p/$path"; then
16437          new_path="$p/$path"
16438          break
16439        fi
16440      done
16441      IFS="$IFS_save"
16442    else
16443      # This is an absolute path, we can use it without further modifications.
16444      new_path="$path"
16445    fi
16446
16447    if test "x$new_path" = x; then
16448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16449$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16450      has_space=`$ECHO "$complete" | $GREP " "`
16451      if test "x$has_space" != x; then
16452        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16454      fi
16455      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16456    fi
16457  fi
16458
16459  # Now join together the path and the arguments once again
16460  if test "x$arguments" != xEOL; then
16461    new_complete="$new_path ${arguments% *}"
16462  else
16463    new_complete="$new_path"
16464  fi
16465
16466  if test "x$complete" != "x$new_complete"; then
16467    FOUND_MAKE="$new_complete"
16468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16469$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16470  fi
16471
16472        fi
16473      fi
16474    fi
16475  fi
16476
16477        if test "x$FOUND_MAKE" = x; then
16478          for ac_prog in make
16479do
16480  # Extract the first word of "$ac_prog", so it can be a program name with args.
16481set dummy $ac_prog; ac_word=$2
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16483$as_echo_n "checking for $ac_word... " >&6; }
16484if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16485  $as_echo_n "(cached) " >&6
16486else
16487  case $CHECK_TOOLSDIR_MAKE in
16488  [\\/]* | ?:[\\/]*)
16489  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16490  ;;
16491  *)
16492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16493for as_dir in $PATH
16494do
16495  IFS=$as_save_IFS
16496  test -z "$as_dir" && as_dir=.
16497    for ac_exec_ext in '' $ac_executable_extensions; do
16498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16499    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16501    break 2
16502  fi
16503done
16504  done
16505IFS=$as_save_IFS
16506
16507  ;;
16508esac
16509fi
16510CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16511if test -n "$CHECK_TOOLSDIR_MAKE"; then
16512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16513$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16514else
16515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16516$as_echo "no" >&6; }
16517fi
16518
16519
16520  test -n "$CHECK_TOOLSDIR_MAKE" && break
16521done
16522
16523
16524  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16525  DESCRIPTION="make in tools-dir"
16526  if test "x$MAKE_CANDIDATE" != x; then
16527    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16528$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16529    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16530    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16531    if test "x$IS_GNU_MAKE" = x; then
16532      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16533$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16534    else
16535      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16536      if test "x$IS_MODERN_MAKE" = x; then
16537        { $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
16538$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;}
16539      else
16540        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16541          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16542            MAKE_EXPECTED_ENV='cygwin'
16543          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16544            MAKE_EXPECTED_ENV='msys'
16545          else
16546            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16547          fi
16548          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16549          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16550        else
16551          # Not relevant for non-Windows
16552          IS_MAKE_CORRECT_ENV=true
16553        fi
16554        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16555          { $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
16556$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;}
16557        else
16558          FOUND_MAKE=$MAKE_CANDIDATE
16559
16560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16561
16562  # First separate the path from the arguments. This will split at the first
16563  # space.
16564  complete="$FOUND_MAKE"
16565  path="${complete%% *}"
16566  tmp="$complete EOL"
16567  arguments="${tmp#* }"
16568
16569  # Input might be given as Windows format, start by converting to
16570  # unix format.
16571  new_path=`$CYGPATH -u "$path"`
16572
16573  # Now try to locate executable using which
16574  new_path=`$WHICH "$new_path" 2> /dev/null`
16575  # bat and cmd files are not always considered executable in cygwin causing which
16576  # to not find them
16577  if test "x$new_path" = x \
16578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16580    new_path=`$CYGPATH -u "$path"`
16581  fi
16582  if test "x$new_path" = x; then
16583    # Oops. Which didn't find the executable.
16584    # The splitting of arguments from the executable at a space might have been incorrect,
16585    # since paths with space are more likely in Windows. Give it another try with the whole
16586    # argument.
16587    path="$complete"
16588    arguments="EOL"
16589    new_path=`$CYGPATH -u "$path"`
16590    new_path=`$WHICH "$new_path" 2> /dev/null`
16591    # bat and cmd files are not always considered executable in cygwin causing which
16592    # to not find them
16593    if test "x$new_path" = x \
16594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16596      new_path=`$CYGPATH -u "$path"`
16597    fi
16598    if test "x$new_path" = x; then
16599      # It's still not found. Now this is an unrecoverable error.
16600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16602      has_space=`$ECHO "$complete" | $GREP " "`
16603      if test "x$has_space" != x; then
16604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16606      fi
16607      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16608    fi
16609  fi
16610
16611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16614  # "foo.exe" is OK but "foo" is an error.
16615  #
16616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16617  # It is also a way to make sure we got the proper file name for the real test later on.
16618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16619  if test "x$test_shortpath" = x; then
16620    # Short path failed, file does not exist as specified.
16621    # Try adding .exe or .cmd
16622    if test -f "${new_path}.exe"; then
16623      input_to_shortpath="${new_path}.exe"
16624    elif test -f "${new_path}.cmd"; then
16625      input_to_shortpath="${new_path}.cmd"
16626    else
16627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16628$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16631      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16632    fi
16633  else
16634    input_to_shortpath="$new_path"
16635  fi
16636
16637  # Call helper function which possibly converts this using DOS-style short mode.
16638  # If so, the updated path is stored in $new_path.
16639  new_path="$input_to_shortpath"
16640
16641  input_path="$input_to_shortpath"
16642  # Check if we need to convert this using DOS-style short mode. If the path
16643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16644  # take no chances and rewrite it.
16645  # Note: m4 eats our [], so we need to use [ and ] instead.
16646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16647  if test "x$has_forbidden_chars" != x; then
16648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16652      # Going to short mode and back again did indeed matter. Since short mode is
16653      # case insensitive, let's make it lowercase to improve readability.
16654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16655      # Now convert it back to Unix-stile (cygpath)
16656      input_path=`$CYGPATH -u "$shortmode_path"`
16657      new_path="$input_path"
16658    fi
16659  fi
16660
16661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16662  if test "x$test_cygdrive_prefix" = x; then
16663    # As a simple fix, exclude /usr/bin since it's not a real path.
16664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16666      # a path prefixed by /cygdrive for fixpath to work.
16667      new_path="$CYGWIN_ROOT_PATH$input_path"
16668    fi
16669  fi
16670
16671  # remove trailing .exe if any
16672  new_path="${new_path/%.exe/}"
16673
16674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16675
16676  # First separate the path from the arguments. This will split at the first
16677  # space.
16678  complete="$FOUND_MAKE"
16679  path="${complete%% *}"
16680  tmp="$complete EOL"
16681  arguments="${tmp#* }"
16682
16683  # Input might be given as Windows format, start by converting to
16684  # unix format.
16685  new_path="$path"
16686
16687  windows_path="$new_path"
16688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16689    unix_path=`$CYGPATH -u "$windows_path"`
16690    new_path="$unix_path"
16691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16693    new_path="$unix_path"
16694  fi
16695
16696
16697  # Now try to locate executable using which
16698  new_path=`$WHICH "$new_path" 2> /dev/null`
16699
16700  if test "x$new_path" = x; then
16701    # Oops. Which didn't find the executable.
16702    # The splitting of arguments from the executable at a space might have been incorrect,
16703    # since paths with space are more likely in Windows. Give it another try with the whole
16704    # argument.
16705    path="$complete"
16706    arguments="EOL"
16707    new_path="$path"
16708
16709  windows_path="$new_path"
16710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16711    unix_path=`$CYGPATH -u "$windows_path"`
16712    new_path="$unix_path"
16713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16715    new_path="$unix_path"
16716  fi
16717
16718
16719    new_path=`$WHICH "$new_path" 2> /dev/null`
16720
16721    if test "x$new_path" = x; then
16722      # It's still not found. Now this is an unrecoverable error.
16723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16725      has_space=`$ECHO "$complete" | $GREP " "`
16726      if test "x$has_space" != x; then
16727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16729      fi
16730      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16731    fi
16732  fi
16733
16734  # Now new_path has a complete unix path to the binary
16735  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16736    # Keep paths in /bin as-is, but remove trailing .exe if any
16737    new_path="${new_path/%.exe/}"
16738    # Do not save /bin paths to all_fixpath_prefixes!
16739  else
16740    # Not in mixed or Windows style, start by that.
16741    new_path=`cmd //c echo $new_path`
16742
16743  input_path="$new_path"
16744  # Check if we need to convert this using DOS-style short mode. If the path
16745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16746  # take no chances and rewrite it.
16747  # Note: m4 eats our [], so we need to use [ and ] instead.
16748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16749  if test "x$has_forbidden_chars" != x; then
16750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16752  fi
16753
16754    # Output is in $new_path
16755
16756  windows_path="$new_path"
16757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16758    unix_path=`$CYGPATH -u "$windows_path"`
16759    new_path="$unix_path"
16760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16762    new_path="$unix_path"
16763  fi
16764
16765    # remove trailing .exe if any
16766    new_path="${new_path/%.exe/}"
16767
16768    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16769    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16770  fi
16771
16772  else
16773    # We're on a posix platform. Hooray! :)
16774    # First separate the path from the arguments. This will split at the first
16775    # space.
16776    complete="$FOUND_MAKE"
16777    path="${complete%% *}"
16778    tmp="$complete EOL"
16779    arguments="${tmp#* }"
16780
16781    # Cannot rely on the command "which" here since it doesn't always work.
16782    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16783    if test -z "$is_absolute_path"; then
16784      # Path to executable is not absolute. Find it.
16785      IFS_save="$IFS"
16786      IFS=:
16787      for p in $PATH; do
16788        if test -f "$p/$path" && test -x "$p/$path"; then
16789          new_path="$p/$path"
16790          break
16791        fi
16792      done
16793      IFS="$IFS_save"
16794    else
16795      # This is an absolute path, we can use it without further modifications.
16796      new_path="$path"
16797    fi
16798
16799    if test "x$new_path" = x; then
16800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16802      has_space=`$ECHO "$complete" | $GREP " "`
16803      if test "x$has_space" != x; then
16804        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16805$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16806      fi
16807      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16808    fi
16809  fi
16810
16811  # Now join together the path and the arguments once again
16812  if test "x$arguments" != xEOL; then
16813    new_complete="$new_path ${arguments% *}"
16814  else
16815    new_complete="$new_path"
16816  fi
16817
16818  if test "x$complete" != "x$new_complete"; then
16819    FOUND_MAKE="$new_complete"
16820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16821$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16822  fi
16823
16824        fi
16825      fi
16826    fi
16827  fi
16828
16829        fi
16830        PATH=$OLD_PATH
16831      fi
16832    fi
16833
16834    if test "x$FOUND_MAKE" = x; then
16835      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
16836    fi
16837  fi
16838
16839  MAKE=$FOUND_MAKE
16840
16841  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16842$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16843
16844
16845
16846  # Test if find supports -delete
16847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16848$as_echo_n "checking if find supports -delete... " >&6; }
16849  FIND_DELETE="-delete"
16850
16851  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16852
16853  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16854
16855  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16856  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16857    # No, it does not.
16858    rm $DELETEDIR/TestIfFindSupportsDelete
16859    FIND_DELETE="-exec rm \{\} \+"
16860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16861$as_echo "no" >&6; }
16862  else
16863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16864$as_echo "yes" >&6; }
16865  fi
16866  rmdir $DELETEDIR
16867
16868
16869
16870  # These tools might not be installed by default,
16871  # need hint on how to install them.
16872
16873
16874
16875  # Publish this variable in the help.
16876
16877
16878  if test "x$UNZIP" = x; then
16879    # The variable is not set by user, try to locate tool using the code snippet
16880    for ac_prog in unzip
16881do
16882  # Extract the first word of "$ac_prog", so it can be a program name with args.
16883set dummy $ac_prog; ac_word=$2
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16885$as_echo_n "checking for $ac_word... " >&6; }
16886if ${ac_cv_path_UNZIP+:} false; then :
16887  $as_echo_n "(cached) " >&6
16888else
16889  case $UNZIP in
16890  [\\/]* | ?:[\\/]*)
16891  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16892  ;;
16893  *)
16894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16895for as_dir in $PATH
16896do
16897  IFS=$as_save_IFS
16898  test -z "$as_dir" && as_dir=.
16899    for ac_exec_ext in '' $ac_executable_extensions; do
16900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16901    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16903    break 2
16904  fi
16905done
16906  done
16907IFS=$as_save_IFS
16908
16909  ;;
16910esac
16911fi
16912UNZIP=$ac_cv_path_UNZIP
16913if test -n "$UNZIP"; then
16914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16915$as_echo "$UNZIP" >&6; }
16916else
16917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16918$as_echo "no" >&6; }
16919fi
16920
16921
16922  test -n "$UNZIP" && break
16923done
16924
16925  else
16926    # The variable is set, but is it from the command line or the environment?
16927
16928    # Try to remove the string !UNZIP! from our list.
16929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16931      # If it failed, the variable was not from the command line. Ignore it,
16932      # but warn the user (except for BASH, which is always set by the calling BASH).
16933      if test "xUNZIP" != xBASH; then
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16935$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16936      fi
16937      # Try to locate tool using the code snippet
16938      for ac_prog in unzip
16939do
16940  # Extract the first word of "$ac_prog", so it can be a program name with args.
16941set dummy $ac_prog; ac_word=$2
16942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16943$as_echo_n "checking for $ac_word... " >&6; }
16944if ${ac_cv_path_UNZIP+:} false; then :
16945  $as_echo_n "(cached) " >&6
16946else
16947  case $UNZIP in
16948  [\\/]* | ?:[\\/]*)
16949  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16950  ;;
16951  *)
16952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16953for as_dir in $PATH
16954do
16955  IFS=$as_save_IFS
16956  test -z "$as_dir" && as_dir=.
16957    for ac_exec_ext in '' $ac_executable_extensions; do
16958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16959    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16961    break 2
16962  fi
16963done
16964  done
16965IFS=$as_save_IFS
16966
16967  ;;
16968esac
16969fi
16970UNZIP=$ac_cv_path_UNZIP
16971if test -n "$UNZIP"; then
16972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16973$as_echo "$UNZIP" >&6; }
16974else
16975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16976$as_echo "no" >&6; }
16977fi
16978
16979
16980  test -n "$UNZIP" && break
16981done
16982
16983    else
16984      # If it succeeded, then it was overridden by the user. We will use it
16985      # for the tool.
16986
16987      # First remove it from the list of overridden variables, so we can test
16988      # for unknown variables in the end.
16989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16990
16991      # Check if the provided tool contains a complete path.
16992      tool_specified="$UNZIP"
16993      tool_basename="${tool_specified##*/}"
16994      if test "x$tool_basename" = "x$tool_specified"; then
16995        # A command without a complete path is provided, search $PATH.
16996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16997$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16998        # Extract the first word of "$tool_basename", so it can be a program name with args.
16999set dummy $tool_basename; ac_word=$2
17000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17001$as_echo_n "checking for $ac_word... " >&6; }
17002if ${ac_cv_path_UNZIP+:} false; then :
17003  $as_echo_n "(cached) " >&6
17004else
17005  case $UNZIP in
17006  [\\/]* | ?:[\\/]*)
17007  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17008  ;;
17009  *)
17010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17011for as_dir in $PATH
17012do
17013  IFS=$as_save_IFS
17014  test -z "$as_dir" && as_dir=.
17015    for ac_exec_ext in '' $ac_executable_extensions; do
17016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17017    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17019    break 2
17020  fi
17021done
17022  done
17023IFS=$as_save_IFS
17024
17025  ;;
17026esac
17027fi
17028UNZIP=$ac_cv_path_UNZIP
17029if test -n "$UNZIP"; then
17030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17031$as_echo "$UNZIP" >&6; }
17032else
17033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17034$as_echo "no" >&6; }
17035fi
17036
17037
17038        if test "x$UNZIP" = x; then
17039          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17040        fi
17041      else
17042        # Otherwise we believe it is a complete path. Use it as it is.
17043        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17044$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17046$as_echo_n "checking for UNZIP... " >&6; }
17047        if test ! -x "$tool_specified"; then
17048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17049$as_echo "not found" >&6; }
17050          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17051        fi
17052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17053$as_echo "$tool_specified" >&6; }
17054      fi
17055    fi
17056  fi
17057
17058
17059
17060  if test "x$UNZIP" = x; then
17061    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17062  fi
17063
17064
17065
17066
17067
17068  # Publish this variable in the help.
17069
17070
17071  if test "x$ZIP" = x; then
17072    # The variable is not set by user, try to locate tool using the code snippet
17073    for ac_prog in zip
17074do
17075  # Extract the first word of "$ac_prog", so it can be a program name with args.
17076set dummy $ac_prog; ac_word=$2
17077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17078$as_echo_n "checking for $ac_word... " >&6; }
17079if ${ac_cv_path_ZIP+:} false; then :
17080  $as_echo_n "(cached) " >&6
17081else
17082  case $ZIP in
17083  [\\/]* | ?:[\\/]*)
17084  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17085  ;;
17086  *)
17087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17088for as_dir in $PATH
17089do
17090  IFS=$as_save_IFS
17091  test -z "$as_dir" && as_dir=.
17092    for ac_exec_ext in '' $ac_executable_extensions; do
17093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17094    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17096    break 2
17097  fi
17098done
17099  done
17100IFS=$as_save_IFS
17101
17102  ;;
17103esac
17104fi
17105ZIP=$ac_cv_path_ZIP
17106if test -n "$ZIP"; then
17107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17108$as_echo "$ZIP" >&6; }
17109else
17110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17111$as_echo "no" >&6; }
17112fi
17113
17114
17115  test -n "$ZIP" && break
17116done
17117
17118  else
17119    # The variable is set, but is it from the command line or the environment?
17120
17121    # Try to remove the string !ZIP! from our list.
17122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17124      # If it failed, the variable was not from the command line. Ignore it,
17125      # but warn the user (except for BASH, which is always set by the calling BASH).
17126      if test "xZIP" != xBASH; then
17127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17128$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17129      fi
17130      # Try to locate tool using the code snippet
17131      for ac_prog in zip
17132do
17133  # Extract the first word of "$ac_prog", so it can be a program name with args.
17134set dummy $ac_prog; ac_word=$2
17135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17136$as_echo_n "checking for $ac_word... " >&6; }
17137if ${ac_cv_path_ZIP+:} false; then :
17138  $as_echo_n "(cached) " >&6
17139else
17140  case $ZIP in
17141  [\\/]* | ?:[\\/]*)
17142  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17143  ;;
17144  *)
17145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17146for as_dir in $PATH
17147do
17148  IFS=$as_save_IFS
17149  test -z "$as_dir" && as_dir=.
17150    for ac_exec_ext in '' $ac_executable_extensions; do
17151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17152    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17154    break 2
17155  fi
17156done
17157  done
17158IFS=$as_save_IFS
17159
17160  ;;
17161esac
17162fi
17163ZIP=$ac_cv_path_ZIP
17164if test -n "$ZIP"; then
17165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17166$as_echo "$ZIP" >&6; }
17167else
17168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17169$as_echo "no" >&6; }
17170fi
17171
17172
17173  test -n "$ZIP" && break
17174done
17175
17176    else
17177      # If it succeeded, then it was overridden by the user. We will use it
17178      # for the tool.
17179
17180      # First remove it from the list of overridden variables, so we can test
17181      # for unknown variables in the end.
17182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17183
17184      # Check if the provided tool contains a complete path.
17185      tool_specified="$ZIP"
17186      tool_basename="${tool_specified##*/}"
17187      if test "x$tool_basename" = "x$tool_specified"; then
17188        # A command without a complete path is provided, search $PATH.
17189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17190$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17191        # Extract the first word of "$tool_basename", so it can be a program name with args.
17192set dummy $tool_basename; ac_word=$2
17193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17194$as_echo_n "checking for $ac_word... " >&6; }
17195if ${ac_cv_path_ZIP+:} false; then :
17196  $as_echo_n "(cached) " >&6
17197else
17198  case $ZIP in
17199  [\\/]* | ?:[\\/]*)
17200  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17201  ;;
17202  *)
17203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17204for as_dir in $PATH
17205do
17206  IFS=$as_save_IFS
17207  test -z "$as_dir" && as_dir=.
17208    for ac_exec_ext in '' $ac_executable_extensions; do
17209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17210    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17212    break 2
17213  fi
17214done
17215  done
17216IFS=$as_save_IFS
17217
17218  ;;
17219esac
17220fi
17221ZIP=$ac_cv_path_ZIP
17222if test -n "$ZIP"; then
17223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17224$as_echo "$ZIP" >&6; }
17225else
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17227$as_echo "no" >&6; }
17228fi
17229
17230
17231        if test "x$ZIP" = x; then
17232          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17233        fi
17234      else
17235        # Otherwise we believe it is a complete path. Use it as it is.
17236        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17237$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17239$as_echo_n "checking for ZIP... " >&6; }
17240        if test ! -x "$tool_specified"; then
17241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17242$as_echo "not found" >&6; }
17243          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17244        fi
17245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17246$as_echo "$tool_specified" >&6; }
17247      fi
17248    fi
17249  fi
17250
17251
17252
17253  if test "x$ZIP" = x; then
17254    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17255  fi
17256
17257
17258
17259  # Non-required basic tools
17260
17261
17262
17263  # Publish this variable in the help.
17264
17265
17266  if test "x$LDD" = x; then
17267    # The variable is not set by user, try to locate tool using the code snippet
17268    for ac_prog in ldd
17269do
17270  # Extract the first word of "$ac_prog", so it can be a program name with args.
17271set dummy $ac_prog; ac_word=$2
17272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17273$as_echo_n "checking for $ac_word... " >&6; }
17274if ${ac_cv_path_LDD+:} false; then :
17275  $as_echo_n "(cached) " >&6
17276else
17277  case $LDD in
17278  [\\/]* | ?:[\\/]*)
17279  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17280  ;;
17281  *)
17282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17283for as_dir in $PATH
17284do
17285  IFS=$as_save_IFS
17286  test -z "$as_dir" && as_dir=.
17287    for ac_exec_ext in '' $ac_executable_extensions; do
17288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17289    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17291    break 2
17292  fi
17293done
17294  done
17295IFS=$as_save_IFS
17296
17297  ;;
17298esac
17299fi
17300LDD=$ac_cv_path_LDD
17301if test -n "$LDD"; then
17302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17303$as_echo "$LDD" >&6; }
17304else
17305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17306$as_echo "no" >&6; }
17307fi
17308
17309
17310  test -n "$LDD" && break
17311done
17312
17313  else
17314    # The variable is set, but is it from the command line or the environment?
17315
17316    # Try to remove the string !LDD! from our list.
17317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17319      # If it failed, the variable was not from the command line. Ignore it,
17320      # but warn the user (except for BASH, which is always set by the calling BASH).
17321      if test "xLDD" != xBASH; then
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17323$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17324      fi
17325      # Try to locate tool using the code snippet
17326      for ac_prog in ldd
17327do
17328  # Extract the first word of "$ac_prog", so it can be a program name with args.
17329set dummy $ac_prog; ac_word=$2
17330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17331$as_echo_n "checking for $ac_word... " >&6; }
17332if ${ac_cv_path_LDD+:} false; then :
17333  $as_echo_n "(cached) " >&6
17334else
17335  case $LDD in
17336  [\\/]* | ?:[\\/]*)
17337  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17338  ;;
17339  *)
17340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17341for as_dir in $PATH
17342do
17343  IFS=$as_save_IFS
17344  test -z "$as_dir" && as_dir=.
17345    for ac_exec_ext in '' $ac_executable_extensions; do
17346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17347    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17349    break 2
17350  fi
17351done
17352  done
17353IFS=$as_save_IFS
17354
17355  ;;
17356esac
17357fi
17358LDD=$ac_cv_path_LDD
17359if test -n "$LDD"; then
17360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17361$as_echo "$LDD" >&6; }
17362else
17363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17364$as_echo "no" >&6; }
17365fi
17366
17367
17368  test -n "$LDD" && break
17369done
17370
17371    else
17372      # If it succeeded, then it was overridden by the user. We will use it
17373      # for the tool.
17374
17375      # First remove it from the list of overridden variables, so we can test
17376      # for unknown variables in the end.
17377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17378
17379      # Check if the provided tool contains a complete path.
17380      tool_specified="$LDD"
17381      tool_basename="${tool_specified##*/}"
17382      if test "x$tool_basename" = "x$tool_specified"; then
17383        # A command without a complete path is provided, search $PATH.
17384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17385$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17386        # Extract the first word of "$tool_basename", so it can be a program name with args.
17387set dummy $tool_basename; ac_word=$2
17388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17389$as_echo_n "checking for $ac_word... " >&6; }
17390if ${ac_cv_path_LDD+:} false; then :
17391  $as_echo_n "(cached) " >&6
17392else
17393  case $LDD in
17394  [\\/]* | ?:[\\/]*)
17395  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17396  ;;
17397  *)
17398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17399for as_dir in $PATH
17400do
17401  IFS=$as_save_IFS
17402  test -z "$as_dir" && as_dir=.
17403    for ac_exec_ext in '' $ac_executable_extensions; do
17404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17405    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17407    break 2
17408  fi
17409done
17410  done
17411IFS=$as_save_IFS
17412
17413  ;;
17414esac
17415fi
17416LDD=$ac_cv_path_LDD
17417if test -n "$LDD"; then
17418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17419$as_echo "$LDD" >&6; }
17420else
17421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17422$as_echo "no" >&6; }
17423fi
17424
17425
17426        if test "x$LDD" = x; then
17427          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17428        fi
17429      else
17430        # Otherwise we believe it is a complete path. Use it as it is.
17431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17432$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17434$as_echo_n "checking for LDD... " >&6; }
17435        if test ! -x "$tool_specified"; then
17436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17437$as_echo "not found" >&6; }
17438          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17439        fi
17440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17441$as_echo "$tool_specified" >&6; }
17442      fi
17443    fi
17444  fi
17445
17446
17447  if test "x$LDD" = "x"; then
17448    # List shared lib dependencies is used for
17449    # debug output and checking for forbidden dependencies.
17450    # We can build without it.
17451    LDD="true"
17452  fi
17453
17454
17455  # Publish this variable in the help.
17456
17457
17458  if test "x$OTOOL" = x; then
17459    # The variable is not set by user, try to locate tool using the code snippet
17460    for ac_prog in otool
17461do
17462  # Extract the first word of "$ac_prog", so it can be a program name with args.
17463set dummy $ac_prog; ac_word=$2
17464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17465$as_echo_n "checking for $ac_word... " >&6; }
17466if ${ac_cv_path_OTOOL+:} false; then :
17467  $as_echo_n "(cached) " >&6
17468else
17469  case $OTOOL in
17470  [\\/]* | ?:[\\/]*)
17471  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17472  ;;
17473  *)
17474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17475for as_dir in $PATH
17476do
17477  IFS=$as_save_IFS
17478  test -z "$as_dir" && as_dir=.
17479    for ac_exec_ext in '' $ac_executable_extensions; do
17480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17481    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17483    break 2
17484  fi
17485done
17486  done
17487IFS=$as_save_IFS
17488
17489  ;;
17490esac
17491fi
17492OTOOL=$ac_cv_path_OTOOL
17493if test -n "$OTOOL"; then
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17495$as_echo "$OTOOL" >&6; }
17496else
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17498$as_echo "no" >&6; }
17499fi
17500
17501
17502  test -n "$OTOOL" && break
17503done
17504
17505  else
17506    # The variable is set, but is it from the command line or the environment?
17507
17508    # Try to remove the string !OTOOL! from our list.
17509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17511      # If it failed, the variable was not from the command line. Ignore it,
17512      # but warn the user (except for BASH, which is always set by the calling BASH).
17513      if test "xOTOOL" != xBASH; then
17514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17515$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17516      fi
17517      # Try to locate tool using the code snippet
17518      for ac_prog in otool
17519do
17520  # Extract the first word of "$ac_prog", so it can be a program name with args.
17521set dummy $ac_prog; ac_word=$2
17522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17523$as_echo_n "checking for $ac_word... " >&6; }
17524if ${ac_cv_path_OTOOL+:} false; then :
17525  $as_echo_n "(cached) " >&6
17526else
17527  case $OTOOL in
17528  [\\/]* | ?:[\\/]*)
17529  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17530  ;;
17531  *)
17532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17533for as_dir in $PATH
17534do
17535  IFS=$as_save_IFS
17536  test -z "$as_dir" && as_dir=.
17537    for ac_exec_ext in '' $ac_executable_extensions; do
17538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17539    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17541    break 2
17542  fi
17543done
17544  done
17545IFS=$as_save_IFS
17546
17547  ;;
17548esac
17549fi
17550OTOOL=$ac_cv_path_OTOOL
17551if test -n "$OTOOL"; then
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17553$as_echo "$OTOOL" >&6; }
17554else
17555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17556$as_echo "no" >&6; }
17557fi
17558
17559
17560  test -n "$OTOOL" && break
17561done
17562
17563    else
17564      # If it succeeded, then it was overridden by the user. We will use it
17565      # for the tool.
17566
17567      # First remove it from the list of overridden variables, so we can test
17568      # for unknown variables in the end.
17569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17570
17571      # Check if the provided tool contains a complete path.
17572      tool_specified="$OTOOL"
17573      tool_basename="${tool_specified##*/}"
17574      if test "x$tool_basename" = "x$tool_specified"; then
17575        # A command without a complete path is provided, search $PATH.
17576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17577$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17578        # Extract the first word of "$tool_basename", so it can be a program name with args.
17579set dummy $tool_basename; ac_word=$2
17580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17581$as_echo_n "checking for $ac_word... " >&6; }
17582if ${ac_cv_path_OTOOL+:} false; then :
17583  $as_echo_n "(cached) " >&6
17584else
17585  case $OTOOL in
17586  [\\/]* | ?:[\\/]*)
17587  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17588  ;;
17589  *)
17590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17591for as_dir in $PATH
17592do
17593  IFS=$as_save_IFS
17594  test -z "$as_dir" && as_dir=.
17595    for ac_exec_ext in '' $ac_executable_extensions; do
17596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17597    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17599    break 2
17600  fi
17601done
17602  done
17603IFS=$as_save_IFS
17604
17605  ;;
17606esac
17607fi
17608OTOOL=$ac_cv_path_OTOOL
17609if test -n "$OTOOL"; then
17610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17611$as_echo "$OTOOL" >&6; }
17612else
17613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17614$as_echo "no" >&6; }
17615fi
17616
17617
17618        if test "x$OTOOL" = x; then
17619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17620        fi
17621      else
17622        # Otherwise we believe it is a complete path. Use it as it is.
17623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17624$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17626$as_echo_n "checking for OTOOL... " >&6; }
17627        if test ! -x "$tool_specified"; then
17628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17629$as_echo "not found" >&6; }
17630          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17631        fi
17632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17633$as_echo "$tool_specified" >&6; }
17634      fi
17635    fi
17636  fi
17637
17638
17639  if test "x$OTOOL" = "x"; then
17640    OTOOL="true"
17641  fi
17642
17643
17644  # Publish this variable in the help.
17645
17646
17647  if test "x$READELF" = x; then
17648    # The variable is not set by user, try to locate tool using the code snippet
17649    for ac_prog in greadelf readelf
17650do
17651  # Extract the first word of "$ac_prog", so it can be a program name with args.
17652set dummy $ac_prog; ac_word=$2
17653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17654$as_echo_n "checking for $ac_word... " >&6; }
17655if ${ac_cv_path_READELF+:} false; then :
17656  $as_echo_n "(cached) " >&6
17657else
17658  case $READELF in
17659  [\\/]* | ?:[\\/]*)
17660  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17661  ;;
17662  *)
17663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17664for as_dir in $PATH
17665do
17666  IFS=$as_save_IFS
17667  test -z "$as_dir" && as_dir=.
17668    for ac_exec_ext in '' $ac_executable_extensions; do
17669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17670    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17672    break 2
17673  fi
17674done
17675  done
17676IFS=$as_save_IFS
17677
17678  ;;
17679esac
17680fi
17681READELF=$ac_cv_path_READELF
17682if test -n "$READELF"; then
17683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17684$as_echo "$READELF" >&6; }
17685else
17686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17687$as_echo "no" >&6; }
17688fi
17689
17690
17691  test -n "$READELF" && break
17692done
17693
17694  else
17695    # The variable is set, but is it from the command line or the environment?
17696
17697    # Try to remove the string !READELF! from our list.
17698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17700      # If it failed, the variable was not from the command line. Ignore it,
17701      # but warn the user (except for BASH, which is always set by the calling BASH).
17702      if test "xREADELF" != xBASH; then
17703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17704$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17705      fi
17706      # Try to locate tool using the code snippet
17707      for ac_prog in greadelf readelf
17708do
17709  # Extract the first word of "$ac_prog", so it can be a program name with args.
17710set dummy $ac_prog; ac_word=$2
17711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17712$as_echo_n "checking for $ac_word... " >&6; }
17713if ${ac_cv_path_READELF+:} false; then :
17714  $as_echo_n "(cached) " >&6
17715else
17716  case $READELF in
17717  [\\/]* | ?:[\\/]*)
17718  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17719  ;;
17720  *)
17721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17722for as_dir in $PATH
17723do
17724  IFS=$as_save_IFS
17725  test -z "$as_dir" && as_dir=.
17726    for ac_exec_ext in '' $ac_executable_extensions; do
17727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17728    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17730    break 2
17731  fi
17732done
17733  done
17734IFS=$as_save_IFS
17735
17736  ;;
17737esac
17738fi
17739READELF=$ac_cv_path_READELF
17740if test -n "$READELF"; then
17741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17742$as_echo "$READELF" >&6; }
17743else
17744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17745$as_echo "no" >&6; }
17746fi
17747
17748
17749  test -n "$READELF" && break
17750done
17751
17752    else
17753      # If it succeeded, then it was overridden by the user. We will use it
17754      # for the tool.
17755
17756      # First remove it from the list of overridden variables, so we can test
17757      # for unknown variables in the end.
17758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17759
17760      # Check if the provided tool contains a complete path.
17761      tool_specified="$READELF"
17762      tool_basename="${tool_specified##*/}"
17763      if test "x$tool_basename" = "x$tool_specified"; then
17764        # A command without a complete path is provided, search $PATH.
17765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17766$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17767        # Extract the first word of "$tool_basename", so it can be a program name with args.
17768set dummy $tool_basename; ac_word=$2
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17770$as_echo_n "checking for $ac_word... " >&6; }
17771if ${ac_cv_path_READELF+:} false; then :
17772  $as_echo_n "(cached) " >&6
17773else
17774  case $READELF in
17775  [\\/]* | ?:[\\/]*)
17776  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17777  ;;
17778  *)
17779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17780for as_dir in $PATH
17781do
17782  IFS=$as_save_IFS
17783  test -z "$as_dir" && as_dir=.
17784    for ac_exec_ext in '' $ac_executable_extensions; do
17785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17786    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17788    break 2
17789  fi
17790done
17791  done
17792IFS=$as_save_IFS
17793
17794  ;;
17795esac
17796fi
17797READELF=$ac_cv_path_READELF
17798if test -n "$READELF"; then
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17800$as_echo "$READELF" >&6; }
17801else
17802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17803$as_echo "no" >&6; }
17804fi
17805
17806
17807        if test "x$READELF" = x; then
17808          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17809        fi
17810      else
17811        # Otherwise we believe it is a complete path. Use it as it is.
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17813$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17815$as_echo_n "checking for READELF... " >&6; }
17816        if test ! -x "$tool_specified"; then
17817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17818$as_echo "not found" >&6; }
17819          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17820        fi
17821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17822$as_echo "$tool_specified" >&6; }
17823      fi
17824    fi
17825  fi
17826
17827
17828
17829
17830  # Publish this variable in the help.
17831
17832
17833  if test "x$HG" = x; then
17834    # The variable is not set by user, try to locate tool using the code snippet
17835    for ac_prog in hg
17836do
17837  # Extract the first word of "$ac_prog", so it can be a program name with args.
17838set dummy $ac_prog; ac_word=$2
17839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17840$as_echo_n "checking for $ac_word... " >&6; }
17841if ${ac_cv_path_HG+:} false; then :
17842  $as_echo_n "(cached) " >&6
17843else
17844  case $HG in
17845  [\\/]* | ?:[\\/]*)
17846  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17847  ;;
17848  *)
17849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17850for as_dir in $PATH
17851do
17852  IFS=$as_save_IFS
17853  test -z "$as_dir" && as_dir=.
17854    for ac_exec_ext in '' $ac_executable_extensions; do
17855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17856    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17858    break 2
17859  fi
17860done
17861  done
17862IFS=$as_save_IFS
17863
17864  ;;
17865esac
17866fi
17867HG=$ac_cv_path_HG
17868if test -n "$HG"; then
17869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17870$as_echo "$HG" >&6; }
17871else
17872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17873$as_echo "no" >&6; }
17874fi
17875
17876
17877  test -n "$HG" && break
17878done
17879
17880  else
17881    # The variable is set, but is it from the command line or the environment?
17882
17883    # Try to remove the string !HG! from our list.
17884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17886      # If it failed, the variable was not from the command line. Ignore it,
17887      # but warn the user (except for BASH, which is always set by the calling BASH).
17888      if test "xHG" != xBASH; then
17889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17890$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17891      fi
17892      # Try to locate tool using the code snippet
17893      for ac_prog in hg
17894do
17895  # Extract the first word of "$ac_prog", so it can be a program name with args.
17896set dummy $ac_prog; ac_word=$2
17897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17898$as_echo_n "checking for $ac_word... " >&6; }
17899if ${ac_cv_path_HG+:} false; then :
17900  $as_echo_n "(cached) " >&6
17901else
17902  case $HG in
17903  [\\/]* | ?:[\\/]*)
17904  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17905  ;;
17906  *)
17907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17908for as_dir in $PATH
17909do
17910  IFS=$as_save_IFS
17911  test -z "$as_dir" && as_dir=.
17912    for ac_exec_ext in '' $ac_executable_extensions; do
17913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17914    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17916    break 2
17917  fi
17918done
17919  done
17920IFS=$as_save_IFS
17921
17922  ;;
17923esac
17924fi
17925HG=$ac_cv_path_HG
17926if test -n "$HG"; then
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17928$as_echo "$HG" >&6; }
17929else
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931$as_echo "no" >&6; }
17932fi
17933
17934
17935  test -n "$HG" && break
17936done
17937
17938    else
17939      # If it succeeded, then it was overridden by the user. We will use it
17940      # for the tool.
17941
17942      # First remove it from the list of overridden variables, so we can test
17943      # for unknown variables in the end.
17944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17945
17946      # Check if the provided tool contains a complete path.
17947      tool_specified="$HG"
17948      tool_basename="${tool_specified##*/}"
17949      if test "x$tool_basename" = "x$tool_specified"; then
17950        # A command without a complete path is provided, search $PATH.
17951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17952$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17953        # Extract the first word of "$tool_basename", so it can be a program name with args.
17954set dummy $tool_basename; ac_word=$2
17955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956$as_echo_n "checking for $ac_word... " >&6; }
17957if ${ac_cv_path_HG+:} false; then :
17958  $as_echo_n "(cached) " >&6
17959else
17960  case $HG in
17961  [\\/]* | ?:[\\/]*)
17962  ac_cv_path_HG="$HG" # 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_HG="$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
17983HG=$ac_cv_path_HG
17984if test -n "$HG"; then
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17986$as_echo "$HG" >&6; }
17987else
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989$as_echo "no" >&6; }
17990fi
17991
17992
17993        if test "x$HG" = x; then
17994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17995        fi
17996      else
17997        # Otherwise we believe it is a complete path. Use it as it is.
17998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17999$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18001$as_echo_n "checking for HG... " >&6; }
18002        if test ! -x "$tool_specified"; then
18003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18004$as_echo "not found" >&6; }
18005          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18006        fi
18007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18008$as_echo "$tool_specified" >&6; }
18009      fi
18010    fi
18011  fi
18012
18013
18014
18015
18016  # Publish this variable in the help.
18017
18018
18019  if test "x$STAT" = x; then
18020    # The variable is not set by user, try to locate tool using the code snippet
18021    for ac_prog in stat
18022do
18023  # Extract the first word of "$ac_prog", so it can be a program name with args.
18024set dummy $ac_prog; ac_word=$2
18025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18026$as_echo_n "checking for $ac_word... " >&6; }
18027if ${ac_cv_path_STAT+:} false; then :
18028  $as_echo_n "(cached) " >&6
18029else
18030  case $STAT in
18031  [\\/]* | ?:[\\/]*)
18032  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18033  ;;
18034  *)
18035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18036for as_dir in $PATH
18037do
18038  IFS=$as_save_IFS
18039  test -z "$as_dir" && as_dir=.
18040    for ac_exec_ext in '' $ac_executable_extensions; do
18041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18042    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18044    break 2
18045  fi
18046done
18047  done
18048IFS=$as_save_IFS
18049
18050  ;;
18051esac
18052fi
18053STAT=$ac_cv_path_STAT
18054if test -n "$STAT"; then
18055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18056$as_echo "$STAT" >&6; }
18057else
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18059$as_echo "no" >&6; }
18060fi
18061
18062
18063  test -n "$STAT" && break
18064done
18065
18066  else
18067    # The variable is set, but is it from the command line or the environment?
18068
18069    # Try to remove the string !STAT! from our list.
18070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18072      # If it failed, the variable was not from the command line. Ignore it,
18073      # but warn the user (except for BASH, which is always set by the calling BASH).
18074      if test "xSTAT" != xBASH; then
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18076$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18077      fi
18078      # Try to locate tool using the code snippet
18079      for ac_prog in stat
18080do
18081  # Extract the first word of "$ac_prog", so it can be a program name with args.
18082set dummy $ac_prog; ac_word=$2
18083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18084$as_echo_n "checking for $ac_word... " >&6; }
18085if ${ac_cv_path_STAT+:} false; then :
18086  $as_echo_n "(cached) " >&6
18087else
18088  case $STAT in
18089  [\\/]* | ?:[\\/]*)
18090  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18091  ;;
18092  *)
18093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18094for as_dir in $PATH
18095do
18096  IFS=$as_save_IFS
18097  test -z "$as_dir" && as_dir=.
18098    for ac_exec_ext in '' $ac_executable_extensions; do
18099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18100    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18102    break 2
18103  fi
18104done
18105  done
18106IFS=$as_save_IFS
18107
18108  ;;
18109esac
18110fi
18111STAT=$ac_cv_path_STAT
18112if test -n "$STAT"; then
18113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18114$as_echo "$STAT" >&6; }
18115else
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18117$as_echo "no" >&6; }
18118fi
18119
18120
18121  test -n "$STAT" && break
18122done
18123
18124    else
18125      # If it succeeded, then it was overridden by the user. We will use it
18126      # for the tool.
18127
18128      # First remove it from the list of overridden variables, so we can test
18129      # for unknown variables in the end.
18130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18131
18132      # Check if the provided tool contains a complete path.
18133      tool_specified="$STAT"
18134      tool_basename="${tool_specified##*/}"
18135      if test "x$tool_basename" = "x$tool_specified"; then
18136        # A command without a complete path is provided, search $PATH.
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18138$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18139        # Extract the first word of "$tool_basename", so it can be a program name with args.
18140set dummy $tool_basename; ac_word=$2
18141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142$as_echo_n "checking for $ac_word... " >&6; }
18143if ${ac_cv_path_STAT+:} false; then :
18144  $as_echo_n "(cached) " >&6
18145else
18146  case $STAT in
18147  [\\/]* | ?:[\\/]*)
18148  ac_cv_path_STAT="$STAT" # 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_STAT="$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
18169STAT=$ac_cv_path_STAT
18170if test -n "$STAT"; then
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18172$as_echo "$STAT" >&6; }
18173else
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175$as_echo "no" >&6; }
18176fi
18177
18178
18179        if test "x$STAT" = x; then
18180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18181        fi
18182      else
18183        # Otherwise we believe it is a complete path. Use it as it is.
18184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18185$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18187$as_echo_n "checking for STAT... " >&6; }
18188        if test ! -x "$tool_specified"; then
18189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18190$as_echo "not found" >&6; }
18191          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18192        fi
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18194$as_echo "$tool_specified" >&6; }
18195      fi
18196    fi
18197  fi
18198
18199
18200
18201
18202  # Publish this variable in the help.
18203
18204
18205  if test "x$TIME" = x; then
18206    # The variable is not set by user, try to locate tool using the code snippet
18207    for ac_prog in time
18208do
18209  # Extract the first word of "$ac_prog", so it can be a program name with args.
18210set dummy $ac_prog; ac_word=$2
18211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18212$as_echo_n "checking for $ac_word... " >&6; }
18213if ${ac_cv_path_TIME+:} false; then :
18214  $as_echo_n "(cached) " >&6
18215else
18216  case $TIME in
18217  [\\/]* | ?:[\\/]*)
18218  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18219  ;;
18220  *)
18221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18222for as_dir in $PATH
18223do
18224  IFS=$as_save_IFS
18225  test -z "$as_dir" && as_dir=.
18226    for ac_exec_ext in '' $ac_executable_extensions; do
18227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18228    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18230    break 2
18231  fi
18232done
18233  done
18234IFS=$as_save_IFS
18235
18236  ;;
18237esac
18238fi
18239TIME=$ac_cv_path_TIME
18240if test -n "$TIME"; then
18241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18242$as_echo "$TIME" >&6; }
18243else
18244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18245$as_echo "no" >&6; }
18246fi
18247
18248
18249  test -n "$TIME" && break
18250done
18251
18252  else
18253    # The variable is set, but is it from the command line or the environment?
18254
18255    # Try to remove the string !TIME! from our list.
18256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18258      # If it failed, the variable was not from the command line. Ignore it,
18259      # but warn the user (except for BASH, which is always set by the calling BASH).
18260      if test "xTIME" != xBASH; then
18261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18262$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18263      fi
18264      # Try to locate tool using the code snippet
18265      for ac_prog in time
18266do
18267  # Extract the first word of "$ac_prog", so it can be a program name with args.
18268set dummy $ac_prog; ac_word=$2
18269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18270$as_echo_n "checking for $ac_word... " >&6; }
18271if ${ac_cv_path_TIME+:} false; then :
18272  $as_echo_n "(cached) " >&6
18273else
18274  case $TIME in
18275  [\\/]* | ?:[\\/]*)
18276  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18277  ;;
18278  *)
18279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18280for as_dir in $PATH
18281do
18282  IFS=$as_save_IFS
18283  test -z "$as_dir" && as_dir=.
18284    for ac_exec_ext in '' $ac_executable_extensions; do
18285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18286    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18288    break 2
18289  fi
18290done
18291  done
18292IFS=$as_save_IFS
18293
18294  ;;
18295esac
18296fi
18297TIME=$ac_cv_path_TIME
18298if test -n "$TIME"; then
18299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18300$as_echo "$TIME" >&6; }
18301else
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18303$as_echo "no" >&6; }
18304fi
18305
18306
18307  test -n "$TIME" && break
18308done
18309
18310    else
18311      # If it succeeded, then it was overridden by the user. We will use it
18312      # for the tool.
18313
18314      # First remove it from the list of overridden variables, so we can test
18315      # for unknown variables in the end.
18316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18317
18318      # Check if the provided tool contains a complete path.
18319      tool_specified="$TIME"
18320      tool_basename="${tool_specified##*/}"
18321      if test "x$tool_basename" = "x$tool_specified"; then
18322        # A command without a complete path is provided, search $PATH.
18323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18324$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18325        # Extract the first word of "$tool_basename", so it can be a program name with args.
18326set dummy $tool_basename; ac_word=$2
18327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18328$as_echo_n "checking for $ac_word... " >&6; }
18329if ${ac_cv_path_TIME+:} false; then :
18330  $as_echo_n "(cached) " >&6
18331else
18332  case $TIME in
18333  [\\/]* | ?:[\\/]*)
18334  ac_cv_path_TIME="$TIME" # 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_TIME="$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
18355TIME=$ac_cv_path_TIME
18356if test -n "$TIME"; then
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18358$as_echo "$TIME" >&6; }
18359else
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18361$as_echo "no" >&6; }
18362fi
18363
18364
18365        if test "x$TIME" = x; then
18366          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18367        fi
18368      else
18369        # Otherwise we believe it is a complete path. Use it as it is.
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18371$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18373$as_echo_n "checking for TIME... " >&6; }
18374        if test ! -x "$tool_specified"; then
18375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18376$as_echo "not found" >&6; }
18377          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18378        fi
18379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18380$as_echo "$tool_specified" >&6; }
18381      fi
18382    fi
18383  fi
18384
18385
18386  # Check if it's GNU time
18387  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18388  if test "x$IS_GNU_TIME" != x; then
18389    IS_GNU_TIME=yes
18390  else
18391    IS_GNU_TIME=no
18392  fi
18393
18394
18395  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18396
18397
18398
18399  # Publish this variable in the help.
18400
18401
18402  if test "x$COMM" = x; then
18403    # The variable is not set by user, try to locate tool using the code snippet
18404    for ac_prog in comm
18405do
18406  # Extract the first word of "$ac_prog", so it can be a program name with args.
18407set dummy $ac_prog; ac_word=$2
18408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18409$as_echo_n "checking for $ac_word... " >&6; }
18410if ${ac_cv_path_COMM+:} false; then :
18411  $as_echo_n "(cached) " >&6
18412else
18413  case $COMM in
18414  [\\/]* | ?:[\\/]*)
18415  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18416  ;;
18417  *)
18418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18419for as_dir in $PATH
18420do
18421  IFS=$as_save_IFS
18422  test -z "$as_dir" && as_dir=.
18423    for ac_exec_ext in '' $ac_executable_extensions; do
18424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18425    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18427    break 2
18428  fi
18429done
18430  done
18431IFS=$as_save_IFS
18432
18433  ;;
18434esac
18435fi
18436COMM=$ac_cv_path_COMM
18437if test -n "$COMM"; then
18438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18439$as_echo "$COMM" >&6; }
18440else
18441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18442$as_echo "no" >&6; }
18443fi
18444
18445
18446  test -n "$COMM" && break
18447done
18448
18449  else
18450    # The variable is set, but is it from the command line or the environment?
18451
18452    # Try to remove the string !COMM! from our list.
18453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18455      # If it failed, the variable was not from the command line. Ignore it,
18456      # but warn the user (except for BASH, which is always set by the calling BASH).
18457      if test "xCOMM" != xBASH; then
18458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18459$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18460      fi
18461      # Try to locate tool using the code snippet
18462      for ac_prog in comm
18463do
18464  # Extract the first word of "$ac_prog", so it can be a program name with args.
18465set dummy $ac_prog; ac_word=$2
18466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18467$as_echo_n "checking for $ac_word... " >&6; }
18468if ${ac_cv_path_COMM+:} false; then :
18469  $as_echo_n "(cached) " >&6
18470else
18471  case $COMM in
18472  [\\/]* | ?:[\\/]*)
18473  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18474  ;;
18475  *)
18476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18477for as_dir in $PATH
18478do
18479  IFS=$as_save_IFS
18480  test -z "$as_dir" && as_dir=.
18481    for ac_exec_ext in '' $ac_executable_extensions; do
18482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18483    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18485    break 2
18486  fi
18487done
18488  done
18489IFS=$as_save_IFS
18490
18491  ;;
18492esac
18493fi
18494COMM=$ac_cv_path_COMM
18495if test -n "$COMM"; then
18496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18497$as_echo "$COMM" >&6; }
18498else
18499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18500$as_echo "no" >&6; }
18501fi
18502
18503
18504  test -n "$COMM" && break
18505done
18506
18507    else
18508      # If it succeeded, then it was overridden by the user. We will use it
18509      # for the tool.
18510
18511      # First remove it from the list of overridden variables, so we can test
18512      # for unknown variables in the end.
18513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18514
18515      # Check if the provided tool contains a complete path.
18516      tool_specified="$COMM"
18517      tool_basename="${tool_specified##*/}"
18518      if test "x$tool_basename" = "x$tool_specified"; then
18519        # A command without a complete path is provided, search $PATH.
18520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18521$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18522        # Extract the first word of "$tool_basename", so it can be a program name with args.
18523set dummy $tool_basename; ac_word=$2
18524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18525$as_echo_n "checking for $ac_word... " >&6; }
18526if ${ac_cv_path_COMM+:} false; then :
18527  $as_echo_n "(cached) " >&6
18528else
18529  case $COMM in
18530  [\\/]* | ?:[\\/]*)
18531  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18532  ;;
18533  *)
18534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18535for as_dir in $PATH
18536do
18537  IFS=$as_save_IFS
18538  test -z "$as_dir" && as_dir=.
18539    for ac_exec_ext in '' $ac_executable_extensions; do
18540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18541    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18543    break 2
18544  fi
18545done
18546  done
18547IFS=$as_save_IFS
18548
18549  ;;
18550esac
18551fi
18552COMM=$ac_cv_path_COMM
18553if test -n "$COMM"; then
18554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18555$as_echo "$COMM" >&6; }
18556else
18557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18558$as_echo "no" >&6; }
18559fi
18560
18561
18562        if test "x$COMM" = x; then
18563          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18564        fi
18565      else
18566        # Otherwise we believe it is a complete path. Use it as it is.
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18568$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18570$as_echo_n "checking for COMM... " >&6; }
18571        if test ! -x "$tool_specified"; then
18572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18573$as_echo "not found" >&6; }
18574          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18575        fi
18576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18577$as_echo "$tool_specified" >&6; }
18578      fi
18579    fi
18580  fi
18581
18582
18583
18584  if test "x$COMM" = x; then
18585    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18586  fi
18587
18588
18589  fi
18590
18591  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18592
18593
18594
18595  # Publish this variable in the help.
18596
18597
18598  if test "x$DSYMUTIL" = x; then
18599    # The variable is not set by user, try to locate tool using the code snippet
18600    for ac_prog in dsymutil
18601do
18602  # Extract the first word of "$ac_prog", so it can be a program name with args.
18603set dummy $ac_prog; ac_word=$2
18604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18605$as_echo_n "checking for $ac_word... " >&6; }
18606if ${ac_cv_path_DSYMUTIL+:} false; then :
18607  $as_echo_n "(cached) " >&6
18608else
18609  case $DSYMUTIL in
18610  [\\/]* | ?:[\\/]*)
18611  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18612  ;;
18613  *)
18614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18615for as_dir in $PATH
18616do
18617  IFS=$as_save_IFS
18618  test -z "$as_dir" && as_dir=.
18619    for ac_exec_ext in '' $ac_executable_extensions; do
18620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18621    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18623    break 2
18624  fi
18625done
18626  done
18627IFS=$as_save_IFS
18628
18629  ;;
18630esac
18631fi
18632DSYMUTIL=$ac_cv_path_DSYMUTIL
18633if test -n "$DSYMUTIL"; then
18634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18635$as_echo "$DSYMUTIL" >&6; }
18636else
18637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18638$as_echo "no" >&6; }
18639fi
18640
18641
18642  test -n "$DSYMUTIL" && break
18643done
18644
18645  else
18646    # The variable is set, but is it from the command line or the environment?
18647
18648    # Try to remove the string !DSYMUTIL! from our list.
18649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18651      # If it failed, the variable was not from the command line. Ignore it,
18652      # but warn the user (except for BASH, which is always set by the calling BASH).
18653      if test "xDSYMUTIL" != xBASH; then
18654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18655$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18656      fi
18657      # Try to locate tool using the code snippet
18658      for ac_prog in dsymutil
18659do
18660  # Extract the first word of "$ac_prog", so it can be a program name with args.
18661set dummy $ac_prog; ac_word=$2
18662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18663$as_echo_n "checking for $ac_word... " >&6; }
18664if ${ac_cv_path_DSYMUTIL+:} false; then :
18665  $as_echo_n "(cached) " >&6
18666else
18667  case $DSYMUTIL in
18668  [\\/]* | ?:[\\/]*)
18669  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18670  ;;
18671  *)
18672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18673for as_dir in $PATH
18674do
18675  IFS=$as_save_IFS
18676  test -z "$as_dir" && as_dir=.
18677    for ac_exec_ext in '' $ac_executable_extensions; do
18678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18679    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18681    break 2
18682  fi
18683done
18684  done
18685IFS=$as_save_IFS
18686
18687  ;;
18688esac
18689fi
18690DSYMUTIL=$ac_cv_path_DSYMUTIL
18691if test -n "$DSYMUTIL"; then
18692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18693$as_echo "$DSYMUTIL" >&6; }
18694else
18695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18696$as_echo "no" >&6; }
18697fi
18698
18699
18700  test -n "$DSYMUTIL" && break
18701done
18702
18703    else
18704      # If it succeeded, then it was overridden by the user. We will use it
18705      # for the tool.
18706
18707      # First remove it from the list of overridden variables, so we can test
18708      # for unknown variables in the end.
18709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18710
18711      # Check if the provided tool contains a complete path.
18712      tool_specified="$DSYMUTIL"
18713      tool_basename="${tool_specified##*/}"
18714      if test "x$tool_basename" = "x$tool_specified"; then
18715        # A command without a complete path is provided, search $PATH.
18716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18717$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18718        # Extract the first word of "$tool_basename", so it can be a program name with args.
18719set dummy $tool_basename; ac_word=$2
18720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18721$as_echo_n "checking for $ac_word... " >&6; }
18722if ${ac_cv_path_DSYMUTIL+:} false; then :
18723  $as_echo_n "(cached) " >&6
18724else
18725  case $DSYMUTIL in
18726  [\\/]* | ?:[\\/]*)
18727  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18728  ;;
18729  *)
18730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18731for as_dir in $PATH
18732do
18733  IFS=$as_save_IFS
18734  test -z "$as_dir" && as_dir=.
18735    for ac_exec_ext in '' $ac_executable_extensions; do
18736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18737    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18739    break 2
18740  fi
18741done
18742  done
18743IFS=$as_save_IFS
18744
18745  ;;
18746esac
18747fi
18748DSYMUTIL=$ac_cv_path_DSYMUTIL
18749if test -n "$DSYMUTIL"; then
18750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18751$as_echo "$DSYMUTIL" >&6; }
18752else
18753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18754$as_echo "no" >&6; }
18755fi
18756
18757
18758        if test "x$DSYMUTIL" = x; then
18759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18760        fi
18761      else
18762        # Otherwise we believe it is a complete path. Use it as it is.
18763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18764$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18766$as_echo_n "checking for DSYMUTIL... " >&6; }
18767        if test ! -x "$tool_specified"; then
18768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18769$as_echo "not found" >&6; }
18770          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18771        fi
18772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18773$as_echo "$tool_specified" >&6; }
18774      fi
18775    fi
18776  fi
18777
18778
18779
18780  if test "x$DSYMUTIL" = x; then
18781    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18782  fi
18783
18784
18785
18786
18787
18788  # Publish this variable in the help.
18789
18790
18791  if test "x$XATTR" = x; then
18792    # The variable is not set by user, try to locate tool using the code snippet
18793    for ac_prog in xattr
18794do
18795  # Extract the first word of "$ac_prog", so it can be a program name with args.
18796set dummy $ac_prog; ac_word=$2
18797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18798$as_echo_n "checking for $ac_word... " >&6; }
18799if ${ac_cv_path_XATTR+:} false; then :
18800  $as_echo_n "(cached) " >&6
18801else
18802  case $XATTR in
18803  [\\/]* | ?:[\\/]*)
18804  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18805  ;;
18806  *)
18807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18808for as_dir in $PATH
18809do
18810  IFS=$as_save_IFS
18811  test -z "$as_dir" && as_dir=.
18812    for ac_exec_ext in '' $ac_executable_extensions; do
18813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18814    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18816    break 2
18817  fi
18818done
18819  done
18820IFS=$as_save_IFS
18821
18822  ;;
18823esac
18824fi
18825XATTR=$ac_cv_path_XATTR
18826if test -n "$XATTR"; then
18827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18828$as_echo "$XATTR" >&6; }
18829else
18830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18831$as_echo "no" >&6; }
18832fi
18833
18834
18835  test -n "$XATTR" && break
18836done
18837
18838  else
18839    # The variable is set, but is it from the command line or the environment?
18840
18841    # Try to remove the string !XATTR! from our list.
18842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18844      # If it failed, the variable was not from the command line. Ignore it,
18845      # but warn the user (except for BASH, which is always set by the calling BASH).
18846      if test "xXATTR" != xBASH; then
18847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18848$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18849      fi
18850      # Try to locate tool using the code snippet
18851      for ac_prog in xattr
18852do
18853  # Extract the first word of "$ac_prog", so it can be a program name with args.
18854set dummy $ac_prog; ac_word=$2
18855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18856$as_echo_n "checking for $ac_word... " >&6; }
18857if ${ac_cv_path_XATTR+:} false; then :
18858  $as_echo_n "(cached) " >&6
18859else
18860  case $XATTR in
18861  [\\/]* | ?:[\\/]*)
18862  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18863  ;;
18864  *)
18865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18866for as_dir in $PATH
18867do
18868  IFS=$as_save_IFS
18869  test -z "$as_dir" && as_dir=.
18870    for ac_exec_ext in '' $ac_executable_extensions; do
18871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18872    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18874    break 2
18875  fi
18876done
18877  done
18878IFS=$as_save_IFS
18879
18880  ;;
18881esac
18882fi
18883XATTR=$ac_cv_path_XATTR
18884if test -n "$XATTR"; then
18885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18886$as_echo "$XATTR" >&6; }
18887else
18888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18889$as_echo "no" >&6; }
18890fi
18891
18892
18893  test -n "$XATTR" && break
18894done
18895
18896    else
18897      # If it succeeded, then it was overridden by the user. We will use it
18898      # for the tool.
18899
18900      # First remove it from the list of overridden variables, so we can test
18901      # for unknown variables in the end.
18902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18903
18904      # Check if the provided tool contains a complete path.
18905      tool_specified="$XATTR"
18906      tool_basename="${tool_specified##*/}"
18907      if test "x$tool_basename" = "x$tool_specified"; then
18908        # A command without a complete path is provided, search $PATH.
18909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18910$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18911        # Extract the first word of "$tool_basename", so it can be a program name with args.
18912set dummy $tool_basename; ac_word=$2
18913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18914$as_echo_n "checking for $ac_word... " >&6; }
18915if ${ac_cv_path_XATTR+:} false; then :
18916  $as_echo_n "(cached) " >&6
18917else
18918  case $XATTR in
18919  [\\/]* | ?:[\\/]*)
18920  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18921  ;;
18922  *)
18923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18924for as_dir in $PATH
18925do
18926  IFS=$as_save_IFS
18927  test -z "$as_dir" && as_dir=.
18928    for ac_exec_ext in '' $ac_executable_extensions; do
18929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18930    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18932    break 2
18933  fi
18934done
18935  done
18936IFS=$as_save_IFS
18937
18938  ;;
18939esac
18940fi
18941XATTR=$ac_cv_path_XATTR
18942if test -n "$XATTR"; then
18943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18944$as_echo "$XATTR" >&6; }
18945else
18946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18947$as_echo "no" >&6; }
18948fi
18949
18950
18951        if test "x$XATTR" = x; then
18952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18953        fi
18954      else
18955        # Otherwise we believe it is a complete path. Use it as it is.
18956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18957$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18959$as_echo_n "checking for XATTR... " >&6; }
18960        if test ! -x "$tool_specified"; then
18961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18962$as_echo "not found" >&6; }
18963          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18964        fi
18965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18966$as_echo "$tool_specified" >&6; }
18967      fi
18968    fi
18969  fi
18970
18971
18972
18973  if test "x$XATTR" = x; then
18974    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18975  fi
18976
18977
18978
18979
18980  # Publish this variable in the help.
18981
18982
18983  if test "x$CODESIGN" = x; then
18984    # The variable is not set by user, try to locate tool using the code snippet
18985    for ac_prog in codesign
18986do
18987  # Extract the first word of "$ac_prog", so it can be a program name with args.
18988set dummy $ac_prog; ac_word=$2
18989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18990$as_echo_n "checking for $ac_word... " >&6; }
18991if ${ac_cv_path_CODESIGN+:} false; then :
18992  $as_echo_n "(cached) " >&6
18993else
18994  case $CODESIGN in
18995  [\\/]* | ?:[\\/]*)
18996  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18997  ;;
18998  *)
18999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19000for as_dir in $PATH
19001do
19002  IFS=$as_save_IFS
19003  test -z "$as_dir" && as_dir=.
19004    for ac_exec_ext in '' $ac_executable_extensions; do
19005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19006    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19008    break 2
19009  fi
19010done
19011  done
19012IFS=$as_save_IFS
19013
19014  ;;
19015esac
19016fi
19017CODESIGN=$ac_cv_path_CODESIGN
19018if test -n "$CODESIGN"; then
19019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19020$as_echo "$CODESIGN" >&6; }
19021else
19022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19023$as_echo "no" >&6; }
19024fi
19025
19026
19027  test -n "$CODESIGN" && break
19028done
19029
19030  else
19031    # The variable is set, but is it from the command line or the environment?
19032
19033    # Try to remove the string !CODESIGN! from our list.
19034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19036      # If it failed, the variable was not from the command line. Ignore it,
19037      # but warn the user (except for BASH, which is always set by the calling BASH).
19038      if test "xCODESIGN" != xBASH; then
19039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19040$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19041      fi
19042      # Try to locate tool using the code snippet
19043      for ac_prog in codesign
19044do
19045  # Extract the first word of "$ac_prog", so it can be a program name with args.
19046set dummy $ac_prog; ac_word=$2
19047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19048$as_echo_n "checking for $ac_word... " >&6; }
19049if ${ac_cv_path_CODESIGN+:} false; then :
19050  $as_echo_n "(cached) " >&6
19051else
19052  case $CODESIGN in
19053  [\\/]* | ?:[\\/]*)
19054  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19055  ;;
19056  *)
19057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19058for as_dir in $PATH
19059do
19060  IFS=$as_save_IFS
19061  test -z "$as_dir" && as_dir=.
19062    for ac_exec_ext in '' $ac_executable_extensions; do
19063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19064    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19066    break 2
19067  fi
19068done
19069  done
19070IFS=$as_save_IFS
19071
19072  ;;
19073esac
19074fi
19075CODESIGN=$ac_cv_path_CODESIGN
19076if test -n "$CODESIGN"; then
19077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19078$as_echo "$CODESIGN" >&6; }
19079else
19080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19081$as_echo "no" >&6; }
19082fi
19083
19084
19085  test -n "$CODESIGN" && break
19086done
19087
19088    else
19089      # If it succeeded, then it was overridden by the user. We will use it
19090      # for the tool.
19091
19092      # First remove it from the list of overridden variables, so we can test
19093      # for unknown variables in the end.
19094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19095
19096      # Check if the provided tool contains a complete path.
19097      tool_specified="$CODESIGN"
19098      tool_basename="${tool_specified##*/}"
19099      if test "x$tool_basename" = "x$tool_specified"; then
19100        # A command without a complete path is provided, search $PATH.
19101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19102$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19103        # Extract the first word of "$tool_basename", so it can be a program name with args.
19104set dummy $tool_basename; ac_word=$2
19105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19106$as_echo_n "checking for $ac_word... " >&6; }
19107if ${ac_cv_path_CODESIGN+:} false; then :
19108  $as_echo_n "(cached) " >&6
19109else
19110  case $CODESIGN in
19111  [\\/]* | ?:[\\/]*)
19112  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19113  ;;
19114  *)
19115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19116for as_dir in $PATH
19117do
19118  IFS=$as_save_IFS
19119  test -z "$as_dir" && as_dir=.
19120    for ac_exec_ext in '' $ac_executable_extensions; do
19121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19122    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19124    break 2
19125  fi
19126done
19127  done
19128IFS=$as_save_IFS
19129
19130  ;;
19131esac
19132fi
19133CODESIGN=$ac_cv_path_CODESIGN
19134if test -n "$CODESIGN"; then
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19136$as_echo "$CODESIGN" >&6; }
19137else
19138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139$as_echo "no" >&6; }
19140fi
19141
19142
19143        if test "x$CODESIGN" = x; then
19144          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19145        fi
19146      else
19147        # Otherwise we believe it is a complete path. Use it as it is.
19148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19149$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19151$as_echo_n "checking for CODESIGN... " >&6; }
19152        if test ! -x "$tool_specified"; then
19153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19154$as_echo "not found" >&6; }
19155          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19156        fi
19157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19158$as_echo "$tool_specified" >&6; }
19159      fi
19160    fi
19161  fi
19162
19163
19164    if test "x$CODESIGN" != "x"; then
19165      # Verify that the openjdk_codesign certificate is present
19166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19167$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19168      rm -f codesign-testfile
19169      touch codesign-testfile
19170      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19171      rm -f codesign-testfile
19172      if test "x$CODESIGN" = x; then
19173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19174$as_echo "no" >&6; }
19175      else
19176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19177$as_echo "yes" >&6; }
19178      fi
19179    fi
19180  fi
19181
19182
19183# Check if pkg-config is available.
19184
19185
19186if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19187	if test -n "$ac_tool_prefix"; then
19188  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19189set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19191$as_echo_n "checking for $ac_word... " >&6; }
19192if ${ac_cv_path_PKG_CONFIG+:} false; then :
19193  $as_echo_n "(cached) " >&6
19194else
19195  case $PKG_CONFIG in
19196  [\\/]* | ?:[\\/]*)
19197  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19198  ;;
19199  *)
19200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19201for as_dir in $PATH
19202do
19203  IFS=$as_save_IFS
19204  test -z "$as_dir" && as_dir=.
19205    for ac_exec_ext in '' $ac_executable_extensions; do
19206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19207    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19209    break 2
19210  fi
19211done
19212  done
19213IFS=$as_save_IFS
19214
19215  ;;
19216esac
19217fi
19218PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19219if test -n "$PKG_CONFIG"; then
19220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19221$as_echo "$PKG_CONFIG" >&6; }
19222else
19223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19224$as_echo "no" >&6; }
19225fi
19226
19227
19228fi
19229if test -z "$ac_cv_path_PKG_CONFIG"; then
19230  ac_pt_PKG_CONFIG=$PKG_CONFIG
19231  # Extract the first word of "pkg-config", so it can be a program name with args.
19232set dummy pkg-config; ac_word=$2
19233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19234$as_echo_n "checking for $ac_word... " >&6; }
19235if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19236  $as_echo_n "(cached) " >&6
19237else
19238  case $ac_pt_PKG_CONFIG in
19239  [\\/]* | ?:[\\/]*)
19240  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19241  ;;
19242  *)
19243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19244for as_dir in $PATH
19245do
19246  IFS=$as_save_IFS
19247  test -z "$as_dir" && as_dir=.
19248    for ac_exec_ext in '' $ac_executable_extensions; do
19249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19250    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19252    break 2
19253  fi
19254done
19255  done
19256IFS=$as_save_IFS
19257
19258  ;;
19259esac
19260fi
19261ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19262if test -n "$ac_pt_PKG_CONFIG"; then
19263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19264$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19265else
19266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19267$as_echo "no" >&6; }
19268fi
19269
19270  if test "x$ac_pt_PKG_CONFIG" = x; then
19271    PKG_CONFIG=""
19272  else
19273    case $cross_compiling:$ac_tool_warned in
19274yes:)
19275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19277ac_tool_warned=yes ;;
19278esac
19279    PKG_CONFIG=$ac_pt_PKG_CONFIG
19280  fi
19281else
19282  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19283fi
19284
19285fi
19286if test -n "$PKG_CONFIG"; then
19287	_pkg_min_version=0.9.0
19288	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19289$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19290	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19291		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19292$as_echo "yes" >&6; }
19293	else
19294		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19295$as_echo "no" >&6; }
19296		PKG_CONFIG=""
19297	fi
19298
19299fi
19300
19301# After basic tools have been setup, we can check build os specific details.
19302
19303  ###############################################################################
19304
19305  # Note that this is the build platform OS version!
19306
19307  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19308  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19309  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19310  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19311
19312
19313
19314
19315
19316# Setup builddeps, for automatic downloading of tools we need.
19317# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19318# boot-jdk setup, but we need to have basic tools setup first.
19319
19320
19321# Check whether --with-builddeps-conf was given.
19322if test "${with_builddeps_conf+set}" = set; then :
19323  withval=$with_builddeps_conf;
19324fi
19325
19326
19327
19328# Check whether --with-builddeps-server was given.
19329if test "${with_builddeps_server+set}" = set; then :
19330  withval=$with_builddeps_server;
19331fi
19332
19333
19334
19335# Check whether --with-builddeps-dir was given.
19336if test "${with_builddeps_dir+set}" = set; then :
19337  withval=$with_builddeps_dir;
19338else
19339  with_builddeps_dir=/localhome/builddeps
19340fi
19341
19342
19343
19344# Check whether --with-builddeps-group was given.
19345if test "${with_builddeps_group+set}" = set; then :
19346  withval=$with_builddeps_group;
19347fi
19348
19349
19350
19351
19352  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19353    if test "x$with_builddeps_conf" != x; then
19354      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19355$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19356      builddepsfile=$with_builddeps_conf
19357      if test -s $builddepsfile; then
19358        . $builddepsfile
19359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19360$as_echo "loaded!" >&6; }
19361      else
19362        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19363      fi
19364    else
19365      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19366$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19367      builddepsfile=`mktemp`
19368      touch $builddepsfile
19369      # Put all found confs into a single file.
19370      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19371      # Source the file to acquire the variables
19372      if test -s $builddepsfile; then
19373        . $builddepsfile
19374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19375$as_echo "found at least one!" >&6; }
19376      else
19377        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19378      fi
19379    fi
19380    # Create build and target names that use _ instead of "-" and ".".
19381    # This is necessary to use them in variable names.
19382    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19383    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19384    # Extract rewrite information for build and target
19385    eval rewritten_build=\${REWRITE_${build_var}}
19386    if test "x$rewritten_build" = x; then
19387      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19388      echo Build stays the same $rewritten_build
19389    else
19390      echo Rewriting build for builddeps into $rewritten_build
19391    fi
19392    eval rewritten_target=\${REWRITE_${target_var}}
19393    if test "x$rewritten_target" = x; then
19394      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19395      echo Target stays the same $rewritten_target
19396    else
19397      echo Rewriting target for builddeps into $rewritten_target
19398    fi
19399    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19400    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19401  fi
19402  for ac_prog in 7z unzip
19403do
19404  # Extract the first word of "$ac_prog", so it can be a program name with args.
19405set dummy $ac_prog; ac_word=$2
19406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19407$as_echo_n "checking for $ac_word... " >&6; }
19408if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19409  $as_echo_n "(cached) " >&6
19410else
19411  if test -n "$BDEPS_UNZIP"; then
19412  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19413else
19414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19415for as_dir in $PATH
19416do
19417  IFS=$as_save_IFS
19418  test -z "$as_dir" && as_dir=.
19419    for ac_exec_ext in '' $ac_executable_extensions; do
19420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19421    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19423    break 2
19424  fi
19425done
19426  done
19427IFS=$as_save_IFS
19428
19429fi
19430fi
19431BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19432if test -n "$BDEPS_UNZIP"; then
19433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19434$as_echo "$BDEPS_UNZIP" >&6; }
19435else
19436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19437$as_echo "no" >&6; }
19438fi
19439
19440
19441  test -n "$BDEPS_UNZIP" && break
19442done
19443
19444  if test "x$BDEPS_UNZIP" = x7z; then
19445    BDEPS_UNZIP="7z x"
19446  fi
19447
19448  for ac_prog in wget lftp ftp
19449do
19450  # Extract the first word of "$ac_prog", so it can be a program name with args.
19451set dummy $ac_prog; ac_word=$2
19452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19453$as_echo_n "checking for $ac_word... " >&6; }
19454if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19455  $as_echo_n "(cached) " >&6
19456else
19457  if test -n "$BDEPS_FTP"; then
19458  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19459else
19460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19461for as_dir in $PATH
19462do
19463  IFS=$as_save_IFS
19464  test -z "$as_dir" && as_dir=.
19465    for ac_exec_ext in '' $ac_executable_extensions; do
19466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19467    ac_cv_prog_BDEPS_FTP="$ac_prog"
19468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19469    break 2
19470  fi
19471done
19472  done
19473IFS=$as_save_IFS
19474
19475fi
19476fi
19477BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19478if test -n "$BDEPS_FTP"; then
19479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19480$as_echo "$BDEPS_FTP" >&6; }
19481else
19482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19483$as_echo "no" >&6; }
19484fi
19485
19486
19487  test -n "$BDEPS_FTP" && break
19488done
19489
19490
19491
19492###############################################################################
19493#
19494# Determine OpenJDK variants, options and version numbers.
19495#
19496###############################################################################
19497
19498# We need build & target for this.
19499
19500
19501  ###############################################################################
19502  #
19503  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19504  # We always build headless support.
19505  #
19506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19507$as_echo_n "checking headful support... " >&6; }
19508  # Check whether --enable-headful was given.
19509if test "${enable_headful+set}" = set; then :
19510  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19511else
19512  SUPPORT_HEADFUL=yes
19513fi
19514
19515
19516  SUPPORT_HEADLESS=yes
19517  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19518
19519  if test "x$SUPPORT_HEADFUL" = xyes; then
19520    # We are building both headful and headless.
19521    headful_msg="include support for both headful and headless"
19522  fi
19523
19524  if test "x$SUPPORT_HEADFUL" = xno; then
19525    # Thus we are building headless only.
19526    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19527    headful_msg="headless only"
19528  fi
19529
19530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19531$as_echo "$headful_msg" >&6; }
19532
19533
19534
19535
19536
19537  # Control wether Hotspot runs Queens test after build.
19538  # Check whether --enable-hotspot-test-in-build was given.
19539if test "${enable_hotspot_test_in_build+set}" = set; then :
19540  enableval=$enable_hotspot_test_in_build;
19541else
19542  enable_hotspot_test_in_build=no
19543fi
19544
19545  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19546    TEST_IN_BUILD=true
19547  else
19548    TEST_IN_BUILD=false
19549  fi
19550
19551
19552  ###############################################################################
19553  #
19554  # Choose cacerts source file
19555  #
19556
19557# Check whether --with-cacerts-file was given.
19558if test "${with_cacerts_file+set}" = set; then :
19559  withval=$with_cacerts_file;
19560fi
19561
19562  if test "x$with_cacerts_file" != x; then
19563    CACERTS_FILE=$with_cacerts_file
19564  else
19565    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19566  fi
19567
19568
19569  ###############################################################################
19570  #
19571  # Enable or disable unlimited crypto
19572  #
19573  # Check whether --enable-unlimited-crypto was given.
19574if test "${enable_unlimited_crypto+set}" = set; then :
19575  enableval=$enable_unlimited_crypto;
19576else
19577  enable_unlimited_crypto=no
19578fi
19579
19580  if test "x$enable_unlimited_crypto" = "xyes"; then
19581    UNLIMITED_CRYPTO=true
19582  else
19583    UNLIMITED_CRYPTO=false
19584  fi
19585
19586
19587  ###############################################################################
19588  #
19589  # Enable or disable the elliptic curve crypto implementation
19590  #
19591
19592
19593  ###############################################################################
19594  #
19595  # --enable-rmiconnector-iiop
19596  #
19597  # Check whether --enable-rmiconnector-iiop was given.
19598if test "${enable_rmiconnector_iiop+set}" = set; then :
19599  enableval=$enable_rmiconnector_iiop;
19600fi
19601
19602  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19603    RMICONNECTOR_IIOP=true
19604  else
19605    RMICONNECTOR_IIOP=false
19606  fi
19607
19608
19609  ###############################################################################
19610  #
19611  # Compress jars
19612  #
19613  COMPRESS_JARS=false
19614
19615
19616
19617
19618  # Source the version numbers
19619  . $AUTOCONF_DIR/version-numbers
19620
19621  # Get the settings from parameters
19622
19623# Check whether --with-milestone was given.
19624if test "${with_milestone+set}" = set; then :
19625  withval=$with_milestone;
19626fi
19627
19628  if test "x$with_milestone" = xyes; then
19629    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19630  elif test "x$with_milestone" != x; then
19631    MILESTONE="$with_milestone"
19632  fi
19633  if test "x$MILESTONE" = x; then
19634    MILESTONE=internal
19635  fi
19636
19637
19638# Check whether --with-update-version was given.
19639if test "${with_update_version+set}" = set; then :
19640  withval=$with_update_version;
19641fi
19642
19643  if test "x$with_update_version" = xyes; then
19644    as_fn_error $? "Update version must have a value" "$LINENO" 5
19645  elif test "x$with_update_version" != x; then
19646    JDK_UPDATE_VERSION="$with_update_version"
19647    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19648    # to a bug in expr (which reduces it to just X). To work around this, we
19649    # always add a 0 to one digit update versions.
19650    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19651      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19652    fi
19653  fi
19654
19655
19656# Check whether --with-user-release-suffix was given.
19657if test "${with_user_release_suffix+set}" = set; then :
19658  withval=$with_user_release_suffix;
19659fi
19660
19661  if test "x$with_user_release_suffix" = xyes; then
19662    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19663  elif test "x$with_user_release_suffix" != x; then
19664    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19665  fi
19666
19667
19668# Check whether --with-build-number was given.
19669if test "${with_build_number+set}" = set; then :
19670  withval=$with_build_number;
19671fi
19672
19673  if test "x$with_build_number" = xyes; then
19674    as_fn_error $? "Build number must have a value" "$LINENO" 5
19675  elif test "x$with_build_number" != x; then
19676    JDK_BUILD_NUMBER="$with_build_number"
19677  fi
19678  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19679  if test "x$JDK_BUILD_NUMBER" = x; then
19680    JDK_BUILD_NUMBER=b00
19681    if test "x$USER_RELEASE_SUFFIX" = x; then
19682      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19683      # Avoid [:alnum:] since it depends on the locale.
19684      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19685      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19686    fi
19687  fi
19688
19689  # Now set the JDK version, milestone, build number etc.
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705  COPYRIGHT_YEAR=`date +'%Y'`
19706
19707
19708  if test "x$JDK_UPDATE_VERSION" != x; then
19709    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19710  else
19711    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19712  fi
19713
19714
19715  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19716
19717
19718
19719###############################################################################
19720#
19721# Setup BootJDK, used to bootstrap the build.
19722#
19723###############################################################################
19724
19725
19726  BOOT_JDK_FOUND=no
19727
19728# Check whether --with-boot-jdk was given.
19729if test "${with_boot_jdk+set}" = set; then :
19730  withval=$with_boot_jdk;
19731fi
19732
19733
19734  # We look for the Boot JDK through various means, going from more certain to
19735  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19736  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19737  # must check if this is indeed valid; otherwise we'll continue looking.
19738
19739  # Test: Is bootjdk explicitely set by command line arguments?
19740
19741  if test "x$BOOT_JDK_FOUND" = xno; then
19742    # Now execute the test
19743
19744  if test "x$with_boot_jdk" != x; then
19745    BOOT_JDK=$with_boot_jdk
19746    BOOT_JDK_FOUND=maybe
19747    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19748$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19749  fi
19750
19751
19752    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19753    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19754      # Do we have a bin/java?
19755      if test ! -x "$BOOT_JDK/bin/java"; then
19756        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19758        BOOT_JDK_FOUND=no
19759      else
19760        # Do we have a bin/javac?
19761        if test ! -x "$BOOT_JDK/bin/javac"; then
19762          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19764          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19765$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19766          BOOT_JDK_FOUND=no
19767        else
19768          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19769          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19772            BOOT_JDK_FOUND=no
19773          else
19774            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19775            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19776
19777            # Extra M4 quote needed to protect [] in grep expression.
19778            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19779            if test "x$FOUND_CORRECT_VERSION" = x; then
19780              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19782              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19783$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19784              BOOT_JDK_FOUND=no
19785            else
19786              # We're done! :-)
19787              BOOT_JDK_FOUND=yes
19788
19789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19790
19791  # Input might be given as Windows format, start by converting to
19792  # unix format.
19793  path="$BOOT_JDK"
19794  new_path=`$CYGPATH -u "$path"`
19795
19796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19799  # "foo.exe" is OK but "foo" is an error.
19800  #
19801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19802  # It is also a way to make sure we got the proper file name for the real test later on.
19803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19804  if test "x$test_shortpath" = x; then
19805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19808  fi
19809
19810  # Call helper function which possibly converts this using DOS-style short mode.
19811  # If so, the updated path is stored in $new_path.
19812
19813  input_path="$new_path"
19814  # Check if we need to convert this using DOS-style short mode. If the path
19815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19816  # take no chances and rewrite it.
19817  # Note: m4 eats our [], so we need to use [ and ] instead.
19818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19819  if test "x$has_forbidden_chars" != x; then
19820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19824      # Going to short mode and back again did indeed matter. Since short mode is
19825      # case insensitive, let's make it lowercase to improve readability.
19826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19827      # Now convert it back to Unix-stile (cygpath)
19828      input_path=`$CYGPATH -u "$shortmode_path"`
19829      new_path="$input_path"
19830    fi
19831  fi
19832
19833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19834  if test "x$test_cygdrive_prefix" = x; then
19835    # As a simple fix, exclude /usr/bin since it's not a real path.
19836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19838      # a path prefixed by /cygdrive for fixpath to work.
19839      new_path="$CYGWIN_ROOT_PATH$input_path"
19840    fi
19841  fi
19842
19843
19844  if test "x$path" != "x$new_path"; then
19845    BOOT_JDK="$new_path"
19846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19848  fi
19849
19850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19851
19852  path="$BOOT_JDK"
19853  has_colon=`$ECHO $path | $GREP ^.:`
19854  new_path="$path"
19855  if test "x$has_colon" = x; then
19856    # Not in mixed or Windows style, start by that.
19857    new_path=`cmd //c echo $path`
19858  fi
19859
19860
19861  input_path="$new_path"
19862  # Check if we need to convert this using DOS-style short mode. If the path
19863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19864  # take no chances and rewrite it.
19865  # Note: m4 eats our [], so we need to use [ and ] instead.
19866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19867  if test "x$has_forbidden_chars" != x; then
19868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19870  fi
19871
19872
19873  windows_path="$new_path"
19874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19875    unix_path=`$CYGPATH -u "$windows_path"`
19876    new_path="$unix_path"
19877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19879    new_path="$unix_path"
19880  fi
19881
19882  if test "x$path" != "x$new_path"; then
19883    BOOT_JDK="$new_path"
19884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19886  fi
19887
19888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19890
19891  else
19892    # We're on a posix platform. Hooray! :)
19893    path="$BOOT_JDK"
19894    has_space=`$ECHO "$path" | $GREP " "`
19895    if test "x$has_space" != x; then
19896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19898      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19899    fi
19900
19901    # Use eval to expand a potential ~
19902    eval path="$path"
19903    if test ! -f "$path" && test ! -d "$path"; then
19904      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19905    fi
19906
19907    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19908  fi
19909
19910              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19911$as_echo_n "checking for Boot JDK... " >&6; }
19912              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19913$as_echo "$BOOT_JDK" >&6; }
19914              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19915$as_echo_n "checking Boot JDK version... " >&6; }
19916              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19917              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19918$as_echo "$BOOT_JDK_VERSION" >&6; }
19919            fi # end check jdk version
19920          fi # end check rt.jar
19921        fi # end check javac
19922      fi # end check java
19923    fi # end check boot jdk found
19924  fi
19925
19926  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19927    # Having specified an argument which is incorrect will produce an instant failure;
19928    # we should not go on looking
19929    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19930  fi
19931
19932  # Test: Is bootjdk available from builddeps?
19933
19934  if test "x$BOOT_JDK_FOUND" = xno; then
19935    # Now execute the test
19936
19937
19938
19939  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19940    # Source the builddeps file again, to make sure it uses the latest variables!
19941    . $builddepsfile
19942    # Look for a target and build machine specific resource!
19943    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19944    if test "x$resource" = x; then
19945      # Ok, lets instead look for a target specific resource
19946      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19947    fi
19948    if test "x$resource" = x; then
19949      # Ok, lets instead look for a build specific resource
19950      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19951    fi
19952    if test "x$resource" = x; then
19953      # Ok, lets instead look for a generic resource
19954      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19955      resource=${builddep_bootjdk}
19956    fi
19957    if test "x$resource" != x; then
19958      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19959$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19960      # If the resource in the builddeps.conf file is an existing directory,
19961      # for example /java/linux/cups
19962      if test -d ${resource}; then
19963        depdir=${resource}
19964      else
19965
19966  # bootjdk is for example mymodule
19967  # $resource is for example libs/general/libmymod_1_2_3.zip
19968  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19969  # $with_builddeps_dir is for example /localhome/builddeps
19970  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19971  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19972  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19973  filename=`basename $resource`
19974  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19975  filebase=${filename%%.*}
19976  extension=${filename#*.}
19977  installdir=$with_builddeps_dir/$filebase
19978  if test ! -f $installdir/$filename.unpacked; then
19979    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19980$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19981    if test ! -d $installdir; then
19982      mkdir -p $installdir
19983    fi
19984    if test ! -d $installdir; then
19985      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19986    fi
19987    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19988    touch $tmpfile
19989    if test ! -f $tmpfile; then
19990      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19991    fi
19992
19993  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19994  # $tmpfile is the local file name for the downloaded file.
19995  VALID_TOOL=no
19996  if test "x$BDEPS_FTP" = xwget; then
19997    VALID_TOOL=yes
19998    wget -O $tmpfile $with_builddeps_server/$resource
19999  fi
20000  if test "x$BDEPS_FTP" = xlftp; then
20001    VALID_TOOL=yes
20002    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20003  fi
20004  if test "x$BDEPS_FTP" = xftp; then
20005    VALID_TOOL=yes
20006    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20007    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20008    FTPUSERPWD=${FTPSERVER%%@*}
20009    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20010      FTPUSER=${userpwd%%:*}
20011      FTPPWD=${userpwd#*@}
20012      FTPSERVER=${FTPSERVER#*@}
20013    else
20014      FTPUSER=ftp
20015      FTPPWD=ftp
20016    fi
20017    # the "pass" command does not work on some
20018    # ftp clients (read ftp.exe) but if it works,
20019    # passive mode is better!
20020    ( \
20021        echo "user $FTPUSER $FTPPWD"        ; \
20022        echo "pass"                         ; \
20023        echo "bin"                          ; \
20024        echo "get $FTPPATH $tmpfile"              ; \
20025    ) | ftp -in $FTPSERVER
20026  fi
20027  if test "x$VALID_TOOL" != xyes; then
20028    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20029  fi
20030
20031    mv $tmpfile $installdir/$filename
20032    if test ! -s $installdir/$filename; then
20033      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20034    fi
20035    case "$extension" in
20036      zip)  echo "Unzipping $installdir/$filename..."
20037        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20038        ;;
20039      tar.gz) echo "Untaring $installdir/$filename..."
20040        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20041        ;;
20042      tgz) echo "Untaring $installdir/$filename..."
20043        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20044        ;;
20045      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20046        ;;
20047    esac
20048  fi
20049  if test -f $installdir/$filename.unpacked; then
20050    depdir=$installdir
20051  fi
20052
20053      fi
20054      # Source the builddeps file again, because in the previous command, the depdir
20055      # was updated to point at the current build dependency install directory.
20056      . $builddepsfile
20057      # Now extract variables from the builddeps.conf files.
20058      theroot=${builddep_bootjdk_ROOT}
20059      thecflags=${builddep_bootjdk_CFLAGS}
20060      thelibs=${builddep_bootjdk_LIBS}
20061      if test "x$depdir" = x; then
20062        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20063      fi
20064      BOOT_JDK=$depdir
20065      if test "x$theroot" != x; then
20066        BOOT_JDK="$theroot"
20067      fi
20068      if test "x$thecflags" != x; then
20069        BOOT_JDK_CFLAGS="$thecflags"
20070      fi
20071      if test "x$thelibs" != x; then
20072        BOOT_JDK_LIBS="$thelibs"
20073      fi
20074      BOOT_JDK_FOUND=maybe
20075      else BOOT_JDK_FOUND=no
20076
20077    fi
20078    else BOOT_JDK_FOUND=no
20079
20080  fi
20081
20082
20083
20084    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20085    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20086      # Do we have a bin/java?
20087      if test ! -x "$BOOT_JDK/bin/java"; then
20088        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20090        BOOT_JDK_FOUND=no
20091      else
20092        # Do we have a bin/javac?
20093        if test ! -x "$BOOT_JDK/bin/javac"; then
20094          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20096          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20097$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20098          BOOT_JDK_FOUND=no
20099        else
20100          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20101          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20102            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20104            BOOT_JDK_FOUND=no
20105          else
20106            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20107            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20108
20109            # Extra M4 quote needed to protect [] in grep expression.
20110            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20111            if test "x$FOUND_CORRECT_VERSION" = x; then
20112              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20114              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20115$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20116              BOOT_JDK_FOUND=no
20117            else
20118              # We're done! :-)
20119              BOOT_JDK_FOUND=yes
20120
20121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20122
20123  # Input might be given as Windows format, start by converting to
20124  # unix format.
20125  path="$BOOT_JDK"
20126  new_path=`$CYGPATH -u "$path"`
20127
20128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20131  # "foo.exe" is OK but "foo" is an error.
20132  #
20133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20134  # It is also a way to make sure we got the proper file name for the real test later on.
20135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20136  if test "x$test_shortpath" = x; then
20137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20139    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20140  fi
20141
20142  # Call helper function which possibly converts this using DOS-style short mode.
20143  # If so, the updated path is stored in $new_path.
20144
20145  input_path="$new_path"
20146  # Check if we need to convert this using DOS-style short mode. If the path
20147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20148  # take no chances and rewrite it.
20149  # Note: m4 eats our [], so we need to use [ and ] instead.
20150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20151  if test "x$has_forbidden_chars" != x; then
20152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20156      # Going to short mode and back again did indeed matter. Since short mode is
20157      # case insensitive, let's make it lowercase to improve readability.
20158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20159      # Now convert it back to Unix-stile (cygpath)
20160      input_path=`$CYGPATH -u "$shortmode_path"`
20161      new_path="$input_path"
20162    fi
20163  fi
20164
20165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20166  if test "x$test_cygdrive_prefix" = x; then
20167    # As a simple fix, exclude /usr/bin since it's not a real path.
20168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20170      # a path prefixed by /cygdrive for fixpath to work.
20171      new_path="$CYGWIN_ROOT_PATH$input_path"
20172    fi
20173  fi
20174
20175
20176  if test "x$path" != "x$new_path"; then
20177    BOOT_JDK="$new_path"
20178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20180  fi
20181
20182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20183
20184  path="$BOOT_JDK"
20185  has_colon=`$ECHO $path | $GREP ^.:`
20186  new_path="$path"
20187  if test "x$has_colon" = x; then
20188    # Not in mixed or Windows style, start by that.
20189    new_path=`cmd //c echo $path`
20190  fi
20191
20192
20193  input_path="$new_path"
20194  # Check if we need to convert this using DOS-style short mode. If the path
20195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20196  # take no chances and rewrite it.
20197  # Note: m4 eats our [], so we need to use [ and ] instead.
20198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20199  if test "x$has_forbidden_chars" != x; then
20200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20202  fi
20203
20204
20205  windows_path="$new_path"
20206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20207    unix_path=`$CYGPATH -u "$windows_path"`
20208    new_path="$unix_path"
20209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20211    new_path="$unix_path"
20212  fi
20213
20214  if test "x$path" != "x$new_path"; then
20215    BOOT_JDK="$new_path"
20216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20218  fi
20219
20220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20222
20223  else
20224    # We're on a posix platform. Hooray! :)
20225    path="$BOOT_JDK"
20226    has_space=`$ECHO "$path" | $GREP " "`
20227    if test "x$has_space" != x; then
20228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20230      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20231    fi
20232
20233    # Use eval to expand a potential ~
20234    eval path="$path"
20235    if test ! -f "$path" && test ! -d "$path"; then
20236      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20237    fi
20238
20239    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20240  fi
20241
20242              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20243$as_echo_n "checking for Boot JDK... " >&6; }
20244              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20245$as_echo "$BOOT_JDK" >&6; }
20246              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20247$as_echo_n "checking Boot JDK version... " >&6; }
20248              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20249              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20250$as_echo "$BOOT_JDK_VERSION" >&6; }
20251            fi # end check jdk version
20252          fi # end check rt.jar
20253        fi # end check javac
20254      fi # end check java
20255    fi # end check boot jdk found
20256  fi
20257
20258
20259  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20260
20261  if test "x$BOOT_JDK_FOUND" = xno; then
20262    # Now execute the test
20263
20264  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20265    # First check at user selected default
20266
20267  if test "x$BOOT_JDK_FOUND" = xno; then
20268    # Now execute the test
20269
20270  if test -x /usr/libexec/java_home; then
20271    BOOT_JDK=`/usr/libexec/java_home `
20272    BOOT_JDK_FOUND=maybe
20273    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20274$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20275  fi
20276
20277
20278    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20279    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20280      # Do we have a bin/java?
20281      if test ! -x "$BOOT_JDK/bin/java"; then
20282        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20284        BOOT_JDK_FOUND=no
20285      else
20286        # Do we have a bin/javac?
20287        if test ! -x "$BOOT_JDK/bin/javac"; then
20288          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20290          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20291$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20292          BOOT_JDK_FOUND=no
20293        else
20294          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20295          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20298            BOOT_JDK_FOUND=no
20299          else
20300            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20301            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20302
20303            # Extra M4 quote needed to protect [] in grep expression.
20304            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20305            if test "x$FOUND_CORRECT_VERSION" = x; then
20306              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20308              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20309$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20310              BOOT_JDK_FOUND=no
20311            else
20312              # We're done! :-)
20313              BOOT_JDK_FOUND=yes
20314
20315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316
20317  # Input might be given as Windows format, start by converting to
20318  # unix format.
20319  path="$BOOT_JDK"
20320  new_path=`$CYGPATH -u "$path"`
20321
20322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20325  # "foo.exe" is OK but "foo" is an error.
20326  #
20327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20328  # It is also a way to make sure we got the proper file name for the real test later on.
20329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20330  if test "x$test_shortpath" = x; then
20331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20333    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20334  fi
20335
20336  # Call helper function which possibly converts this using DOS-style short mode.
20337  # If so, the updated path is stored in $new_path.
20338
20339  input_path="$new_path"
20340  # Check if we need to convert this using DOS-style short mode. If the path
20341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20342  # take no chances and rewrite it.
20343  # Note: m4 eats our [], so we need to use [ and ] instead.
20344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20345  if test "x$has_forbidden_chars" != x; then
20346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20350      # Going to short mode and back again did indeed matter. Since short mode is
20351      # case insensitive, let's make it lowercase to improve readability.
20352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20353      # Now convert it back to Unix-stile (cygpath)
20354      input_path=`$CYGPATH -u "$shortmode_path"`
20355      new_path="$input_path"
20356    fi
20357  fi
20358
20359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20360  if test "x$test_cygdrive_prefix" = x; then
20361    # As a simple fix, exclude /usr/bin since it's not a real path.
20362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20364      # a path prefixed by /cygdrive for fixpath to work.
20365      new_path="$CYGWIN_ROOT_PATH$input_path"
20366    fi
20367  fi
20368
20369
20370  if test "x$path" != "x$new_path"; then
20371    BOOT_JDK="$new_path"
20372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20374  fi
20375
20376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20377
20378  path="$BOOT_JDK"
20379  has_colon=`$ECHO $path | $GREP ^.:`
20380  new_path="$path"
20381  if test "x$has_colon" = x; then
20382    # Not in mixed or Windows style, start by that.
20383    new_path=`cmd //c echo $path`
20384  fi
20385
20386
20387  input_path="$new_path"
20388  # Check if we need to convert this using DOS-style short mode. If the path
20389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20390  # take no chances and rewrite it.
20391  # Note: m4 eats our [], so we need to use [ and ] instead.
20392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20393  if test "x$has_forbidden_chars" != x; then
20394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20396  fi
20397
20398
20399  windows_path="$new_path"
20400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20401    unix_path=`$CYGPATH -u "$windows_path"`
20402    new_path="$unix_path"
20403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20405    new_path="$unix_path"
20406  fi
20407
20408  if test "x$path" != "x$new_path"; then
20409    BOOT_JDK="$new_path"
20410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20412  fi
20413
20414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20416
20417  else
20418    # We're on a posix platform. Hooray! :)
20419    path="$BOOT_JDK"
20420    has_space=`$ECHO "$path" | $GREP " "`
20421    if test "x$has_space" != x; then
20422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20424      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20425    fi
20426
20427    # Use eval to expand a potential ~
20428    eval path="$path"
20429    if test ! -f "$path" && test ! -d "$path"; then
20430      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20431    fi
20432
20433    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20434  fi
20435
20436              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20437$as_echo_n "checking for Boot JDK... " >&6; }
20438              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20439$as_echo "$BOOT_JDK" >&6; }
20440              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20441$as_echo_n "checking Boot JDK version... " >&6; }
20442              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20443              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20444$as_echo "$BOOT_JDK_VERSION" >&6; }
20445            fi # end check jdk version
20446          fi # end check rt.jar
20447        fi # end check javac
20448      fi # end check java
20449    fi # end check boot jdk found
20450  fi
20451
20452    # If that did not work out (e.g. too old), try explicit versions instead
20453
20454  if test "x$BOOT_JDK_FOUND" = xno; then
20455    # Now execute the test
20456
20457  if test -x /usr/libexec/java_home; then
20458    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20459    BOOT_JDK_FOUND=maybe
20460    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20461$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20462  fi
20463
20464
20465    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20466    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20467      # Do we have a bin/java?
20468      if test ! -x "$BOOT_JDK/bin/java"; then
20469        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20471        BOOT_JDK_FOUND=no
20472      else
20473        # Do we have a bin/javac?
20474        if test ! -x "$BOOT_JDK/bin/javac"; then
20475          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20477          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20478$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20479          BOOT_JDK_FOUND=no
20480        else
20481          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20482          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20483            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20485            BOOT_JDK_FOUND=no
20486          else
20487            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20489
20490            # Extra M4 quote needed to protect [] in grep expression.
20491            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20492            if test "x$FOUND_CORRECT_VERSION" = x; then
20493              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20495              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20496$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20497              BOOT_JDK_FOUND=no
20498            else
20499              # We're done! :-)
20500              BOOT_JDK_FOUND=yes
20501
20502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20503
20504  # Input might be given as Windows format, start by converting to
20505  # unix format.
20506  path="$BOOT_JDK"
20507  new_path=`$CYGPATH -u "$path"`
20508
20509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20512  # "foo.exe" is OK but "foo" is an error.
20513  #
20514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20515  # It is also a way to make sure we got the proper file name for the real test later on.
20516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20517  if test "x$test_shortpath" = x; then
20518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20520    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20521  fi
20522
20523  # Call helper function which possibly converts this using DOS-style short mode.
20524  # If so, the updated path is stored in $new_path.
20525
20526  input_path="$new_path"
20527  # Check if we need to convert this using DOS-style short mode. If the path
20528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20529  # take no chances and rewrite it.
20530  # Note: m4 eats our [], so we need to use [ and ] instead.
20531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20532  if test "x$has_forbidden_chars" != x; then
20533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20537      # Going to short mode and back again did indeed matter. Since short mode is
20538      # case insensitive, let's make it lowercase to improve readability.
20539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20540      # Now convert it back to Unix-stile (cygpath)
20541      input_path=`$CYGPATH -u "$shortmode_path"`
20542      new_path="$input_path"
20543    fi
20544  fi
20545
20546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20547  if test "x$test_cygdrive_prefix" = x; then
20548    # As a simple fix, exclude /usr/bin since it's not a real path.
20549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20551      # a path prefixed by /cygdrive for fixpath to work.
20552      new_path="$CYGWIN_ROOT_PATH$input_path"
20553    fi
20554  fi
20555
20556
20557  if test "x$path" != "x$new_path"; then
20558    BOOT_JDK="$new_path"
20559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20561  fi
20562
20563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20564
20565  path="$BOOT_JDK"
20566  has_colon=`$ECHO $path | $GREP ^.:`
20567  new_path="$path"
20568  if test "x$has_colon" = x; then
20569    # Not in mixed or Windows style, start by that.
20570    new_path=`cmd //c echo $path`
20571  fi
20572
20573
20574  input_path="$new_path"
20575  # Check if we need to convert this using DOS-style short mode. If the path
20576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20577  # take no chances and rewrite it.
20578  # Note: m4 eats our [], so we need to use [ and ] instead.
20579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20580  if test "x$has_forbidden_chars" != x; then
20581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20583  fi
20584
20585
20586  windows_path="$new_path"
20587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20588    unix_path=`$CYGPATH -u "$windows_path"`
20589    new_path="$unix_path"
20590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20592    new_path="$unix_path"
20593  fi
20594
20595  if test "x$path" != "x$new_path"; then
20596    BOOT_JDK="$new_path"
20597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20599  fi
20600
20601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20603
20604  else
20605    # We're on a posix platform. Hooray! :)
20606    path="$BOOT_JDK"
20607    has_space=`$ECHO "$path" | $GREP " "`
20608    if test "x$has_space" != x; then
20609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20612    fi
20613
20614    # Use eval to expand a potential ~
20615    eval path="$path"
20616    if test ! -f "$path" && test ! -d "$path"; then
20617      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20618    fi
20619
20620    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20621  fi
20622
20623              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20624$as_echo_n "checking for Boot JDK... " >&6; }
20625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20626$as_echo "$BOOT_JDK" >&6; }
20627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20628$as_echo_n "checking Boot JDK version... " >&6; }
20629              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20631$as_echo "$BOOT_JDK_VERSION" >&6; }
20632            fi # end check jdk version
20633          fi # end check rt.jar
20634        fi # end check javac
20635      fi # end check java
20636    fi # end check boot jdk found
20637  fi
20638
20639
20640  if test "x$BOOT_JDK_FOUND" = xno; then
20641    # Now execute the test
20642
20643  if test -x /usr/libexec/java_home; then
20644    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20645    BOOT_JDK_FOUND=maybe
20646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20647$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20648  fi
20649
20650
20651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20653      # Do we have a bin/java?
20654      if test ! -x "$BOOT_JDK/bin/java"; then
20655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20657        BOOT_JDK_FOUND=no
20658      else
20659        # Do we have a bin/javac?
20660        if test ! -x "$BOOT_JDK/bin/javac"; then
20661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20665          BOOT_JDK_FOUND=no
20666        else
20667          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20668          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20671            BOOT_JDK_FOUND=no
20672          else
20673            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20675
20676            # Extra M4 quote needed to protect [] in grep expression.
20677            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20678            if test "x$FOUND_CORRECT_VERSION" = x; then
20679              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20681              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20682$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20683              BOOT_JDK_FOUND=no
20684            else
20685              # We're done! :-)
20686              BOOT_JDK_FOUND=yes
20687
20688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20689
20690  # Input might be given as Windows format, start by converting to
20691  # unix format.
20692  path="$BOOT_JDK"
20693  new_path=`$CYGPATH -u "$path"`
20694
20695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20698  # "foo.exe" is OK but "foo" is an error.
20699  #
20700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20701  # It is also a way to make sure we got the proper file name for the real test later on.
20702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20703  if test "x$test_shortpath" = x; then
20704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20707  fi
20708
20709  # Call helper function which possibly converts this using DOS-style short mode.
20710  # If so, the updated path is stored in $new_path.
20711
20712  input_path="$new_path"
20713  # Check if we need to convert this using DOS-style short mode. If the path
20714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20715  # take no chances and rewrite it.
20716  # Note: m4 eats our [], so we need to use [ and ] instead.
20717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20718  if test "x$has_forbidden_chars" != x; then
20719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20723      # Going to short mode and back again did indeed matter. Since short mode is
20724      # case insensitive, let's make it lowercase to improve readability.
20725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20726      # Now convert it back to Unix-stile (cygpath)
20727      input_path=`$CYGPATH -u "$shortmode_path"`
20728      new_path="$input_path"
20729    fi
20730  fi
20731
20732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20733  if test "x$test_cygdrive_prefix" = x; then
20734    # As a simple fix, exclude /usr/bin since it's not a real path.
20735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20737      # a path prefixed by /cygdrive for fixpath to work.
20738      new_path="$CYGWIN_ROOT_PATH$input_path"
20739    fi
20740  fi
20741
20742
20743  if test "x$path" != "x$new_path"; then
20744    BOOT_JDK="$new_path"
20745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20747  fi
20748
20749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20750
20751  path="$BOOT_JDK"
20752  has_colon=`$ECHO $path | $GREP ^.:`
20753  new_path="$path"
20754  if test "x$has_colon" = x; then
20755    # Not in mixed or Windows style, start by that.
20756    new_path=`cmd //c echo $path`
20757  fi
20758
20759
20760  input_path="$new_path"
20761  # Check if we need to convert this using DOS-style short mode. If the path
20762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20763  # take no chances and rewrite it.
20764  # Note: m4 eats our [], so we need to use [ and ] instead.
20765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20766  if test "x$has_forbidden_chars" != x; then
20767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20769  fi
20770
20771
20772  windows_path="$new_path"
20773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774    unix_path=`$CYGPATH -u "$windows_path"`
20775    new_path="$unix_path"
20776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20778    new_path="$unix_path"
20779  fi
20780
20781  if test "x$path" != "x$new_path"; then
20782    BOOT_JDK="$new_path"
20783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20785  fi
20786
20787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20789
20790  else
20791    # We're on a posix platform. Hooray! :)
20792    path="$BOOT_JDK"
20793    has_space=`$ECHO "$path" | $GREP " "`
20794    if test "x$has_space" != x; then
20795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20797      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20798    fi
20799
20800    # Use eval to expand a potential ~
20801    eval path="$path"
20802    if test ! -f "$path" && test ! -d "$path"; then
20803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20804    fi
20805
20806    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20807  fi
20808
20809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20810$as_echo_n "checking for Boot JDK... " >&6; }
20811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20812$as_echo "$BOOT_JDK" >&6; }
20813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20814$as_echo_n "checking Boot JDK version... " >&6; }
20815              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20817$as_echo "$BOOT_JDK_VERSION" >&6; }
20818            fi # end check jdk version
20819          fi # end check rt.jar
20820        fi # end check javac
20821      fi # end check java
20822    fi # end check boot jdk found
20823  fi
20824
20825
20826  if test "x$BOOT_JDK_FOUND" = xno; then
20827    # Now execute the test
20828
20829  if test -x /usr/libexec/java_home; then
20830    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20831    BOOT_JDK_FOUND=maybe
20832    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20833$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20834  fi
20835
20836
20837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20839      # Do we have a bin/java?
20840      if test ! -x "$BOOT_JDK/bin/java"; then
20841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20843        BOOT_JDK_FOUND=no
20844      else
20845        # Do we have a bin/javac?
20846        if test ! -x "$BOOT_JDK/bin/javac"; then
20847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20851          BOOT_JDK_FOUND=no
20852        else
20853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20857            BOOT_JDK_FOUND=no
20858          else
20859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20861
20862            # Extra M4 quote needed to protect [] in grep expression.
20863            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20864            if test "x$FOUND_CORRECT_VERSION" = x; then
20865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20868$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20869              BOOT_JDK_FOUND=no
20870            else
20871              # We're done! :-)
20872              BOOT_JDK_FOUND=yes
20873
20874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20875
20876  # Input might be given as Windows format, start by converting to
20877  # unix format.
20878  path="$BOOT_JDK"
20879  new_path=`$CYGPATH -u "$path"`
20880
20881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20884  # "foo.exe" is OK but "foo" is an error.
20885  #
20886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20887  # It is also a way to make sure we got the proper file name for the real test later on.
20888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20889  if test "x$test_shortpath" = x; then
20890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20893  fi
20894
20895  # Call helper function which possibly converts this using DOS-style short mode.
20896  # If so, the updated path is stored in $new_path.
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20909      # Going to short mode and back again did indeed matter. Since short mode is
20910      # case insensitive, let's make it lowercase to improve readability.
20911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20912      # Now convert it back to Unix-stile (cygpath)
20913      input_path=`$CYGPATH -u "$shortmode_path"`
20914      new_path="$input_path"
20915    fi
20916  fi
20917
20918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20919  if test "x$test_cygdrive_prefix" = x; then
20920    # As a simple fix, exclude /usr/bin since it's not a real path.
20921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20923      # a path prefixed by /cygdrive for fixpath to work.
20924      new_path="$CYGWIN_ROOT_PATH$input_path"
20925    fi
20926  fi
20927
20928
20929  if test "x$path" != "x$new_path"; then
20930    BOOT_JDK="$new_path"
20931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20933  fi
20934
20935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20936
20937  path="$BOOT_JDK"
20938  has_colon=`$ECHO $path | $GREP ^.:`
20939  new_path="$path"
20940  if test "x$has_colon" = x; then
20941    # Not in mixed or Windows style, start by that.
20942    new_path=`cmd //c echo $path`
20943  fi
20944
20945
20946  input_path="$new_path"
20947  # Check if we need to convert this using DOS-style short mode. If the path
20948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20949  # take no chances and rewrite it.
20950  # Note: m4 eats our [], so we need to use [ and ] instead.
20951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20952  if test "x$has_forbidden_chars" != x; then
20953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20955  fi
20956
20957
20958  windows_path="$new_path"
20959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20960    unix_path=`$CYGPATH -u "$windows_path"`
20961    new_path="$unix_path"
20962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20964    new_path="$unix_path"
20965  fi
20966
20967  if test "x$path" != "x$new_path"; then
20968    BOOT_JDK="$new_path"
20969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20971  fi
20972
20973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20975
20976  else
20977    # We're on a posix platform. Hooray! :)
20978    path="$BOOT_JDK"
20979    has_space=`$ECHO "$path" | $GREP " "`
20980    if test "x$has_space" != x; then
20981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20984    fi
20985
20986    # Use eval to expand a potential ~
20987    eval path="$path"
20988    if test ! -f "$path" && test ! -d "$path"; then
20989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20990    fi
20991
20992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20993  fi
20994
20995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20996$as_echo_n "checking for Boot JDK... " >&6; }
20997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20998$as_echo "$BOOT_JDK" >&6; }
20999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21000$as_echo_n "checking Boot JDK version... " >&6; }
21001              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21003$as_echo "$BOOT_JDK_VERSION" >&6; }
21004            fi # end check jdk version
21005          fi # end check rt.jar
21006        fi # end check javac
21007      fi # end check java
21008    fi # end check boot jdk found
21009  fi
21010
21011  fi
21012
21013
21014    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21015    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21016      # Do we have a bin/java?
21017      if test ! -x "$BOOT_JDK/bin/java"; then
21018        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21020        BOOT_JDK_FOUND=no
21021      else
21022        # Do we have a bin/javac?
21023        if test ! -x "$BOOT_JDK/bin/javac"; then
21024          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21026          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21027$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21028          BOOT_JDK_FOUND=no
21029        else
21030          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21031          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21032            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21034            BOOT_JDK_FOUND=no
21035          else
21036            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21037            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21038
21039            # Extra M4 quote needed to protect [] in grep expression.
21040            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21041            if test "x$FOUND_CORRECT_VERSION" = x; then
21042              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21044              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21045$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21046              BOOT_JDK_FOUND=no
21047            else
21048              # We're done! :-)
21049              BOOT_JDK_FOUND=yes
21050
21051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21052
21053  # Input might be given as Windows format, start by converting to
21054  # unix format.
21055  path="$BOOT_JDK"
21056  new_path=`$CYGPATH -u "$path"`
21057
21058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21061  # "foo.exe" is OK but "foo" is an error.
21062  #
21063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21064  # It is also a way to make sure we got the proper file name for the real test later on.
21065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21066  if test "x$test_shortpath" = x; then
21067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21069    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21070  fi
21071
21072  # Call helper function which possibly converts this using DOS-style short mode.
21073  # If so, the updated path is stored in $new_path.
21074
21075  input_path="$new_path"
21076  # Check if we need to convert this using DOS-style short mode. If the path
21077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21078  # take no chances and rewrite it.
21079  # Note: m4 eats our [], so we need to use [ and ] instead.
21080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21081  if test "x$has_forbidden_chars" != x; then
21082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21086      # Going to short mode and back again did indeed matter. Since short mode is
21087      # case insensitive, let's make it lowercase to improve readability.
21088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21089      # Now convert it back to Unix-stile (cygpath)
21090      input_path=`$CYGPATH -u "$shortmode_path"`
21091      new_path="$input_path"
21092    fi
21093  fi
21094
21095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21096  if test "x$test_cygdrive_prefix" = x; then
21097    # As a simple fix, exclude /usr/bin since it's not a real path.
21098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21100      # a path prefixed by /cygdrive for fixpath to work.
21101      new_path="$CYGWIN_ROOT_PATH$input_path"
21102    fi
21103  fi
21104
21105
21106  if test "x$path" != "x$new_path"; then
21107    BOOT_JDK="$new_path"
21108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21110  fi
21111
21112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21113
21114  path="$BOOT_JDK"
21115  has_colon=`$ECHO $path | $GREP ^.:`
21116  new_path="$path"
21117  if test "x$has_colon" = x; then
21118    # Not in mixed or Windows style, start by that.
21119    new_path=`cmd //c echo $path`
21120  fi
21121
21122
21123  input_path="$new_path"
21124  # Check if we need to convert this using DOS-style short mode. If the path
21125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21126  # take no chances and rewrite it.
21127  # Note: m4 eats our [], so we need to use [ and ] instead.
21128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21129  if test "x$has_forbidden_chars" != x; then
21130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21132  fi
21133
21134
21135  windows_path="$new_path"
21136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21137    unix_path=`$CYGPATH -u "$windows_path"`
21138    new_path="$unix_path"
21139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21141    new_path="$unix_path"
21142  fi
21143
21144  if test "x$path" != "x$new_path"; then
21145    BOOT_JDK="$new_path"
21146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21148  fi
21149
21150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21152
21153  else
21154    # We're on a posix platform. Hooray! :)
21155    path="$BOOT_JDK"
21156    has_space=`$ECHO "$path" | $GREP " "`
21157    if test "x$has_space" != x; then
21158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21160      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21161    fi
21162
21163    # Use eval to expand a potential ~
21164    eval path="$path"
21165    if test ! -f "$path" && test ! -d "$path"; then
21166      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21167    fi
21168
21169    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21170  fi
21171
21172              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21173$as_echo_n "checking for Boot JDK... " >&6; }
21174              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21175$as_echo "$BOOT_JDK" >&6; }
21176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21177$as_echo_n "checking Boot JDK version... " >&6; }
21178              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21179              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21180$as_echo "$BOOT_JDK_VERSION" >&6; }
21181            fi # end check jdk version
21182          fi # end check rt.jar
21183        fi # end check javac
21184      fi # end check java
21185    fi # end check boot jdk found
21186  fi
21187
21188
21189  # Test: Is $JAVA_HOME set?
21190
21191  if test "x$BOOT_JDK_FOUND" = xno; then
21192    # Now execute the test
21193
21194  if test "x$JAVA_HOME" != x; then
21195    JAVA_HOME_PROCESSED="$JAVA_HOME"
21196
21197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21198
21199  # Input might be given as Windows format, start by converting to
21200  # unix format.
21201  path="$JAVA_HOME_PROCESSED"
21202  new_path=`$CYGPATH -u "$path"`
21203
21204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21207  # "foo.exe" is OK but "foo" is an error.
21208  #
21209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21210  # It is also a way to make sure we got the proper file name for the real test later on.
21211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21212  if test "x$test_shortpath" = x; then
21213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21214$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21215    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21216  fi
21217
21218  # Call helper function which possibly converts this using DOS-style short mode.
21219  # If so, the updated path is stored in $new_path.
21220
21221  input_path="$new_path"
21222  # Check if we need to convert this using DOS-style short mode. If the path
21223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21224  # take no chances and rewrite it.
21225  # Note: m4 eats our [], so we need to use [ and ] instead.
21226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21227  if test "x$has_forbidden_chars" != x; then
21228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21232      # Going to short mode and back again did indeed matter. Since short mode is
21233      # case insensitive, let's make it lowercase to improve readability.
21234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21235      # Now convert it back to Unix-stile (cygpath)
21236      input_path=`$CYGPATH -u "$shortmode_path"`
21237      new_path="$input_path"
21238    fi
21239  fi
21240
21241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21242  if test "x$test_cygdrive_prefix" = x; then
21243    # As a simple fix, exclude /usr/bin since it's not a real path.
21244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21246      # a path prefixed by /cygdrive for fixpath to work.
21247      new_path="$CYGWIN_ROOT_PATH$input_path"
21248    fi
21249  fi
21250
21251
21252  if test "x$path" != "x$new_path"; then
21253    JAVA_HOME_PROCESSED="$new_path"
21254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21255$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21256  fi
21257
21258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21259
21260  path="$JAVA_HOME_PROCESSED"
21261  has_colon=`$ECHO $path | $GREP ^.:`
21262  new_path="$path"
21263  if test "x$has_colon" = x; then
21264    # Not in mixed or Windows style, start by that.
21265    new_path=`cmd //c echo $path`
21266  fi
21267
21268
21269  input_path="$new_path"
21270  # Check if we need to convert this using DOS-style short mode. If the path
21271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21272  # take no chances and rewrite it.
21273  # Note: m4 eats our [], so we need to use [ and ] instead.
21274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21275  if test "x$has_forbidden_chars" != x; then
21276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21278  fi
21279
21280
21281  windows_path="$new_path"
21282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21283    unix_path=`$CYGPATH -u "$windows_path"`
21284    new_path="$unix_path"
21285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21287    new_path="$unix_path"
21288  fi
21289
21290  if test "x$path" != "x$new_path"; then
21291    JAVA_HOME_PROCESSED="$new_path"
21292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21293$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21294  fi
21295
21296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21298
21299  else
21300    # We're on a posix platform. Hooray! :)
21301    path="$JAVA_HOME_PROCESSED"
21302    has_space=`$ECHO "$path" | $GREP " "`
21303    if test "x$has_space" != x; then
21304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21305$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21307    fi
21308
21309    # Use eval to expand a potential ~
21310    eval path="$path"
21311    if test ! -f "$path" && test ! -d "$path"; then
21312      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21313    fi
21314
21315    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21316  fi
21317
21318    if test ! -d "$JAVA_HOME_PROCESSED"; then
21319      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21320$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21321    else
21322      # Aha, the user has set a JAVA_HOME
21323      # let us use that as the Boot JDK.
21324      BOOT_JDK="$JAVA_HOME_PROCESSED"
21325      BOOT_JDK_FOUND=maybe
21326      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21327$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21328    fi
21329  fi
21330
21331
21332    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21333    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21334      # Do we have a bin/java?
21335      if test ! -x "$BOOT_JDK/bin/java"; then
21336        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21338        BOOT_JDK_FOUND=no
21339      else
21340        # Do we have a bin/javac?
21341        if test ! -x "$BOOT_JDK/bin/javac"; then
21342          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21344          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21345$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21346          BOOT_JDK_FOUND=no
21347        else
21348          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21349          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21352            BOOT_JDK_FOUND=no
21353          else
21354            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21355            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21356
21357            # Extra M4 quote needed to protect [] in grep expression.
21358            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21359            if test "x$FOUND_CORRECT_VERSION" = x; then
21360              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21362              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21363$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21364              BOOT_JDK_FOUND=no
21365            else
21366              # We're done! :-)
21367              BOOT_JDK_FOUND=yes
21368
21369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21370
21371  # Input might be given as Windows format, start by converting to
21372  # unix format.
21373  path="$BOOT_JDK"
21374  new_path=`$CYGPATH -u "$path"`
21375
21376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21379  # "foo.exe" is OK but "foo" is an error.
21380  #
21381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21382  # It is also a way to make sure we got the proper file name for the real test later on.
21383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21384  if test "x$test_shortpath" = x; then
21385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21387    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21388  fi
21389
21390  # Call helper function which possibly converts this using DOS-style short mode.
21391  # If so, the updated path is stored in $new_path.
21392
21393  input_path="$new_path"
21394  # Check if we need to convert this using DOS-style short mode. If the path
21395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21396  # take no chances and rewrite it.
21397  # Note: m4 eats our [], so we need to use [ and ] instead.
21398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21399  if test "x$has_forbidden_chars" != x; then
21400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21404      # Going to short mode and back again did indeed matter. Since short mode is
21405      # case insensitive, let's make it lowercase to improve readability.
21406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21407      # Now convert it back to Unix-stile (cygpath)
21408      input_path=`$CYGPATH -u "$shortmode_path"`
21409      new_path="$input_path"
21410    fi
21411  fi
21412
21413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21414  if test "x$test_cygdrive_prefix" = x; then
21415    # As a simple fix, exclude /usr/bin since it's not a real path.
21416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21418      # a path prefixed by /cygdrive for fixpath to work.
21419      new_path="$CYGWIN_ROOT_PATH$input_path"
21420    fi
21421  fi
21422
21423
21424  if test "x$path" != "x$new_path"; then
21425    BOOT_JDK="$new_path"
21426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21428  fi
21429
21430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21431
21432  path="$BOOT_JDK"
21433  has_colon=`$ECHO $path | $GREP ^.:`
21434  new_path="$path"
21435  if test "x$has_colon" = x; then
21436    # Not in mixed or Windows style, start by that.
21437    new_path=`cmd //c echo $path`
21438  fi
21439
21440
21441  input_path="$new_path"
21442  # Check if we need to convert this using DOS-style short mode. If the path
21443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21444  # take no chances and rewrite it.
21445  # Note: m4 eats our [], so we need to use [ and ] instead.
21446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21447  if test "x$has_forbidden_chars" != x; then
21448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21450  fi
21451
21452
21453  windows_path="$new_path"
21454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21455    unix_path=`$CYGPATH -u "$windows_path"`
21456    new_path="$unix_path"
21457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21459    new_path="$unix_path"
21460  fi
21461
21462  if test "x$path" != "x$new_path"; then
21463    BOOT_JDK="$new_path"
21464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21466  fi
21467
21468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21470
21471  else
21472    # We're on a posix platform. Hooray! :)
21473    path="$BOOT_JDK"
21474    has_space=`$ECHO "$path" | $GREP " "`
21475    if test "x$has_space" != x; then
21476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21478      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21479    fi
21480
21481    # Use eval to expand a potential ~
21482    eval path="$path"
21483    if test ! -f "$path" && test ! -d "$path"; then
21484      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21485    fi
21486
21487    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21488  fi
21489
21490              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21491$as_echo_n "checking for Boot JDK... " >&6; }
21492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21493$as_echo "$BOOT_JDK" >&6; }
21494              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21495$as_echo_n "checking Boot JDK version... " >&6; }
21496              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21497              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21498$as_echo "$BOOT_JDK_VERSION" >&6; }
21499            fi # end check jdk version
21500          fi # end check rt.jar
21501        fi # end check javac
21502      fi # end check java
21503    fi # end check boot jdk found
21504  fi
21505
21506
21507  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21508
21509  if test "x$BOOT_JDK_FOUND" = xno; then
21510    # Now execute the test
21511
21512  # Extract the first word of "javac", so it can be a program name with args.
21513set dummy javac; ac_word=$2
21514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21515$as_echo_n "checking for $ac_word... " >&6; }
21516if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21517  $as_echo_n "(cached) " >&6
21518else
21519  case $JAVAC_CHECK in
21520  [\\/]* | ?:[\\/]*)
21521  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21522  ;;
21523  *)
21524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21525for as_dir in $PATH
21526do
21527  IFS=$as_save_IFS
21528  test -z "$as_dir" && as_dir=.
21529    for ac_exec_ext in '' $ac_executable_extensions; do
21530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21531    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21533    break 2
21534  fi
21535done
21536  done
21537IFS=$as_save_IFS
21538
21539  ;;
21540esac
21541fi
21542JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21543if test -n "$JAVAC_CHECK"; then
21544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21545$as_echo "$JAVAC_CHECK" >&6; }
21546else
21547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21548$as_echo "no" >&6; }
21549fi
21550
21551
21552  # Extract the first word of "java", so it can be a program name with args.
21553set dummy java; ac_word=$2
21554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21555$as_echo_n "checking for $ac_word... " >&6; }
21556if ${ac_cv_path_JAVA_CHECK+:} false; then :
21557  $as_echo_n "(cached) " >&6
21558else
21559  case $JAVA_CHECK in
21560  [\\/]* | ?:[\\/]*)
21561  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21562  ;;
21563  *)
21564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21565for as_dir in $PATH
21566do
21567  IFS=$as_save_IFS
21568  test -z "$as_dir" && as_dir=.
21569    for ac_exec_ext in '' $ac_executable_extensions; do
21570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21571    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21573    break 2
21574  fi
21575done
21576  done
21577IFS=$as_save_IFS
21578
21579  ;;
21580esac
21581fi
21582JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21583if test -n "$JAVA_CHECK"; then
21584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21585$as_echo "$JAVA_CHECK" >&6; }
21586else
21587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21588$as_echo "no" >&6; }
21589fi
21590
21591
21592  BINARY="$JAVAC_CHECK"
21593  if test "x$JAVAC_CHECK" = x; then
21594    BINARY="$JAVA_CHECK"
21595  fi
21596  if test "x$BINARY" != x; then
21597    # So there is a java(c) binary, it might be part of a JDK.
21598    # Lets find the JDK/JRE directory by following symbolic links.
21599    # Linux/GNU systems often have links from /usr/bin/java to
21600    # /etc/alternatives/java to the real JDK binary.
21601
21602  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21603    # Follow a chain of symbolic links. Use readlink
21604    # where it exists, else fall back to horribly
21605    # complicated shell code.
21606    if test "x$READLINK_TESTED" != yes; then
21607      # On MacOSX there is a readlink tool with a different
21608      # purpose than the GNU readlink tool. Check the found readlink.
21609      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21610      if test "x$ISGNU" = x; then
21611        # A readlink that we do not know how to use.
21612        # Are there other non-GNU readlinks out there?
21613        READLINK_TESTED=yes
21614        READLINK=
21615      fi
21616    fi
21617
21618    if test "x$READLINK" != x; then
21619      BINARY=`$READLINK -f $BINARY`
21620    else
21621      # Save the current directory for restoring afterwards
21622      STARTDIR=$PWD
21623      COUNTER=0
21624      sym_link_dir=`$DIRNAME $BINARY`
21625      sym_link_file=`$BASENAME $BINARY`
21626      cd $sym_link_dir
21627      # Use -P flag to resolve symlinks in directories.
21628      cd `$THEPWDCMD -P`
21629      sym_link_dir=`$THEPWDCMD -P`
21630      # Resolve file symlinks
21631      while test $COUNTER -lt 20; do
21632        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21633        if test "x$ISLINK" == x; then
21634          # This is not a symbolic link! We are done!
21635          break
21636        fi
21637        # Again resolve directory symlinks since the target of the just found
21638        # link could be in a different directory
21639        cd `$DIRNAME $ISLINK`
21640        sym_link_dir=`$THEPWDCMD -P`
21641        sym_link_file=`$BASENAME $ISLINK`
21642        let COUNTER=COUNTER+1
21643      done
21644      cd $STARTDIR
21645      BINARY=$sym_link_dir/$sym_link_file
21646    fi
21647  fi
21648
21649    BOOT_JDK=`dirname "$BINARY"`
21650    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21651    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21652      # Looks like we found ourselves an JDK
21653      BOOT_JDK_FOUND=maybe
21654      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21655$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21656    fi
21657  fi
21658
21659
21660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21661    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21662      # Do we have a bin/java?
21663      if test ! -x "$BOOT_JDK/bin/java"; then
21664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21666        BOOT_JDK_FOUND=no
21667      else
21668        # Do we have a bin/javac?
21669        if test ! -x "$BOOT_JDK/bin/javac"; then
21670          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21672          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21673$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21674          BOOT_JDK_FOUND=no
21675        else
21676          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21677          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21678            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21680            BOOT_JDK_FOUND=no
21681          else
21682            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21683            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21684
21685            # Extra M4 quote needed to protect [] in grep expression.
21686            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21687            if test "x$FOUND_CORRECT_VERSION" = x; then
21688              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21690              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21691$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21692              BOOT_JDK_FOUND=no
21693            else
21694              # We're done! :-)
21695              BOOT_JDK_FOUND=yes
21696
21697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21698
21699  # Input might be given as Windows format, start by converting to
21700  # unix format.
21701  path="$BOOT_JDK"
21702  new_path=`$CYGPATH -u "$path"`
21703
21704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21707  # "foo.exe" is OK but "foo" is an error.
21708  #
21709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21710  # It is also a way to make sure we got the proper file name for the real test later on.
21711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21712  if test "x$test_shortpath" = x; then
21713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21715    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21716  fi
21717
21718  # Call helper function which possibly converts this using DOS-style short mode.
21719  # If so, the updated path is stored in $new_path.
21720
21721  input_path="$new_path"
21722  # Check if we need to convert this using DOS-style short mode. If the path
21723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21724  # take no chances and rewrite it.
21725  # Note: m4 eats our [], so we need to use [ and ] instead.
21726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21727  if test "x$has_forbidden_chars" != x; then
21728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21732      # Going to short mode and back again did indeed matter. Since short mode is
21733      # case insensitive, let's make it lowercase to improve readability.
21734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21735      # Now convert it back to Unix-stile (cygpath)
21736      input_path=`$CYGPATH -u "$shortmode_path"`
21737      new_path="$input_path"
21738    fi
21739  fi
21740
21741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21742  if test "x$test_cygdrive_prefix" = x; then
21743    # As a simple fix, exclude /usr/bin since it's not a real path.
21744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21746      # a path prefixed by /cygdrive for fixpath to work.
21747      new_path="$CYGWIN_ROOT_PATH$input_path"
21748    fi
21749  fi
21750
21751
21752  if test "x$path" != "x$new_path"; then
21753    BOOT_JDK="$new_path"
21754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21756  fi
21757
21758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21759
21760  path="$BOOT_JDK"
21761  has_colon=`$ECHO $path | $GREP ^.:`
21762  new_path="$path"
21763  if test "x$has_colon" = x; then
21764    # Not in mixed or Windows style, start by that.
21765    new_path=`cmd //c echo $path`
21766  fi
21767
21768
21769  input_path="$new_path"
21770  # Check if we need to convert this using DOS-style short mode. If the path
21771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21772  # take no chances and rewrite it.
21773  # Note: m4 eats our [], so we need to use [ and ] instead.
21774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21775  if test "x$has_forbidden_chars" != x; then
21776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21778  fi
21779
21780
21781  windows_path="$new_path"
21782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21783    unix_path=`$CYGPATH -u "$windows_path"`
21784    new_path="$unix_path"
21785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21787    new_path="$unix_path"
21788  fi
21789
21790  if test "x$path" != "x$new_path"; then
21791    BOOT_JDK="$new_path"
21792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21794  fi
21795
21796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21798
21799  else
21800    # We're on a posix platform. Hooray! :)
21801    path="$BOOT_JDK"
21802    has_space=`$ECHO "$path" | $GREP " "`
21803    if test "x$has_space" != x; then
21804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21806      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21807    fi
21808
21809    # Use eval to expand a potential ~
21810    eval path="$path"
21811    if test ! -f "$path" && test ! -d "$path"; then
21812      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21813    fi
21814
21815    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21816  fi
21817
21818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21819$as_echo_n "checking for Boot JDK... " >&6; }
21820              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21821$as_echo "$BOOT_JDK" >&6; }
21822              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21823$as_echo_n "checking Boot JDK version... " >&6; }
21824              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21826$as_echo "$BOOT_JDK_VERSION" >&6; }
21827            fi # end check jdk version
21828          fi # end check rt.jar
21829        fi # end check javac
21830      fi # end check java
21831    fi # end check boot jdk found
21832  fi
21833
21834
21835  # Test: Is there a JDK installed in default, well-known locations?
21836
21837  if test "x$BOOT_JDK_FOUND" = xno; then
21838    # Now execute the test
21839
21840  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21841
21842  if test "x$BOOT_JDK_FOUND" = xno; then
21843    # Now execute the test
21844
21845  if test "x$ProgramW6432" != x; then
21846    VIRTUAL_DIR="$ProgramW6432/Java"
21847
21848  windows_path="$VIRTUAL_DIR"
21849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21850    unix_path=`$CYGPATH -u "$windows_path"`
21851    VIRTUAL_DIR="$unix_path"
21852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21854    VIRTUAL_DIR="$unix_path"
21855  fi
21856
21857
21858  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21859  BOOT_JDK_SUFFIX=""
21860  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21861  if test "x$ALL_JDKS_FOUND" != x; then
21862    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21863
21864  if test "x$BOOT_JDK_FOUND" = xno; then
21865    # Now execute the test
21866
21867        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21868        if test -d "$BOOT_JDK"; then
21869          BOOT_JDK_FOUND=maybe
21870          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21871$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21872        fi
21873
21874
21875    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21876    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21877      # Do we have a bin/java?
21878      if test ! -x "$BOOT_JDK/bin/java"; then
21879        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21881        BOOT_JDK_FOUND=no
21882      else
21883        # Do we have a bin/javac?
21884        if test ! -x "$BOOT_JDK/bin/javac"; then
21885          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21887          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21888$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21889          BOOT_JDK_FOUND=no
21890        else
21891          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21892          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21893            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21895            BOOT_JDK_FOUND=no
21896          else
21897            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21898            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21899
21900            # Extra M4 quote needed to protect [] in grep expression.
21901            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21902            if test "x$FOUND_CORRECT_VERSION" = x; then
21903              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21905              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21906$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21907              BOOT_JDK_FOUND=no
21908            else
21909              # We're done! :-)
21910              BOOT_JDK_FOUND=yes
21911
21912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21913
21914  # Input might be given as Windows format, start by converting to
21915  # unix format.
21916  path="$BOOT_JDK"
21917  new_path=`$CYGPATH -u "$path"`
21918
21919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21922  # "foo.exe" is OK but "foo" is an error.
21923  #
21924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21925  # It is also a way to make sure we got the proper file name for the real test later on.
21926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21927  if test "x$test_shortpath" = x; then
21928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21930    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21931  fi
21932
21933  # Call helper function which possibly converts this using DOS-style short mode.
21934  # If so, the updated path is stored in $new_path.
21935
21936  input_path="$new_path"
21937  # Check if we need to convert this using DOS-style short mode. If the path
21938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21939  # take no chances and rewrite it.
21940  # Note: m4 eats our [], so we need to use [ and ] instead.
21941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21942  if test "x$has_forbidden_chars" != x; then
21943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21947      # Going to short mode and back again did indeed matter. Since short mode is
21948      # case insensitive, let's make it lowercase to improve readability.
21949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21950      # Now convert it back to Unix-stile (cygpath)
21951      input_path=`$CYGPATH -u "$shortmode_path"`
21952      new_path="$input_path"
21953    fi
21954  fi
21955
21956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21957  if test "x$test_cygdrive_prefix" = x; then
21958    # As a simple fix, exclude /usr/bin since it's not a real path.
21959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21961      # a path prefixed by /cygdrive for fixpath to work.
21962      new_path="$CYGWIN_ROOT_PATH$input_path"
21963    fi
21964  fi
21965
21966
21967  if test "x$path" != "x$new_path"; then
21968    BOOT_JDK="$new_path"
21969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21971  fi
21972
21973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21974
21975  path="$BOOT_JDK"
21976  has_colon=`$ECHO $path | $GREP ^.:`
21977  new_path="$path"
21978  if test "x$has_colon" = x; then
21979    # Not in mixed or Windows style, start by that.
21980    new_path=`cmd //c echo $path`
21981  fi
21982
21983
21984  input_path="$new_path"
21985  # Check if we need to convert this using DOS-style short mode. If the path
21986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21987  # take no chances and rewrite it.
21988  # Note: m4 eats our [], so we need to use [ and ] instead.
21989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21990  if test "x$has_forbidden_chars" != x; then
21991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21993  fi
21994
21995
21996  windows_path="$new_path"
21997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21998    unix_path=`$CYGPATH -u "$windows_path"`
21999    new_path="$unix_path"
22000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22002    new_path="$unix_path"
22003  fi
22004
22005  if test "x$path" != "x$new_path"; then
22006    BOOT_JDK="$new_path"
22007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22009  fi
22010
22011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22013
22014  else
22015    # We're on a posix platform. Hooray! :)
22016    path="$BOOT_JDK"
22017    has_space=`$ECHO "$path" | $GREP " "`
22018    if test "x$has_space" != x; then
22019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22021      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22022    fi
22023
22024    # Use eval to expand a potential ~
22025    eval path="$path"
22026    if test ! -f "$path" && test ! -d "$path"; then
22027      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22028    fi
22029
22030    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22031  fi
22032
22033              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22034$as_echo_n "checking for Boot JDK... " >&6; }
22035              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22036$as_echo "$BOOT_JDK" >&6; }
22037              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22038$as_echo_n "checking Boot JDK version... " >&6; }
22039              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22040              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22041$as_echo "$BOOT_JDK_VERSION" >&6; }
22042            fi # end check jdk version
22043          fi # end check rt.jar
22044        fi # end check javac
22045      fi # end check java
22046    fi # end check boot jdk found
22047  fi
22048
22049    done
22050  fi
22051
22052  fi
22053
22054
22055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22057      # Do we have a bin/java?
22058      if test ! -x "$BOOT_JDK/bin/java"; then
22059        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22061        BOOT_JDK_FOUND=no
22062      else
22063        # Do we have a bin/javac?
22064        if test ! -x "$BOOT_JDK/bin/javac"; then
22065          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22067          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22069          BOOT_JDK_FOUND=no
22070        else
22071          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22072          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22073            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22075            BOOT_JDK_FOUND=no
22076          else
22077            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22078            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22079
22080            # Extra M4 quote needed to protect [] in grep expression.
22081            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22082            if test "x$FOUND_CORRECT_VERSION" = x; then
22083              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22085              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22086$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22087              BOOT_JDK_FOUND=no
22088            else
22089              # We're done! :-)
22090              BOOT_JDK_FOUND=yes
22091
22092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22093
22094  # Input might be given as Windows format, start by converting to
22095  # unix format.
22096  path="$BOOT_JDK"
22097  new_path=`$CYGPATH -u "$path"`
22098
22099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22102  # "foo.exe" is OK but "foo" is an error.
22103  #
22104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22105  # It is also a way to make sure we got the proper file name for the real test later on.
22106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22107  if test "x$test_shortpath" = x; then
22108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22110    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22111  fi
22112
22113  # Call helper function which possibly converts this using DOS-style short mode.
22114  # If so, the updated path is stored in $new_path.
22115
22116  input_path="$new_path"
22117  # Check if we need to convert this using DOS-style short mode. If the path
22118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22119  # take no chances and rewrite it.
22120  # Note: m4 eats our [], so we need to use [ and ] instead.
22121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22122  if test "x$has_forbidden_chars" != x; then
22123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22127      # Going to short mode and back again did indeed matter. Since short mode is
22128      # case insensitive, let's make it lowercase to improve readability.
22129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22130      # Now convert it back to Unix-stile (cygpath)
22131      input_path=`$CYGPATH -u "$shortmode_path"`
22132      new_path="$input_path"
22133    fi
22134  fi
22135
22136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22137  if test "x$test_cygdrive_prefix" = x; then
22138    # As a simple fix, exclude /usr/bin since it's not a real path.
22139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22141      # a path prefixed by /cygdrive for fixpath to work.
22142      new_path="$CYGWIN_ROOT_PATH$input_path"
22143    fi
22144  fi
22145
22146
22147  if test "x$path" != "x$new_path"; then
22148    BOOT_JDK="$new_path"
22149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22151  fi
22152
22153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22154
22155  path="$BOOT_JDK"
22156  has_colon=`$ECHO $path | $GREP ^.:`
22157  new_path="$path"
22158  if test "x$has_colon" = x; then
22159    # Not in mixed or Windows style, start by that.
22160    new_path=`cmd //c echo $path`
22161  fi
22162
22163
22164  input_path="$new_path"
22165  # Check if we need to convert this using DOS-style short mode. If the path
22166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22167  # take no chances and rewrite it.
22168  # Note: m4 eats our [], so we need to use [ and ] instead.
22169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22170  if test "x$has_forbidden_chars" != x; then
22171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22173  fi
22174
22175
22176  windows_path="$new_path"
22177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22178    unix_path=`$CYGPATH -u "$windows_path"`
22179    new_path="$unix_path"
22180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22182    new_path="$unix_path"
22183  fi
22184
22185  if test "x$path" != "x$new_path"; then
22186    BOOT_JDK="$new_path"
22187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22188$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22189  fi
22190
22191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22193
22194  else
22195    # We're on a posix platform. Hooray! :)
22196    path="$BOOT_JDK"
22197    has_space=`$ECHO "$path" | $GREP " "`
22198    if test "x$has_space" != x; then
22199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22201      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22202    fi
22203
22204    # Use eval to expand a potential ~
22205    eval path="$path"
22206    if test ! -f "$path" && test ! -d "$path"; then
22207      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22208    fi
22209
22210    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22211  fi
22212
22213              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22214$as_echo_n "checking for Boot JDK... " >&6; }
22215              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22216$as_echo "$BOOT_JDK" >&6; }
22217              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22218$as_echo_n "checking Boot JDK version... " >&6; }
22219              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22220              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22221$as_echo "$BOOT_JDK_VERSION" >&6; }
22222            fi # end check jdk version
22223          fi # end check rt.jar
22224        fi # end check javac
22225      fi # end check java
22226    fi # end check boot jdk found
22227  fi
22228
22229
22230  if test "x$BOOT_JDK_FOUND" = xno; then
22231    # Now execute the test
22232
22233  if test "x$PROGRAMW6432" != x; then
22234    VIRTUAL_DIR="$PROGRAMW6432/Java"
22235
22236  windows_path="$VIRTUAL_DIR"
22237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22238    unix_path=`$CYGPATH -u "$windows_path"`
22239    VIRTUAL_DIR="$unix_path"
22240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22242    VIRTUAL_DIR="$unix_path"
22243  fi
22244
22245
22246  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22247  BOOT_JDK_SUFFIX=""
22248  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22249  if test "x$ALL_JDKS_FOUND" != x; then
22250    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22251
22252  if test "x$BOOT_JDK_FOUND" = xno; then
22253    # Now execute the test
22254
22255        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22256        if test -d "$BOOT_JDK"; then
22257          BOOT_JDK_FOUND=maybe
22258          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22259$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22260        fi
22261
22262
22263    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22264    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22265      # Do we have a bin/java?
22266      if test ! -x "$BOOT_JDK/bin/java"; then
22267        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22269        BOOT_JDK_FOUND=no
22270      else
22271        # Do we have a bin/javac?
22272        if test ! -x "$BOOT_JDK/bin/javac"; then
22273          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22275          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22276$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22277          BOOT_JDK_FOUND=no
22278        else
22279          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22280          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22283            BOOT_JDK_FOUND=no
22284          else
22285            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22287
22288            # Extra M4 quote needed to protect [] in grep expression.
22289            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22290            if test "x$FOUND_CORRECT_VERSION" = x; then
22291              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22293              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22294$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22295              BOOT_JDK_FOUND=no
22296            else
22297              # We're done! :-)
22298              BOOT_JDK_FOUND=yes
22299
22300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22301
22302  # Input might be given as Windows format, start by converting to
22303  # unix format.
22304  path="$BOOT_JDK"
22305  new_path=`$CYGPATH -u "$path"`
22306
22307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22310  # "foo.exe" is OK but "foo" is an error.
22311  #
22312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22313  # It is also a way to make sure we got the proper file name for the real test later on.
22314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22315  if test "x$test_shortpath" = x; then
22316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22319  fi
22320
22321  # Call helper function which possibly converts this using DOS-style short mode.
22322  # If so, the updated path is stored in $new_path.
22323
22324  input_path="$new_path"
22325  # Check if we need to convert this using DOS-style short mode. If the path
22326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22327  # take no chances and rewrite it.
22328  # Note: m4 eats our [], so we need to use [ and ] instead.
22329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22330  if test "x$has_forbidden_chars" != x; then
22331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22335      # Going to short mode and back again did indeed matter. Since short mode is
22336      # case insensitive, let's make it lowercase to improve readability.
22337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22338      # Now convert it back to Unix-stile (cygpath)
22339      input_path=`$CYGPATH -u "$shortmode_path"`
22340      new_path="$input_path"
22341    fi
22342  fi
22343
22344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22345  if test "x$test_cygdrive_prefix" = x; then
22346    # As a simple fix, exclude /usr/bin since it's not a real path.
22347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22349      # a path prefixed by /cygdrive for fixpath to work.
22350      new_path="$CYGWIN_ROOT_PATH$input_path"
22351    fi
22352  fi
22353
22354
22355  if test "x$path" != "x$new_path"; then
22356    BOOT_JDK="$new_path"
22357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22359  fi
22360
22361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22362
22363  path="$BOOT_JDK"
22364  has_colon=`$ECHO $path | $GREP ^.:`
22365  new_path="$path"
22366  if test "x$has_colon" = x; then
22367    # Not in mixed or Windows style, start by that.
22368    new_path=`cmd //c echo $path`
22369  fi
22370
22371
22372  input_path="$new_path"
22373  # Check if we need to convert this using DOS-style short mode. If the path
22374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22375  # take no chances and rewrite it.
22376  # Note: m4 eats our [], so we need to use [ and ] instead.
22377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22378  if test "x$has_forbidden_chars" != x; then
22379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22381  fi
22382
22383
22384  windows_path="$new_path"
22385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22386    unix_path=`$CYGPATH -u "$windows_path"`
22387    new_path="$unix_path"
22388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22390    new_path="$unix_path"
22391  fi
22392
22393  if test "x$path" != "x$new_path"; then
22394    BOOT_JDK="$new_path"
22395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22397  fi
22398
22399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22401
22402  else
22403    # We're on a posix platform. Hooray! :)
22404    path="$BOOT_JDK"
22405    has_space=`$ECHO "$path" | $GREP " "`
22406    if test "x$has_space" != x; then
22407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22410    fi
22411
22412    # Use eval to expand a potential ~
22413    eval path="$path"
22414    if test ! -f "$path" && test ! -d "$path"; then
22415      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22416    fi
22417
22418    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22419  fi
22420
22421              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22422$as_echo_n "checking for Boot JDK... " >&6; }
22423              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22424$as_echo "$BOOT_JDK" >&6; }
22425              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22426$as_echo_n "checking Boot JDK version... " >&6; }
22427              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22429$as_echo "$BOOT_JDK_VERSION" >&6; }
22430            fi # end check jdk version
22431          fi # end check rt.jar
22432        fi # end check javac
22433      fi # end check java
22434    fi # end check boot jdk found
22435  fi
22436
22437    done
22438  fi
22439
22440  fi
22441
22442
22443    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22444    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22445      # Do we have a bin/java?
22446      if test ! -x "$BOOT_JDK/bin/java"; then
22447        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22449        BOOT_JDK_FOUND=no
22450      else
22451        # Do we have a bin/javac?
22452        if test ! -x "$BOOT_JDK/bin/javac"; then
22453          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22455          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22456$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22457          BOOT_JDK_FOUND=no
22458        else
22459          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22460          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22461            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22463            BOOT_JDK_FOUND=no
22464          else
22465            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22466            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22467
22468            # Extra M4 quote needed to protect [] in grep expression.
22469            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22470            if test "x$FOUND_CORRECT_VERSION" = x; then
22471              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22473              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22474$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22475              BOOT_JDK_FOUND=no
22476            else
22477              # We're done! :-)
22478              BOOT_JDK_FOUND=yes
22479
22480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22481
22482  # Input might be given as Windows format, start by converting to
22483  # unix format.
22484  path="$BOOT_JDK"
22485  new_path=`$CYGPATH -u "$path"`
22486
22487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22490  # "foo.exe" is OK but "foo" is an error.
22491  #
22492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22493  # It is also a way to make sure we got the proper file name for the real test later on.
22494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22495  if test "x$test_shortpath" = x; then
22496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22499  fi
22500
22501  # Call helper function which possibly converts this using DOS-style short mode.
22502  # If so, the updated path is stored in $new_path.
22503
22504  input_path="$new_path"
22505  # Check if we need to convert this using DOS-style short mode. If the path
22506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22507  # take no chances and rewrite it.
22508  # Note: m4 eats our [], so we need to use [ and ] instead.
22509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22510  if test "x$has_forbidden_chars" != x; then
22511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22515      # Going to short mode and back again did indeed matter. Since short mode is
22516      # case insensitive, let's make it lowercase to improve readability.
22517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22518      # Now convert it back to Unix-stile (cygpath)
22519      input_path=`$CYGPATH -u "$shortmode_path"`
22520      new_path="$input_path"
22521    fi
22522  fi
22523
22524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22525  if test "x$test_cygdrive_prefix" = x; then
22526    # As a simple fix, exclude /usr/bin since it's not a real path.
22527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22529      # a path prefixed by /cygdrive for fixpath to work.
22530      new_path="$CYGWIN_ROOT_PATH$input_path"
22531    fi
22532  fi
22533
22534
22535  if test "x$path" != "x$new_path"; then
22536    BOOT_JDK="$new_path"
22537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22539  fi
22540
22541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22542
22543  path="$BOOT_JDK"
22544  has_colon=`$ECHO $path | $GREP ^.:`
22545  new_path="$path"
22546  if test "x$has_colon" = x; then
22547    # Not in mixed or Windows style, start by that.
22548    new_path=`cmd //c echo $path`
22549  fi
22550
22551
22552  input_path="$new_path"
22553  # Check if we need to convert this using DOS-style short mode. If the path
22554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22555  # take no chances and rewrite it.
22556  # Note: m4 eats our [], so we need to use [ and ] instead.
22557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22558  if test "x$has_forbidden_chars" != x; then
22559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22561  fi
22562
22563
22564  windows_path="$new_path"
22565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22566    unix_path=`$CYGPATH -u "$windows_path"`
22567    new_path="$unix_path"
22568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22570    new_path="$unix_path"
22571  fi
22572
22573  if test "x$path" != "x$new_path"; then
22574    BOOT_JDK="$new_path"
22575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22577  fi
22578
22579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22581
22582  else
22583    # We're on a posix platform. Hooray! :)
22584    path="$BOOT_JDK"
22585    has_space=`$ECHO "$path" | $GREP " "`
22586    if test "x$has_space" != x; then
22587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22589      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22590    fi
22591
22592    # Use eval to expand a potential ~
22593    eval path="$path"
22594    if test ! -f "$path" && test ! -d "$path"; then
22595      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22596    fi
22597
22598    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22599  fi
22600
22601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22602$as_echo_n "checking for Boot JDK... " >&6; }
22603              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22604$as_echo "$BOOT_JDK" >&6; }
22605              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22606$as_echo_n "checking Boot JDK version... " >&6; }
22607              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22608              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22609$as_echo "$BOOT_JDK_VERSION" >&6; }
22610            fi # end check jdk version
22611          fi # end check rt.jar
22612        fi # end check javac
22613      fi # end check java
22614    fi # end check boot jdk found
22615  fi
22616
22617
22618  if test "x$BOOT_JDK_FOUND" = xno; then
22619    # Now execute the test
22620
22621  if test "x$PROGRAMFILES" != x; then
22622    VIRTUAL_DIR="$PROGRAMFILES/Java"
22623
22624  windows_path="$VIRTUAL_DIR"
22625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22626    unix_path=`$CYGPATH -u "$windows_path"`
22627    VIRTUAL_DIR="$unix_path"
22628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22630    VIRTUAL_DIR="$unix_path"
22631  fi
22632
22633
22634  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22635  BOOT_JDK_SUFFIX=""
22636  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22637  if test "x$ALL_JDKS_FOUND" != x; then
22638    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22639
22640  if test "x$BOOT_JDK_FOUND" = xno; then
22641    # Now execute the test
22642
22643        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22644        if test -d "$BOOT_JDK"; then
22645          BOOT_JDK_FOUND=maybe
22646          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22647$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22648        fi
22649
22650
22651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22653      # Do we have a bin/java?
22654      if test ! -x "$BOOT_JDK/bin/java"; then
22655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22657        BOOT_JDK_FOUND=no
22658      else
22659        # Do we have a bin/javac?
22660        if test ! -x "$BOOT_JDK/bin/javac"; then
22661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22665          BOOT_JDK_FOUND=no
22666        else
22667          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22668          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22671            BOOT_JDK_FOUND=no
22672          else
22673            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22675
22676            # Extra M4 quote needed to protect [] in grep expression.
22677            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22678            if test "x$FOUND_CORRECT_VERSION" = x; then
22679              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22681              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22682$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22683              BOOT_JDK_FOUND=no
22684            else
22685              # We're done! :-)
22686              BOOT_JDK_FOUND=yes
22687
22688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22689
22690  # Input might be given as Windows format, start by converting to
22691  # unix format.
22692  path="$BOOT_JDK"
22693  new_path=`$CYGPATH -u "$path"`
22694
22695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22698  # "foo.exe" is OK but "foo" is an error.
22699  #
22700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22701  # It is also a way to make sure we got the proper file name for the real test later on.
22702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22703  if test "x$test_shortpath" = x; then
22704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22707  fi
22708
22709  # Call helper function which possibly converts this using DOS-style short mode.
22710  # If so, the updated path is stored in $new_path.
22711
22712  input_path="$new_path"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22723      # Going to short mode and back again did indeed matter. Since short mode is
22724      # case insensitive, let's make it lowercase to improve readability.
22725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22726      # Now convert it back to Unix-stile (cygpath)
22727      input_path=`$CYGPATH -u "$shortmode_path"`
22728      new_path="$input_path"
22729    fi
22730  fi
22731
22732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22733  if test "x$test_cygdrive_prefix" = x; then
22734    # As a simple fix, exclude /usr/bin since it's not a real path.
22735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22737      # a path prefixed by /cygdrive for fixpath to work.
22738      new_path="$CYGWIN_ROOT_PATH$input_path"
22739    fi
22740  fi
22741
22742
22743  if test "x$path" != "x$new_path"; then
22744    BOOT_JDK="$new_path"
22745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22747  fi
22748
22749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22750
22751  path="$BOOT_JDK"
22752  has_colon=`$ECHO $path | $GREP ^.:`
22753  new_path="$path"
22754  if test "x$has_colon" = x; then
22755    # Not in mixed or Windows style, start by that.
22756    new_path=`cmd //c echo $path`
22757  fi
22758
22759
22760  input_path="$new_path"
22761  # Check if we need to convert this using DOS-style short mode. If the path
22762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22763  # take no chances and rewrite it.
22764  # Note: m4 eats our [], so we need to use [ and ] instead.
22765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22766  if test "x$has_forbidden_chars" != x; then
22767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22769  fi
22770
22771
22772  windows_path="$new_path"
22773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22774    unix_path=`$CYGPATH -u "$windows_path"`
22775    new_path="$unix_path"
22776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22778    new_path="$unix_path"
22779  fi
22780
22781  if test "x$path" != "x$new_path"; then
22782    BOOT_JDK="$new_path"
22783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22785  fi
22786
22787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22789
22790  else
22791    # We're on a posix platform. Hooray! :)
22792    path="$BOOT_JDK"
22793    has_space=`$ECHO "$path" | $GREP " "`
22794    if test "x$has_space" != x; then
22795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22797      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22798    fi
22799
22800    # Use eval to expand a potential ~
22801    eval path="$path"
22802    if test ! -f "$path" && test ! -d "$path"; then
22803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22804    fi
22805
22806    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22807  fi
22808
22809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22810$as_echo_n "checking for Boot JDK... " >&6; }
22811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22812$as_echo "$BOOT_JDK" >&6; }
22813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22814$as_echo_n "checking Boot JDK version... " >&6; }
22815              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22817$as_echo "$BOOT_JDK_VERSION" >&6; }
22818            fi # end check jdk version
22819          fi # end check rt.jar
22820        fi # end check javac
22821      fi # end check java
22822    fi # end check boot jdk found
22823  fi
22824
22825    done
22826  fi
22827
22828  fi
22829
22830
22831    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22832    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22833      # Do we have a bin/java?
22834      if test ! -x "$BOOT_JDK/bin/java"; then
22835        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22837        BOOT_JDK_FOUND=no
22838      else
22839        # Do we have a bin/javac?
22840        if test ! -x "$BOOT_JDK/bin/javac"; then
22841          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22844$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22845          BOOT_JDK_FOUND=no
22846        else
22847          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22848          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22851            BOOT_JDK_FOUND=no
22852          else
22853            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22854            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22855
22856            # Extra M4 quote needed to protect [] in grep expression.
22857            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22858            if test "x$FOUND_CORRECT_VERSION" = x; then
22859              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22861              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22862$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22863              BOOT_JDK_FOUND=no
22864            else
22865              # We're done! :-)
22866              BOOT_JDK_FOUND=yes
22867
22868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22869
22870  # Input might be given as Windows format, start by converting to
22871  # unix format.
22872  path="$BOOT_JDK"
22873  new_path=`$CYGPATH -u "$path"`
22874
22875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22878  # "foo.exe" is OK but "foo" is an error.
22879  #
22880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22881  # It is also a way to make sure we got the proper file name for the real test later on.
22882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22883  if test "x$test_shortpath" = x; then
22884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22887  fi
22888
22889  # Call helper function which possibly converts this using DOS-style short mode.
22890  # If so, the updated path is stored in $new_path.
22891
22892  input_path="$new_path"
22893  # Check if we need to convert this using DOS-style short mode. If the path
22894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22895  # take no chances and rewrite it.
22896  # Note: m4 eats our [], so we need to use [ and ] instead.
22897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22898  if test "x$has_forbidden_chars" != x; then
22899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22903      # Going to short mode and back again did indeed matter. Since short mode is
22904      # case insensitive, let's make it lowercase to improve readability.
22905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22906      # Now convert it back to Unix-stile (cygpath)
22907      input_path=`$CYGPATH -u "$shortmode_path"`
22908      new_path="$input_path"
22909    fi
22910  fi
22911
22912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22913  if test "x$test_cygdrive_prefix" = x; then
22914    # As a simple fix, exclude /usr/bin since it's not a real path.
22915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22917      # a path prefixed by /cygdrive for fixpath to work.
22918      new_path="$CYGWIN_ROOT_PATH$input_path"
22919    fi
22920  fi
22921
22922
22923  if test "x$path" != "x$new_path"; then
22924    BOOT_JDK="$new_path"
22925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22927  fi
22928
22929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22930
22931  path="$BOOT_JDK"
22932  has_colon=`$ECHO $path | $GREP ^.:`
22933  new_path="$path"
22934  if test "x$has_colon" = x; then
22935    # Not in mixed or Windows style, start by that.
22936    new_path=`cmd //c echo $path`
22937  fi
22938
22939
22940  input_path="$new_path"
22941  # Check if we need to convert this using DOS-style short mode. If the path
22942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22943  # take no chances and rewrite it.
22944  # Note: m4 eats our [], so we need to use [ and ] instead.
22945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22946  if test "x$has_forbidden_chars" != x; then
22947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22949  fi
22950
22951
22952  windows_path="$new_path"
22953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22954    unix_path=`$CYGPATH -u "$windows_path"`
22955    new_path="$unix_path"
22956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22958    new_path="$unix_path"
22959  fi
22960
22961  if test "x$path" != "x$new_path"; then
22962    BOOT_JDK="$new_path"
22963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22965  fi
22966
22967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22969
22970  else
22971    # We're on a posix platform. Hooray! :)
22972    path="$BOOT_JDK"
22973    has_space=`$ECHO "$path" | $GREP " "`
22974    if test "x$has_space" != x; then
22975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22977      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22978    fi
22979
22980    # Use eval to expand a potential ~
22981    eval path="$path"
22982    if test ! -f "$path" && test ! -d "$path"; then
22983      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22984    fi
22985
22986    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22987  fi
22988
22989              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22990$as_echo_n "checking for Boot JDK... " >&6; }
22991              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22992$as_echo "$BOOT_JDK" >&6; }
22993              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22994$as_echo_n "checking Boot JDK version... " >&6; }
22995              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22996              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22997$as_echo "$BOOT_JDK_VERSION" >&6; }
22998            fi # end check jdk version
22999          fi # end check rt.jar
23000        fi # end check javac
23001      fi # end check java
23002    fi # end check boot jdk found
23003  fi
23004
23005
23006  if test "x$BOOT_JDK_FOUND" = xno; then
23007    # Now execute the test
23008
23009  if test "x$ProgramFiles" != x; then
23010    VIRTUAL_DIR="$ProgramFiles/Java"
23011
23012  windows_path="$VIRTUAL_DIR"
23013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23014    unix_path=`$CYGPATH -u "$windows_path"`
23015    VIRTUAL_DIR="$unix_path"
23016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23018    VIRTUAL_DIR="$unix_path"
23019  fi
23020
23021
23022  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23023  BOOT_JDK_SUFFIX=""
23024  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23025  if test "x$ALL_JDKS_FOUND" != x; then
23026    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23027
23028  if test "x$BOOT_JDK_FOUND" = xno; then
23029    # Now execute the test
23030
23031        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23032        if test -d "$BOOT_JDK"; then
23033          BOOT_JDK_FOUND=maybe
23034          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23035$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23036        fi
23037
23038
23039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23041      # Do we have a bin/java?
23042      if test ! -x "$BOOT_JDK/bin/java"; then
23043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23045        BOOT_JDK_FOUND=no
23046      else
23047        # Do we have a bin/javac?
23048        if test ! -x "$BOOT_JDK/bin/javac"; then
23049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23053          BOOT_JDK_FOUND=no
23054        else
23055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23059            BOOT_JDK_FOUND=no
23060          else
23061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23063
23064            # Extra M4 quote needed to protect [] in grep expression.
23065            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23066            if test "x$FOUND_CORRECT_VERSION" = x; then
23067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23070$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23071              BOOT_JDK_FOUND=no
23072            else
23073              # We're done! :-)
23074              BOOT_JDK_FOUND=yes
23075
23076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23077
23078  # Input might be given as Windows format, start by converting to
23079  # unix format.
23080  path="$BOOT_JDK"
23081  new_path=`$CYGPATH -u "$path"`
23082
23083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23086  # "foo.exe" is OK but "foo" is an error.
23087  #
23088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23089  # It is also a way to make sure we got the proper file name for the real test later on.
23090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23091  if test "x$test_shortpath" = x; then
23092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23095  fi
23096
23097  # Call helper function which possibly converts this using DOS-style short mode.
23098  # If so, the updated path is stored in $new_path.
23099
23100  input_path="$new_path"
23101  # Check if we need to convert this using DOS-style short mode. If the path
23102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23103  # take no chances and rewrite it.
23104  # Note: m4 eats our [], so we need to use [ and ] instead.
23105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23106  if test "x$has_forbidden_chars" != x; then
23107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23111      # Going to short mode and back again did indeed matter. Since short mode is
23112      # case insensitive, let's make it lowercase to improve readability.
23113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23114      # Now convert it back to Unix-stile (cygpath)
23115      input_path=`$CYGPATH -u "$shortmode_path"`
23116      new_path="$input_path"
23117    fi
23118  fi
23119
23120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23121  if test "x$test_cygdrive_prefix" = x; then
23122    # As a simple fix, exclude /usr/bin since it's not a real path.
23123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23125      # a path prefixed by /cygdrive for fixpath to work.
23126      new_path="$CYGWIN_ROOT_PATH$input_path"
23127    fi
23128  fi
23129
23130
23131  if test "x$path" != "x$new_path"; then
23132    BOOT_JDK="$new_path"
23133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23135  fi
23136
23137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23138
23139  path="$BOOT_JDK"
23140  has_colon=`$ECHO $path | $GREP ^.:`
23141  new_path="$path"
23142  if test "x$has_colon" = x; then
23143    # Not in mixed or Windows style, start by that.
23144    new_path=`cmd //c echo $path`
23145  fi
23146
23147
23148  input_path="$new_path"
23149  # Check if we need to convert this using DOS-style short mode. If the path
23150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23151  # take no chances and rewrite it.
23152  # Note: m4 eats our [], so we need to use [ and ] instead.
23153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23154  if test "x$has_forbidden_chars" != x; then
23155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23157  fi
23158
23159
23160  windows_path="$new_path"
23161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23162    unix_path=`$CYGPATH -u "$windows_path"`
23163    new_path="$unix_path"
23164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23166    new_path="$unix_path"
23167  fi
23168
23169  if test "x$path" != "x$new_path"; then
23170    BOOT_JDK="$new_path"
23171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23173  fi
23174
23175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23177
23178  else
23179    # We're on a posix platform. Hooray! :)
23180    path="$BOOT_JDK"
23181    has_space=`$ECHO "$path" | $GREP " "`
23182    if test "x$has_space" != x; then
23183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23186    fi
23187
23188    # Use eval to expand a potential ~
23189    eval path="$path"
23190    if test ! -f "$path" && test ! -d "$path"; then
23191      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23192    fi
23193
23194    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23195  fi
23196
23197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23198$as_echo_n "checking for Boot JDK... " >&6; }
23199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23200$as_echo "$BOOT_JDK" >&6; }
23201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23202$as_echo_n "checking Boot JDK version... " >&6; }
23203              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23205$as_echo "$BOOT_JDK_VERSION" >&6; }
23206            fi # end check jdk version
23207          fi # end check rt.jar
23208        fi # end check javac
23209      fi # end check java
23210    fi # end check boot jdk found
23211  fi
23212
23213    done
23214  fi
23215
23216  fi
23217
23218
23219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23221      # Do we have a bin/java?
23222      if test ! -x "$BOOT_JDK/bin/java"; then
23223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23225        BOOT_JDK_FOUND=no
23226      else
23227        # Do we have a bin/javac?
23228        if test ! -x "$BOOT_JDK/bin/javac"; then
23229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23233          BOOT_JDK_FOUND=no
23234        else
23235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23239            BOOT_JDK_FOUND=no
23240          else
23241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23243
23244            # Extra M4 quote needed to protect [] in grep expression.
23245            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23246            if test "x$FOUND_CORRECT_VERSION" = x; then
23247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23250$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23251              BOOT_JDK_FOUND=no
23252            else
23253              # We're done! :-)
23254              BOOT_JDK_FOUND=yes
23255
23256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23257
23258  # Input might be given as Windows format, start by converting to
23259  # unix format.
23260  path="$BOOT_JDK"
23261  new_path=`$CYGPATH -u "$path"`
23262
23263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23266  # "foo.exe" is OK but "foo" is an error.
23267  #
23268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23269  # It is also a way to make sure we got the proper file name for the real test later on.
23270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23271  if test "x$test_shortpath" = x; then
23272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23275  fi
23276
23277  # Call helper function which possibly converts this using DOS-style short mode.
23278  # If so, the updated path is stored in $new_path.
23279
23280  input_path="$new_path"
23281  # Check if we need to convert this using DOS-style short mode. If the path
23282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23283  # take no chances and rewrite it.
23284  # Note: m4 eats our [], so we need to use [ and ] instead.
23285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23286  if test "x$has_forbidden_chars" != x; then
23287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23291      # Going to short mode and back again did indeed matter. Since short mode is
23292      # case insensitive, let's make it lowercase to improve readability.
23293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23294      # Now convert it back to Unix-stile (cygpath)
23295      input_path=`$CYGPATH -u "$shortmode_path"`
23296      new_path="$input_path"
23297    fi
23298  fi
23299
23300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23301  if test "x$test_cygdrive_prefix" = x; then
23302    # As a simple fix, exclude /usr/bin since it's not a real path.
23303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23305      # a path prefixed by /cygdrive for fixpath to work.
23306      new_path="$CYGWIN_ROOT_PATH$input_path"
23307    fi
23308  fi
23309
23310
23311  if test "x$path" != "x$new_path"; then
23312    BOOT_JDK="$new_path"
23313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23315  fi
23316
23317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23318
23319  path="$BOOT_JDK"
23320  has_colon=`$ECHO $path | $GREP ^.:`
23321  new_path="$path"
23322  if test "x$has_colon" = x; then
23323    # Not in mixed or Windows style, start by that.
23324    new_path=`cmd //c echo $path`
23325  fi
23326
23327
23328  input_path="$new_path"
23329  # Check if we need to convert this using DOS-style short mode. If the path
23330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23331  # take no chances and rewrite it.
23332  # Note: m4 eats our [], so we need to use [ and ] instead.
23333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23334  if test "x$has_forbidden_chars" != x; then
23335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23337  fi
23338
23339
23340  windows_path="$new_path"
23341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23342    unix_path=`$CYGPATH -u "$windows_path"`
23343    new_path="$unix_path"
23344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23346    new_path="$unix_path"
23347  fi
23348
23349  if test "x$path" != "x$new_path"; then
23350    BOOT_JDK="$new_path"
23351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23353  fi
23354
23355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23357
23358  else
23359    # We're on a posix platform. Hooray! :)
23360    path="$BOOT_JDK"
23361    has_space=`$ECHO "$path" | $GREP " "`
23362    if test "x$has_space" != x; then
23363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23365      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23366    fi
23367
23368    # Use eval to expand a potential ~
23369    eval path="$path"
23370    if test ! -f "$path" && test ! -d "$path"; then
23371      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23372    fi
23373
23374    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23375  fi
23376
23377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23378$as_echo_n "checking for Boot JDK... " >&6; }
23379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23380$as_echo "$BOOT_JDK" >&6; }
23381              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23382$as_echo_n "checking Boot JDK version... " >&6; }
23383              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23384              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23385$as_echo "$BOOT_JDK_VERSION" >&6; }
23386            fi # end check jdk version
23387          fi # end check rt.jar
23388        fi # end check javac
23389      fi # end check java
23390    fi # end check boot jdk found
23391  fi
23392
23393
23394  if test "x$BOOT_JDK_FOUND" = xno; then
23395    # Now execute the test
23396
23397  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23398  BOOT_JDK_SUFFIX=""
23399  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23400  if test "x$ALL_JDKS_FOUND" != x; then
23401    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23402
23403  if test "x$BOOT_JDK_FOUND" = xno; then
23404    # Now execute the test
23405
23406        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23407        if test -d "$BOOT_JDK"; then
23408          BOOT_JDK_FOUND=maybe
23409          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23410$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23411        fi
23412
23413
23414    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23415    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23416      # Do we have a bin/java?
23417      if test ! -x "$BOOT_JDK/bin/java"; then
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23420        BOOT_JDK_FOUND=no
23421      else
23422        # Do we have a bin/javac?
23423        if test ! -x "$BOOT_JDK/bin/javac"; then
23424          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23426          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23427$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23428          BOOT_JDK_FOUND=no
23429        else
23430          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23431          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23432            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23434            BOOT_JDK_FOUND=no
23435          else
23436            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23437            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23438
23439            # Extra M4 quote needed to protect [] in grep expression.
23440            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23441            if test "x$FOUND_CORRECT_VERSION" = x; then
23442              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23444              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23445$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23446              BOOT_JDK_FOUND=no
23447            else
23448              # We're done! :-)
23449              BOOT_JDK_FOUND=yes
23450
23451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23452
23453  # Input might be given as Windows format, start by converting to
23454  # unix format.
23455  path="$BOOT_JDK"
23456  new_path=`$CYGPATH -u "$path"`
23457
23458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23461  # "foo.exe" is OK but "foo" is an error.
23462  #
23463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23464  # It is also a way to make sure we got the proper file name for the real test later on.
23465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23466  if test "x$test_shortpath" = x; then
23467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23469    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23470  fi
23471
23472  # Call helper function which possibly converts this using DOS-style short mode.
23473  # If so, the updated path is stored in $new_path.
23474
23475  input_path="$new_path"
23476  # Check if we need to convert this using DOS-style short mode. If the path
23477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23478  # take no chances and rewrite it.
23479  # Note: m4 eats our [], so we need to use [ and ] instead.
23480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23481  if test "x$has_forbidden_chars" != x; then
23482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23486      # Going to short mode and back again did indeed matter. Since short mode is
23487      # case insensitive, let's make it lowercase to improve readability.
23488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23489      # Now convert it back to Unix-stile (cygpath)
23490      input_path=`$CYGPATH -u "$shortmode_path"`
23491      new_path="$input_path"
23492    fi
23493  fi
23494
23495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23496  if test "x$test_cygdrive_prefix" = x; then
23497    # As a simple fix, exclude /usr/bin since it's not a real path.
23498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23500      # a path prefixed by /cygdrive for fixpath to work.
23501      new_path="$CYGWIN_ROOT_PATH$input_path"
23502    fi
23503  fi
23504
23505
23506  if test "x$path" != "x$new_path"; then
23507    BOOT_JDK="$new_path"
23508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23510  fi
23511
23512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23513
23514  path="$BOOT_JDK"
23515  has_colon=`$ECHO $path | $GREP ^.:`
23516  new_path="$path"
23517  if test "x$has_colon" = x; then
23518    # Not in mixed or Windows style, start by that.
23519    new_path=`cmd //c echo $path`
23520  fi
23521
23522
23523  input_path="$new_path"
23524  # Check if we need to convert this using DOS-style short mode. If the path
23525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23526  # take no chances and rewrite it.
23527  # Note: m4 eats our [], so we need to use [ and ] instead.
23528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23529  if test "x$has_forbidden_chars" != x; then
23530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23532  fi
23533
23534
23535  windows_path="$new_path"
23536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23537    unix_path=`$CYGPATH -u "$windows_path"`
23538    new_path="$unix_path"
23539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23541    new_path="$unix_path"
23542  fi
23543
23544  if test "x$path" != "x$new_path"; then
23545    BOOT_JDK="$new_path"
23546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23548  fi
23549
23550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23552
23553  else
23554    # We're on a posix platform. Hooray! :)
23555    path="$BOOT_JDK"
23556    has_space=`$ECHO "$path" | $GREP " "`
23557    if test "x$has_space" != x; then
23558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23560      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23561    fi
23562
23563    # Use eval to expand a potential ~
23564    eval path="$path"
23565    if test ! -f "$path" && test ! -d "$path"; then
23566      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23567    fi
23568
23569    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23570  fi
23571
23572              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23573$as_echo_n "checking for Boot JDK... " >&6; }
23574              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23575$as_echo "$BOOT_JDK" >&6; }
23576              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23577$as_echo_n "checking Boot JDK version... " >&6; }
23578              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23579              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23580$as_echo "$BOOT_JDK_VERSION" >&6; }
23581            fi # end check jdk version
23582          fi # end check rt.jar
23583        fi # end check javac
23584      fi # end check java
23585    fi # end check boot jdk found
23586  fi
23587
23588    done
23589  fi
23590
23591
23592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23594      # Do we have a bin/java?
23595      if test ! -x "$BOOT_JDK/bin/java"; then
23596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23598        BOOT_JDK_FOUND=no
23599      else
23600        # Do we have a bin/javac?
23601        if test ! -x "$BOOT_JDK/bin/javac"; then
23602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23606          BOOT_JDK_FOUND=no
23607        else
23608          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23609          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23612            BOOT_JDK_FOUND=no
23613          else
23614            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23615            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23616
23617            # Extra M4 quote needed to protect [] in grep expression.
23618            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23619            if test "x$FOUND_CORRECT_VERSION" = x; then
23620              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23622              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23623$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23624              BOOT_JDK_FOUND=no
23625            else
23626              # We're done! :-)
23627              BOOT_JDK_FOUND=yes
23628
23629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23630
23631  # Input might be given as Windows format, start by converting to
23632  # unix format.
23633  path="$BOOT_JDK"
23634  new_path=`$CYGPATH -u "$path"`
23635
23636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23639  # "foo.exe" is OK but "foo" is an error.
23640  #
23641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23642  # It is also a way to make sure we got the proper file name for the real test later on.
23643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23644  if test "x$test_shortpath" = x; then
23645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23648  fi
23649
23650  # Call helper function which possibly converts this using DOS-style short mode.
23651  # If so, the updated path is stored in $new_path.
23652
23653  input_path="$new_path"
23654  # Check if we need to convert this using DOS-style short mode. If the path
23655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23656  # take no chances and rewrite it.
23657  # Note: m4 eats our [], so we need to use [ and ] instead.
23658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23659  if test "x$has_forbidden_chars" != x; then
23660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23664      # Going to short mode and back again did indeed matter. Since short mode is
23665      # case insensitive, let's make it lowercase to improve readability.
23666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23667      # Now convert it back to Unix-stile (cygpath)
23668      input_path=`$CYGPATH -u "$shortmode_path"`
23669      new_path="$input_path"
23670    fi
23671  fi
23672
23673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23674  if test "x$test_cygdrive_prefix" = x; then
23675    # As a simple fix, exclude /usr/bin since it's not a real path.
23676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23678      # a path prefixed by /cygdrive for fixpath to work.
23679      new_path="$CYGWIN_ROOT_PATH$input_path"
23680    fi
23681  fi
23682
23683
23684  if test "x$path" != "x$new_path"; then
23685    BOOT_JDK="$new_path"
23686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23688  fi
23689
23690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23691
23692  path="$BOOT_JDK"
23693  has_colon=`$ECHO $path | $GREP ^.:`
23694  new_path="$path"
23695  if test "x$has_colon" = x; then
23696    # Not in mixed or Windows style, start by that.
23697    new_path=`cmd //c echo $path`
23698  fi
23699
23700
23701  input_path="$new_path"
23702  # Check if we need to convert this using DOS-style short mode. If the path
23703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23704  # take no chances and rewrite it.
23705  # Note: m4 eats our [], so we need to use [ and ] instead.
23706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23707  if test "x$has_forbidden_chars" != x; then
23708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23710  fi
23711
23712
23713  windows_path="$new_path"
23714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23715    unix_path=`$CYGPATH -u "$windows_path"`
23716    new_path="$unix_path"
23717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23719    new_path="$unix_path"
23720  fi
23721
23722  if test "x$path" != "x$new_path"; then
23723    BOOT_JDK="$new_path"
23724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23726  fi
23727
23728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23730
23731  else
23732    # We're on a posix platform. Hooray! :)
23733    path="$BOOT_JDK"
23734    has_space=`$ECHO "$path" | $GREP " "`
23735    if test "x$has_space" != x; then
23736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23739    fi
23740
23741    # Use eval to expand a potential ~
23742    eval path="$path"
23743    if test ! -f "$path" && test ! -d "$path"; then
23744      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23745    fi
23746
23747    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23748  fi
23749
23750              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23751$as_echo_n "checking for Boot JDK... " >&6; }
23752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23753$as_echo "$BOOT_JDK" >&6; }
23754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23755$as_echo_n "checking Boot JDK version... " >&6; }
23756              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23758$as_echo "$BOOT_JDK_VERSION" >&6; }
23759            fi # end check jdk version
23760          fi # end check rt.jar
23761        fi # end check javac
23762      fi # end check java
23763    fi # end check boot jdk found
23764  fi
23765
23766  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23767
23768  if test "x$BOOT_JDK_FOUND" = xno; then
23769    # Now execute the test
23770
23771  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23772  BOOT_JDK_SUFFIX="/Contents/Home"
23773  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23774  if test "x$ALL_JDKS_FOUND" != x; then
23775    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23776
23777  if test "x$BOOT_JDK_FOUND" = xno; then
23778    # Now execute the test
23779
23780        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23781        if test -d "$BOOT_JDK"; then
23782          BOOT_JDK_FOUND=maybe
23783          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23784$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23785        fi
23786
23787
23788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23790      # Do we have a bin/java?
23791      if test ! -x "$BOOT_JDK/bin/java"; then
23792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23794        BOOT_JDK_FOUND=no
23795      else
23796        # Do we have a bin/javac?
23797        if test ! -x "$BOOT_JDK/bin/javac"; then
23798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23802          BOOT_JDK_FOUND=no
23803        else
23804          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23805          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23808            BOOT_JDK_FOUND=no
23809          else
23810            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23812
23813            # Extra M4 quote needed to protect [] in grep expression.
23814            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23815            if test "x$FOUND_CORRECT_VERSION" = x; then
23816              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23818              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23819$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23820              BOOT_JDK_FOUND=no
23821            else
23822              # We're done! :-)
23823              BOOT_JDK_FOUND=yes
23824
23825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23826
23827  # Input might be given as Windows format, start by converting to
23828  # unix format.
23829  path="$BOOT_JDK"
23830  new_path=`$CYGPATH -u "$path"`
23831
23832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23835  # "foo.exe" is OK but "foo" is an error.
23836  #
23837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23838  # It is also a way to make sure we got the proper file name for the real test later on.
23839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23840  if test "x$test_shortpath" = x; then
23841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23844  fi
23845
23846  # Call helper function which possibly converts this using DOS-style short mode.
23847  # If so, the updated path is stored in $new_path.
23848
23849  input_path="$new_path"
23850  # Check if we need to convert this using DOS-style short mode. If the path
23851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23852  # take no chances and rewrite it.
23853  # Note: m4 eats our [], so we need to use [ and ] instead.
23854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23855  if test "x$has_forbidden_chars" != x; then
23856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23860      # Going to short mode and back again did indeed matter. Since short mode is
23861      # case insensitive, let's make it lowercase to improve readability.
23862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23863      # Now convert it back to Unix-stile (cygpath)
23864      input_path=`$CYGPATH -u "$shortmode_path"`
23865      new_path="$input_path"
23866    fi
23867  fi
23868
23869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23870  if test "x$test_cygdrive_prefix" = x; then
23871    # As a simple fix, exclude /usr/bin since it's not a real path.
23872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23874      # a path prefixed by /cygdrive for fixpath to work.
23875      new_path="$CYGWIN_ROOT_PATH$input_path"
23876    fi
23877  fi
23878
23879
23880  if test "x$path" != "x$new_path"; then
23881    BOOT_JDK="$new_path"
23882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23884  fi
23885
23886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23887
23888  path="$BOOT_JDK"
23889  has_colon=`$ECHO $path | $GREP ^.:`
23890  new_path="$path"
23891  if test "x$has_colon" = x; then
23892    # Not in mixed or Windows style, start by that.
23893    new_path=`cmd //c echo $path`
23894  fi
23895
23896
23897  input_path="$new_path"
23898  # Check if we need to convert this using DOS-style short mode. If the path
23899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23900  # take no chances and rewrite it.
23901  # Note: m4 eats our [], so we need to use [ and ] instead.
23902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23903  if test "x$has_forbidden_chars" != x; then
23904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23906  fi
23907
23908
23909  windows_path="$new_path"
23910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23911    unix_path=`$CYGPATH -u "$windows_path"`
23912    new_path="$unix_path"
23913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23915    new_path="$unix_path"
23916  fi
23917
23918  if test "x$path" != "x$new_path"; then
23919    BOOT_JDK="$new_path"
23920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23922  fi
23923
23924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23926
23927  else
23928    # We're on a posix platform. Hooray! :)
23929    path="$BOOT_JDK"
23930    has_space=`$ECHO "$path" | $GREP " "`
23931    if test "x$has_space" != x; then
23932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23934      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23935    fi
23936
23937    # Use eval to expand a potential ~
23938    eval path="$path"
23939    if test ! -f "$path" && test ! -d "$path"; then
23940      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23941    fi
23942
23943    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23944  fi
23945
23946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23947$as_echo_n "checking for Boot JDK... " >&6; }
23948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23949$as_echo "$BOOT_JDK" >&6; }
23950              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23951$as_echo_n "checking Boot JDK version... " >&6; }
23952              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23954$as_echo "$BOOT_JDK_VERSION" >&6; }
23955            fi # end check jdk version
23956          fi # end check rt.jar
23957        fi # end check javac
23958      fi # end check java
23959    fi # end check boot jdk found
23960  fi
23961
23962    done
23963  fi
23964
23965
23966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23968      # Do we have a bin/java?
23969      if test ! -x "$BOOT_JDK/bin/java"; then
23970        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23972        BOOT_JDK_FOUND=no
23973      else
23974        # Do we have a bin/javac?
23975        if test ! -x "$BOOT_JDK/bin/javac"; then
23976          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23978          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23980          BOOT_JDK_FOUND=no
23981        else
23982          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23983          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23984            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23986            BOOT_JDK_FOUND=no
23987          else
23988            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23990
23991            # Extra M4 quote needed to protect [] in grep expression.
23992            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23993            if test "x$FOUND_CORRECT_VERSION" = x; then
23994              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23996              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23997$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23998              BOOT_JDK_FOUND=no
23999            else
24000              # We're done! :-)
24001              BOOT_JDK_FOUND=yes
24002
24003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24004
24005  # Input might be given as Windows format, start by converting to
24006  # unix format.
24007  path="$BOOT_JDK"
24008  new_path=`$CYGPATH -u "$path"`
24009
24010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24013  # "foo.exe" is OK but "foo" is an error.
24014  #
24015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24016  # It is also a way to make sure we got the proper file name for the real test later on.
24017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24018  if test "x$test_shortpath" = x; then
24019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24021    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24022  fi
24023
24024  # Call helper function which possibly converts this using DOS-style short mode.
24025  # If so, the updated path is stored in $new_path.
24026
24027  input_path="$new_path"
24028  # Check if we need to convert this using DOS-style short mode. If the path
24029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24030  # take no chances and rewrite it.
24031  # Note: m4 eats our [], so we need to use [ and ] instead.
24032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24033  if test "x$has_forbidden_chars" != x; then
24034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24038      # Going to short mode and back again did indeed matter. Since short mode is
24039      # case insensitive, let's make it lowercase to improve readability.
24040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24041      # Now convert it back to Unix-stile (cygpath)
24042      input_path=`$CYGPATH -u "$shortmode_path"`
24043      new_path="$input_path"
24044    fi
24045  fi
24046
24047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24048  if test "x$test_cygdrive_prefix" = x; then
24049    # As a simple fix, exclude /usr/bin since it's not a real path.
24050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24052      # a path prefixed by /cygdrive for fixpath to work.
24053      new_path="$CYGWIN_ROOT_PATH$input_path"
24054    fi
24055  fi
24056
24057
24058  if test "x$path" != "x$new_path"; then
24059    BOOT_JDK="$new_path"
24060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24062  fi
24063
24064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24065
24066  path="$BOOT_JDK"
24067  has_colon=`$ECHO $path | $GREP ^.:`
24068  new_path="$path"
24069  if test "x$has_colon" = x; then
24070    # Not in mixed or Windows style, start by that.
24071    new_path=`cmd //c echo $path`
24072  fi
24073
24074
24075  input_path="$new_path"
24076  # Check if we need to convert this using DOS-style short mode. If the path
24077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24078  # take no chances and rewrite it.
24079  # Note: m4 eats our [], so we need to use [ and ] instead.
24080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24081  if test "x$has_forbidden_chars" != x; then
24082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24084  fi
24085
24086
24087  windows_path="$new_path"
24088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24089    unix_path=`$CYGPATH -u "$windows_path"`
24090    new_path="$unix_path"
24091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24093    new_path="$unix_path"
24094  fi
24095
24096  if test "x$path" != "x$new_path"; then
24097    BOOT_JDK="$new_path"
24098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24100  fi
24101
24102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24104
24105  else
24106    # We're on a posix platform. Hooray! :)
24107    path="$BOOT_JDK"
24108    has_space=`$ECHO "$path" | $GREP " "`
24109    if test "x$has_space" != x; then
24110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24112      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24113    fi
24114
24115    # Use eval to expand a potential ~
24116    eval path="$path"
24117    if test ! -f "$path" && test ! -d "$path"; then
24118      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24119    fi
24120
24121    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24122  fi
24123
24124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24125$as_echo_n "checking for Boot JDK... " >&6; }
24126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24127$as_echo "$BOOT_JDK" >&6; }
24128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24129$as_echo_n "checking Boot JDK version... " >&6; }
24130              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24132$as_echo "$BOOT_JDK_VERSION" >&6; }
24133            fi # end check jdk version
24134          fi # end check rt.jar
24135        fi # end check javac
24136      fi # end check java
24137    fi # end check boot jdk found
24138  fi
24139
24140
24141  if test "x$BOOT_JDK_FOUND" = xno; then
24142    # Now execute the test
24143
24144  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24145  BOOT_JDK_SUFFIX="/Contents/Home"
24146  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24147  if test "x$ALL_JDKS_FOUND" != x; then
24148    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24149
24150  if test "x$BOOT_JDK_FOUND" = xno; then
24151    # Now execute the test
24152
24153        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24154        if test -d "$BOOT_JDK"; then
24155          BOOT_JDK_FOUND=maybe
24156          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24157$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24158        fi
24159
24160
24161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24163      # Do we have a bin/java?
24164      if test ! -x "$BOOT_JDK/bin/java"; then
24165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24167        BOOT_JDK_FOUND=no
24168      else
24169        # Do we have a bin/javac?
24170        if test ! -x "$BOOT_JDK/bin/javac"; then
24171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24175          BOOT_JDK_FOUND=no
24176        else
24177          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24178          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24181            BOOT_JDK_FOUND=no
24182          else
24183            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24185
24186            # Extra M4 quote needed to protect [] in grep expression.
24187            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24188            if test "x$FOUND_CORRECT_VERSION" = x; then
24189              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24191              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24192$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24193              BOOT_JDK_FOUND=no
24194            else
24195              # We're done! :-)
24196              BOOT_JDK_FOUND=yes
24197
24198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24199
24200  # Input might be given as Windows format, start by converting to
24201  # unix format.
24202  path="$BOOT_JDK"
24203  new_path=`$CYGPATH -u "$path"`
24204
24205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24208  # "foo.exe" is OK but "foo" is an error.
24209  #
24210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24211  # It is also a way to make sure we got the proper file name for the real test later on.
24212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24213  if test "x$test_shortpath" = x; then
24214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24217  fi
24218
24219  # Call helper function which possibly converts this using DOS-style short mode.
24220  # If so, the updated path is stored in $new_path.
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24233      # Going to short mode and back again did indeed matter. Since short mode is
24234      # case insensitive, let's make it lowercase to improve readability.
24235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24236      # Now convert it back to Unix-stile (cygpath)
24237      input_path=`$CYGPATH -u "$shortmode_path"`
24238      new_path="$input_path"
24239    fi
24240  fi
24241
24242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24243  if test "x$test_cygdrive_prefix" = x; then
24244    # As a simple fix, exclude /usr/bin since it's not a real path.
24245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24247      # a path prefixed by /cygdrive for fixpath to work.
24248      new_path="$CYGWIN_ROOT_PATH$input_path"
24249    fi
24250  fi
24251
24252
24253  if test "x$path" != "x$new_path"; then
24254    BOOT_JDK="$new_path"
24255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24257  fi
24258
24259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24260
24261  path="$BOOT_JDK"
24262  has_colon=`$ECHO $path | $GREP ^.:`
24263  new_path="$path"
24264  if test "x$has_colon" = x; then
24265    # Not in mixed or Windows style, start by that.
24266    new_path=`cmd //c echo $path`
24267  fi
24268
24269
24270  input_path="$new_path"
24271  # Check if we need to convert this using DOS-style short mode. If the path
24272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24273  # take no chances and rewrite it.
24274  # Note: m4 eats our [], so we need to use [ and ] instead.
24275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24276  if test "x$has_forbidden_chars" != x; then
24277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24279  fi
24280
24281
24282  windows_path="$new_path"
24283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24284    unix_path=`$CYGPATH -u "$windows_path"`
24285    new_path="$unix_path"
24286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24288    new_path="$unix_path"
24289  fi
24290
24291  if test "x$path" != "x$new_path"; then
24292    BOOT_JDK="$new_path"
24293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24295  fi
24296
24297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24299
24300  else
24301    # We're on a posix platform. Hooray! :)
24302    path="$BOOT_JDK"
24303    has_space=`$ECHO "$path" | $GREP " "`
24304    if test "x$has_space" != x; then
24305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24307      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24308    fi
24309
24310    # Use eval to expand a potential ~
24311    eval path="$path"
24312    if test ! -f "$path" && test ! -d "$path"; then
24313      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24314    fi
24315
24316    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24317  fi
24318
24319              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24320$as_echo_n "checking for Boot JDK... " >&6; }
24321              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24322$as_echo "$BOOT_JDK" >&6; }
24323              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24324$as_echo_n "checking Boot JDK version... " >&6; }
24325              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24326              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24327$as_echo "$BOOT_JDK_VERSION" >&6; }
24328            fi # end check jdk version
24329          fi # end check rt.jar
24330        fi # end check javac
24331      fi # end check java
24332    fi # end check boot jdk found
24333  fi
24334
24335    done
24336  fi
24337
24338
24339    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24340    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24341      # Do we have a bin/java?
24342      if test ! -x "$BOOT_JDK/bin/java"; then
24343        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24345        BOOT_JDK_FOUND=no
24346      else
24347        # Do we have a bin/javac?
24348        if test ! -x "$BOOT_JDK/bin/javac"; then
24349          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24351          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24352$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24353          BOOT_JDK_FOUND=no
24354        else
24355          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24356          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24357            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24359            BOOT_JDK_FOUND=no
24360          else
24361            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24363
24364            # Extra M4 quote needed to protect [] in grep expression.
24365            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24366            if test "x$FOUND_CORRECT_VERSION" = x; then
24367              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24369              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24370$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24371              BOOT_JDK_FOUND=no
24372            else
24373              # We're done! :-)
24374              BOOT_JDK_FOUND=yes
24375
24376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24377
24378  # Input might be given as Windows format, start by converting to
24379  # unix format.
24380  path="$BOOT_JDK"
24381  new_path=`$CYGPATH -u "$path"`
24382
24383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24386  # "foo.exe" is OK but "foo" is an error.
24387  #
24388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24389  # It is also a way to make sure we got the proper file name for the real test later on.
24390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24391  if test "x$test_shortpath" = x; then
24392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24394    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24395  fi
24396
24397  # Call helper function which possibly converts this using DOS-style short mode.
24398  # If so, the updated path is stored in $new_path.
24399
24400  input_path="$new_path"
24401  # Check if we need to convert this using DOS-style short mode. If the path
24402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24403  # take no chances and rewrite it.
24404  # Note: m4 eats our [], so we need to use [ and ] instead.
24405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24406  if test "x$has_forbidden_chars" != x; then
24407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24411      # Going to short mode and back again did indeed matter. Since short mode is
24412      # case insensitive, let's make it lowercase to improve readability.
24413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24414      # Now convert it back to Unix-stile (cygpath)
24415      input_path=`$CYGPATH -u "$shortmode_path"`
24416      new_path="$input_path"
24417    fi
24418  fi
24419
24420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24421  if test "x$test_cygdrive_prefix" = x; then
24422    # As a simple fix, exclude /usr/bin since it's not a real path.
24423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24425      # a path prefixed by /cygdrive for fixpath to work.
24426      new_path="$CYGWIN_ROOT_PATH$input_path"
24427    fi
24428  fi
24429
24430
24431  if test "x$path" != "x$new_path"; then
24432    BOOT_JDK="$new_path"
24433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24435  fi
24436
24437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24438
24439  path="$BOOT_JDK"
24440  has_colon=`$ECHO $path | $GREP ^.:`
24441  new_path="$path"
24442  if test "x$has_colon" = x; then
24443    # Not in mixed or Windows style, start by that.
24444    new_path=`cmd //c echo $path`
24445  fi
24446
24447
24448  input_path="$new_path"
24449  # Check if we need to convert this using DOS-style short mode. If the path
24450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24451  # take no chances and rewrite it.
24452  # Note: m4 eats our [], so we need to use [ and ] instead.
24453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24454  if test "x$has_forbidden_chars" != x; then
24455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24457  fi
24458
24459
24460  windows_path="$new_path"
24461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24462    unix_path=`$CYGPATH -u "$windows_path"`
24463    new_path="$unix_path"
24464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24466    new_path="$unix_path"
24467  fi
24468
24469  if test "x$path" != "x$new_path"; then
24470    BOOT_JDK="$new_path"
24471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24473  fi
24474
24475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24477
24478  else
24479    # We're on a posix platform. Hooray! :)
24480    path="$BOOT_JDK"
24481    has_space=`$ECHO "$path" | $GREP " "`
24482    if test "x$has_space" != x; then
24483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24485      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24486    fi
24487
24488    # Use eval to expand a potential ~
24489    eval path="$path"
24490    if test ! -f "$path" && test ! -d "$path"; then
24491      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24492    fi
24493
24494    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24495  fi
24496
24497              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24498$as_echo_n "checking for Boot JDK... " >&6; }
24499              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24500$as_echo "$BOOT_JDK" >&6; }
24501              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24502$as_echo_n "checking Boot JDK version... " >&6; }
24503              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24504              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24505$as_echo "$BOOT_JDK_VERSION" >&6; }
24506            fi # end check jdk version
24507          fi # end check rt.jar
24508        fi # end check javac
24509      fi # end check java
24510    fi # end check boot jdk found
24511  fi
24512
24513  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24514
24515  if test "x$BOOT_JDK_FOUND" = xno; then
24516    # Now execute the test
24517
24518  BOOT_JDK_PREFIX="/usr/lib/jvm"
24519  BOOT_JDK_SUFFIX=""
24520  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24521  if test "x$ALL_JDKS_FOUND" != x; then
24522    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24523
24524  if test "x$BOOT_JDK_FOUND" = xno; then
24525    # Now execute the test
24526
24527        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24528        if test -d "$BOOT_JDK"; then
24529          BOOT_JDK_FOUND=maybe
24530          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24531$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24532        fi
24533
24534
24535    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24536    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24537      # Do we have a bin/java?
24538      if test ! -x "$BOOT_JDK/bin/java"; then
24539        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24541        BOOT_JDK_FOUND=no
24542      else
24543        # Do we have a bin/javac?
24544        if test ! -x "$BOOT_JDK/bin/javac"; then
24545          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24547          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24548$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24549          BOOT_JDK_FOUND=no
24550        else
24551          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24552          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24553            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24555            BOOT_JDK_FOUND=no
24556          else
24557            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24558            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24559
24560            # Extra M4 quote needed to protect [] in grep expression.
24561            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24562            if test "x$FOUND_CORRECT_VERSION" = x; then
24563              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24565              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24566$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24567              BOOT_JDK_FOUND=no
24568            else
24569              # We're done! :-)
24570              BOOT_JDK_FOUND=yes
24571
24572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24573
24574  # Input might be given as Windows format, start by converting to
24575  # unix format.
24576  path="$BOOT_JDK"
24577  new_path=`$CYGPATH -u "$path"`
24578
24579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24582  # "foo.exe" is OK but "foo" is an error.
24583  #
24584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24585  # It is also a way to make sure we got the proper file name for the real test later on.
24586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24587  if test "x$test_shortpath" = x; then
24588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24590    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24591  fi
24592
24593  # Call helper function which possibly converts this using DOS-style short mode.
24594  # If so, the updated path is stored in $new_path.
24595
24596  input_path="$new_path"
24597  # Check if we need to convert this using DOS-style short mode. If the path
24598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24599  # take no chances and rewrite it.
24600  # Note: m4 eats our [], so we need to use [ and ] instead.
24601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24602  if test "x$has_forbidden_chars" != x; then
24603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24607      # Going to short mode and back again did indeed matter. Since short mode is
24608      # case insensitive, let's make it lowercase to improve readability.
24609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24610      # Now convert it back to Unix-stile (cygpath)
24611      input_path=`$CYGPATH -u "$shortmode_path"`
24612      new_path="$input_path"
24613    fi
24614  fi
24615
24616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24617  if test "x$test_cygdrive_prefix" = x; then
24618    # As a simple fix, exclude /usr/bin since it's not a real path.
24619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24621      # a path prefixed by /cygdrive for fixpath to work.
24622      new_path="$CYGWIN_ROOT_PATH$input_path"
24623    fi
24624  fi
24625
24626
24627  if test "x$path" != "x$new_path"; then
24628    BOOT_JDK="$new_path"
24629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24631  fi
24632
24633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24634
24635  path="$BOOT_JDK"
24636  has_colon=`$ECHO $path | $GREP ^.:`
24637  new_path="$path"
24638  if test "x$has_colon" = x; then
24639    # Not in mixed or Windows style, start by that.
24640    new_path=`cmd //c echo $path`
24641  fi
24642
24643
24644  input_path="$new_path"
24645  # Check if we need to convert this using DOS-style short mode. If the path
24646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24647  # take no chances and rewrite it.
24648  # Note: m4 eats our [], so we need to use [ and ] instead.
24649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24650  if test "x$has_forbidden_chars" != x; then
24651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24653  fi
24654
24655
24656  windows_path="$new_path"
24657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24658    unix_path=`$CYGPATH -u "$windows_path"`
24659    new_path="$unix_path"
24660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24662    new_path="$unix_path"
24663  fi
24664
24665  if test "x$path" != "x$new_path"; then
24666    BOOT_JDK="$new_path"
24667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24669  fi
24670
24671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24673
24674  else
24675    # We're on a posix platform. Hooray! :)
24676    path="$BOOT_JDK"
24677    has_space=`$ECHO "$path" | $GREP " "`
24678    if test "x$has_space" != x; then
24679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24681      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24682    fi
24683
24684    # Use eval to expand a potential ~
24685    eval path="$path"
24686    if test ! -f "$path" && test ! -d "$path"; then
24687      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24688    fi
24689
24690    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24691  fi
24692
24693              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24694$as_echo_n "checking for Boot JDK... " >&6; }
24695              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24696$as_echo "$BOOT_JDK" >&6; }
24697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24698$as_echo_n "checking Boot JDK version... " >&6; }
24699              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24700              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24701$as_echo "$BOOT_JDK_VERSION" >&6; }
24702            fi # end check jdk version
24703          fi # end check rt.jar
24704        fi # end check javac
24705      fi # end check java
24706    fi # end check boot jdk found
24707  fi
24708
24709    done
24710  fi
24711
24712
24713    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24714    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24715      # Do we have a bin/java?
24716      if test ! -x "$BOOT_JDK/bin/java"; then
24717        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24719        BOOT_JDK_FOUND=no
24720      else
24721        # Do we have a bin/javac?
24722        if test ! -x "$BOOT_JDK/bin/javac"; then
24723          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24725          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24726$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24727          BOOT_JDK_FOUND=no
24728        else
24729          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24730          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24733            BOOT_JDK_FOUND=no
24734          else
24735            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24737
24738            # Extra M4 quote needed to protect [] in grep expression.
24739            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24740            if test "x$FOUND_CORRECT_VERSION" = x; then
24741              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24743              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24744$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24745              BOOT_JDK_FOUND=no
24746            else
24747              # We're done! :-)
24748              BOOT_JDK_FOUND=yes
24749
24750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24751
24752  # Input might be given as Windows format, start by converting to
24753  # unix format.
24754  path="$BOOT_JDK"
24755  new_path=`$CYGPATH -u "$path"`
24756
24757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24760  # "foo.exe" is OK but "foo" is an error.
24761  #
24762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24763  # It is also a way to make sure we got the proper file name for the real test later on.
24764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24765  if test "x$test_shortpath" = x; then
24766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24768    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24769  fi
24770
24771  # Call helper function which possibly converts this using DOS-style short mode.
24772  # If so, the updated path is stored in $new_path.
24773
24774  input_path="$new_path"
24775  # Check if we need to convert this using DOS-style short mode. If the path
24776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24777  # take no chances and rewrite it.
24778  # Note: m4 eats our [], so we need to use [ and ] instead.
24779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24780  if test "x$has_forbidden_chars" != x; then
24781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24785      # Going to short mode and back again did indeed matter. Since short mode is
24786      # case insensitive, let's make it lowercase to improve readability.
24787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24788      # Now convert it back to Unix-stile (cygpath)
24789      input_path=`$CYGPATH -u "$shortmode_path"`
24790      new_path="$input_path"
24791    fi
24792  fi
24793
24794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24795  if test "x$test_cygdrive_prefix" = x; then
24796    # As a simple fix, exclude /usr/bin since it's not a real path.
24797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24799      # a path prefixed by /cygdrive for fixpath to work.
24800      new_path="$CYGWIN_ROOT_PATH$input_path"
24801    fi
24802  fi
24803
24804
24805  if test "x$path" != "x$new_path"; then
24806    BOOT_JDK="$new_path"
24807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24809  fi
24810
24811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24812
24813  path="$BOOT_JDK"
24814  has_colon=`$ECHO $path | $GREP ^.:`
24815  new_path="$path"
24816  if test "x$has_colon" = x; then
24817    # Not in mixed or Windows style, start by that.
24818    new_path=`cmd //c echo $path`
24819  fi
24820
24821
24822  input_path="$new_path"
24823  # Check if we need to convert this using DOS-style short mode. If the path
24824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24825  # take no chances and rewrite it.
24826  # Note: m4 eats our [], so we need to use [ and ] instead.
24827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24828  if test "x$has_forbidden_chars" != x; then
24829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24831  fi
24832
24833
24834  windows_path="$new_path"
24835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24836    unix_path=`$CYGPATH -u "$windows_path"`
24837    new_path="$unix_path"
24838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24840    new_path="$unix_path"
24841  fi
24842
24843  if test "x$path" != "x$new_path"; then
24844    BOOT_JDK="$new_path"
24845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24847  fi
24848
24849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24851
24852  else
24853    # We're on a posix platform. Hooray! :)
24854    path="$BOOT_JDK"
24855    has_space=`$ECHO "$path" | $GREP " "`
24856    if test "x$has_space" != x; then
24857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24859      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24860    fi
24861
24862    # Use eval to expand a potential ~
24863    eval path="$path"
24864    if test ! -f "$path" && test ! -d "$path"; then
24865      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24866    fi
24867
24868    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24869  fi
24870
24871              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24872$as_echo_n "checking for Boot JDK... " >&6; }
24873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24874$as_echo "$BOOT_JDK" >&6; }
24875              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24876$as_echo_n "checking Boot JDK version... " >&6; }
24877              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24878              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24879$as_echo "$BOOT_JDK_VERSION" >&6; }
24880            fi # end check jdk version
24881          fi # end check rt.jar
24882        fi # end check javac
24883      fi # end check java
24884    fi # end check boot jdk found
24885  fi
24886
24887  fi
24888
24889
24890    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24891    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24892      # Do we have a bin/java?
24893      if test ! -x "$BOOT_JDK/bin/java"; then
24894        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24896        BOOT_JDK_FOUND=no
24897      else
24898        # Do we have a bin/javac?
24899        if test ! -x "$BOOT_JDK/bin/javac"; then
24900          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24902          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24903$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24904          BOOT_JDK_FOUND=no
24905        else
24906          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24907          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24910            BOOT_JDK_FOUND=no
24911          else
24912            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24913            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24914
24915            # Extra M4 quote needed to protect [] in grep expression.
24916            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24917            if test "x$FOUND_CORRECT_VERSION" = x; then
24918              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24920              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24921$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24922              BOOT_JDK_FOUND=no
24923            else
24924              # We're done! :-)
24925              BOOT_JDK_FOUND=yes
24926
24927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24928
24929  # Input might be given as Windows format, start by converting to
24930  # unix format.
24931  path="$BOOT_JDK"
24932  new_path=`$CYGPATH -u "$path"`
24933
24934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24937  # "foo.exe" is OK but "foo" is an error.
24938  #
24939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24940  # It is also a way to make sure we got the proper file name for the real test later on.
24941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24942  if test "x$test_shortpath" = x; then
24943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24946  fi
24947
24948  # Call helper function which possibly converts this using DOS-style short mode.
24949  # If so, the updated path is stored in $new_path.
24950
24951  input_path="$new_path"
24952  # Check if we need to convert this using DOS-style short mode. If the path
24953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954  # take no chances and rewrite it.
24955  # Note: m4 eats our [], so we need to use [ and ] instead.
24956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24957  if test "x$has_forbidden_chars" != x; then
24958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24962      # Going to short mode and back again did indeed matter. Since short mode is
24963      # case insensitive, let's make it lowercase to improve readability.
24964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24965      # Now convert it back to Unix-stile (cygpath)
24966      input_path=`$CYGPATH -u "$shortmode_path"`
24967      new_path="$input_path"
24968    fi
24969  fi
24970
24971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24972  if test "x$test_cygdrive_prefix" = x; then
24973    # As a simple fix, exclude /usr/bin since it's not a real path.
24974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24976      # a path prefixed by /cygdrive for fixpath to work.
24977      new_path="$CYGWIN_ROOT_PATH$input_path"
24978    fi
24979  fi
24980
24981
24982  if test "x$path" != "x$new_path"; then
24983    BOOT_JDK="$new_path"
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24986  fi
24987
24988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24989
24990  path="$BOOT_JDK"
24991  has_colon=`$ECHO $path | $GREP ^.:`
24992  new_path="$path"
24993  if test "x$has_colon" = x; then
24994    # Not in mixed or Windows style, start by that.
24995    new_path=`cmd //c echo $path`
24996  fi
24997
24998
24999  input_path="$new_path"
25000  # Check if we need to convert this using DOS-style short mode. If the path
25001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25002  # take no chances and rewrite it.
25003  # Note: m4 eats our [], so we need to use [ and ] instead.
25004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25005  if test "x$has_forbidden_chars" != x; then
25006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25008  fi
25009
25010
25011  windows_path="$new_path"
25012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013    unix_path=`$CYGPATH -u "$windows_path"`
25014    new_path="$unix_path"
25015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25017    new_path="$unix_path"
25018  fi
25019
25020  if test "x$path" != "x$new_path"; then
25021    BOOT_JDK="$new_path"
25022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25024  fi
25025
25026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25028
25029  else
25030    # We're on a posix platform. Hooray! :)
25031    path="$BOOT_JDK"
25032    has_space=`$ECHO "$path" | $GREP " "`
25033    if test "x$has_space" != x; then
25034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25036      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25037    fi
25038
25039    # Use eval to expand a potential ~
25040    eval path="$path"
25041    if test ! -f "$path" && test ! -d "$path"; then
25042      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25043    fi
25044
25045    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25046  fi
25047
25048              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25049$as_echo_n "checking for Boot JDK... " >&6; }
25050              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25051$as_echo "$BOOT_JDK" >&6; }
25052              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25053$as_echo_n "checking Boot JDK version... " >&6; }
25054              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25055              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25056$as_echo "$BOOT_JDK_VERSION" >&6; }
25057            fi # end check jdk version
25058          fi # end check rt.jar
25059        fi # end check javac
25060      fi # end check java
25061    fi # end check boot jdk found
25062  fi
25063
25064
25065  # If we haven't found anything yet, we've truly lost. Give up.
25066  if test "x$BOOT_JDK_FOUND" = xno; then
25067
25068  # Print a helpful message on how to acquire the necessary build dependency.
25069  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25070  MISSING_DEPENDENCY=openjdk
25071
25072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25073    cygwin_help $MISSING_DEPENDENCY
25074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25075    msys_help $MISSING_DEPENDENCY
25076  else
25077    PKGHANDLER_COMMAND=
25078
25079    case $PKGHANDLER in
25080      apt-get)
25081        apt_help     $MISSING_DEPENDENCY ;;
25082      yum)
25083        yum_help     $MISSING_DEPENDENCY ;;
25084      port)
25085        port_help    $MISSING_DEPENDENCY ;;
25086      pkgutil)
25087        pkgutil_help $MISSING_DEPENDENCY ;;
25088      pkgadd)
25089        pkgadd_help  $MISSING_DEPENDENCY ;;
25090    esac
25091
25092    if test "x$PKGHANDLER_COMMAND" != x; then
25093      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25094    fi
25095  fi
25096
25097    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25098$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25099    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25100$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25101    as_fn_error $? "Cannot continue" "$LINENO" 5
25102  fi
25103
25104  # Setup proper paths for what we found
25105  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25106  if test ! -f "$BOOT_RTJAR"; then
25107    # On MacOSX it is called classes.jar
25108    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25109    if test -f "$BOOT_RTJAR"; then
25110      # Remove the ..
25111      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25112    fi
25113  fi
25114  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25115  BOOT_JDK="$BOOT_JDK"
25116
25117
25118
25119
25120  # Setup tools from the Boot JDK.
25121
25122  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25123
25124  # Publish this variable in the help.
25125
25126
25127  if test "x$JAVA" = x; then
25128    # The variable is not set by user, try to locate tool using the code snippet
25129
25130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25131$as_echo_n "checking for java in Boot JDK... " >&6; }
25132      JAVA=$BOOT_JDK/bin/java
25133      if test ! -x $JAVA; then
25134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25135$as_echo "not found" >&6; }
25136        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25137$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25138        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25139      fi
25140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25141$as_echo "ok" >&6; }
25142
25143
25144  else
25145    # The variable is set, but is it from the command line or the environment?
25146
25147    # Try to remove the string !JAVA! from our list.
25148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25150      # If it failed, the variable was not from the command line. Ignore it,
25151      # but warn the user (except for BASH, which is always set by the calling BASH).
25152      if test "xJAVA" != xBASH; then
25153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25154$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25155      fi
25156      # Try to locate tool using the code snippet
25157
25158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25159$as_echo_n "checking for java in Boot JDK... " >&6; }
25160      JAVA=$BOOT_JDK/bin/java
25161      if test ! -x $JAVA; then
25162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25163$as_echo "not found" >&6; }
25164        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25165$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25166        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25167      fi
25168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25169$as_echo "ok" >&6; }
25170
25171
25172    else
25173      # If it succeeded, then it was overridden by the user. We will use it
25174      # for the tool.
25175
25176      # First remove it from the list of overridden variables, so we can test
25177      # for unknown variables in the end.
25178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25179
25180      # Check if the provided tool contains a complete path.
25181      tool_specified="$JAVA"
25182      tool_basename="${tool_specified##*/}"
25183      if test "x$tool_basename" = "x$tool_specified"; then
25184        # A command without a complete path is provided, search $PATH.
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25186$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25187        # Extract the first word of "$tool_basename", so it can be a program name with args.
25188set dummy $tool_basename; ac_word=$2
25189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25190$as_echo_n "checking for $ac_word... " >&6; }
25191if ${ac_cv_path_JAVA+:} false; then :
25192  $as_echo_n "(cached) " >&6
25193else
25194  case $JAVA in
25195  [\\/]* | ?:[\\/]*)
25196  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25197  ;;
25198  *)
25199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25200for as_dir in $PATH
25201do
25202  IFS=$as_save_IFS
25203  test -z "$as_dir" && as_dir=.
25204    for ac_exec_ext in '' $ac_executable_extensions; do
25205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25206    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25208    break 2
25209  fi
25210done
25211  done
25212IFS=$as_save_IFS
25213
25214  ;;
25215esac
25216fi
25217JAVA=$ac_cv_path_JAVA
25218if test -n "$JAVA"; then
25219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25220$as_echo "$JAVA" >&6; }
25221else
25222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25223$as_echo "no" >&6; }
25224fi
25225
25226
25227        if test "x$JAVA" = x; then
25228          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25229        fi
25230      else
25231        # Otherwise we believe it is a complete path. Use it as it is.
25232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25233$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25235$as_echo_n "checking for JAVA... " >&6; }
25236        if test ! -x "$tool_specified"; then
25237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25238$as_echo "not found" >&6; }
25239          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25240        fi
25241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25242$as_echo "$tool_specified" >&6; }
25243      fi
25244    fi
25245  fi
25246
25247
25248
25249  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25250
25251  # Publish this variable in the help.
25252
25253
25254  if test "x$JAVAC" = x; then
25255    # The variable is not set by user, try to locate tool using the code snippet
25256
25257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25258$as_echo_n "checking for javac in Boot JDK... " >&6; }
25259      JAVAC=$BOOT_JDK/bin/javac
25260      if test ! -x $JAVAC; then
25261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25262$as_echo "not found" >&6; }
25263        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25264$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25265        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25266      fi
25267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25268$as_echo "ok" >&6; }
25269
25270
25271  else
25272    # The variable is set, but is it from the command line or the environment?
25273
25274    # Try to remove the string !JAVAC! from our list.
25275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25277      # If it failed, the variable was not from the command line. Ignore it,
25278      # but warn the user (except for BASH, which is always set by the calling BASH).
25279      if test "xJAVAC" != xBASH; then
25280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25281$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25282      fi
25283      # Try to locate tool using the code snippet
25284
25285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25286$as_echo_n "checking for javac in Boot JDK... " >&6; }
25287      JAVAC=$BOOT_JDK/bin/javac
25288      if test ! -x $JAVAC; then
25289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25290$as_echo "not found" >&6; }
25291        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25292$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25293        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25294      fi
25295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25296$as_echo "ok" >&6; }
25297
25298
25299    else
25300      # If it succeeded, then it was overridden by the user. We will use it
25301      # for the tool.
25302
25303      # First remove it from the list of overridden variables, so we can test
25304      # for unknown variables in the end.
25305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25306
25307      # Check if the provided tool contains a complete path.
25308      tool_specified="$JAVAC"
25309      tool_basename="${tool_specified##*/}"
25310      if test "x$tool_basename" = "x$tool_specified"; then
25311        # A command without a complete path is provided, search $PATH.
25312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25313$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25314        # Extract the first word of "$tool_basename", so it can be a program name with args.
25315set dummy $tool_basename; ac_word=$2
25316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25317$as_echo_n "checking for $ac_word... " >&6; }
25318if ${ac_cv_path_JAVAC+:} false; then :
25319  $as_echo_n "(cached) " >&6
25320else
25321  case $JAVAC in
25322  [\\/]* | ?:[\\/]*)
25323  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25324  ;;
25325  *)
25326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25327for as_dir in $PATH
25328do
25329  IFS=$as_save_IFS
25330  test -z "$as_dir" && as_dir=.
25331    for ac_exec_ext in '' $ac_executable_extensions; do
25332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25333    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25335    break 2
25336  fi
25337done
25338  done
25339IFS=$as_save_IFS
25340
25341  ;;
25342esac
25343fi
25344JAVAC=$ac_cv_path_JAVAC
25345if test -n "$JAVAC"; then
25346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25347$as_echo "$JAVAC" >&6; }
25348else
25349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25350$as_echo "no" >&6; }
25351fi
25352
25353
25354        if test "x$JAVAC" = x; then
25355          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25356        fi
25357      else
25358        # Otherwise we believe it is a complete path. Use it as it is.
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25360$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25362$as_echo_n "checking for JAVAC... " >&6; }
25363        if test ! -x "$tool_specified"; then
25364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25365$as_echo "not found" >&6; }
25366          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25367        fi
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25369$as_echo "$tool_specified" >&6; }
25370      fi
25371    fi
25372  fi
25373
25374
25375
25376  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25377
25378  # Publish this variable in the help.
25379
25380
25381  if test "x$JAVAH" = x; then
25382    # The variable is not set by user, try to locate tool using the code snippet
25383
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25385$as_echo_n "checking for javah in Boot JDK... " >&6; }
25386      JAVAH=$BOOT_JDK/bin/javah
25387      if test ! -x $JAVAH; then
25388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25389$as_echo "not found" >&6; }
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25391$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25392        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25393      fi
25394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25395$as_echo "ok" >&6; }
25396
25397
25398  else
25399    # The variable is set, but is it from the command line or the environment?
25400
25401    # Try to remove the string !JAVAH! from our list.
25402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25404      # If it failed, the variable was not from the command line. Ignore it,
25405      # but warn the user (except for BASH, which is always set by the calling BASH).
25406      if test "xJAVAH" != xBASH; then
25407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25408$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25409      fi
25410      # Try to locate tool using the code snippet
25411
25412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25413$as_echo_n "checking for javah in Boot JDK... " >&6; }
25414      JAVAH=$BOOT_JDK/bin/javah
25415      if test ! -x $JAVAH; then
25416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25417$as_echo "not found" >&6; }
25418        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25419$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25420        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25421      fi
25422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25423$as_echo "ok" >&6; }
25424
25425
25426    else
25427      # If it succeeded, then it was overridden by the user. We will use it
25428      # for the tool.
25429
25430      # First remove it from the list of overridden variables, so we can test
25431      # for unknown variables in the end.
25432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25433
25434      # Check if the provided tool contains a complete path.
25435      tool_specified="$JAVAH"
25436      tool_basename="${tool_specified##*/}"
25437      if test "x$tool_basename" = "x$tool_specified"; then
25438        # A command without a complete path is provided, search $PATH.
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25440$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25441        # Extract the first word of "$tool_basename", so it can be a program name with args.
25442set dummy $tool_basename; ac_word=$2
25443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25444$as_echo_n "checking for $ac_word... " >&6; }
25445if ${ac_cv_path_JAVAH+:} false; then :
25446  $as_echo_n "(cached) " >&6
25447else
25448  case $JAVAH in
25449  [\\/]* | ?:[\\/]*)
25450  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25451  ;;
25452  *)
25453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25454for as_dir in $PATH
25455do
25456  IFS=$as_save_IFS
25457  test -z "$as_dir" && as_dir=.
25458    for ac_exec_ext in '' $ac_executable_extensions; do
25459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25460    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25462    break 2
25463  fi
25464done
25465  done
25466IFS=$as_save_IFS
25467
25468  ;;
25469esac
25470fi
25471JAVAH=$ac_cv_path_JAVAH
25472if test -n "$JAVAH"; then
25473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25474$as_echo "$JAVAH" >&6; }
25475else
25476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25477$as_echo "no" >&6; }
25478fi
25479
25480
25481        if test "x$JAVAH" = x; then
25482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25483        fi
25484      else
25485        # Otherwise we believe it is a complete path. Use it as it is.
25486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25487$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25489$as_echo_n "checking for JAVAH... " >&6; }
25490        if test ! -x "$tool_specified"; then
25491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25492$as_echo "not found" >&6; }
25493          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25494        fi
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25496$as_echo "$tool_specified" >&6; }
25497      fi
25498    fi
25499  fi
25500
25501
25502
25503  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25504
25505  # Publish this variable in the help.
25506
25507
25508  if test "x$JAR" = x; then
25509    # The variable is not set by user, try to locate tool using the code snippet
25510
25511      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25512$as_echo_n "checking for jar in Boot JDK... " >&6; }
25513      JAR=$BOOT_JDK/bin/jar
25514      if test ! -x $JAR; then
25515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25516$as_echo "not found" >&6; }
25517        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25518$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25519        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25520      fi
25521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25522$as_echo "ok" >&6; }
25523
25524
25525  else
25526    # The variable is set, but is it from the command line or the environment?
25527
25528    # Try to remove the string !JAR! from our list.
25529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25531      # If it failed, the variable was not from the command line. Ignore it,
25532      # but warn the user (except for BASH, which is always set by the calling BASH).
25533      if test "xJAR" != xBASH; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25535$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25536      fi
25537      # Try to locate tool using the code snippet
25538
25539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25540$as_echo_n "checking for jar in Boot JDK... " >&6; }
25541      JAR=$BOOT_JDK/bin/jar
25542      if test ! -x $JAR; then
25543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25544$as_echo "not found" >&6; }
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25546$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25547        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25548      fi
25549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25550$as_echo "ok" >&6; }
25551
25552
25553    else
25554      # If it succeeded, then it was overridden by the user. We will use it
25555      # for the tool.
25556
25557      # First remove it from the list of overridden variables, so we can test
25558      # for unknown variables in the end.
25559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25560
25561      # Check if the provided tool contains a complete path.
25562      tool_specified="$JAR"
25563      tool_basename="${tool_specified##*/}"
25564      if test "x$tool_basename" = "x$tool_specified"; then
25565        # A command without a complete path is provided, search $PATH.
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25567$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25568        # Extract the first word of "$tool_basename", so it can be a program name with args.
25569set dummy $tool_basename; ac_word=$2
25570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25571$as_echo_n "checking for $ac_word... " >&6; }
25572if ${ac_cv_path_JAR+:} false; then :
25573  $as_echo_n "(cached) " >&6
25574else
25575  case $JAR in
25576  [\\/]* | ?:[\\/]*)
25577  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25578  ;;
25579  *)
25580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25581for as_dir in $PATH
25582do
25583  IFS=$as_save_IFS
25584  test -z "$as_dir" && as_dir=.
25585    for ac_exec_ext in '' $ac_executable_extensions; do
25586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25587    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25589    break 2
25590  fi
25591done
25592  done
25593IFS=$as_save_IFS
25594
25595  ;;
25596esac
25597fi
25598JAR=$ac_cv_path_JAR
25599if test -n "$JAR"; then
25600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25601$as_echo "$JAR" >&6; }
25602else
25603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25604$as_echo "no" >&6; }
25605fi
25606
25607
25608        if test "x$JAR" = x; then
25609          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25610        fi
25611      else
25612        # Otherwise we believe it is a complete path. Use it as it is.
25613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25614$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25616$as_echo_n "checking for JAR... " >&6; }
25617        if test ! -x "$tool_specified"; then
25618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25619$as_echo "not found" >&6; }
25620          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25621        fi
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25623$as_echo "$tool_specified" >&6; }
25624      fi
25625    fi
25626  fi
25627
25628
25629
25630  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25631
25632  # Publish this variable in the help.
25633
25634
25635  if test "x$NATIVE2ASCII" = x; then
25636    # The variable is not set by user, try to locate tool using the code snippet
25637
25638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25639$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25640      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25641      if test ! -x $NATIVE2ASCII; then
25642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25643$as_echo "not found" >&6; }
25644        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25645$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25646        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25647      fi
25648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25649$as_echo "ok" >&6; }
25650
25651
25652  else
25653    # The variable is set, but is it from the command line or the environment?
25654
25655    # Try to remove the string !NATIVE2ASCII! from our list.
25656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25658      # If it failed, the variable was not from the command line. Ignore it,
25659      # but warn the user (except for BASH, which is always set by the calling BASH).
25660      if test "xNATIVE2ASCII" != xBASH; then
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25662$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25663      fi
25664      # Try to locate tool using the code snippet
25665
25666      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25667$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25668      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25669      if test ! -x $NATIVE2ASCII; then
25670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25671$as_echo "not found" >&6; }
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25673$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25674        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25675      fi
25676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25677$as_echo "ok" >&6; }
25678
25679
25680    else
25681      # If it succeeded, then it was overridden by the user. We will use it
25682      # for the tool.
25683
25684      # First remove it from the list of overridden variables, so we can test
25685      # for unknown variables in the end.
25686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25687
25688      # Check if the provided tool contains a complete path.
25689      tool_specified="$NATIVE2ASCII"
25690      tool_basename="${tool_specified##*/}"
25691      if test "x$tool_basename" = "x$tool_specified"; then
25692        # A command without a complete path is provided, search $PATH.
25693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25694$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25695        # Extract the first word of "$tool_basename", so it can be a program name with args.
25696set dummy $tool_basename; ac_word=$2
25697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25698$as_echo_n "checking for $ac_word... " >&6; }
25699if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25700  $as_echo_n "(cached) " >&6
25701else
25702  case $NATIVE2ASCII in
25703  [\\/]* | ?:[\\/]*)
25704  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25705  ;;
25706  *)
25707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25708for as_dir in $PATH
25709do
25710  IFS=$as_save_IFS
25711  test -z "$as_dir" && as_dir=.
25712    for ac_exec_ext in '' $ac_executable_extensions; do
25713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25714    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25716    break 2
25717  fi
25718done
25719  done
25720IFS=$as_save_IFS
25721
25722  ;;
25723esac
25724fi
25725NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25726if test -n "$NATIVE2ASCII"; then
25727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25728$as_echo "$NATIVE2ASCII" >&6; }
25729else
25730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25731$as_echo "no" >&6; }
25732fi
25733
25734
25735        if test "x$NATIVE2ASCII" = x; then
25736          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25737        fi
25738      else
25739        # Otherwise we believe it is a complete path. Use it as it is.
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25741$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25743$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25744        if test ! -x "$tool_specified"; then
25745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25746$as_echo "not found" >&6; }
25747          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25748        fi
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25750$as_echo "$tool_specified" >&6; }
25751      fi
25752    fi
25753  fi
25754
25755
25756
25757  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25758
25759  # Publish this variable in the help.
25760
25761
25762  if test "x$JARSIGNER" = x; then
25763    # The variable is not set by user, try to locate tool using the code snippet
25764
25765      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25766$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25767      JARSIGNER=$BOOT_JDK/bin/jarsigner
25768      if test ! -x $JARSIGNER; then
25769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25770$as_echo "not found" >&6; }
25771        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25772$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25773        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25774      fi
25775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25776$as_echo "ok" >&6; }
25777
25778
25779  else
25780    # The variable is set, but is it from the command line or the environment?
25781
25782    # Try to remove the string !JARSIGNER! from our list.
25783    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25784    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25785      # If it failed, the variable was not from the command line. Ignore it,
25786      # but warn the user (except for BASH, which is always set by the calling BASH).
25787      if test "xJARSIGNER" != xBASH; then
25788        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25789$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25790      fi
25791      # Try to locate tool using the code snippet
25792
25793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25794$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25795      JARSIGNER=$BOOT_JDK/bin/jarsigner
25796      if test ! -x $JARSIGNER; then
25797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25798$as_echo "not found" >&6; }
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25800$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25801        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25802      fi
25803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25804$as_echo "ok" >&6; }
25805
25806
25807    else
25808      # If it succeeded, then it was overridden by the user. We will use it
25809      # for the tool.
25810
25811      # First remove it from the list of overridden variables, so we can test
25812      # for unknown variables in the end.
25813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25814
25815      # Check if the provided tool contains a complete path.
25816      tool_specified="$JARSIGNER"
25817      tool_basename="${tool_specified##*/}"
25818      if test "x$tool_basename" = "x$tool_specified"; then
25819        # A command without a complete path is provided, search $PATH.
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25821$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25822        # Extract the first word of "$tool_basename", so it can be a program name with args.
25823set dummy $tool_basename; ac_word=$2
25824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25825$as_echo_n "checking for $ac_word... " >&6; }
25826if ${ac_cv_path_JARSIGNER+:} false; then :
25827  $as_echo_n "(cached) " >&6
25828else
25829  case $JARSIGNER in
25830  [\\/]* | ?:[\\/]*)
25831  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25832  ;;
25833  *)
25834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25835for as_dir in $PATH
25836do
25837  IFS=$as_save_IFS
25838  test -z "$as_dir" && as_dir=.
25839    for ac_exec_ext in '' $ac_executable_extensions; do
25840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25841    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25843    break 2
25844  fi
25845done
25846  done
25847IFS=$as_save_IFS
25848
25849  ;;
25850esac
25851fi
25852JARSIGNER=$ac_cv_path_JARSIGNER
25853if test -n "$JARSIGNER"; then
25854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25855$as_echo "$JARSIGNER" >&6; }
25856else
25857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25858$as_echo "no" >&6; }
25859fi
25860
25861
25862        if test "x$JARSIGNER" = x; then
25863          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25864        fi
25865      else
25866        # Otherwise we believe it is a complete path. Use it as it is.
25867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25868$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25870$as_echo_n "checking for JARSIGNER... " >&6; }
25871        if test ! -x "$tool_specified"; then
25872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25873$as_echo "not found" >&6; }
25874          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25875        fi
25876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25877$as_echo "$tool_specified" >&6; }
25878      fi
25879    fi
25880  fi
25881
25882
25883
25884  # Finally, set some other options...
25885
25886  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25887  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25888
25889
25890
25891
25892  ##############################################################################
25893  #
25894  # Specify jvm options for anything that is run with the Boot JDK.
25895  # Not all JVM:s accept the same arguments on the command line.
25896  #
25897
25898# Check whether --with-boot-jdk-jvmargs was given.
25899if test "${with_boot_jdk_jvmargs+set}" = set; then :
25900  withval=$with_boot_jdk_jvmargs;
25901fi
25902
25903
25904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
25905$as_echo_n "checking flags for boot jdk java command ... " >&6; }
25906
25907  # Disable special log output when a debug build is used as Boot JDK...
25908
25909  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25910  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25911  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25912  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25913  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25914  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25915    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25916    JVM_ARG_OK=true
25917  else
25918    $ECHO "Arg failed:" >&5
25919    $ECHO "$OUTPUT" >&5
25920    JVM_ARG_OK=false
25921  fi
25922
25923
25924  # Apply user provided options.
25925
25926  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
25927  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
25928  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
25929  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25930  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25931  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25932    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
25933    JVM_ARG_OK=true
25934  else
25935    $ECHO "Arg failed:" >&5
25936    $ECHO "$OUTPUT" >&5
25937    JVM_ARG_OK=false
25938  fi
25939
25940
25941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
25942$as_echo "$boot_jdk_jvmargs" >&6; }
25943
25944  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
25945  JAVA_FLAGS=$boot_jdk_jvmargs
25946
25947
25948
25949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
25950$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
25951
25952  # Starting amount of heap memory.
25953
25954  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25955  $ECHO "Command: $JAVA -Xms64M -version" >&5
25956  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25957  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25958  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25959  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25960    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
25961    JVM_ARG_OK=true
25962  else
25963    $ECHO "Arg failed:" >&5
25964    $ECHO "$OUTPUT" >&5
25965    JVM_ARG_OK=false
25966  fi
25967
25968
25969  # Maximum amount of heap memory.
25970  # Maximum stack size.
25971  if test "x$BUILD_NUM_BITS" = x32; then
25972    JVM_MAX_HEAP=1100M
25973    STACK_SIZE=768
25974  else
25975    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
25976    # pointers are used. Apparently, we need to increase the heap and stack
25977    # space for the jvm. More specifically, when running javac to build huge
25978    # jdk batch
25979    JVM_MAX_HEAP=1600M
25980    STACK_SIZE=1536
25981  fi
25982
25983  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
25984  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
25985  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25986  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25987  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25988  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25989    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
25990    JVM_ARG_OK=true
25991  else
25992    $ECHO "Arg failed:" >&5
25993    $ECHO "$OUTPUT" >&5
25994    JVM_ARG_OK=false
25995  fi
25996
25997
25998  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25999  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26000  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26001  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26002  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26003  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26004    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26005    JVM_ARG_OK=true
26006  else
26007    $ECHO "Arg failed:" >&5
26008    $ECHO "$OUTPUT" >&5
26009    JVM_ARG_OK=false
26010  fi
26011
26012
26013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26014$as_echo "$boot_jdk_jvmargs_big" >&6; }
26015
26016  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26017
26018
26019
26020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26021$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26022
26023  # Use serial gc for small short lived tools if possible
26024
26025  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26026  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26027  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26028  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26029  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26030  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26031    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26032    JVM_ARG_OK=true
26033  else
26034    $ECHO "Arg failed:" >&5
26035    $ECHO "$OUTPUT" >&5
26036    JVM_ARG_OK=false
26037  fi
26038
26039
26040  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26041  $ECHO "Command: $JAVA -Xms32M -version" >&5
26042  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26043  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26044  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26046    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26047    JVM_ARG_OK=true
26048  else
26049    $ECHO "Arg failed:" >&5
26050    $ECHO "$OUTPUT" >&5
26051    JVM_ARG_OK=false
26052  fi
26053
26054
26055  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26056  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26057  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26058  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26059  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26060  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26061    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26062    JVM_ARG_OK=true
26063  else
26064    $ECHO "Arg failed:" >&5
26065    $ECHO "$OUTPUT" >&5
26066    JVM_ARG_OK=false
26067  fi
26068
26069
26070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26071$as_echo "$boot_jdk_jvmargs_small" >&6; }
26072
26073  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26074
26075
26076
26077###############################################################################
26078#
26079# Configure the sources to use. We can add or override individual directories.
26080#
26081###############################################################################
26082
26083
26084  # Where are the sources. Any of these can be overridden
26085  # using --with-override-corba and the likes.
26086  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26087  CORBA_TOPDIR="$SRC_ROOT/corba"
26088  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26089  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26090  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26091  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26092  JDK_TOPDIR="$SRC_ROOT/jdk"
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103  ###############################################################################
26104  #
26105  # Pickup additional source for a component from outside of the source root
26106  # or override source for a component.
26107  #
26108
26109# Check whether --with-add-source-root was given.
26110if test "${with_add_source_root+set}" = set; then :
26111  withval=$with_add_source_root;
26112fi
26113
26114
26115
26116# Check whether --with-override-source-root was given.
26117if test "${with_override_source_root+set}" = set; then :
26118  withval=$with_override_source_root;
26119fi
26120
26121
26122
26123# Check whether --with-adds-and-overrides was given.
26124if test "${with_adds_and_overrides+set}" = set; then :
26125  withval=$with_adds_and_overrides;
26126fi
26127
26128
26129  if test "x$with_adds_and_overrides" != x; then
26130    with_add_source_root="$with_adds_and_overrides/adds"
26131    with_override_source_root="$with_adds_and_overrides/overrides"
26132  fi
26133
26134  if test "x$with_add_source_root" != x; then
26135    if ! test -d $with_add_source_root; then
26136      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26137    fi
26138    CURDIR="$PWD"
26139    cd "$with_add_source_root"
26140    ADD_SRC_ROOT="`pwd`"
26141    cd "$CURDIR"
26142    # Verify that the addon source root does not have any root makefiles.
26143    # If it does, then it is usually an error, prevent this.
26144    if test -f $with_add_source_root/langtools/make/Makefile; then
26145      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
26146    fi
26147    if test -f $with_add_source_root/corba/make/Makefile; then
26148      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
26149    fi
26150    if test -f $with_add_source_root/jaxp/make/Makefile; then
26151      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
26152    fi
26153    if test -f $with_add_source_root/jaxws/make/Makefile; then
26154      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
26155    fi
26156    if test -f $with_add_source_root/hotspot/make/Makefile; then
26157      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
26158    fi
26159    if test -f $with_add_source_root/nashorn/make/Makefile; then
26160      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
26161    fi
26162    if test -f $with_add_source_root/jdk/make/Makefile; then
26163      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
26164    fi
26165  fi
26166
26167
26168  if test "x$with_override_source_root" != x; then
26169    if ! test -d $with_override_source_root; then
26170      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26171    fi
26172    CURDIR="$PWD"
26173    cd "$with_override_source_root"
26174    OVERRIDE_SRC_ROOT="`pwd`"
26175    cd "$CURDIR"
26176    if test -f $with_override_source_root/langtools/make/Makefile; then
26177      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
26178    fi
26179    if test -f $with_override_source_root/corba/make/Makefile; then
26180      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
26181    fi
26182    if test -f $with_override_source_root/jaxp/make/Makefile; then
26183      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
26184    fi
26185    if test -f $with_override_source_root/jaxws/make/Makefile; then
26186      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
26187    fi
26188    if test -f $with_override_source_root/hotspot/make/Makefile; then
26189      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
26190    fi
26191    if test -f $with_override_source_root/nashorn/make/Makefile; then
26192      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
26193    fi
26194    if test -f $with_override_source_root/jdk/make/Makefile; then
26195      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
26196    fi
26197  fi
26198
26199
26200  ###############################################################################
26201  #
26202  # Override a repo completely, this is used for example when you have 3 small
26203  # development sandboxes of the langtools sources and want to avoid having 3 full
26204  # OpenJDK sources checked out on disk.
26205  #
26206  # Assuming that the 3 langtools sandboxes are located here:
26207  # /home/fredrik/sandbox1/langtools
26208  # /home/fredrik/sandbox2/langtools
26209  # /home/fredrik/sandbox3/langtools
26210  #
26211  # From the source root you create build subdirs manually:
26212  #     mkdir -p build1 build2 build3
26213  # in each build directory run:
26214  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26215  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26216  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26217  #
26218
26219
26220# Check whether --with-override-langtools was given.
26221if test "${with_override_langtools+set}" = set; then :
26222  withval=$with_override_langtools;
26223fi
26224
26225
26226
26227# Check whether --with-override-corba was given.
26228if test "${with_override_corba+set}" = set; then :
26229  withval=$with_override_corba;
26230fi
26231
26232
26233
26234# Check whether --with-override-jaxp was given.
26235if test "${with_override_jaxp+set}" = set; then :
26236  withval=$with_override_jaxp;
26237fi
26238
26239
26240
26241# Check whether --with-override-jaxws was given.
26242if test "${with_override_jaxws+set}" = set; then :
26243  withval=$with_override_jaxws;
26244fi
26245
26246
26247
26248# Check whether --with-override-hotspot was given.
26249if test "${with_override_hotspot+set}" = set; then :
26250  withval=$with_override_hotspot;
26251fi
26252
26253
26254
26255# Check whether --with-override-nashorn was given.
26256if test "${with_override_nashorn+set}" = set; then :
26257  withval=$with_override_nashorn;
26258fi
26259
26260
26261
26262# Check whether --with-override-jdk was given.
26263if test "${with_override_jdk+set}" = set; then :
26264  withval=$with_override_jdk;
26265fi
26266
26267
26268  if test "x$with_override_langtools" != x; then
26269    CURDIR="$PWD"
26270    cd "$with_override_langtools"
26271    LANGTOOLS_TOPDIR="`pwd`"
26272    cd "$CURDIR"
26273    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26274      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26275    fi
26276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26277$as_echo_n "checking if langtools should be overridden... " >&6; }
26278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26279$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26280  fi
26281  if test "x$with_override_corba" != x; then
26282    CURDIR="$PWD"
26283    cd "$with_override_corba"
26284    CORBA_TOPDIR="`pwd`"
26285    cd "$CURDIR"
26286    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26287      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26288    fi
26289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26290$as_echo_n "checking if corba should be overridden... " >&6; }
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26292$as_echo "yes with $CORBA_TOPDIR" >&6; }
26293  fi
26294  if test "x$with_override_jaxp" != x; then
26295    CURDIR="$PWD"
26296    cd "$with_override_jaxp"
26297    JAXP_TOPDIR="`pwd`"
26298    cd "$CURDIR"
26299    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26300      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26301    fi
26302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26303$as_echo_n "checking if jaxp should be overridden... " >&6; }
26304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26305$as_echo "yes with $JAXP_TOPDIR" >&6; }
26306  fi
26307  if test "x$with_override_jaxws" != x; then
26308    CURDIR="$PWD"
26309    cd "$with_override_jaxws"
26310    JAXWS_TOPDIR="`pwd`"
26311    cd "$CURDIR"
26312    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26313      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26314    fi
26315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26316$as_echo_n "checking if jaxws should be overridden... " >&6; }
26317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26318$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26319  fi
26320  if test "x$with_override_hotspot" != x; then
26321    CURDIR="$PWD"
26322    cd "$with_override_hotspot"
26323    HOTSPOT_TOPDIR="`pwd`"
26324    cd "$CURDIR"
26325    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26326      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26327    fi
26328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26329$as_echo_n "checking if hotspot should be overridden... " >&6; }
26330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26331$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26332  fi
26333  if test "x$with_override_nashorn" != x; then
26334    CURDIR="$PWD"
26335    cd "$with_override_nashorn"
26336    NASHORN_TOPDIR="`pwd`"
26337    cd "$CURDIR"
26338    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26339      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26340    fi
26341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26342$as_echo_n "checking if nashorn should be overridden... " >&6; }
26343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26344$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26345  fi
26346  if test "x$with_override_jdk" != x; then
26347    CURDIR="$PWD"
26348    cd "$with_override_jdk"
26349    JDK_TOPDIR="`pwd`"
26350    cd "$CURDIR"
26351    if ! test -f $JDK_TOPDIR/make/Makefile; then
26352      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26353    fi
26354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26355$as_echo_n "checking if JDK should be overridden... " >&6; }
26356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26357$as_echo "yes with $JDK_TOPDIR" >&6; }
26358  fi
26359
26360
26361  BUILD_OUTPUT="$OUTPUT_ROOT"
26362
26363
26364  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26365  BUILD_HOTSPOT=true
26366
26367
26368
26369# Check whether --with-import-hotspot was given.
26370if test "${with_import_hotspot+set}" = set; then :
26371  withval=$with_import_hotspot;
26372fi
26373
26374  if test "x$with_import_hotspot" != x; then
26375    CURDIR="$PWD"
26376    cd "$with_import_hotspot"
26377    HOTSPOT_DIST="`pwd`"
26378    cd "$CURDIR"
26379    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26380      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26381    fi
26382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26383$as_echo_n "checking if hotspot should be imported... " >&6; }
26384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26385$as_echo "yes from $HOTSPOT_DIST" >&6; }
26386    BUILD_HOTSPOT=false
26387  fi
26388
26389  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26390
26391
26392###############################################################################
26393#
26394# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26395# native code.
26396#
26397###############################################################################
26398
26399# First determine the toolchain type (compiler family)
26400
26401
26402# Check whether --with-toolchain-type was given.
26403if test "${with_toolchain_type+set}" = set; then :
26404  withval=$with_toolchain_type;
26405fi
26406
26407
26408  # Use indirect variable referencing
26409  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26410  VALID_TOOLCHAINS=${!toolchain_var_name}
26411
26412  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26413    # On Mac OS X, default toolchain to clang after Xcode 5
26414    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26415    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26416    if test $? -ne 0; then
26417      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26418    fi
26419    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26420        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26421        $CUT -f 1 -d .`
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26423$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26424    if test $XCODE_MAJOR_VERSION -ge 5; then
26425        DEFAULT_TOOLCHAIN="clang"
26426    else
26427        DEFAULT_TOOLCHAIN="gcc"
26428    fi
26429  else
26430    # First toolchain type in the list is the default
26431    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26432  fi
26433
26434  if test "x$with_toolchain_type" = xlist; then
26435    # List all toolchains
26436    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26437$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26438    for toolchain in $VALID_TOOLCHAINS; do
26439      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26440      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26441      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26442    done
26443
26444    exit 0
26445  elif test "x$with_toolchain_type" != x; then
26446    # User override; check that it is valid
26447    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26448      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26449$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26450      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26451$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26452      as_fn_error $? "Cannot continue." "$LINENO" 5
26453    fi
26454    TOOLCHAIN_TYPE=$with_toolchain_type
26455  else
26456    # No flag given, use default
26457    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26458  fi
26459
26460
26461  TOOLCHAIN_CC_BINARY_clang="clang"
26462  TOOLCHAIN_CC_BINARY_gcc="gcc"
26463  TOOLCHAIN_CC_BINARY_microsoft="cl"
26464  TOOLCHAIN_CC_BINARY_solstudio="cc"
26465  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26466
26467  TOOLCHAIN_CXX_BINARY_clang="clang++"
26468  TOOLCHAIN_CXX_BINARY_gcc="g++"
26469  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26470  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26471  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26472
26473  # Use indirect variable referencing
26474  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26475  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26476  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26477  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26478  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26479  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26480
26481
26482  # Define filename patterns
26483  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26484    LIBRARY_PREFIX=
26485    SHARED_LIBRARY_SUFFIX='.dll'
26486    STATIC_LIBRARY_SUFFIX='.lib'
26487    SHARED_LIBRARY='$1.dll'
26488    STATIC_LIBRARY='$1.lib'
26489    OBJ_SUFFIX='.obj'
26490    EXE_SUFFIX='.exe'
26491  else
26492    LIBRARY_PREFIX=lib
26493    SHARED_LIBRARY_SUFFIX='.so'
26494    STATIC_LIBRARY_SUFFIX='.a'
26495    SHARED_LIBRARY='lib$1.so'
26496    STATIC_LIBRARY='lib$1.a'
26497    OBJ_SUFFIX='.o'
26498    EXE_SUFFIX=''
26499    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26500      SHARED_LIBRARY='lib$1.dylib'
26501      SHARED_LIBRARY_SUFFIX='.dylib'
26502    fi
26503  fi
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26515    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26516$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26517  else
26518    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26519$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26520  fi
26521
26522
26523# Then detect the actual binaries needed
26524
26525  # FIXME: Is this needed?
26526  ac_ext=cpp
26527ac_cpp='$CXXCPP $CPPFLAGS'
26528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26531
26532
26533  # Store the CFLAGS etc passed to the configure script.
26534  ORG_CFLAGS="$CFLAGS"
26535  ORG_CXXFLAGS="$CXXFLAGS"
26536  ORG_OBJCFLAGS="$OBJCFLAGS"
26537
26538  # On Windows, we need to detect the visual studio installation first.
26539  # This will change the PATH, but we need to keep that new PATH even
26540  # after toolchain detection is done, since the compiler (on x86) uses
26541  # it for DLL resolution in runtime.
26542  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26543
26544  # Store path to cygwin link.exe to help excluding it when searching for
26545  # VS linker. This must be done before changing the PATH when looking for VS.
26546  # Extract the first word of "link", so it can be a program name with args.
26547set dummy link; ac_word=$2
26548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26549$as_echo_n "checking for $ac_word... " >&6; }
26550if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26551  $as_echo_n "(cached) " >&6
26552else
26553  case $CYGWIN_LINK in
26554  [\\/]* | ?:[\\/]*)
26555  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26556  ;;
26557  *)
26558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26559for as_dir in $PATH
26560do
26561  IFS=$as_save_IFS
26562  test -z "$as_dir" && as_dir=.
26563    for ac_exec_ext in '' $ac_executable_extensions; do
26564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26565    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26567    break 2
26568  fi
26569done
26570  done
26571IFS=$as_save_IFS
26572
26573  ;;
26574esac
26575fi
26576CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26577if test -n "$CYGWIN_LINK"; then
26578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26579$as_echo "$CYGWIN_LINK" >&6; }
26580else
26581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26582$as_echo "no" >&6; }
26583fi
26584
26585
26586  if test "x$CYGWIN_LINK" != x; then
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26588$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26589    "$CYGWIN_LINK" --version > /dev/null
26590    if test $? -eq 0 ; then
26591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26592$as_echo "yes" >&6; }
26593    else
26594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26595$as_echo "no" >&6; }
26596      # This might be the VS linker. Don't exclude it later on.
26597      CYGWIN_LINK=""
26598    fi
26599  fi
26600
26601  # First-hand choice is to locate and run the vsvars bat file.
26602
26603  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26604    VCVARSFILE="vc/bin/vcvars32.bat"
26605  else
26606    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26607  fi
26608
26609  VS_ENV_CMD=""
26610  VS_ENV_ARGS=""
26611  if test "x$with_toolsdir" != x; then
26612
26613  if test "x$VS_ENV_CMD" = x; then
26614    VS100BASE="$with_toolsdir/../.."
26615    METHOD="--with-tools-dir"
26616
26617  windows_path="$VS100BASE"
26618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619    unix_path=`$CYGPATH -u "$windows_path"`
26620    VS100BASE="$unix_path"
26621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26623    VS100BASE="$unix_path"
26624  fi
26625
26626    if test -d "$VS100BASE"; then
26627      if test -f "$VS100BASE/$VCVARSFILE"; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26629$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26630        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26631      else
26632        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26633$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26634        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26635$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26636      fi
26637    fi
26638  fi
26639
26640  fi
26641
26642  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26643    # Having specified an argument which is incorrect will produce an instant failure;
26644    # we should not go on looking
26645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26646$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26647    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26648$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26649    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26650  fi
26651
26652  if test "x$VS100COMNTOOLS" != x; then
26653
26654  if test "x$VS_ENV_CMD" = x; then
26655    VS100BASE="$VS100COMNTOOLS/../.."
26656    METHOD="VS100COMNTOOLS variable"
26657
26658  windows_path="$VS100BASE"
26659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26660    unix_path=`$CYGPATH -u "$windows_path"`
26661    VS100BASE="$unix_path"
26662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26664    VS100BASE="$unix_path"
26665  fi
26666
26667    if test -d "$VS100BASE"; then
26668      if test -f "$VS100BASE/$VCVARSFILE"; then
26669        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26670$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26671        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26672      else
26673        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26674$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26675        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26676$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26677      fi
26678    fi
26679  fi
26680
26681  fi
26682  if test "x$PROGRAMFILES" != x; then
26683
26684  if test "x$VS_ENV_CMD" = x; then
26685    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26686    METHOD="well-known name"
26687
26688  windows_path="$VS100BASE"
26689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26690    unix_path=`$CYGPATH -u "$windows_path"`
26691    VS100BASE="$unix_path"
26692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26694    VS100BASE="$unix_path"
26695  fi
26696
26697    if test -d "$VS100BASE"; then
26698      if test -f "$VS100BASE/$VCVARSFILE"; then
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26700$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26701        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26702      else
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26704$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26706$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26707      fi
26708    fi
26709  fi
26710
26711  fi
26712
26713  if test "x$VS_ENV_CMD" = x; then
26714    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26715    METHOD="well-known name"
26716
26717  windows_path="$VS100BASE"
26718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26719    unix_path=`$CYGPATH -u "$windows_path"`
26720    VS100BASE="$unix_path"
26721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26723    VS100BASE="$unix_path"
26724  fi
26725
26726    if test -d "$VS100BASE"; then
26727      if test -f "$VS100BASE/$VCVARSFILE"; then
26728        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26729$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26730        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26731      else
26732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26733$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26734        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26735$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26736      fi
26737    fi
26738  fi
26739
26740
26741  if test "x$VS_ENV_CMD" = x; then
26742    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26743    METHOD="well-known name"
26744
26745  windows_path="$VS100BASE"
26746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26747    unix_path=`$CYGPATH -u "$windows_path"`
26748    VS100BASE="$unix_path"
26749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26751    VS100BASE="$unix_path"
26752  fi
26753
26754    if test -d "$VS100BASE"; then
26755      if test -f "$VS100BASE/$VCVARSFILE"; then
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26757$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26758        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26759      else
26760        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26761$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26762        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26763$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26764      fi
26765    fi
26766  fi
26767
26768
26769  if test "x$ProgramW6432" != x; then
26770
26771  if test "x$VS_ENV_CMD" = x; then
26772    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26773    METHOD="well-known name"
26774
26775  windows_path="$WIN_SDK_BASE"
26776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777    unix_path=`$CYGPATH -u "$windows_path"`
26778    WIN_SDK_BASE="$unix_path"
26779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26781    WIN_SDK_BASE="$unix_path"
26782  fi
26783
26784    if test -d "$WIN_SDK_BASE"; then
26785      # There have been cases of partial or broken SDK installations. A missing
26786      # lib dir is not going to work.
26787      if test ! -d "$WIN_SDK_BASE/../lib"; then
26788        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26789$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26790        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26791$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26792      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26793        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26794$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26795        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26796        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26797          VS_ENV_ARGS="/x86"
26798        else
26799          VS_ENV_ARGS="/x64"
26800        fi
26801      else
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26803$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26805$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26806      fi
26807    fi
26808  fi
26809
26810  fi
26811  if test "x$PROGRAMW6432" != x; then
26812
26813  if test "x$VS_ENV_CMD" = x; then
26814    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26815    METHOD="well-known name"
26816
26817  windows_path="$WIN_SDK_BASE"
26818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26819    unix_path=`$CYGPATH -u "$windows_path"`
26820    WIN_SDK_BASE="$unix_path"
26821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26823    WIN_SDK_BASE="$unix_path"
26824  fi
26825
26826    if test -d "$WIN_SDK_BASE"; then
26827      # There have been cases of partial or broken SDK installations. A missing
26828      # lib dir is not going to work.
26829      if test ! -d "$WIN_SDK_BASE/../lib"; then
26830        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26831$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26832        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26833$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26834      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26836$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26837        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26838        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26839          VS_ENV_ARGS="/x86"
26840        else
26841          VS_ENV_ARGS="/x64"
26842        fi
26843      else
26844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26845$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26846        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26847$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26848      fi
26849    fi
26850  fi
26851
26852  fi
26853  if test "x$PROGRAMFILES" != x; then
26854
26855  if test "x$VS_ENV_CMD" = x; then
26856    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26857    METHOD="well-known name"
26858
26859  windows_path="$WIN_SDK_BASE"
26860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26861    unix_path=`$CYGPATH -u "$windows_path"`
26862    WIN_SDK_BASE="$unix_path"
26863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26865    WIN_SDK_BASE="$unix_path"
26866  fi
26867
26868    if test -d "$WIN_SDK_BASE"; then
26869      # There have been cases of partial or broken SDK installations. A missing
26870      # lib dir is not going to work.
26871      if test ! -d "$WIN_SDK_BASE/../lib"; then
26872        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26873$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26875$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26876      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26878$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26879        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26880        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26881          VS_ENV_ARGS="/x86"
26882        else
26883          VS_ENV_ARGS="/x64"
26884        fi
26885      else
26886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26887$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26889$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26890      fi
26891    fi
26892  fi
26893
26894  fi
26895
26896  if test "x$VS_ENV_CMD" = x; then
26897    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26898    METHOD="well-known name"
26899
26900  windows_path="$WIN_SDK_BASE"
26901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26902    unix_path=`$CYGPATH -u "$windows_path"`
26903    WIN_SDK_BASE="$unix_path"
26904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26906    WIN_SDK_BASE="$unix_path"
26907  fi
26908
26909    if test -d "$WIN_SDK_BASE"; then
26910      # There have been cases of partial or broken SDK installations. A missing
26911      # lib dir is not going to work.
26912      if test ! -d "$WIN_SDK_BASE/../lib"; then
26913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26914$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26916$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26917      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26919$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26920        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26921        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26922          VS_ENV_ARGS="/x86"
26923        else
26924          VS_ENV_ARGS="/x64"
26925        fi
26926      else
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26928$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26929        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26930$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26931      fi
26932    fi
26933  fi
26934
26935
26936  if test "x$VS_ENV_CMD" = x; then
26937    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26938    METHOD="well-known name"
26939
26940  windows_path="$WIN_SDK_BASE"
26941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26942    unix_path=`$CYGPATH -u "$windows_path"`
26943    WIN_SDK_BASE="$unix_path"
26944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26946    WIN_SDK_BASE="$unix_path"
26947  fi
26948
26949    if test -d "$WIN_SDK_BASE"; then
26950      # There have been cases of partial or broken SDK installations. A missing
26951      # lib dir is not going to work.
26952      if test ! -d "$WIN_SDK_BASE/../lib"; then
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26956$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26957      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26959$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26960        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26961        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26962          VS_ENV_ARGS="/x86"
26963        else
26964          VS_ENV_ARGS="/x64"
26965        fi
26966      else
26967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26970$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26971      fi
26972    fi
26973  fi
26974
26975
26976  if test "x$VS_ENV_CMD" != x; then
26977    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26978
26979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26980
26981  # First separate the path from the arguments. This will split at the first
26982  # space.
26983  complete="$VS_ENV_CMD"
26984  path="${complete%% *}"
26985  tmp="$complete EOL"
26986  arguments="${tmp#* }"
26987
26988  # Input might be given as Windows format, start by converting to
26989  # unix format.
26990  new_path=`$CYGPATH -u "$path"`
26991
26992  # Now try to locate executable using which
26993  new_path=`$WHICH "$new_path" 2> /dev/null`
26994  # bat and cmd files are not always considered executable in cygwin causing which
26995  # to not find them
26996  if test "x$new_path" = x \
26997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26999    new_path=`$CYGPATH -u "$path"`
27000  fi
27001  if test "x$new_path" = x; then
27002    # Oops. Which didn't find the executable.
27003    # The splitting of arguments from the executable at a space might have been incorrect,
27004    # since paths with space are more likely in Windows. Give it another try with the whole
27005    # argument.
27006    path="$complete"
27007    arguments="EOL"
27008    new_path=`$CYGPATH -u "$path"`
27009    new_path=`$WHICH "$new_path" 2> /dev/null`
27010    # bat and cmd files are not always considered executable in cygwin causing which
27011    # to not find them
27012    if test "x$new_path" = x \
27013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27015      new_path=`$CYGPATH -u "$path"`
27016    fi
27017    if test "x$new_path" = x; then
27018      # It's still not found. Now this is an unrecoverable error.
27019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27020$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27021      has_space=`$ECHO "$complete" | $GREP " "`
27022      if test "x$has_space" != x; then
27023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27025      fi
27026      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27027    fi
27028  fi
27029
27030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27033  # "foo.exe" is OK but "foo" is an error.
27034  #
27035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27036  # It is also a way to make sure we got the proper file name for the real test later on.
27037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27038  if test "x$test_shortpath" = x; then
27039    # Short path failed, file does not exist as specified.
27040    # Try adding .exe or .cmd
27041    if test -f "${new_path}.exe"; then
27042      input_to_shortpath="${new_path}.exe"
27043    elif test -f "${new_path}.cmd"; then
27044      input_to_shortpath="${new_path}.cmd"
27045    else
27046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27047$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27050      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27051    fi
27052  else
27053    input_to_shortpath="$new_path"
27054  fi
27055
27056  # Call helper function which possibly converts this using DOS-style short mode.
27057  # If so, the updated path is stored in $new_path.
27058  new_path="$input_to_shortpath"
27059
27060  input_path="$input_to_shortpath"
27061  # Check if we need to convert this using DOS-style short mode. If the path
27062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27063  # take no chances and rewrite it.
27064  # Note: m4 eats our [], so we need to use [ and ] instead.
27065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27066  if test "x$has_forbidden_chars" != x; then
27067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27071      # Going to short mode and back again did indeed matter. Since short mode is
27072      # case insensitive, let's make it lowercase to improve readability.
27073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27074      # Now convert it back to Unix-stile (cygpath)
27075      input_path=`$CYGPATH -u "$shortmode_path"`
27076      new_path="$input_path"
27077    fi
27078  fi
27079
27080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27081  if test "x$test_cygdrive_prefix" = x; then
27082    # As a simple fix, exclude /usr/bin since it's not a real path.
27083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27085      # a path prefixed by /cygdrive for fixpath to work.
27086      new_path="$CYGWIN_ROOT_PATH$input_path"
27087    fi
27088  fi
27089
27090  # remove trailing .exe if any
27091  new_path="${new_path/%.exe/}"
27092
27093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27094
27095  # First separate the path from the arguments. This will split at the first
27096  # space.
27097  complete="$VS_ENV_CMD"
27098  path="${complete%% *}"
27099  tmp="$complete EOL"
27100  arguments="${tmp#* }"
27101
27102  # Input might be given as Windows format, start by converting to
27103  # unix format.
27104  new_path="$path"
27105
27106  windows_path="$new_path"
27107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27108    unix_path=`$CYGPATH -u "$windows_path"`
27109    new_path="$unix_path"
27110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27112    new_path="$unix_path"
27113  fi
27114
27115
27116  # Now try to locate executable using which
27117  new_path=`$WHICH "$new_path" 2> /dev/null`
27118
27119  if test "x$new_path" = x; then
27120    # Oops. Which didn't find the executable.
27121    # The splitting of arguments from the executable at a space might have been incorrect,
27122    # since paths with space are more likely in Windows. Give it another try with the whole
27123    # argument.
27124    path="$complete"
27125    arguments="EOL"
27126    new_path="$path"
27127
27128  windows_path="$new_path"
27129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27130    unix_path=`$CYGPATH -u "$windows_path"`
27131    new_path="$unix_path"
27132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27134    new_path="$unix_path"
27135  fi
27136
27137
27138    new_path=`$WHICH "$new_path" 2> /dev/null`
27139
27140    if test "x$new_path" = x; then
27141      # It's still not found. Now this is an unrecoverable error.
27142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27143$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27144      has_space=`$ECHO "$complete" | $GREP " "`
27145      if test "x$has_space" != x; then
27146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27148      fi
27149      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27150    fi
27151  fi
27152
27153  # Now new_path has a complete unix path to the binary
27154  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27155    # Keep paths in /bin as-is, but remove trailing .exe if any
27156    new_path="${new_path/%.exe/}"
27157    # Do not save /bin paths to all_fixpath_prefixes!
27158  else
27159    # Not in mixed or Windows style, start by that.
27160    new_path=`cmd //c echo $new_path`
27161
27162  input_path="$new_path"
27163  # Check if we need to convert this using DOS-style short mode. If the path
27164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27165  # take no chances and rewrite it.
27166  # Note: m4 eats our [], so we need to use [ and ] instead.
27167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27168  if test "x$has_forbidden_chars" != x; then
27169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27171  fi
27172
27173    # Output is in $new_path
27174
27175  windows_path="$new_path"
27176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27177    unix_path=`$CYGPATH -u "$windows_path"`
27178    new_path="$unix_path"
27179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27181    new_path="$unix_path"
27182  fi
27183
27184    # remove trailing .exe if any
27185    new_path="${new_path/%.exe/}"
27186
27187    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27188    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27189  fi
27190
27191  else
27192    # We're on a posix platform. Hooray! :)
27193    # First separate the path from the arguments. This will split at the first
27194    # space.
27195    complete="$VS_ENV_CMD"
27196    path="${complete%% *}"
27197    tmp="$complete EOL"
27198    arguments="${tmp#* }"
27199
27200    # Cannot rely on the command "which" here since it doesn't always work.
27201    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27202    if test -z "$is_absolute_path"; then
27203      # Path to executable is not absolute. Find it.
27204      IFS_save="$IFS"
27205      IFS=:
27206      for p in $PATH; do
27207        if test -f "$p/$path" && test -x "$p/$path"; then
27208          new_path="$p/$path"
27209          break
27210        fi
27211      done
27212      IFS="$IFS_save"
27213    else
27214      # This is an absolute path, we can use it without further modifications.
27215      new_path="$path"
27216    fi
27217
27218    if test "x$new_path" = x; then
27219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27220$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27221      has_space=`$ECHO "$complete" | $GREP " "`
27222      if test "x$has_space" != x; then
27223        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27225      fi
27226      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27227    fi
27228  fi
27229
27230  # Now join together the path and the arguments once again
27231  if test "x$arguments" != xEOL; then
27232    new_complete="$new_path ${arguments% *}"
27233  else
27234    new_complete="$new_path"
27235  fi
27236
27237  if test "x$complete" != "x$new_complete"; then
27238    VS_ENV_CMD="$new_complete"
27239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27240$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27241  fi
27242
27243
27244    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27245    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27246$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27247    cd $OUTPUT_ROOT
27248    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27249    # to autoconf standards.
27250
27251    #----
27252
27253    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27254    # but calculate the difference in Cygwin environment before/after running it and then
27255    # apply the diff.
27256
27257    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27258      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27259      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27260      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27261    else
27262      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27263      _dosbash=`cmd //c echo \`which bash\``
27264    fi
27265
27266    # generate the set of exported vars before/after the vs10 setup
27267    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27268    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27269    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27270    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27271
27272    # Now execute the newly created bat file.
27273    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27274    cmd /c localdevenvtmp.bat | cat
27275
27276    # apply the diff (less some non-vs10 vars named by "!")
27277    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27278    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27279    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27280
27281    # cleanup
27282    $RM localdevenvtmp*
27283    #----
27284    cd $CURDIR
27285    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27287$as_echo "no" >&6; }
27288      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27289$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27290      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27291$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27292      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27293$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27294      as_fn_error $? "Cannot continue" "$LINENO" 5
27295    fi
27296
27297    # Now set all paths and other env variables. This will allow the rest of
27298    # the configure script to find and run the compiler in the proper way.
27299    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27300$as_echo "$as_me: Setting extracted environment variables" >&6;}
27301    . $OUTPUT_ROOT/localdevenv.sh
27302  else
27303    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27304    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27305$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27306  fi
27307
27308  # At this point, we should have corrent variables in the environment, or we can't continue.
27309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27310$as_echo_n "checking for Visual Studio variables... " >&6; }
27311
27312  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27313    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27315$as_echo "present but broken" >&6; }
27316      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27317    else
27318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27319$as_echo "ok" >&6; }
27320      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27321      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27322      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27323      # Remove any paths containing # (typically F#) as that messes up make
27324      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27325      VS_PATH="$PATH"
27326
27327
27328
27329    fi
27330  else
27331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27332$as_echo "not found" >&6; }
27333
27334    if test "x$VS_ENV_CMD" = x; then
27335      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27336$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27337      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27338$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27339    else
27340      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27341$as_echo "$as_me: Running the extraction script failed." >&6;}
27342    fi
27343    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27344$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27345    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27346$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27347    as_fn_error $? "Cannot continue" "$LINENO" 5
27348  fi
27349
27350  fi
27351
27352  # autoconf magic only relies on PATH, so update it if tools dir is specified
27353  OLD_PATH="$PATH"
27354
27355  # For solaris we really need solaris tools, and not the GNU equivalent.
27356  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27357  # so add that to path before starting to probe.
27358  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27359  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27360    PATH="/usr/ccs/bin:$PATH"
27361  fi
27362
27363  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27364  # override all other locations.
27365  if test "x$TOOLS_DIR" != x; then
27366    PATH=$TOOLS_DIR:$PATH
27367  fi
27368
27369  # If a devkit is found on the builddeps server, then prepend its path to the
27370  # PATH variable. If there are cross compilers available in the devkit, these
27371  # will be found by AC_PROG_CC et al.
27372  DEVKIT=
27373
27374
27375  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27376    # Source the builddeps file again, to make sure it uses the latest variables!
27377    . $builddepsfile
27378    # Look for a target and build machine specific resource!
27379    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27380    if test "x$resource" = x; then
27381      # Ok, lets instead look for a target specific resource
27382      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27383    fi
27384    if test "x$resource" = x; then
27385      # Ok, lets instead look for a build specific resource
27386      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27387    fi
27388    if test "x$resource" = x; then
27389      # Ok, lets instead look for a generic resource
27390      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27391      resource=${builddep_devkit}
27392    fi
27393    if test "x$resource" != x; then
27394      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27395$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27396      # If the resource in the builddeps.conf file is an existing directory,
27397      # for example /java/linux/cups
27398      if test -d ${resource}; then
27399        depdir=${resource}
27400      else
27401
27402  # devkit is for example mymodule
27403  # $resource is for example libs/general/libmymod_1_2_3.zip
27404  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27405  # $with_builddeps_dir is for example /localhome/builddeps
27406  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27407  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27408  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27409  filename=`basename $resource`
27410  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27411  filebase=${filename%%.*}
27412  extension=${filename#*.}
27413  installdir=$with_builddeps_dir/$filebase
27414  if test ! -f $installdir/$filename.unpacked; then
27415    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27416$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27417    if test ! -d $installdir; then
27418      mkdir -p $installdir
27419    fi
27420    if test ! -d $installdir; then
27421      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27422    fi
27423    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27424    touch $tmpfile
27425    if test ! -f $tmpfile; then
27426      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27427    fi
27428
27429  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27430  # $tmpfile is the local file name for the downloaded file.
27431  VALID_TOOL=no
27432  if test "x$BDEPS_FTP" = xwget; then
27433    VALID_TOOL=yes
27434    wget -O $tmpfile $with_builddeps_server/$resource
27435  fi
27436  if test "x$BDEPS_FTP" = xlftp; then
27437    VALID_TOOL=yes
27438    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27439  fi
27440  if test "x$BDEPS_FTP" = xftp; then
27441    VALID_TOOL=yes
27442    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27443    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27444    FTPUSERPWD=${FTPSERVER%%@*}
27445    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27446      FTPUSER=${userpwd%%:*}
27447      FTPPWD=${userpwd#*@}
27448      FTPSERVER=${FTPSERVER#*@}
27449    else
27450      FTPUSER=ftp
27451      FTPPWD=ftp
27452    fi
27453    # the "pass" command does not work on some
27454    # ftp clients (read ftp.exe) but if it works,
27455    # passive mode is better!
27456    ( \
27457        echo "user $FTPUSER $FTPPWD"        ; \
27458        echo "pass"                         ; \
27459        echo "bin"                          ; \
27460        echo "get $FTPPATH $tmpfile"              ; \
27461    ) | ftp -in $FTPSERVER
27462  fi
27463  if test "x$VALID_TOOL" != xyes; then
27464    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27465  fi
27466
27467    mv $tmpfile $installdir/$filename
27468    if test ! -s $installdir/$filename; then
27469      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27470    fi
27471    case "$extension" in
27472      zip)  echo "Unzipping $installdir/$filename..."
27473        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27474        ;;
27475      tar.gz) echo "Untaring $installdir/$filename..."
27476        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27477        ;;
27478      tgz) echo "Untaring $installdir/$filename..."
27479        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27480        ;;
27481      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27482        ;;
27483    esac
27484  fi
27485  if test -f $installdir/$filename.unpacked; then
27486    depdir=$installdir
27487  fi
27488
27489      fi
27490      # Source the builddeps file again, because in the previous command, the depdir
27491      # was updated to point at the current build dependency install directory.
27492      . $builddepsfile
27493      # Now extract variables from the builddeps.conf files.
27494      theroot=${builddep_devkit_ROOT}
27495      thecflags=${builddep_devkit_CFLAGS}
27496      thelibs=${builddep_devkit_LIBS}
27497      if test "x$depdir" = x; then
27498        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27499      fi
27500      DEVKIT=$depdir
27501      if test "x$theroot" != x; then
27502        DEVKIT="$theroot"
27503      fi
27504      if test "x$thecflags" != x; then
27505        DEVKIT_CFLAGS="$thecflags"
27506      fi
27507      if test "x$thelibs" != x; then
27508        DEVKIT_LIBS="$thelibs"
27509      fi
27510
27511        # Found devkit
27512        PATH="$DEVKIT/bin:$PATH"
27513        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27514        if test "x$x_includes" = "xNONE"; then
27515          x_includes="$SYS_ROOT/usr/include/X11"
27516        fi
27517        if test "x$x_libraries" = "xNONE"; then
27518          x_libraries="$SYS_ROOT/usr/lib"
27519        fi
27520
27521
27522    fi
27523
27524  fi
27525
27526
27527
27528  #
27529  # Setup the compilers (CC and CXX)
27530  #
27531
27532  COMPILER_NAME=C
27533  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27534
27535  if test "x$CC" != x; then
27536    # User has supplied compiler name already, always let that override.
27537    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27538$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27539    if test "x`basename $CC`" = "x$CC"; then
27540      # A command without a complete path is provided, search $PATH.
27541
27542      for ac_prog in $CC
27543do
27544  # Extract the first word of "$ac_prog", so it can be a program name with args.
27545set dummy $ac_prog; ac_word=$2
27546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27547$as_echo_n "checking for $ac_word... " >&6; }
27548if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27549  $as_echo_n "(cached) " >&6
27550else
27551  case $POTENTIAL_CC in
27552  [\\/]* | ?:[\\/]*)
27553  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27554  ;;
27555  *)
27556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27557for as_dir in $PATH
27558do
27559  IFS=$as_save_IFS
27560  test -z "$as_dir" && as_dir=.
27561    for ac_exec_ext in '' $ac_executable_extensions; do
27562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27563    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27565    break 2
27566  fi
27567done
27568  done
27569IFS=$as_save_IFS
27570
27571  ;;
27572esac
27573fi
27574POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27575if test -n "$POTENTIAL_CC"; then
27576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27577$as_echo "$POTENTIAL_CC" >&6; }
27578else
27579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27580$as_echo "no" >&6; }
27581fi
27582
27583
27584  test -n "$POTENTIAL_CC" && break
27585done
27586
27587      if test "x$POTENTIAL_CC" != x; then
27588        CC=$POTENTIAL_CC
27589      else
27590        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27591      fi
27592    else
27593      # Otherwise it might already be a complete path
27594      if test ! -x "$CC"; then
27595        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27596      fi
27597    fi
27598  else
27599    # No user supplied value. Locate compiler ourselves.
27600
27601    # If we are cross compiling, assume cross compilation tools follows the
27602    # cross compilation standard where they are prefixed with the autoconf
27603    # standard name for the target. For example the binary
27604    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27605    # If we are not cross compiling, then the default compiler name will be
27606    # used.
27607
27608    CC=
27609    # If TOOLS_DIR is set, check for all compiler names in there first
27610    # before checking the rest of the PATH.
27611    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27612    # step, this should not be necessary.
27613    if test -n "$TOOLS_DIR"; then
27614      PATH_save="$PATH"
27615      PATH="$TOOLS_DIR"
27616      for ac_prog in $SEARCH_LIST
27617do
27618  # Extract the first word of "$ac_prog", so it can be a program name with args.
27619set dummy $ac_prog; ac_word=$2
27620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27621$as_echo_n "checking for $ac_word... " >&6; }
27622if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27623  $as_echo_n "(cached) " >&6
27624else
27625  case $TOOLS_DIR_CC in
27626  [\\/]* | ?:[\\/]*)
27627  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27628  ;;
27629  *)
27630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27631for as_dir in $PATH
27632do
27633  IFS=$as_save_IFS
27634  test -z "$as_dir" && as_dir=.
27635    for ac_exec_ext in '' $ac_executable_extensions; do
27636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27637    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27639    break 2
27640  fi
27641done
27642  done
27643IFS=$as_save_IFS
27644
27645  ;;
27646esac
27647fi
27648TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27649if test -n "$TOOLS_DIR_CC"; then
27650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27651$as_echo "$TOOLS_DIR_CC" >&6; }
27652else
27653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27654$as_echo "no" >&6; }
27655fi
27656
27657
27658  test -n "$TOOLS_DIR_CC" && break
27659done
27660
27661      CC=$TOOLS_DIR_CC
27662      PATH="$PATH_save"
27663    fi
27664
27665    # AC_PATH_PROGS can't be run multiple times with the same variable,
27666    # so create a new name for this run.
27667    if test "x$CC" = x; then
27668      for ac_prog in $SEARCH_LIST
27669do
27670  # Extract the first word of "$ac_prog", so it can be a program name with args.
27671set dummy $ac_prog; ac_word=$2
27672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27673$as_echo_n "checking for $ac_word... " >&6; }
27674if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27675  $as_echo_n "(cached) " >&6
27676else
27677  case $POTENTIAL_CC in
27678  [\\/]* | ?:[\\/]*)
27679  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27680  ;;
27681  *)
27682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27683for as_dir in $PATH
27684do
27685  IFS=$as_save_IFS
27686  test -z "$as_dir" && as_dir=.
27687    for ac_exec_ext in '' $ac_executable_extensions; do
27688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27689    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27691    break 2
27692  fi
27693done
27694  done
27695IFS=$as_save_IFS
27696
27697  ;;
27698esac
27699fi
27700POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27701if test -n "$POTENTIAL_CC"; then
27702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27703$as_echo "$POTENTIAL_CC" >&6; }
27704else
27705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27706$as_echo "no" >&6; }
27707fi
27708
27709
27710  test -n "$POTENTIAL_CC" && break
27711done
27712
27713      CC=$POTENTIAL_CC
27714    fi
27715
27716    if test "x$CC" = x; then
27717
27718  # Print a helpful message on how to acquire the necessary build dependency.
27719  # devkit is the help tag: freetype, cups, pulse, alsa etc
27720  MISSING_DEPENDENCY=devkit
27721
27722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27723    cygwin_help $MISSING_DEPENDENCY
27724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27725    msys_help $MISSING_DEPENDENCY
27726  else
27727    PKGHANDLER_COMMAND=
27728
27729    case $PKGHANDLER in
27730      apt-get)
27731        apt_help     $MISSING_DEPENDENCY ;;
27732      yum)
27733        yum_help     $MISSING_DEPENDENCY ;;
27734      port)
27735        port_help    $MISSING_DEPENDENCY ;;
27736      pkgutil)
27737        pkgutil_help $MISSING_DEPENDENCY ;;
27738      pkgadd)
27739        pkgadd_help  $MISSING_DEPENDENCY ;;
27740    esac
27741
27742    if test "x$PKGHANDLER_COMMAND" != x; then
27743      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27744    fi
27745  fi
27746
27747      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27748    fi
27749  fi
27750
27751  # Now we have a compiler binary in CC. Make sure it's okay.
27752
27753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27754
27755  # First separate the path from the arguments. This will split at the first
27756  # space.
27757  complete="$CC"
27758  path="${complete%% *}"
27759  tmp="$complete EOL"
27760  arguments="${tmp#* }"
27761
27762  # Input might be given as Windows format, start by converting to
27763  # unix format.
27764  new_path=`$CYGPATH -u "$path"`
27765
27766  # Now try to locate executable using which
27767  new_path=`$WHICH "$new_path" 2> /dev/null`
27768  # bat and cmd files are not always considered executable in cygwin causing which
27769  # to not find them
27770  if test "x$new_path" = x \
27771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27773    new_path=`$CYGPATH -u "$path"`
27774  fi
27775  if test "x$new_path" = x; then
27776    # Oops. Which didn't find the executable.
27777    # The splitting of arguments from the executable at a space might have been incorrect,
27778    # since paths with space are more likely in Windows. Give it another try with the whole
27779    # argument.
27780    path="$complete"
27781    arguments="EOL"
27782    new_path=`$CYGPATH -u "$path"`
27783    new_path=`$WHICH "$new_path" 2> /dev/null`
27784    # bat and cmd files are not always considered executable in cygwin causing which
27785    # to not find them
27786    if test "x$new_path" = x \
27787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27789      new_path=`$CYGPATH -u "$path"`
27790    fi
27791    if test "x$new_path" = x; then
27792      # It's still not found. Now this is an unrecoverable error.
27793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27794$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27795      has_space=`$ECHO "$complete" | $GREP " "`
27796      if test "x$has_space" != x; then
27797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27799      fi
27800      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27801    fi
27802  fi
27803
27804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27807  # "foo.exe" is OK but "foo" is an error.
27808  #
27809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27810  # It is also a way to make sure we got the proper file name for the real test later on.
27811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27812  if test "x$test_shortpath" = x; then
27813    # Short path failed, file does not exist as specified.
27814    # Try adding .exe or .cmd
27815    if test -f "${new_path}.exe"; then
27816      input_to_shortpath="${new_path}.exe"
27817    elif test -f "${new_path}.cmd"; then
27818      input_to_shortpath="${new_path}.cmd"
27819    else
27820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27821$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27824      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27825    fi
27826  else
27827    input_to_shortpath="$new_path"
27828  fi
27829
27830  # Call helper function which possibly converts this using DOS-style short mode.
27831  # If so, the updated path is stored in $new_path.
27832  new_path="$input_to_shortpath"
27833
27834  input_path="$input_to_shortpath"
27835  # Check if we need to convert this using DOS-style short mode. If the path
27836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27837  # take no chances and rewrite it.
27838  # Note: m4 eats our [], so we need to use [ and ] instead.
27839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27840  if test "x$has_forbidden_chars" != x; then
27841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27845      # Going to short mode and back again did indeed matter. Since short mode is
27846      # case insensitive, let's make it lowercase to improve readability.
27847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27848      # Now convert it back to Unix-stile (cygpath)
27849      input_path=`$CYGPATH -u "$shortmode_path"`
27850      new_path="$input_path"
27851    fi
27852  fi
27853
27854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27855  if test "x$test_cygdrive_prefix" = x; then
27856    # As a simple fix, exclude /usr/bin since it's not a real path.
27857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27859      # a path prefixed by /cygdrive for fixpath to work.
27860      new_path="$CYGWIN_ROOT_PATH$input_path"
27861    fi
27862  fi
27863
27864  # remove trailing .exe if any
27865  new_path="${new_path/%.exe/}"
27866
27867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27868
27869  # First separate the path from the arguments. This will split at the first
27870  # space.
27871  complete="$CC"
27872  path="${complete%% *}"
27873  tmp="$complete EOL"
27874  arguments="${tmp#* }"
27875
27876  # Input might be given as Windows format, start by converting to
27877  # unix format.
27878  new_path="$path"
27879
27880  windows_path="$new_path"
27881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27882    unix_path=`$CYGPATH -u "$windows_path"`
27883    new_path="$unix_path"
27884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27886    new_path="$unix_path"
27887  fi
27888
27889
27890  # Now try to locate executable using which
27891  new_path=`$WHICH "$new_path" 2> /dev/null`
27892
27893  if test "x$new_path" = x; then
27894    # Oops. Which didn't find the executable.
27895    # The splitting of arguments from the executable at a space might have been incorrect,
27896    # since paths with space are more likely in Windows. Give it another try with the whole
27897    # argument.
27898    path="$complete"
27899    arguments="EOL"
27900    new_path="$path"
27901
27902  windows_path="$new_path"
27903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27904    unix_path=`$CYGPATH -u "$windows_path"`
27905    new_path="$unix_path"
27906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27908    new_path="$unix_path"
27909  fi
27910
27911
27912    new_path=`$WHICH "$new_path" 2> /dev/null`
27913
27914    if test "x$new_path" = x; then
27915      # It's still not found. Now this is an unrecoverable error.
27916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27917$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27918      has_space=`$ECHO "$complete" | $GREP " "`
27919      if test "x$has_space" != x; then
27920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27922      fi
27923      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27924    fi
27925  fi
27926
27927  # Now new_path has a complete unix path to the binary
27928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27929    # Keep paths in /bin as-is, but remove trailing .exe if any
27930    new_path="${new_path/%.exe/}"
27931    # Do not save /bin paths to all_fixpath_prefixes!
27932  else
27933    # Not in mixed or Windows style, start by that.
27934    new_path=`cmd //c echo $new_path`
27935
27936  input_path="$new_path"
27937  # Check if we need to convert this using DOS-style short mode. If the path
27938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27939  # take no chances and rewrite it.
27940  # Note: m4 eats our [], so we need to use [ and ] instead.
27941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27942  if test "x$has_forbidden_chars" != x; then
27943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27945  fi
27946
27947    # Output is in $new_path
27948
27949  windows_path="$new_path"
27950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951    unix_path=`$CYGPATH -u "$windows_path"`
27952    new_path="$unix_path"
27953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27955    new_path="$unix_path"
27956  fi
27957
27958    # remove trailing .exe if any
27959    new_path="${new_path/%.exe/}"
27960
27961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27963  fi
27964
27965  else
27966    # We're on a posix platform. Hooray! :)
27967    # First separate the path from the arguments. This will split at the first
27968    # space.
27969    complete="$CC"
27970    path="${complete%% *}"
27971    tmp="$complete EOL"
27972    arguments="${tmp#* }"
27973
27974    # Cannot rely on the command "which" here since it doesn't always work.
27975    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27976    if test -z "$is_absolute_path"; then
27977      # Path to executable is not absolute. Find it.
27978      IFS_save="$IFS"
27979      IFS=:
27980      for p in $PATH; do
27981        if test -f "$p/$path" && test -x "$p/$path"; then
27982          new_path="$p/$path"
27983          break
27984        fi
27985      done
27986      IFS="$IFS_save"
27987    else
27988      # This is an absolute path, we can use it without further modifications.
27989      new_path="$path"
27990    fi
27991
27992    if test "x$new_path" = x; then
27993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27994$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27995      has_space=`$ECHO "$complete" | $GREP " "`
27996      if test "x$has_space" != x; then
27997        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27999      fi
28000      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28001    fi
28002  fi
28003
28004  # Now join together the path and the arguments once again
28005  if test "x$arguments" != xEOL; then
28006    new_complete="$new_path ${arguments% *}"
28007  else
28008    new_complete="$new_path"
28009  fi
28010
28011  if test "x$complete" != "x$new_complete"; then
28012    CC="$new_complete"
28013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28014$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28015  fi
28016
28017  TEST_COMPILER="$CC"
28018  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28019  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28020  if test "x$OPENJDK_BUILD_OS" != xaix; then
28021    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28023$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28024
28025  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28026    # Follow a chain of symbolic links. Use readlink
28027    # where it exists, else fall back to horribly
28028    # complicated shell code.
28029    if test "x$READLINK_TESTED" != yes; then
28030      # On MacOSX there is a readlink tool with a different
28031      # purpose than the GNU readlink tool. Check the found readlink.
28032      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28033      if test "x$ISGNU" = x; then
28034        # A readlink that we do not know how to use.
28035        # Are there other non-GNU readlinks out there?
28036        READLINK_TESTED=yes
28037        READLINK=
28038      fi
28039    fi
28040
28041    if test "x$READLINK" != x; then
28042      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28043    else
28044      # Save the current directory for restoring afterwards
28045      STARTDIR=$PWD
28046      COUNTER=0
28047      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28048      sym_link_file=`$BASENAME $TEST_COMPILER`
28049      cd $sym_link_dir
28050      # Use -P flag to resolve symlinks in directories.
28051      cd `$THEPWDCMD -P`
28052      sym_link_dir=`$THEPWDCMD -P`
28053      # Resolve file symlinks
28054      while test $COUNTER -lt 20; do
28055        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28056        if test "x$ISLINK" == x; then
28057          # This is not a symbolic link! We are done!
28058          break
28059        fi
28060        # Again resolve directory symlinks since the target of the just found
28061        # link could be in a different directory
28062        cd `$DIRNAME $ISLINK`
28063        sym_link_dir=`$THEPWDCMD -P`
28064        sym_link_file=`$BASENAME $ISLINK`
28065        let COUNTER=COUNTER+1
28066      done
28067      cd $STARTDIR
28068      TEST_COMPILER=$sym_link_dir/$sym_link_file
28069    fi
28070  fi
28071
28072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28073$as_echo "$TEST_COMPILER" >&6; }
28074  fi
28075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28076$as_echo_n "checking if CC is disguised ccache... " >&6; }
28077
28078  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28079  if test "x$COMPILER_BASENAME" = "xccache"; then
28080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28081$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28082    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28083    # We want to control ccache invocation ourselves, so ignore this cc and try
28084    # searching again.
28085
28086    # Remove the path to the fake ccache cc from the PATH
28087    RETRY_COMPILER_SAVED_PATH="$PATH"
28088    COMPILER_DIRNAME=`$DIRNAME $CC`
28089    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28090
28091    # Try again looking for our compiler
28092    if test -n "$ac_tool_prefix"; then
28093  for ac_prog in $TOOLCHAIN_CC_BINARY
28094  do
28095    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28096set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28098$as_echo_n "checking for $ac_word... " >&6; }
28099if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28100  $as_echo_n "(cached) " >&6
28101else
28102  if test -n "$PROPER_COMPILER_CC"; then
28103  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28104else
28105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28106for as_dir in $PATH
28107do
28108  IFS=$as_save_IFS
28109  test -z "$as_dir" && as_dir=.
28110    for ac_exec_ext in '' $ac_executable_extensions; do
28111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28112    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28114    break 2
28115  fi
28116done
28117  done
28118IFS=$as_save_IFS
28119
28120fi
28121fi
28122PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28123if test -n "$PROPER_COMPILER_CC"; then
28124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28125$as_echo "$PROPER_COMPILER_CC" >&6; }
28126else
28127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28128$as_echo "no" >&6; }
28129fi
28130
28131
28132    test -n "$PROPER_COMPILER_CC" && break
28133  done
28134fi
28135if test -z "$PROPER_COMPILER_CC"; then
28136  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28137  for ac_prog in $TOOLCHAIN_CC_BINARY
28138do
28139  # Extract the first word of "$ac_prog", so it can be a program name with args.
28140set dummy $ac_prog; ac_word=$2
28141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28142$as_echo_n "checking for $ac_word... " >&6; }
28143if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28144  $as_echo_n "(cached) " >&6
28145else
28146  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28147  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28148else
28149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28150for as_dir in $PATH
28151do
28152  IFS=$as_save_IFS
28153  test -z "$as_dir" && as_dir=.
28154    for ac_exec_ext in '' $ac_executable_extensions; do
28155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28156    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28158    break 2
28159  fi
28160done
28161  done
28162IFS=$as_save_IFS
28163
28164fi
28165fi
28166ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28167if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28169$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28170else
28171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28172$as_echo "no" >&6; }
28173fi
28174
28175
28176  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28177done
28178
28179  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28180    PROPER_COMPILER_CC=""
28181  else
28182    case $cross_compiling:$ac_tool_warned in
28183yes:)
28184{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28185$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28186ac_tool_warned=yes ;;
28187esac
28188    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28189  fi
28190fi
28191
28192
28193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28194
28195  # First separate the path from the arguments. This will split at the first
28196  # space.
28197  complete="$PROPER_COMPILER_CC"
28198  path="${complete%% *}"
28199  tmp="$complete EOL"
28200  arguments="${tmp#* }"
28201
28202  # Input might be given as Windows format, start by converting to
28203  # unix format.
28204  new_path=`$CYGPATH -u "$path"`
28205
28206  # Now try to locate executable using which
28207  new_path=`$WHICH "$new_path" 2> /dev/null`
28208  # bat and cmd files are not always considered executable in cygwin causing which
28209  # to not find them
28210  if test "x$new_path" = x \
28211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28213    new_path=`$CYGPATH -u "$path"`
28214  fi
28215  if test "x$new_path" = x; then
28216    # Oops. Which didn't find the executable.
28217    # The splitting of arguments from the executable at a space might have been incorrect,
28218    # since paths with space are more likely in Windows. Give it another try with the whole
28219    # argument.
28220    path="$complete"
28221    arguments="EOL"
28222    new_path=`$CYGPATH -u "$path"`
28223    new_path=`$WHICH "$new_path" 2> /dev/null`
28224    # bat and cmd files are not always considered executable in cygwin causing which
28225    # to not find them
28226    if test "x$new_path" = x \
28227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28229      new_path=`$CYGPATH -u "$path"`
28230    fi
28231    if test "x$new_path" = x; then
28232      # It's still not found. Now this is an unrecoverable error.
28233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28234$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28235      has_space=`$ECHO "$complete" | $GREP " "`
28236      if test "x$has_space" != x; then
28237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28239      fi
28240      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28241    fi
28242  fi
28243
28244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28247  # "foo.exe" is OK but "foo" is an error.
28248  #
28249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28250  # It is also a way to make sure we got the proper file name for the real test later on.
28251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28252  if test "x$test_shortpath" = x; then
28253    # Short path failed, file does not exist as specified.
28254    # Try adding .exe or .cmd
28255    if test -f "${new_path}.exe"; then
28256      input_to_shortpath="${new_path}.exe"
28257    elif test -f "${new_path}.cmd"; then
28258      input_to_shortpath="${new_path}.cmd"
28259    else
28260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28261$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28264      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28265    fi
28266  else
28267    input_to_shortpath="$new_path"
28268  fi
28269
28270  # Call helper function which possibly converts this using DOS-style short mode.
28271  # If so, the updated path is stored in $new_path.
28272  new_path="$input_to_shortpath"
28273
28274  input_path="$input_to_shortpath"
28275  # Check if we need to convert this using DOS-style short mode. If the path
28276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28277  # take no chances and rewrite it.
28278  # Note: m4 eats our [], so we need to use [ and ] instead.
28279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28280  if test "x$has_forbidden_chars" != x; then
28281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28285      # Going to short mode and back again did indeed matter. Since short mode is
28286      # case insensitive, let's make it lowercase to improve readability.
28287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28288      # Now convert it back to Unix-stile (cygpath)
28289      input_path=`$CYGPATH -u "$shortmode_path"`
28290      new_path="$input_path"
28291    fi
28292  fi
28293
28294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28295  if test "x$test_cygdrive_prefix" = x; then
28296    # As a simple fix, exclude /usr/bin since it's not a real path.
28297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28299      # a path prefixed by /cygdrive for fixpath to work.
28300      new_path="$CYGWIN_ROOT_PATH$input_path"
28301    fi
28302  fi
28303
28304  # remove trailing .exe if any
28305  new_path="${new_path/%.exe/}"
28306
28307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308
28309  # First separate the path from the arguments. This will split at the first
28310  # space.
28311  complete="$PROPER_COMPILER_CC"
28312  path="${complete%% *}"
28313  tmp="$complete EOL"
28314  arguments="${tmp#* }"
28315
28316  # Input might be given as Windows format, start by converting to
28317  # unix format.
28318  new_path="$path"
28319
28320  windows_path="$new_path"
28321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28322    unix_path=`$CYGPATH -u "$windows_path"`
28323    new_path="$unix_path"
28324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28326    new_path="$unix_path"
28327  fi
28328
28329
28330  # Now try to locate executable using which
28331  new_path=`$WHICH "$new_path" 2> /dev/null`
28332
28333  if test "x$new_path" = x; then
28334    # Oops. Which didn't find the executable.
28335    # The splitting of arguments from the executable at a space might have been incorrect,
28336    # since paths with space are more likely in Windows. Give it another try with the whole
28337    # argument.
28338    path="$complete"
28339    arguments="EOL"
28340    new_path="$path"
28341
28342  windows_path="$new_path"
28343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28344    unix_path=`$CYGPATH -u "$windows_path"`
28345    new_path="$unix_path"
28346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28348    new_path="$unix_path"
28349  fi
28350
28351
28352    new_path=`$WHICH "$new_path" 2> /dev/null`
28353
28354    if test "x$new_path" = x; then
28355      # It's still not found. Now this is an unrecoverable error.
28356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28357$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28358      has_space=`$ECHO "$complete" | $GREP " "`
28359      if test "x$has_space" != x; then
28360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28362      fi
28363      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28364    fi
28365  fi
28366
28367  # Now new_path has a complete unix path to the binary
28368  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28369    # Keep paths in /bin as-is, but remove trailing .exe if any
28370    new_path="${new_path/%.exe/}"
28371    # Do not save /bin paths to all_fixpath_prefixes!
28372  else
28373    # Not in mixed or Windows style, start by that.
28374    new_path=`cmd //c echo $new_path`
28375
28376  input_path="$new_path"
28377  # Check if we need to convert this using DOS-style short mode. If the path
28378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28379  # take no chances and rewrite it.
28380  # Note: m4 eats our [], so we need to use [ and ] instead.
28381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28382  if test "x$has_forbidden_chars" != x; then
28383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28385  fi
28386
28387    # Output is in $new_path
28388
28389  windows_path="$new_path"
28390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28391    unix_path=`$CYGPATH -u "$windows_path"`
28392    new_path="$unix_path"
28393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28395    new_path="$unix_path"
28396  fi
28397
28398    # remove trailing .exe if any
28399    new_path="${new_path/%.exe/}"
28400
28401    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28402    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28403  fi
28404
28405  else
28406    # We're on a posix platform. Hooray! :)
28407    # First separate the path from the arguments. This will split at the first
28408    # space.
28409    complete="$PROPER_COMPILER_CC"
28410    path="${complete%% *}"
28411    tmp="$complete EOL"
28412    arguments="${tmp#* }"
28413
28414    # Cannot rely on the command "which" here since it doesn't always work.
28415    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28416    if test -z "$is_absolute_path"; then
28417      # Path to executable is not absolute. Find it.
28418      IFS_save="$IFS"
28419      IFS=:
28420      for p in $PATH; do
28421        if test -f "$p/$path" && test -x "$p/$path"; then
28422          new_path="$p/$path"
28423          break
28424        fi
28425      done
28426      IFS="$IFS_save"
28427    else
28428      # This is an absolute path, we can use it without further modifications.
28429      new_path="$path"
28430    fi
28431
28432    if test "x$new_path" = x; then
28433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28434$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28435      has_space=`$ECHO "$complete" | $GREP " "`
28436      if test "x$has_space" != x; then
28437        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28438$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28439      fi
28440      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28441    fi
28442  fi
28443
28444  # Now join together the path and the arguments once again
28445  if test "x$arguments" != xEOL; then
28446    new_complete="$new_path ${arguments% *}"
28447  else
28448    new_complete="$new_path"
28449  fi
28450
28451  if test "x$complete" != "x$new_complete"; then
28452    PROPER_COMPILER_CC="$new_complete"
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28454$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28455  fi
28456
28457    PATH="$RETRY_COMPILER_SAVED_PATH"
28458
28459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28460$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28461
28462  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28463    # Follow a chain of symbolic links. Use readlink
28464    # where it exists, else fall back to horribly
28465    # complicated shell code.
28466    if test "x$READLINK_TESTED" != yes; then
28467      # On MacOSX there is a readlink tool with a different
28468      # purpose than the GNU readlink tool. Check the found readlink.
28469      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28470      if test "x$ISGNU" = x; then
28471        # A readlink that we do not know how to use.
28472        # Are there other non-GNU readlinks out there?
28473        READLINK_TESTED=yes
28474        READLINK=
28475      fi
28476    fi
28477
28478    if test "x$READLINK" != x; then
28479      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28480    else
28481      # Save the current directory for restoring afterwards
28482      STARTDIR=$PWD
28483      COUNTER=0
28484      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28485      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28486      cd $sym_link_dir
28487      # Use -P flag to resolve symlinks in directories.
28488      cd `$THEPWDCMD -P`
28489      sym_link_dir=`$THEPWDCMD -P`
28490      # Resolve file symlinks
28491      while test $COUNTER -lt 20; do
28492        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28493        if test "x$ISLINK" == x; then
28494          # This is not a symbolic link! We are done!
28495          break
28496        fi
28497        # Again resolve directory symlinks since the target of the just found
28498        # link could be in a different directory
28499        cd `$DIRNAME $ISLINK`
28500        sym_link_dir=`$THEPWDCMD -P`
28501        sym_link_file=`$BASENAME $ISLINK`
28502        let COUNTER=COUNTER+1
28503      done
28504      cd $STARTDIR
28505      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28506    fi
28507  fi
28508
28509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28510$as_echo "$PROPER_COMPILER_CC" >&6; }
28511    CC="$PROPER_COMPILER_CC"
28512  else
28513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28514$as_echo "no, keeping CC" >&6; }
28515  fi
28516
28517
28518  COMPILER=$CC
28519  COMPILER_NAME=$COMPILER_NAME
28520
28521  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28522    # cc -V output typically looks like
28523    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28524    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28525    # Check that this is likely to be the Solaris Studio cc.
28526    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28527    if test $? -ne 0; then
28528      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28529      { $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
28530$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28531      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28532$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28533      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28534$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28535      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28536    fi
28537    # Remove usage instructions (if present), and
28538    # collapse compiler output into a single line
28539    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28540        $SED -e 's/ *[Uu]sage:.*//'`
28541    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28542        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28543  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28544    # xlc -qversion output typically looks like
28545    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28546    #     Version: 11.01.0000.0015
28547    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28548    # Check that this is likely to be the IBM XL C compiler.
28549    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28550    if test $? -ne 0; then
28551      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28552      { $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
28553$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28554      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28555$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28556      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28557$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28558      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28559    fi
28560    # Collapse compiler output into a single line
28561    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28562    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28563        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28564  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28565    # There is no specific version flag, but all output starts with a version string.
28566    # First line typically looks something like:
28567    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28568    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28569    # Check that this is likely to be Microsoft CL.EXE.
28570    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28571    if test $? -ne 0; then
28572      { $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
28573$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28575$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28576      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28577    fi
28578    # Collapse compiler output into a single line
28579    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28580    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28581        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28582  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28583    # gcc --version output typically looks like
28584    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28585    #     Copyright (C) 2013 Free Software Foundation, Inc.
28586    #     This is free software; see the source for copying conditions.  There is NO
28587    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28588    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28589    # Check that this is likely to be GCC.
28590    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28591    if test $? -ne 0; then
28592      { $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
28593$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28595$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28596      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28597    fi
28598    # Remove Copyright and legalese from version string, and
28599    # collapse into a single line
28600    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28601        $SED -e 's/ *Copyright .*//'`
28602    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28603        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28604  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28605    # clang --version output typically looks like
28606    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28607    #    clang version 3.3 (tags/RELEASE_33/final)
28608    # or
28609    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28610    #    Target: x86_64-pc-linux-gnu
28611    #    Thread model: posix
28612    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28613    # Check that this is likely to be clang
28614    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28615    if test $? -ne 0; then
28616      { $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
28617$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28618      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28619$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28620      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28621    fi
28622    # Collapse compiler output into a single line
28623    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28624    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28625        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28626  else
28627      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28628  fi
28629  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28630  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28631  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28632  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28633
28634  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28635$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28636
28637
28638  # Now that we have resolved CC ourself, let autoconf have its go at it
28639  ac_ext=c
28640ac_cpp='$CPP $CPPFLAGS'
28641ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28642ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28643ac_compiler_gnu=$ac_cv_c_compiler_gnu
28644if test -n "$ac_tool_prefix"; then
28645  for ac_prog in $CC
28646  do
28647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28650$as_echo_n "checking for $ac_word... " >&6; }
28651if ${ac_cv_prog_CC+:} false; then :
28652  $as_echo_n "(cached) " >&6
28653else
28654  if test -n "$CC"; then
28655  ac_cv_prog_CC="$CC" # Let the user override the test.
28656else
28657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28658for as_dir in $PATH
28659do
28660  IFS=$as_save_IFS
28661  test -z "$as_dir" && as_dir=.
28662    for ac_exec_ext in '' $ac_executable_extensions; do
28663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28664    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28666    break 2
28667  fi
28668done
28669  done
28670IFS=$as_save_IFS
28671
28672fi
28673fi
28674CC=$ac_cv_prog_CC
28675if test -n "$CC"; then
28676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28677$as_echo "$CC" >&6; }
28678else
28679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28680$as_echo "no" >&6; }
28681fi
28682
28683
28684    test -n "$CC" && break
28685  done
28686fi
28687if test -z "$CC"; then
28688  ac_ct_CC=$CC
28689  for ac_prog in $CC
28690do
28691  # Extract the first word of "$ac_prog", so it can be a program name with args.
28692set dummy $ac_prog; ac_word=$2
28693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28694$as_echo_n "checking for $ac_word... " >&6; }
28695if ${ac_cv_prog_ac_ct_CC+:} false; then :
28696  $as_echo_n "(cached) " >&6
28697else
28698  if test -n "$ac_ct_CC"; then
28699  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28700else
28701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28702for as_dir in $PATH
28703do
28704  IFS=$as_save_IFS
28705  test -z "$as_dir" && as_dir=.
28706    for ac_exec_ext in '' $ac_executable_extensions; do
28707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28708    ac_cv_prog_ac_ct_CC="$ac_prog"
28709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28710    break 2
28711  fi
28712done
28713  done
28714IFS=$as_save_IFS
28715
28716fi
28717fi
28718ac_ct_CC=$ac_cv_prog_ac_ct_CC
28719if test -n "$ac_ct_CC"; then
28720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28721$as_echo "$ac_ct_CC" >&6; }
28722else
28723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28724$as_echo "no" >&6; }
28725fi
28726
28727
28728  test -n "$ac_ct_CC" && break
28729done
28730
28731  if test "x$ac_ct_CC" = x; then
28732    CC=""
28733  else
28734    case $cross_compiling:$ac_tool_warned in
28735yes:)
28736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28738ac_tool_warned=yes ;;
28739esac
28740    CC=$ac_ct_CC
28741  fi
28742fi
28743
28744
28745test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28747as_fn_error $? "no acceptable C compiler found in \$PATH
28748See \`config.log' for more details" "$LINENO" 5; }
28749
28750# Provide some information about the compiler.
28751$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28752set X $ac_compile
28753ac_compiler=$2
28754for ac_option in --version -v -V -qversion; do
28755  { { ac_try="$ac_compiler $ac_option >&5"
28756case "(($ac_try" in
28757  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28758  *) ac_try_echo=$ac_try;;
28759esac
28760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28761$as_echo "$ac_try_echo"; } >&5
28762  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28763  ac_status=$?
28764  if test -s conftest.err; then
28765    sed '10a\
28766... rest of stderr output deleted ...
28767         10q' conftest.err >conftest.er1
28768    cat conftest.er1 >&5
28769  fi
28770  rm -f conftest.er1 conftest.err
28771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28772  test $ac_status = 0; }
28773done
28774
28775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28776/* end confdefs.h.  */
28777
28778int
28779main ()
28780{
28781
28782  ;
28783  return 0;
28784}
28785_ACEOF
28786ac_clean_files_save=$ac_clean_files
28787ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28788# Try to create an executable without -o first, disregard a.out.
28789# It will help us diagnose broken compilers, and finding out an intuition
28790# of exeext.
28791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28792$as_echo_n "checking whether the C compiler works... " >&6; }
28793ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28794
28795# The possible output files:
28796ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28797
28798ac_rmfiles=
28799for ac_file in $ac_files
28800do
28801  case $ac_file in
28802    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28803    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28804  esac
28805done
28806rm -f $ac_rmfiles
28807
28808if { { ac_try="$ac_link_default"
28809case "(($ac_try" in
28810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28811  *) ac_try_echo=$ac_try;;
28812esac
28813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28814$as_echo "$ac_try_echo"; } >&5
28815  (eval "$ac_link_default") 2>&5
28816  ac_status=$?
28817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28818  test $ac_status = 0; }; then :
28819  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28820# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28821# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28822# so that the user can short-circuit this test for compilers unknown to
28823# Autoconf.
28824for ac_file in $ac_files ''
28825do
28826  test -f "$ac_file" || continue
28827  case $ac_file in
28828    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28829	;;
28830    [ab].out )
28831	# We found the default executable, but exeext='' is most
28832	# certainly right.
28833	break;;
28834    *.* )
28835	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28836	then :; else
28837	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28838	fi
28839	# We set ac_cv_exeext here because the later test for it is not
28840	# safe: cross compilers may not add the suffix if given an `-o'
28841	# argument, so we may need to know it at that point already.
28842	# Even if this section looks crufty: it has the advantage of
28843	# actually working.
28844	break;;
28845    * )
28846	break;;
28847  esac
28848done
28849test "$ac_cv_exeext" = no && ac_cv_exeext=
28850
28851else
28852  ac_file=''
28853fi
28854if test -z "$ac_file"; then :
28855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28856$as_echo "no" >&6; }
28857$as_echo "$as_me: failed program was:" >&5
28858sed 's/^/| /' conftest.$ac_ext >&5
28859
28860{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28862as_fn_error 77 "C compiler cannot create executables
28863See \`config.log' for more details" "$LINENO" 5; }
28864else
28865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28866$as_echo "yes" >&6; }
28867fi
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28869$as_echo_n "checking for C compiler default output file name... " >&6; }
28870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28871$as_echo "$ac_file" >&6; }
28872ac_exeext=$ac_cv_exeext
28873
28874rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28875ac_clean_files=$ac_clean_files_save
28876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28877$as_echo_n "checking for suffix of executables... " >&6; }
28878if { { ac_try="$ac_link"
28879case "(($ac_try" in
28880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28881  *) ac_try_echo=$ac_try;;
28882esac
28883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28884$as_echo "$ac_try_echo"; } >&5
28885  (eval "$ac_link") 2>&5
28886  ac_status=$?
28887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28888  test $ac_status = 0; }; then :
28889  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28890# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28891# work properly (i.e., refer to `conftest.exe'), while it won't with
28892# `rm'.
28893for ac_file in conftest.exe conftest conftest.*; do
28894  test -f "$ac_file" || continue
28895  case $ac_file in
28896    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28897    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28898	  break;;
28899    * ) break;;
28900  esac
28901done
28902else
28903  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28905as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28906See \`config.log' for more details" "$LINENO" 5; }
28907fi
28908rm -f conftest conftest$ac_cv_exeext
28909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28910$as_echo "$ac_cv_exeext" >&6; }
28911
28912rm -f conftest.$ac_ext
28913EXEEXT=$ac_cv_exeext
28914ac_exeext=$EXEEXT
28915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28916/* end confdefs.h.  */
28917#include <stdio.h>
28918int
28919main ()
28920{
28921FILE *f = fopen ("conftest.out", "w");
28922 return ferror (f) || fclose (f) != 0;
28923
28924  ;
28925  return 0;
28926}
28927_ACEOF
28928ac_clean_files="$ac_clean_files conftest.out"
28929# Check that the compiler produces executables we can run.  If not, either
28930# the compiler is broken, or we cross compile.
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28932$as_echo_n "checking whether we are cross compiling... " >&6; }
28933if test "$cross_compiling" != yes; then
28934  { { ac_try="$ac_link"
28935case "(($ac_try" in
28936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28937  *) ac_try_echo=$ac_try;;
28938esac
28939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28940$as_echo "$ac_try_echo"; } >&5
28941  (eval "$ac_link") 2>&5
28942  ac_status=$?
28943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28944  test $ac_status = 0; }
28945  if { ac_try='./conftest$ac_cv_exeext'
28946  { { case "(($ac_try" in
28947  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28948  *) ac_try_echo=$ac_try;;
28949esac
28950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28951$as_echo "$ac_try_echo"; } >&5
28952  (eval "$ac_try") 2>&5
28953  ac_status=$?
28954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28955  test $ac_status = 0; }; }; then
28956    cross_compiling=no
28957  else
28958    if test "$cross_compiling" = maybe; then
28959	cross_compiling=yes
28960    else
28961	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28963as_fn_error $? "cannot run C compiled programs.
28964If you meant to cross compile, use \`--host'.
28965See \`config.log' for more details" "$LINENO" 5; }
28966    fi
28967  fi
28968fi
28969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28970$as_echo "$cross_compiling" >&6; }
28971
28972rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28973ac_clean_files=$ac_clean_files_save
28974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28975$as_echo_n "checking for suffix of object files... " >&6; }
28976if ${ac_cv_objext+:} false; then :
28977  $as_echo_n "(cached) " >&6
28978else
28979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28980/* end confdefs.h.  */
28981
28982int
28983main ()
28984{
28985
28986  ;
28987  return 0;
28988}
28989_ACEOF
28990rm -f conftest.o conftest.obj
28991if { { ac_try="$ac_compile"
28992case "(($ac_try" in
28993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28994  *) ac_try_echo=$ac_try;;
28995esac
28996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28997$as_echo "$ac_try_echo"; } >&5
28998  (eval "$ac_compile") 2>&5
28999  ac_status=$?
29000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29001  test $ac_status = 0; }; then :
29002  for ac_file in conftest.o conftest.obj conftest.*; do
29003  test -f "$ac_file" || continue;
29004  case $ac_file in
29005    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29006    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29007       break;;
29008  esac
29009done
29010else
29011  $as_echo "$as_me: failed program was:" >&5
29012sed 's/^/| /' conftest.$ac_ext >&5
29013
29014{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29016as_fn_error $? "cannot compute suffix of object files: cannot compile
29017See \`config.log' for more details" "$LINENO" 5; }
29018fi
29019rm -f conftest.$ac_cv_objext conftest.$ac_ext
29020fi
29021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29022$as_echo "$ac_cv_objext" >&6; }
29023OBJEXT=$ac_cv_objext
29024ac_objext=$OBJEXT
29025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29026$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29027if ${ac_cv_c_compiler_gnu+:} false; then :
29028  $as_echo_n "(cached) " >&6
29029else
29030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29031/* end confdefs.h.  */
29032
29033int
29034main ()
29035{
29036#ifndef __GNUC__
29037       choke me
29038#endif
29039
29040  ;
29041  return 0;
29042}
29043_ACEOF
29044if ac_fn_c_try_compile "$LINENO"; then :
29045  ac_compiler_gnu=yes
29046else
29047  ac_compiler_gnu=no
29048fi
29049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29050ac_cv_c_compiler_gnu=$ac_compiler_gnu
29051
29052fi
29053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29054$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29055if test $ac_compiler_gnu = yes; then
29056  GCC=yes
29057else
29058  GCC=
29059fi
29060ac_test_CFLAGS=${CFLAGS+set}
29061ac_save_CFLAGS=$CFLAGS
29062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29063$as_echo_n "checking whether $CC accepts -g... " >&6; }
29064if ${ac_cv_prog_cc_g+:} false; then :
29065  $as_echo_n "(cached) " >&6
29066else
29067  ac_save_c_werror_flag=$ac_c_werror_flag
29068   ac_c_werror_flag=yes
29069   ac_cv_prog_cc_g=no
29070   CFLAGS="-g"
29071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29072/* end confdefs.h.  */
29073
29074int
29075main ()
29076{
29077
29078  ;
29079  return 0;
29080}
29081_ACEOF
29082if ac_fn_c_try_compile "$LINENO"; then :
29083  ac_cv_prog_cc_g=yes
29084else
29085  CFLAGS=""
29086      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29087/* end confdefs.h.  */
29088
29089int
29090main ()
29091{
29092
29093  ;
29094  return 0;
29095}
29096_ACEOF
29097if ac_fn_c_try_compile "$LINENO"; then :
29098
29099else
29100  ac_c_werror_flag=$ac_save_c_werror_flag
29101	 CFLAGS="-g"
29102	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29103/* end confdefs.h.  */
29104
29105int
29106main ()
29107{
29108
29109  ;
29110  return 0;
29111}
29112_ACEOF
29113if ac_fn_c_try_compile "$LINENO"; then :
29114  ac_cv_prog_cc_g=yes
29115fi
29116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29117fi
29118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29119fi
29120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29121   ac_c_werror_flag=$ac_save_c_werror_flag
29122fi
29123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29124$as_echo "$ac_cv_prog_cc_g" >&6; }
29125if test "$ac_test_CFLAGS" = set; then
29126  CFLAGS=$ac_save_CFLAGS
29127elif test $ac_cv_prog_cc_g = yes; then
29128  if test "$GCC" = yes; then
29129    CFLAGS="-g -O2"
29130  else
29131    CFLAGS="-g"
29132  fi
29133else
29134  if test "$GCC" = yes; then
29135    CFLAGS="-O2"
29136  else
29137    CFLAGS=
29138  fi
29139fi
29140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29141$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29142if ${ac_cv_prog_cc_c89+:} false; then :
29143  $as_echo_n "(cached) " >&6
29144else
29145  ac_cv_prog_cc_c89=no
29146ac_save_CC=$CC
29147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29148/* end confdefs.h.  */
29149#include <stdarg.h>
29150#include <stdio.h>
29151struct stat;
29152/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29153struct buf { int x; };
29154FILE * (*rcsopen) (struct buf *, struct stat *, int);
29155static char *e (p, i)
29156     char **p;
29157     int i;
29158{
29159  return p[i];
29160}
29161static char *f (char * (*g) (char **, int), char **p, ...)
29162{
29163  char *s;
29164  va_list v;
29165  va_start (v,p);
29166  s = g (p, va_arg (v,int));
29167  va_end (v);
29168  return s;
29169}
29170
29171/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29172   function prototypes and stuff, but not '\xHH' hex character constants.
29173   These don't provoke an error unfortunately, instead are silently treated
29174   as 'x'.  The following induces an error, until -std is added to get
29175   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29176   array size at least.  It's necessary to write '\x00'==0 to get something
29177   that's true only with -std.  */
29178int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29179
29180/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29181   inside strings and character constants.  */
29182#define FOO(x) 'x'
29183int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29184
29185int test (int i, double x);
29186struct s1 {int (*f) (int a);};
29187struct s2 {int (*f) (double a);};
29188int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29189int argc;
29190char **argv;
29191int
29192main ()
29193{
29194return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29195  ;
29196  return 0;
29197}
29198_ACEOF
29199for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29200	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29201do
29202  CC="$ac_save_CC $ac_arg"
29203  if ac_fn_c_try_compile "$LINENO"; then :
29204  ac_cv_prog_cc_c89=$ac_arg
29205fi
29206rm -f core conftest.err conftest.$ac_objext
29207  test "x$ac_cv_prog_cc_c89" != "xno" && break
29208done
29209rm -f conftest.$ac_ext
29210CC=$ac_save_CC
29211
29212fi
29213# AC_CACHE_VAL
29214case "x$ac_cv_prog_cc_c89" in
29215  x)
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29217$as_echo "none needed" >&6; } ;;
29218  xno)
29219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29220$as_echo "unsupported" >&6; } ;;
29221  *)
29222    CC="$CC $ac_cv_prog_cc_c89"
29223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29224$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29225esac
29226if test "x$ac_cv_prog_cc_c89" != xno; then :
29227
29228fi
29229
29230ac_ext=cpp
29231ac_cpp='$CXXCPP $CPPFLAGS'
29232ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29233ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29234ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29235
29236
29237
29238  COMPILER_NAME=C++
29239  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29240
29241  if test "x$CXX" != x; then
29242    # User has supplied compiler name already, always let that override.
29243    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29244$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29245    if test "x`basename $CXX`" = "x$CXX"; then
29246      # A command without a complete path is provided, search $PATH.
29247
29248      for ac_prog in $CXX
29249do
29250  # Extract the first word of "$ac_prog", so it can be a program name with args.
29251set dummy $ac_prog; ac_word=$2
29252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29253$as_echo_n "checking for $ac_word... " >&6; }
29254if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29255  $as_echo_n "(cached) " >&6
29256else
29257  case $POTENTIAL_CXX in
29258  [\\/]* | ?:[\\/]*)
29259  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29260  ;;
29261  *)
29262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29263for as_dir in $PATH
29264do
29265  IFS=$as_save_IFS
29266  test -z "$as_dir" && as_dir=.
29267    for ac_exec_ext in '' $ac_executable_extensions; do
29268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29269    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29271    break 2
29272  fi
29273done
29274  done
29275IFS=$as_save_IFS
29276
29277  ;;
29278esac
29279fi
29280POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29281if test -n "$POTENTIAL_CXX"; then
29282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29283$as_echo "$POTENTIAL_CXX" >&6; }
29284else
29285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29286$as_echo "no" >&6; }
29287fi
29288
29289
29290  test -n "$POTENTIAL_CXX" && break
29291done
29292
29293      if test "x$POTENTIAL_CXX" != x; then
29294        CXX=$POTENTIAL_CXX
29295      else
29296        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29297      fi
29298    else
29299      # Otherwise it might already be a complete path
29300      if test ! -x "$CXX"; then
29301        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29302      fi
29303    fi
29304  else
29305    # No user supplied value. Locate compiler ourselves.
29306
29307    # If we are cross compiling, assume cross compilation tools follows the
29308    # cross compilation standard where they are prefixed with the autoconf
29309    # standard name for the target. For example the binary
29310    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29311    # If we are not cross compiling, then the default compiler name will be
29312    # used.
29313
29314    CXX=
29315    # If TOOLS_DIR is set, check for all compiler names in there first
29316    # before checking the rest of the PATH.
29317    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29318    # step, this should not be necessary.
29319    if test -n "$TOOLS_DIR"; then
29320      PATH_save="$PATH"
29321      PATH="$TOOLS_DIR"
29322      for ac_prog in $SEARCH_LIST
29323do
29324  # Extract the first word of "$ac_prog", so it can be a program name with args.
29325set dummy $ac_prog; ac_word=$2
29326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29327$as_echo_n "checking for $ac_word... " >&6; }
29328if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29329  $as_echo_n "(cached) " >&6
29330else
29331  case $TOOLS_DIR_CXX in
29332  [\\/]* | ?:[\\/]*)
29333  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29334  ;;
29335  *)
29336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29337for as_dir in $PATH
29338do
29339  IFS=$as_save_IFS
29340  test -z "$as_dir" && as_dir=.
29341    for ac_exec_ext in '' $ac_executable_extensions; do
29342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29343    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29345    break 2
29346  fi
29347done
29348  done
29349IFS=$as_save_IFS
29350
29351  ;;
29352esac
29353fi
29354TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29355if test -n "$TOOLS_DIR_CXX"; then
29356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29357$as_echo "$TOOLS_DIR_CXX" >&6; }
29358else
29359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29360$as_echo "no" >&6; }
29361fi
29362
29363
29364  test -n "$TOOLS_DIR_CXX" && break
29365done
29366
29367      CXX=$TOOLS_DIR_CXX
29368      PATH="$PATH_save"
29369    fi
29370
29371    # AC_PATH_PROGS can't be run multiple times with the same variable,
29372    # so create a new name for this run.
29373    if test "x$CXX" = x; then
29374      for ac_prog in $SEARCH_LIST
29375do
29376  # Extract the first word of "$ac_prog", so it can be a program name with args.
29377set dummy $ac_prog; ac_word=$2
29378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29379$as_echo_n "checking for $ac_word... " >&6; }
29380if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29381  $as_echo_n "(cached) " >&6
29382else
29383  case $POTENTIAL_CXX in
29384  [\\/]* | ?:[\\/]*)
29385  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29386  ;;
29387  *)
29388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29389for as_dir in $PATH
29390do
29391  IFS=$as_save_IFS
29392  test -z "$as_dir" && as_dir=.
29393    for ac_exec_ext in '' $ac_executable_extensions; do
29394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29395    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29397    break 2
29398  fi
29399done
29400  done
29401IFS=$as_save_IFS
29402
29403  ;;
29404esac
29405fi
29406POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29407if test -n "$POTENTIAL_CXX"; then
29408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29409$as_echo "$POTENTIAL_CXX" >&6; }
29410else
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29412$as_echo "no" >&6; }
29413fi
29414
29415
29416  test -n "$POTENTIAL_CXX" && break
29417done
29418
29419      CXX=$POTENTIAL_CXX
29420    fi
29421
29422    if test "x$CXX" = x; then
29423
29424  # Print a helpful message on how to acquire the necessary build dependency.
29425  # devkit is the help tag: freetype, cups, pulse, alsa etc
29426  MISSING_DEPENDENCY=devkit
29427
29428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29429    cygwin_help $MISSING_DEPENDENCY
29430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29431    msys_help $MISSING_DEPENDENCY
29432  else
29433    PKGHANDLER_COMMAND=
29434
29435    case $PKGHANDLER in
29436      apt-get)
29437        apt_help     $MISSING_DEPENDENCY ;;
29438      yum)
29439        yum_help     $MISSING_DEPENDENCY ;;
29440      port)
29441        port_help    $MISSING_DEPENDENCY ;;
29442      pkgutil)
29443        pkgutil_help $MISSING_DEPENDENCY ;;
29444      pkgadd)
29445        pkgadd_help  $MISSING_DEPENDENCY ;;
29446    esac
29447
29448    if test "x$PKGHANDLER_COMMAND" != x; then
29449      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29450    fi
29451  fi
29452
29453      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29454    fi
29455  fi
29456
29457  # Now we have a compiler binary in CXX. Make sure it's okay.
29458
29459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29460
29461  # First separate the path from the arguments. This will split at the first
29462  # space.
29463  complete="$CXX"
29464  path="${complete%% *}"
29465  tmp="$complete EOL"
29466  arguments="${tmp#* }"
29467
29468  # Input might be given as Windows format, start by converting to
29469  # unix format.
29470  new_path=`$CYGPATH -u "$path"`
29471
29472  # Now try to locate executable using which
29473  new_path=`$WHICH "$new_path" 2> /dev/null`
29474  # bat and cmd files are not always considered executable in cygwin causing which
29475  # to not find them
29476  if test "x$new_path" = x \
29477      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29478      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29479    new_path=`$CYGPATH -u "$path"`
29480  fi
29481  if test "x$new_path" = x; then
29482    # Oops. Which didn't find the executable.
29483    # The splitting of arguments from the executable at a space might have been incorrect,
29484    # since paths with space are more likely in Windows. Give it another try with the whole
29485    # argument.
29486    path="$complete"
29487    arguments="EOL"
29488    new_path=`$CYGPATH -u "$path"`
29489    new_path=`$WHICH "$new_path" 2> /dev/null`
29490    # bat and cmd files are not always considered executable in cygwin causing which
29491    # to not find them
29492    if test "x$new_path" = x \
29493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29495      new_path=`$CYGPATH -u "$path"`
29496    fi
29497    if test "x$new_path" = x; then
29498      # It's still not found. Now this is an unrecoverable error.
29499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29500$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29501      has_space=`$ECHO "$complete" | $GREP " "`
29502      if test "x$has_space" != x; then
29503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29505      fi
29506      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29507    fi
29508  fi
29509
29510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29513  # "foo.exe" is OK but "foo" is an error.
29514  #
29515  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29516  # It is also a way to make sure we got the proper file name for the real test later on.
29517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29518  if test "x$test_shortpath" = x; then
29519    # Short path failed, file does not exist as specified.
29520    # Try adding .exe or .cmd
29521    if test -f "${new_path}.exe"; then
29522      input_to_shortpath="${new_path}.exe"
29523    elif test -f "${new_path}.cmd"; then
29524      input_to_shortpath="${new_path}.cmd"
29525    else
29526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29527$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29530      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29531    fi
29532  else
29533    input_to_shortpath="$new_path"
29534  fi
29535
29536  # Call helper function which possibly converts this using DOS-style short mode.
29537  # If so, the updated path is stored in $new_path.
29538  new_path="$input_to_shortpath"
29539
29540  input_path="$input_to_shortpath"
29541  # Check if we need to convert this using DOS-style short mode. If the path
29542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29543  # take no chances and rewrite it.
29544  # Note: m4 eats our [], so we need to use [ and ] instead.
29545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29546  if test "x$has_forbidden_chars" != x; then
29547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29551      # Going to short mode and back again did indeed matter. Since short mode is
29552      # case insensitive, let's make it lowercase to improve readability.
29553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29554      # Now convert it back to Unix-stile (cygpath)
29555      input_path=`$CYGPATH -u "$shortmode_path"`
29556      new_path="$input_path"
29557    fi
29558  fi
29559
29560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29561  if test "x$test_cygdrive_prefix" = x; then
29562    # As a simple fix, exclude /usr/bin since it's not a real path.
29563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29565      # a path prefixed by /cygdrive for fixpath to work.
29566      new_path="$CYGWIN_ROOT_PATH$input_path"
29567    fi
29568  fi
29569
29570  # remove trailing .exe if any
29571  new_path="${new_path/%.exe/}"
29572
29573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29574
29575  # First separate the path from the arguments. This will split at the first
29576  # space.
29577  complete="$CXX"
29578  path="${complete%% *}"
29579  tmp="$complete EOL"
29580  arguments="${tmp#* }"
29581
29582  # Input might be given as Windows format, start by converting to
29583  # unix format.
29584  new_path="$path"
29585
29586  windows_path="$new_path"
29587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29588    unix_path=`$CYGPATH -u "$windows_path"`
29589    new_path="$unix_path"
29590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29592    new_path="$unix_path"
29593  fi
29594
29595
29596  # Now try to locate executable using which
29597  new_path=`$WHICH "$new_path" 2> /dev/null`
29598
29599  if test "x$new_path" = x; then
29600    # Oops. Which didn't find the executable.
29601    # The splitting of arguments from the executable at a space might have been incorrect,
29602    # since paths with space are more likely in Windows. Give it another try with the whole
29603    # argument.
29604    path="$complete"
29605    arguments="EOL"
29606    new_path="$path"
29607
29608  windows_path="$new_path"
29609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29610    unix_path=`$CYGPATH -u "$windows_path"`
29611    new_path="$unix_path"
29612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29614    new_path="$unix_path"
29615  fi
29616
29617
29618    new_path=`$WHICH "$new_path" 2> /dev/null`
29619
29620    if test "x$new_path" = x; then
29621      # It's still not found. Now this is an unrecoverable error.
29622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29623$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29624      has_space=`$ECHO "$complete" | $GREP " "`
29625      if test "x$has_space" != x; then
29626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29628      fi
29629      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29630    fi
29631  fi
29632
29633  # Now new_path has a complete unix path to the binary
29634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29635    # Keep paths in /bin as-is, but remove trailing .exe if any
29636    new_path="${new_path/%.exe/}"
29637    # Do not save /bin paths to all_fixpath_prefixes!
29638  else
29639    # Not in mixed or Windows style, start by that.
29640    new_path=`cmd //c echo $new_path`
29641
29642  input_path="$new_path"
29643  # Check if we need to convert this using DOS-style short mode. If the path
29644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29645  # take no chances and rewrite it.
29646  # Note: m4 eats our [], so we need to use [ and ] instead.
29647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29648  if test "x$has_forbidden_chars" != x; then
29649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29651  fi
29652
29653    # Output is in $new_path
29654
29655  windows_path="$new_path"
29656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29657    unix_path=`$CYGPATH -u "$windows_path"`
29658    new_path="$unix_path"
29659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29661    new_path="$unix_path"
29662  fi
29663
29664    # remove trailing .exe if any
29665    new_path="${new_path/%.exe/}"
29666
29667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29669  fi
29670
29671  else
29672    # We're on a posix platform. Hooray! :)
29673    # First separate the path from the arguments. This will split at the first
29674    # space.
29675    complete="$CXX"
29676    path="${complete%% *}"
29677    tmp="$complete EOL"
29678    arguments="${tmp#* }"
29679
29680    # Cannot rely on the command "which" here since it doesn't always work.
29681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29682    if test -z "$is_absolute_path"; then
29683      # Path to executable is not absolute. Find it.
29684      IFS_save="$IFS"
29685      IFS=:
29686      for p in $PATH; do
29687        if test -f "$p/$path" && test -x "$p/$path"; then
29688          new_path="$p/$path"
29689          break
29690        fi
29691      done
29692      IFS="$IFS_save"
29693    else
29694      # This is an absolute path, we can use it without further modifications.
29695      new_path="$path"
29696    fi
29697
29698    if test "x$new_path" = x; then
29699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29700$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29701      has_space=`$ECHO "$complete" | $GREP " "`
29702      if test "x$has_space" != x; then
29703        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29705      fi
29706      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29707    fi
29708  fi
29709
29710  # Now join together the path and the arguments once again
29711  if test "x$arguments" != xEOL; then
29712    new_complete="$new_path ${arguments% *}"
29713  else
29714    new_complete="$new_path"
29715  fi
29716
29717  if test "x$complete" != "x$new_complete"; then
29718    CXX="$new_complete"
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29720$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29721  fi
29722
29723  TEST_COMPILER="$CXX"
29724  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29725  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29726  if test "x$OPENJDK_BUILD_OS" != xaix; then
29727    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29729$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29730
29731  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29732    # Follow a chain of symbolic links. Use readlink
29733    # where it exists, else fall back to horribly
29734    # complicated shell code.
29735    if test "x$READLINK_TESTED" != yes; then
29736      # On MacOSX there is a readlink tool with a different
29737      # purpose than the GNU readlink tool. Check the found readlink.
29738      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29739      if test "x$ISGNU" = x; then
29740        # A readlink that we do not know how to use.
29741        # Are there other non-GNU readlinks out there?
29742        READLINK_TESTED=yes
29743        READLINK=
29744      fi
29745    fi
29746
29747    if test "x$READLINK" != x; then
29748      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29749    else
29750      # Save the current directory for restoring afterwards
29751      STARTDIR=$PWD
29752      COUNTER=0
29753      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29754      sym_link_file=`$BASENAME $TEST_COMPILER`
29755      cd $sym_link_dir
29756      # Use -P flag to resolve symlinks in directories.
29757      cd `$THEPWDCMD -P`
29758      sym_link_dir=`$THEPWDCMD -P`
29759      # Resolve file symlinks
29760      while test $COUNTER -lt 20; do
29761        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29762        if test "x$ISLINK" == x; then
29763          # This is not a symbolic link! We are done!
29764          break
29765        fi
29766        # Again resolve directory symlinks since the target of the just found
29767        # link could be in a different directory
29768        cd `$DIRNAME $ISLINK`
29769        sym_link_dir=`$THEPWDCMD -P`
29770        sym_link_file=`$BASENAME $ISLINK`
29771        let COUNTER=COUNTER+1
29772      done
29773      cd $STARTDIR
29774      TEST_COMPILER=$sym_link_dir/$sym_link_file
29775    fi
29776  fi
29777
29778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29779$as_echo "$TEST_COMPILER" >&6; }
29780  fi
29781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29782$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29783
29784  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29785  if test "x$COMPILER_BASENAME" = "xccache"; then
29786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29787$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29788    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29789    # We want to control ccache invocation ourselves, so ignore this cc and try
29790    # searching again.
29791
29792    # Remove the path to the fake ccache cc from the PATH
29793    RETRY_COMPILER_SAVED_PATH="$PATH"
29794    COMPILER_DIRNAME=`$DIRNAME $CXX`
29795    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29796
29797    # Try again looking for our compiler
29798    if test -n "$ac_tool_prefix"; then
29799  for ac_prog in $TOOLCHAIN_CXX_BINARY
29800  do
29801    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29804$as_echo_n "checking for $ac_word... " >&6; }
29805if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29806  $as_echo_n "(cached) " >&6
29807else
29808  if test -n "$PROPER_COMPILER_CXX"; then
29809  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29810else
29811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29812for as_dir in $PATH
29813do
29814  IFS=$as_save_IFS
29815  test -z "$as_dir" && as_dir=.
29816    for ac_exec_ext in '' $ac_executable_extensions; do
29817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29818    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29820    break 2
29821  fi
29822done
29823  done
29824IFS=$as_save_IFS
29825
29826fi
29827fi
29828PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29829if test -n "$PROPER_COMPILER_CXX"; then
29830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29831$as_echo "$PROPER_COMPILER_CXX" >&6; }
29832else
29833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29834$as_echo "no" >&6; }
29835fi
29836
29837
29838    test -n "$PROPER_COMPILER_CXX" && break
29839  done
29840fi
29841if test -z "$PROPER_COMPILER_CXX"; then
29842  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29843  for ac_prog in $TOOLCHAIN_CXX_BINARY
29844do
29845  # Extract the first word of "$ac_prog", so it can be a program name with args.
29846set dummy $ac_prog; ac_word=$2
29847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29848$as_echo_n "checking for $ac_word... " >&6; }
29849if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29850  $as_echo_n "(cached) " >&6
29851else
29852  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29853  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29854else
29855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29856for as_dir in $PATH
29857do
29858  IFS=$as_save_IFS
29859  test -z "$as_dir" && as_dir=.
29860    for ac_exec_ext in '' $ac_executable_extensions; do
29861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29862    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29864    break 2
29865  fi
29866done
29867  done
29868IFS=$as_save_IFS
29869
29870fi
29871fi
29872ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29873if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29875$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29876else
29877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29878$as_echo "no" >&6; }
29879fi
29880
29881
29882  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29883done
29884
29885  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29886    PROPER_COMPILER_CXX=""
29887  else
29888    case $cross_compiling:$ac_tool_warned in
29889yes:)
29890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29892ac_tool_warned=yes ;;
29893esac
29894    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29895  fi
29896fi
29897
29898
29899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29900
29901  # First separate the path from the arguments. This will split at the first
29902  # space.
29903  complete="$PROPER_COMPILER_CXX"
29904  path="${complete%% *}"
29905  tmp="$complete EOL"
29906  arguments="${tmp#* }"
29907
29908  # Input might be given as Windows format, start by converting to
29909  # unix format.
29910  new_path=`$CYGPATH -u "$path"`
29911
29912  # Now try to locate executable using which
29913  new_path=`$WHICH "$new_path" 2> /dev/null`
29914  # bat and cmd files are not always considered executable in cygwin causing which
29915  # to not find them
29916  if test "x$new_path" = x \
29917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29919    new_path=`$CYGPATH -u "$path"`
29920  fi
29921  if test "x$new_path" = x; then
29922    # Oops. Which didn't find the executable.
29923    # The splitting of arguments from the executable at a space might have been incorrect,
29924    # since paths with space are more likely in Windows. Give it another try with the whole
29925    # argument.
29926    path="$complete"
29927    arguments="EOL"
29928    new_path=`$CYGPATH -u "$path"`
29929    new_path=`$WHICH "$new_path" 2> /dev/null`
29930    # bat and cmd files are not always considered executable in cygwin causing which
29931    # to not find them
29932    if test "x$new_path" = x \
29933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29935      new_path=`$CYGPATH -u "$path"`
29936    fi
29937    if test "x$new_path" = x; then
29938      # It's still not found. Now this is an unrecoverable error.
29939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29940$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29941      has_space=`$ECHO "$complete" | $GREP " "`
29942      if test "x$has_space" != x; then
29943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29945      fi
29946      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29947    fi
29948  fi
29949
29950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29953  # "foo.exe" is OK but "foo" is an error.
29954  #
29955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29956  # It is also a way to make sure we got the proper file name for the real test later on.
29957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29958  if test "x$test_shortpath" = x; then
29959    # Short path failed, file does not exist as specified.
29960    # Try adding .exe or .cmd
29961    if test -f "${new_path}.exe"; then
29962      input_to_shortpath="${new_path}.exe"
29963    elif test -f "${new_path}.cmd"; then
29964      input_to_shortpath="${new_path}.cmd"
29965    else
29966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29967$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29970      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29971    fi
29972  else
29973    input_to_shortpath="$new_path"
29974  fi
29975
29976  # Call helper function which possibly converts this using DOS-style short mode.
29977  # If so, the updated path is stored in $new_path.
29978  new_path="$input_to_shortpath"
29979
29980  input_path="$input_to_shortpath"
29981  # Check if we need to convert this using DOS-style short mode. If the path
29982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29983  # take no chances and rewrite it.
29984  # Note: m4 eats our [], so we need to use [ and ] instead.
29985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29986  if test "x$has_forbidden_chars" != x; then
29987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29991      # Going to short mode and back again did indeed matter. Since short mode is
29992      # case insensitive, let's make it lowercase to improve readability.
29993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29994      # Now convert it back to Unix-stile (cygpath)
29995      input_path=`$CYGPATH -u "$shortmode_path"`
29996      new_path="$input_path"
29997    fi
29998  fi
29999
30000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30001  if test "x$test_cygdrive_prefix" = x; then
30002    # As a simple fix, exclude /usr/bin since it's not a real path.
30003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30005      # a path prefixed by /cygdrive for fixpath to work.
30006      new_path="$CYGWIN_ROOT_PATH$input_path"
30007    fi
30008  fi
30009
30010  # remove trailing .exe if any
30011  new_path="${new_path/%.exe/}"
30012
30013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30014
30015  # First separate the path from the arguments. This will split at the first
30016  # space.
30017  complete="$PROPER_COMPILER_CXX"
30018  path="${complete%% *}"
30019  tmp="$complete EOL"
30020  arguments="${tmp#* }"
30021
30022  # Input might be given as Windows format, start by converting to
30023  # unix format.
30024  new_path="$path"
30025
30026  windows_path="$new_path"
30027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30028    unix_path=`$CYGPATH -u "$windows_path"`
30029    new_path="$unix_path"
30030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30032    new_path="$unix_path"
30033  fi
30034
30035
30036  # Now try to locate executable using which
30037  new_path=`$WHICH "$new_path" 2> /dev/null`
30038
30039  if test "x$new_path" = x; then
30040    # Oops. Which didn't find the executable.
30041    # The splitting of arguments from the executable at a space might have been incorrect,
30042    # since paths with space are more likely in Windows. Give it another try with the whole
30043    # argument.
30044    path="$complete"
30045    arguments="EOL"
30046    new_path="$path"
30047
30048  windows_path="$new_path"
30049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30050    unix_path=`$CYGPATH -u "$windows_path"`
30051    new_path="$unix_path"
30052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30054    new_path="$unix_path"
30055  fi
30056
30057
30058    new_path=`$WHICH "$new_path" 2> /dev/null`
30059
30060    if test "x$new_path" = x; then
30061      # It's still not found. Now this is an unrecoverable error.
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30063$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30064      has_space=`$ECHO "$complete" | $GREP " "`
30065      if test "x$has_space" != x; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30068      fi
30069      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30070    fi
30071  fi
30072
30073  # Now new_path has a complete unix path to the binary
30074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30075    # Keep paths in /bin as-is, but remove trailing .exe if any
30076    new_path="${new_path/%.exe/}"
30077    # Do not save /bin paths to all_fixpath_prefixes!
30078  else
30079    # Not in mixed or Windows style, start by that.
30080    new_path=`cmd //c echo $new_path`
30081
30082  input_path="$new_path"
30083  # Check if we need to convert this using DOS-style short mode. If the path
30084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30085  # take no chances and rewrite it.
30086  # Note: m4 eats our [], so we need to use [ and ] instead.
30087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30088  if test "x$has_forbidden_chars" != x; then
30089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30091  fi
30092
30093    # Output is in $new_path
30094
30095  windows_path="$new_path"
30096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30097    unix_path=`$CYGPATH -u "$windows_path"`
30098    new_path="$unix_path"
30099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30101    new_path="$unix_path"
30102  fi
30103
30104    # remove trailing .exe if any
30105    new_path="${new_path/%.exe/}"
30106
30107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30109  fi
30110
30111  else
30112    # We're on a posix platform. Hooray! :)
30113    # First separate the path from the arguments. This will split at the first
30114    # space.
30115    complete="$PROPER_COMPILER_CXX"
30116    path="${complete%% *}"
30117    tmp="$complete EOL"
30118    arguments="${tmp#* }"
30119
30120    # Cannot rely on the command "which" here since it doesn't always work.
30121    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30122    if test -z "$is_absolute_path"; then
30123      # Path to executable is not absolute. Find it.
30124      IFS_save="$IFS"
30125      IFS=:
30126      for p in $PATH; do
30127        if test -f "$p/$path" && test -x "$p/$path"; then
30128          new_path="$p/$path"
30129          break
30130        fi
30131      done
30132      IFS="$IFS_save"
30133    else
30134      # This is an absolute path, we can use it without further modifications.
30135      new_path="$path"
30136    fi
30137
30138    if test "x$new_path" = x; then
30139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30140$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30141      has_space=`$ECHO "$complete" | $GREP " "`
30142      if test "x$has_space" != x; then
30143        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30145      fi
30146      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30147    fi
30148  fi
30149
30150  # Now join together the path and the arguments once again
30151  if test "x$arguments" != xEOL; then
30152    new_complete="$new_path ${arguments% *}"
30153  else
30154    new_complete="$new_path"
30155  fi
30156
30157  if test "x$complete" != "x$new_complete"; then
30158    PROPER_COMPILER_CXX="$new_complete"
30159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30160$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30161  fi
30162
30163    PATH="$RETRY_COMPILER_SAVED_PATH"
30164
30165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30166$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30167
30168  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30169    # Follow a chain of symbolic links. Use readlink
30170    # where it exists, else fall back to horribly
30171    # complicated shell code.
30172    if test "x$READLINK_TESTED" != yes; then
30173      # On MacOSX there is a readlink tool with a different
30174      # purpose than the GNU readlink tool. Check the found readlink.
30175      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30176      if test "x$ISGNU" = x; then
30177        # A readlink that we do not know how to use.
30178        # Are there other non-GNU readlinks out there?
30179        READLINK_TESTED=yes
30180        READLINK=
30181      fi
30182    fi
30183
30184    if test "x$READLINK" != x; then
30185      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30186    else
30187      # Save the current directory for restoring afterwards
30188      STARTDIR=$PWD
30189      COUNTER=0
30190      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30191      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30192      cd $sym_link_dir
30193      # Use -P flag to resolve symlinks in directories.
30194      cd `$THEPWDCMD -P`
30195      sym_link_dir=`$THEPWDCMD -P`
30196      # Resolve file symlinks
30197      while test $COUNTER -lt 20; do
30198        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30199        if test "x$ISLINK" == x; then
30200          # This is not a symbolic link! We are done!
30201          break
30202        fi
30203        # Again resolve directory symlinks since the target of the just found
30204        # link could be in a different directory
30205        cd `$DIRNAME $ISLINK`
30206        sym_link_dir=`$THEPWDCMD -P`
30207        sym_link_file=`$BASENAME $ISLINK`
30208        let COUNTER=COUNTER+1
30209      done
30210      cd $STARTDIR
30211      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30212    fi
30213  fi
30214
30215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30216$as_echo "$PROPER_COMPILER_CXX" >&6; }
30217    CXX="$PROPER_COMPILER_CXX"
30218  else
30219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30220$as_echo "no, keeping CXX" >&6; }
30221  fi
30222
30223
30224  COMPILER=$CXX
30225  COMPILER_NAME=$COMPILER_NAME
30226
30227  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30228    # cc -V output typically looks like
30229    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30230    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30231    # Check that this is likely to be the Solaris Studio cc.
30232    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30233    if test $? -ne 0; then
30234      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30235      { $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
30236$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30237      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30238$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30239      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30240$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30241      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30242    fi
30243    # Remove usage instructions (if present), and
30244    # collapse compiler output into a single line
30245    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30246        $SED -e 's/ *[Uu]sage:.*//'`
30247    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30248        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30249  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30250    # xlc -qversion output typically looks like
30251    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30252    #     Version: 11.01.0000.0015
30253    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30254    # Check that this is likely to be the IBM XL C compiler.
30255    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30256    if test $? -ne 0; then
30257      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30258      { $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
30259$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30260      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30261$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30262      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30263$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30264      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30265    fi
30266    # Collapse compiler output into a single line
30267    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30268    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30269        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30270  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30271    # There is no specific version flag, but all output starts with a version string.
30272    # First line typically looks something like:
30273    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30274    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30275    # Check that this is likely to be Microsoft CL.EXE.
30276    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30277    if test $? -ne 0; then
30278      { $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
30279$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30280      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30281$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30282      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30283    fi
30284    # Collapse compiler output into a single line
30285    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30286    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30287        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30288  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30289    # gcc --version output typically looks like
30290    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30291    #     Copyright (C) 2013 Free Software Foundation, Inc.
30292    #     This is free software; see the source for copying conditions.  There is NO
30293    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30294    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30295    # Check that this is likely to be GCC.
30296    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30297    if test $? -ne 0; then
30298      { $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
30299$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30300      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30301$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30302      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30303    fi
30304    # Remove Copyright and legalese from version string, and
30305    # collapse into a single line
30306    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30307        $SED -e 's/ *Copyright .*//'`
30308    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30309        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30310  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30311    # clang --version output typically looks like
30312    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30313    #    clang version 3.3 (tags/RELEASE_33/final)
30314    # or
30315    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30316    #    Target: x86_64-pc-linux-gnu
30317    #    Thread model: posix
30318    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30319    # Check that this is likely to be clang
30320    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30321    if test $? -ne 0; then
30322      { $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
30323$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30324      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30325$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30326      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30327    fi
30328    # Collapse compiler output into a single line
30329    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30330    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30331        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30332  else
30333      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30334  fi
30335  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30336  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30337  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30338  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30339
30340  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30341$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30342
30343
30344  # Now that we have resolved CXX ourself, let autoconf have its go at it
30345  ac_ext=cpp
30346ac_cpp='$CXXCPP $CPPFLAGS'
30347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30350if test -z "$CXX"; then
30351  if test -n "$CCC"; then
30352    CXX=$CCC
30353  else
30354    if test -n "$ac_tool_prefix"; then
30355  for ac_prog in $CXX
30356  do
30357    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30358set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30360$as_echo_n "checking for $ac_word... " >&6; }
30361if ${ac_cv_prog_CXX+:} false; then :
30362  $as_echo_n "(cached) " >&6
30363else
30364  if test -n "$CXX"; then
30365  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30366else
30367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30368for as_dir in $PATH
30369do
30370  IFS=$as_save_IFS
30371  test -z "$as_dir" && as_dir=.
30372    for ac_exec_ext in '' $ac_executable_extensions; do
30373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30374    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30376    break 2
30377  fi
30378done
30379  done
30380IFS=$as_save_IFS
30381
30382fi
30383fi
30384CXX=$ac_cv_prog_CXX
30385if test -n "$CXX"; then
30386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30387$as_echo "$CXX" >&6; }
30388else
30389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30390$as_echo "no" >&6; }
30391fi
30392
30393
30394    test -n "$CXX" && break
30395  done
30396fi
30397if test -z "$CXX"; then
30398  ac_ct_CXX=$CXX
30399  for ac_prog in $CXX
30400do
30401  # Extract the first word of "$ac_prog", so it can be a program name with args.
30402set dummy $ac_prog; ac_word=$2
30403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30404$as_echo_n "checking for $ac_word... " >&6; }
30405if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30406  $as_echo_n "(cached) " >&6
30407else
30408  if test -n "$ac_ct_CXX"; then
30409  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30410else
30411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30412for as_dir in $PATH
30413do
30414  IFS=$as_save_IFS
30415  test -z "$as_dir" && as_dir=.
30416    for ac_exec_ext in '' $ac_executable_extensions; do
30417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30418    ac_cv_prog_ac_ct_CXX="$ac_prog"
30419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30420    break 2
30421  fi
30422done
30423  done
30424IFS=$as_save_IFS
30425
30426fi
30427fi
30428ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30429if test -n "$ac_ct_CXX"; then
30430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30431$as_echo "$ac_ct_CXX" >&6; }
30432else
30433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30434$as_echo "no" >&6; }
30435fi
30436
30437
30438  test -n "$ac_ct_CXX" && break
30439done
30440
30441  if test "x$ac_ct_CXX" = x; then
30442    CXX="g++"
30443  else
30444    case $cross_compiling:$ac_tool_warned in
30445yes:)
30446{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30447$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30448ac_tool_warned=yes ;;
30449esac
30450    CXX=$ac_ct_CXX
30451  fi
30452fi
30453
30454  fi
30455fi
30456# Provide some information about the compiler.
30457$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30458set X $ac_compile
30459ac_compiler=$2
30460for ac_option in --version -v -V -qversion; do
30461  { { ac_try="$ac_compiler $ac_option >&5"
30462case "(($ac_try" in
30463  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30464  *) ac_try_echo=$ac_try;;
30465esac
30466eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30467$as_echo "$ac_try_echo"; } >&5
30468  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30469  ac_status=$?
30470  if test -s conftest.err; then
30471    sed '10a\
30472... rest of stderr output deleted ...
30473         10q' conftest.err >conftest.er1
30474    cat conftest.er1 >&5
30475  fi
30476  rm -f conftest.er1 conftest.err
30477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30478  test $ac_status = 0; }
30479done
30480
30481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30482$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30483if ${ac_cv_cxx_compiler_gnu+:} false; then :
30484  $as_echo_n "(cached) " >&6
30485else
30486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30487/* end confdefs.h.  */
30488
30489int
30490main ()
30491{
30492#ifndef __GNUC__
30493       choke me
30494#endif
30495
30496  ;
30497  return 0;
30498}
30499_ACEOF
30500if ac_fn_cxx_try_compile "$LINENO"; then :
30501  ac_compiler_gnu=yes
30502else
30503  ac_compiler_gnu=no
30504fi
30505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30506ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30507
30508fi
30509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30510$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30511if test $ac_compiler_gnu = yes; then
30512  GXX=yes
30513else
30514  GXX=
30515fi
30516ac_test_CXXFLAGS=${CXXFLAGS+set}
30517ac_save_CXXFLAGS=$CXXFLAGS
30518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30519$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30520if ${ac_cv_prog_cxx_g+:} false; then :
30521  $as_echo_n "(cached) " >&6
30522else
30523  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30524   ac_cxx_werror_flag=yes
30525   ac_cv_prog_cxx_g=no
30526   CXXFLAGS="-g"
30527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30528/* end confdefs.h.  */
30529
30530int
30531main ()
30532{
30533
30534  ;
30535  return 0;
30536}
30537_ACEOF
30538if ac_fn_cxx_try_compile "$LINENO"; then :
30539  ac_cv_prog_cxx_g=yes
30540else
30541  CXXFLAGS=""
30542      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30543/* end confdefs.h.  */
30544
30545int
30546main ()
30547{
30548
30549  ;
30550  return 0;
30551}
30552_ACEOF
30553if ac_fn_cxx_try_compile "$LINENO"; then :
30554
30555else
30556  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30557	 CXXFLAGS="-g"
30558	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30559/* end confdefs.h.  */
30560
30561int
30562main ()
30563{
30564
30565  ;
30566  return 0;
30567}
30568_ACEOF
30569if ac_fn_cxx_try_compile "$LINENO"; then :
30570  ac_cv_prog_cxx_g=yes
30571fi
30572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30573fi
30574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30575fi
30576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30577   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30578fi
30579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30580$as_echo "$ac_cv_prog_cxx_g" >&6; }
30581if test "$ac_test_CXXFLAGS" = set; then
30582  CXXFLAGS=$ac_save_CXXFLAGS
30583elif test $ac_cv_prog_cxx_g = yes; then
30584  if test "$GXX" = yes; then
30585    CXXFLAGS="-g -O2"
30586  else
30587    CXXFLAGS="-g"
30588  fi
30589else
30590  if test "$GXX" = yes; then
30591    CXXFLAGS="-O2"
30592  else
30593    CXXFLAGS=
30594  fi
30595fi
30596ac_ext=cpp
30597ac_cpp='$CXXCPP $CPPFLAGS'
30598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30601
30602
30603  #
30604  # Setup the preprocessor (CPP and CXXCPP)
30605  #
30606  ac_ext=c
30607ac_cpp='$CPP $CPPFLAGS'
30608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30610ac_compiler_gnu=$ac_cv_c_compiler_gnu
30611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30612$as_echo_n "checking how to run the C preprocessor... " >&6; }
30613# On Suns, sometimes $CPP names a directory.
30614if test -n "$CPP" && test -d "$CPP"; then
30615  CPP=
30616fi
30617if test -z "$CPP"; then
30618  if ${ac_cv_prog_CPP+:} false; then :
30619  $as_echo_n "(cached) " >&6
30620else
30621      # Double quotes because CPP needs to be expanded
30622    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30623    do
30624      ac_preproc_ok=false
30625for ac_c_preproc_warn_flag in '' yes
30626do
30627  # Use a header file that comes with gcc, so configuring glibc
30628  # with a fresh cross-compiler works.
30629  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30630  # <limits.h> exists even on freestanding compilers.
30631  # On the NeXT, cc -E runs the code through the compiler's parser,
30632  # not just through cpp. "Syntax error" is here to catch this case.
30633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30634/* end confdefs.h.  */
30635#ifdef __STDC__
30636# include <limits.h>
30637#else
30638# include <assert.h>
30639#endif
30640		     Syntax error
30641_ACEOF
30642if ac_fn_c_try_cpp "$LINENO"; then :
30643
30644else
30645  # Broken: fails on valid input.
30646continue
30647fi
30648rm -f conftest.err conftest.i conftest.$ac_ext
30649
30650  # OK, works on sane cases.  Now check whether nonexistent headers
30651  # can be detected and how.
30652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30653/* end confdefs.h.  */
30654#include <ac_nonexistent.h>
30655_ACEOF
30656if ac_fn_c_try_cpp "$LINENO"; then :
30657  # Broken: success on invalid input.
30658continue
30659else
30660  # Passes both tests.
30661ac_preproc_ok=:
30662break
30663fi
30664rm -f conftest.err conftest.i conftest.$ac_ext
30665
30666done
30667# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30668rm -f conftest.i conftest.err conftest.$ac_ext
30669if $ac_preproc_ok; then :
30670  break
30671fi
30672
30673    done
30674    ac_cv_prog_CPP=$CPP
30675
30676fi
30677  CPP=$ac_cv_prog_CPP
30678else
30679  ac_cv_prog_CPP=$CPP
30680fi
30681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30682$as_echo "$CPP" >&6; }
30683ac_preproc_ok=false
30684for ac_c_preproc_warn_flag in '' yes
30685do
30686  # Use a header file that comes with gcc, so configuring glibc
30687  # with a fresh cross-compiler works.
30688  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30689  # <limits.h> exists even on freestanding compilers.
30690  # On the NeXT, cc -E runs the code through the compiler's parser,
30691  # not just through cpp. "Syntax error" is here to catch this case.
30692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30693/* end confdefs.h.  */
30694#ifdef __STDC__
30695# include <limits.h>
30696#else
30697# include <assert.h>
30698#endif
30699		     Syntax error
30700_ACEOF
30701if ac_fn_c_try_cpp "$LINENO"; then :
30702
30703else
30704  # Broken: fails on valid input.
30705continue
30706fi
30707rm -f conftest.err conftest.i conftest.$ac_ext
30708
30709  # OK, works on sane cases.  Now check whether nonexistent headers
30710  # can be detected and how.
30711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30712/* end confdefs.h.  */
30713#include <ac_nonexistent.h>
30714_ACEOF
30715if ac_fn_c_try_cpp "$LINENO"; then :
30716  # Broken: success on invalid input.
30717continue
30718else
30719  # Passes both tests.
30720ac_preproc_ok=:
30721break
30722fi
30723rm -f conftest.err conftest.i conftest.$ac_ext
30724
30725done
30726# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30727rm -f conftest.i conftest.err conftest.$ac_ext
30728if $ac_preproc_ok; then :
30729
30730else
30731  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30733as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30734See \`config.log' for more details" "$LINENO" 5; }
30735fi
30736
30737ac_ext=cpp
30738ac_cpp='$CXXCPP $CPPFLAGS'
30739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30742
30743
30744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30745
30746  # First separate the path from the arguments. This will split at the first
30747  # space.
30748  complete="$CPP"
30749  path="${complete%% *}"
30750  tmp="$complete EOL"
30751  arguments="${tmp#* }"
30752
30753  # Input might be given as Windows format, start by converting to
30754  # unix format.
30755  new_path=`$CYGPATH -u "$path"`
30756
30757  # Now try to locate executable using which
30758  new_path=`$WHICH "$new_path" 2> /dev/null`
30759  # bat and cmd files are not always considered executable in cygwin causing which
30760  # to not find them
30761  if test "x$new_path" = x \
30762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30764    new_path=`$CYGPATH -u "$path"`
30765  fi
30766  if test "x$new_path" = x; then
30767    # Oops. Which didn't find the executable.
30768    # The splitting of arguments from the executable at a space might have been incorrect,
30769    # since paths with space are more likely in Windows. Give it another try with the whole
30770    # argument.
30771    path="$complete"
30772    arguments="EOL"
30773    new_path=`$CYGPATH -u "$path"`
30774    new_path=`$WHICH "$new_path" 2> /dev/null`
30775    # bat and cmd files are not always considered executable in cygwin causing which
30776    # to not find them
30777    if test "x$new_path" = x \
30778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30780      new_path=`$CYGPATH -u "$path"`
30781    fi
30782    if test "x$new_path" = x; then
30783      # It's still not found. Now this is an unrecoverable error.
30784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30785$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30786      has_space=`$ECHO "$complete" | $GREP " "`
30787      if test "x$has_space" != x; then
30788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30790      fi
30791      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30792    fi
30793  fi
30794
30795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30798  # "foo.exe" is OK but "foo" is an error.
30799  #
30800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30801  # It is also a way to make sure we got the proper file name for the real test later on.
30802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30803  if test "x$test_shortpath" = x; then
30804    # Short path failed, file does not exist as specified.
30805    # Try adding .exe or .cmd
30806    if test -f "${new_path}.exe"; then
30807      input_to_shortpath="${new_path}.exe"
30808    elif test -f "${new_path}.cmd"; then
30809      input_to_shortpath="${new_path}.cmd"
30810    else
30811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30812$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30815      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30816    fi
30817  else
30818    input_to_shortpath="$new_path"
30819  fi
30820
30821  # Call helper function which possibly converts this using DOS-style short mode.
30822  # If so, the updated path is stored in $new_path.
30823  new_path="$input_to_shortpath"
30824
30825  input_path="$input_to_shortpath"
30826  # Check if we need to convert this using DOS-style short mode. If the path
30827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30828  # take no chances and rewrite it.
30829  # Note: m4 eats our [], so we need to use [ and ] instead.
30830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30831  if test "x$has_forbidden_chars" != x; then
30832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30836      # Going to short mode and back again did indeed matter. Since short mode is
30837      # case insensitive, let's make it lowercase to improve readability.
30838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30839      # Now convert it back to Unix-stile (cygpath)
30840      input_path=`$CYGPATH -u "$shortmode_path"`
30841      new_path="$input_path"
30842    fi
30843  fi
30844
30845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30846  if test "x$test_cygdrive_prefix" = x; then
30847    # As a simple fix, exclude /usr/bin since it's not a real path.
30848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30850      # a path prefixed by /cygdrive for fixpath to work.
30851      new_path="$CYGWIN_ROOT_PATH$input_path"
30852    fi
30853  fi
30854
30855  # remove trailing .exe if any
30856  new_path="${new_path/%.exe/}"
30857
30858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30859
30860  # First separate the path from the arguments. This will split at the first
30861  # space.
30862  complete="$CPP"
30863  path="${complete%% *}"
30864  tmp="$complete EOL"
30865  arguments="${tmp#* }"
30866
30867  # Input might be given as Windows format, start by converting to
30868  # unix format.
30869  new_path="$path"
30870
30871  windows_path="$new_path"
30872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30873    unix_path=`$CYGPATH -u "$windows_path"`
30874    new_path="$unix_path"
30875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30877    new_path="$unix_path"
30878  fi
30879
30880
30881  # Now try to locate executable using which
30882  new_path=`$WHICH "$new_path" 2> /dev/null`
30883
30884  if test "x$new_path" = x; then
30885    # Oops. Which didn't find the executable.
30886    # The splitting of arguments from the executable at a space might have been incorrect,
30887    # since paths with space are more likely in Windows. Give it another try with the whole
30888    # argument.
30889    path="$complete"
30890    arguments="EOL"
30891    new_path="$path"
30892
30893  windows_path="$new_path"
30894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30895    unix_path=`$CYGPATH -u "$windows_path"`
30896    new_path="$unix_path"
30897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30899    new_path="$unix_path"
30900  fi
30901
30902
30903    new_path=`$WHICH "$new_path" 2> /dev/null`
30904
30905    if test "x$new_path" = x; then
30906      # It's still not found. Now this is an unrecoverable error.
30907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30908$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30909      has_space=`$ECHO "$complete" | $GREP " "`
30910      if test "x$has_space" != x; then
30911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30913      fi
30914      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30915    fi
30916  fi
30917
30918  # Now new_path has a complete unix path to the binary
30919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30920    # Keep paths in /bin as-is, but remove trailing .exe if any
30921    new_path="${new_path/%.exe/}"
30922    # Do not save /bin paths to all_fixpath_prefixes!
30923  else
30924    # Not in mixed or Windows style, start by that.
30925    new_path=`cmd //c echo $new_path`
30926
30927  input_path="$new_path"
30928  # Check if we need to convert this using DOS-style short mode. If the path
30929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30930  # take no chances and rewrite it.
30931  # Note: m4 eats our [], so we need to use [ and ] instead.
30932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30933  if test "x$has_forbidden_chars" != x; then
30934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30936  fi
30937
30938    # Output is in $new_path
30939
30940  windows_path="$new_path"
30941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30942    unix_path=`$CYGPATH -u "$windows_path"`
30943    new_path="$unix_path"
30944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30946    new_path="$unix_path"
30947  fi
30948
30949    # remove trailing .exe if any
30950    new_path="${new_path/%.exe/}"
30951
30952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30954  fi
30955
30956  else
30957    # We're on a posix platform. Hooray! :)
30958    # First separate the path from the arguments. This will split at the first
30959    # space.
30960    complete="$CPP"
30961    path="${complete%% *}"
30962    tmp="$complete EOL"
30963    arguments="${tmp#* }"
30964
30965    # Cannot rely on the command "which" here since it doesn't always work.
30966    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30967    if test -z "$is_absolute_path"; then
30968      # Path to executable is not absolute. Find it.
30969      IFS_save="$IFS"
30970      IFS=:
30971      for p in $PATH; do
30972        if test -f "$p/$path" && test -x "$p/$path"; then
30973          new_path="$p/$path"
30974          break
30975        fi
30976      done
30977      IFS="$IFS_save"
30978    else
30979      # This is an absolute path, we can use it without further modifications.
30980      new_path="$path"
30981    fi
30982
30983    if test "x$new_path" = x; then
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30985$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30986      has_space=`$ECHO "$complete" | $GREP " "`
30987      if test "x$has_space" != x; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30990      fi
30991      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30992    fi
30993  fi
30994
30995  # Now join together the path and the arguments once again
30996  if test "x$arguments" != xEOL; then
30997    new_complete="$new_path ${arguments% *}"
30998  else
30999    new_complete="$new_path"
31000  fi
31001
31002  if test "x$complete" != "x$new_complete"; then
31003    CPP="$new_complete"
31004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31005$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31006  fi
31007
31008  ac_ext=cpp
31009ac_cpp='$CXXCPP $CPPFLAGS'
31010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31014$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31015if test -z "$CXXCPP"; then
31016  if ${ac_cv_prog_CXXCPP+:} false; then :
31017  $as_echo_n "(cached) " >&6
31018else
31019      # Double quotes because CXXCPP needs to be expanded
31020    for CXXCPP in "$CXX -E" "/lib/cpp"
31021    do
31022      ac_preproc_ok=false
31023for ac_cxx_preproc_warn_flag in '' yes
31024do
31025  # Use a header file that comes with gcc, so configuring glibc
31026  # with a fresh cross-compiler works.
31027  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31028  # <limits.h> exists even on freestanding compilers.
31029  # On the NeXT, cc -E runs the code through the compiler's parser,
31030  # not just through cpp. "Syntax error" is here to catch this case.
31031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31032/* end confdefs.h.  */
31033#ifdef __STDC__
31034# include <limits.h>
31035#else
31036# include <assert.h>
31037#endif
31038		     Syntax error
31039_ACEOF
31040if ac_fn_cxx_try_cpp "$LINENO"; then :
31041
31042else
31043  # Broken: fails on valid input.
31044continue
31045fi
31046rm -f conftest.err conftest.i conftest.$ac_ext
31047
31048  # OK, works on sane cases.  Now check whether nonexistent headers
31049  # can be detected and how.
31050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31051/* end confdefs.h.  */
31052#include <ac_nonexistent.h>
31053_ACEOF
31054if ac_fn_cxx_try_cpp "$LINENO"; then :
31055  # Broken: success on invalid input.
31056continue
31057else
31058  # Passes both tests.
31059ac_preproc_ok=:
31060break
31061fi
31062rm -f conftest.err conftest.i conftest.$ac_ext
31063
31064done
31065# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31066rm -f conftest.i conftest.err conftest.$ac_ext
31067if $ac_preproc_ok; then :
31068  break
31069fi
31070
31071    done
31072    ac_cv_prog_CXXCPP=$CXXCPP
31073
31074fi
31075  CXXCPP=$ac_cv_prog_CXXCPP
31076else
31077  ac_cv_prog_CXXCPP=$CXXCPP
31078fi
31079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31080$as_echo "$CXXCPP" >&6; }
31081ac_preproc_ok=false
31082for ac_cxx_preproc_warn_flag in '' yes
31083do
31084  # Use a header file that comes with gcc, so configuring glibc
31085  # with a fresh cross-compiler works.
31086  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31087  # <limits.h> exists even on freestanding compilers.
31088  # On the NeXT, cc -E runs the code through the compiler's parser,
31089  # not just through cpp. "Syntax error" is here to catch this case.
31090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31091/* end confdefs.h.  */
31092#ifdef __STDC__
31093# include <limits.h>
31094#else
31095# include <assert.h>
31096#endif
31097		     Syntax error
31098_ACEOF
31099if ac_fn_cxx_try_cpp "$LINENO"; then :
31100
31101else
31102  # Broken: fails on valid input.
31103continue
31104fi
31105rm -f conftest.err conftest.i conftest.$ac_ext
31106
31107  # OK, works on sane cases.  Now check whether nonexistent headers
31108  # can be detected and how.
31109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31110/* end confdefs.h.  */
31111#include <ac_nonexistent.h>
31112_ACEOF
31113if ac_fn_cxx_try_cpp "$LINENO"; then :
31114  # Broken: success on invalid input.
31115continue
31116else
31117  # Passes both tests.
31118ac_preproc_ok=:
31119break
31120fi
31121rm -f conftest.err conftest.i conftest.$ac_ext
31122
31123done
31124# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31125rm -f conftest.i conftest.err conftest.$ac_ext
31126if $ac_preproc_ok; then :
31127
31128else
31129  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31131as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31132See \`config.log' for more details" "$LINENO" 5; }
31133fi
31134
31135ac_ext=cpp
31136ac_cpp='$CXXCPP $CPPFLAGS'
31137ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31138ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31139ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31140
31141
31142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31143
31144  # First separate the path from the arguments. This will split at the first
31145  # space.
31146  complete="$CXXCPP"
31147  path="${complete%% *}"
31148  tmp="$complete EOL"
31149  arguments="${tmp#* }"
31150
31151  # Input might be given as Windows format, start by converting to
31152  # unix format.
31153  new_path=`$CYGPATH -u "$path"`
31154
31155  # Now try to locate executable using which
31156  new_path=`$WHICH "$new_path" 2> /dev/null`
31157  # bat and cmd files are not always considered executable in cygwin causing which
31158  # to not find them
31159  if test "x$new_path" = x \
31160      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31161      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31162    new_path=`$CYGPATH -u "$path"`
31163  fi
31164  if test "x$new_path" = x; then
31165    # Oops. Which didn't find the executable.
31166    # The splitting of arguments from the executable at a space might have been incorrect,
31167    # since paths with space are more likely in Windows. Give it another try with the whole
31168    # argument.
31169    path="$complete"
31170    arguments="EOL"
31171    new_path=`$CYGPATH -u "$path"`
31172    new_path=`$WHICH "$new_path" 2> /dev/null`
31173    # bat and cmd files are not always considered executable in cygwin causing which
31174    # to not find them
31175    if test "x$new_path" = x \
31176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31178      new_path=`$CYGPATH -u "$path"`
31179    fi
31180    if test "x$new_path" = x; then
31181      # It's still not found. Now this is an unrecoverable error.
31182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31183$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31184      has_space=`$ECHO "$complete" | $GREP " "`
31185      if test "x$has_space" != x; then
31186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31188      fi
31189      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31190    fi
31191  fi
31192
31193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31196  # "foo.exe" is OK but "foo" is an error.
31197  #
31198  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31199  # It is also a way to make sure we got the proper file name for the real test later on.
31200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31201  if test "x$test_shortpath" = x; then
31202    # Short path failed, file does not exist as specified.
31203    # Try adding .exe or .cmd
31204    if test -f "${new_path}.exe"; then
31205      input_to_shortpath="${new_path}.exe"
31206    elif test -f "${new_path}.cmd"; then
31207      input_to_shortpath="${new_path}.cmd"
31208    else
31209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31210$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31211      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31212$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31213      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31214    fi
31215  else
31216    input_to_shortpath="$new_path"
31217  fi
31218
31219  # Call helper function which possibly converts this using DOS-style short mode.
31220  # If so, the updated path is stored in $new_path.
31221  new_path="$input_to_shortpath"
31222
31223  input_path="$input_to_shortpath"
31224  # Check if we need to convert this using DOS-style short mode. If the path
31225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31226  # take no chances and rewrite it.
31227  # Note: m4 eats our [], so we need to use [ and ] instead.
31228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31229  if test "x$has_forbidden_chars" != x; then
31230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31234      # Going to short mode and back again did indeed matter. Since short mode is
31235      # case insensitive, let's make it lowercase to improve readability.
31236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31237      # Now convert it back to Unix-stile (cygpath)
31238      input_path=`$CYGPATH -u "$shortmode_path"`
31239      new_path="$input_path"
31240    fi
31241  fi
31242
31243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31244  if test "x$test_cygdrive_prefix" = x; then
31245    # As a simple fix, exclude /usr/bin since it's not a real path.
31246    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31248      # a path prefixed by /cygdrive for fixpath to work.
31249      new_path="$CYGWIN_ROOT_PATH$input_path"
31250    fi
31251  fi
31252
31253  # remove trailing .exe if any
31254  new_path="${new_path/%.exe/}"
31255
31256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31257
31258  # First separate the path from the arguments. This will split at the first
31259  # space.
31260  complete="$CXXCPP"
31261  path="${complete%% *}"
31262  tmp="$complete EOL"
31263  arguments="${tmp#* }"
31264
31265  # Input might be given as Windows format, start by converting to
31266  # unix format.
31267  new_path="$path"
31268
31269  windows_path="$new_path"
31270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31271    unix_path=`$CYGPATH -u "$windows_path"`
31272    new_path="$unix_path"
31273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31275    new_path="$unix_path"
31276  fi
31277
31278
31279  # Now try to locate executable using which
31280  new_path=`$WHICH "$new_path" 2> /dev/null`
31281
31282  if test "x$new_path" = x; then
31283    # Oops. Which didn't find the executable.
31284    # The splitting of arguments from the executable at a space might have been incorrect,
31285    # since paths with space are more likely in Windows. Give it another try with the whole
31286    # argument.
31287    path="$complete"
31288    arguments="EOL"
31289    new_path="$path"
31290
31291  windows_path="$new_path"
31292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31293    unix_path=`$CYGPATH -u "$windows_path"`
31294    new_path="$unix_path"
31295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31297    new_path="$unix_path"
31298  fi
31299
31300
31301    new_path=`$WHICH "$new_path" 2> /dev/null`
31302
31303    if test "x$new_path" = x; then
31304      # It's still not found. Now this is an unrecoverable error.
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31306$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31307      has_space=`$ECHO "$complete" | $GREP " "`
31308      if test "x$has_space" != x; then
31309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31311      fi
31312      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31313    fi
31314  fi
31315
31316  # Now new_path has a complete unix path to the binary
31317  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31318    # Keep paths in /bin as-is, but remove trailing .exe if any
31319    new_path="${new_path/%.exe/}"
31320    # Do not save /bin paths to all_fixpath_prefixes!
31321  else
31322    # Not in mixed or Windows style, start by that.
31323    new_path=`cmd //c echo $new_path`
31324
31325  input_path="$new_path"
31326  # Check if we need to convert this using DOS-style short mode. If the path
31327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31328  # take no chances and rewrite it.
31329  # Note: m4 eats our [], so we need to use [ and ] instead.
31330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31331  if test "x$has_forbidden_chars" != x; then
31332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31334  fi
31335
31336    # Output is in $new_path
31337
31338  windows_path="$new_path"
31339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31340    unix_path=`$CYGPATH -u "$windows_path"`
31341    new_path="$unix_path"
31342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31344    new_path="$unix_path"
31345  fi
31346
31347    # remove trailing .exe if any
31348    new_path="${new_path/%.exe/}"
31349
31350    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31351    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31352  fi
31353
31354  else
31355    # We're on a posix platform. Hooray! :)
31356    # First separate the path from the arguments. This will split at the first
31357    # space.
31358    complete="$CXXCPP"
31359    path="${complete%% *}"
31360    tmp="$complete EOL"
31361    arguments="${tmp#* }"
31362
31363    # Cannot rely on the command "which" here since it doesn't always work.
31364    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31365    if test -z "$is_absolute_path"; then
31366      # Path to executable is not absolute. Find it.
31367      IFS_save="$IFS"
31368      IFS=:
31369      for p in $PATH; do
31370        if test -f "$p/$path" && test -x "$p/$path"; then
31371          new_path="$p/$path"
31372          break
31373        fi
31374      done
31375      IFS="$IFS_save"
31376    else
31377      # This is an absolute path, we can use it without further modifications.
31378      new_path="$path"
31379    fi
31380
31381    if test "x$new_path" = x; then
31382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31383$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31384      has_space=`$ECHO "$complete" | $GREP " "`
31385      if test "x$has_space" != x; then
31386        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31388      fi
31389      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31390    fi
31391  fi
31392
31393  # Now join together the path and the arguments once again
31394  if test "x$arguments" != xEOL; then
31395    new_complete="$new_path ${arguments% *}"
31396  else
31397    new_complete="$new_path"
31398  fi
31399
31400  if test "x$complete" != "x$new_complete"; then
31401    CXXCPP="$new_complete"
31402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31403$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31404  fi
31405
31406
31407  #
31408  # Setup the linker (LD)
31409  #
31410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31411    # In the Microsoft toolchain we have a separate LD command "link".
31412    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31413    # a cygwin program for something completely different.
31414    # Extract the first word of "link", so it can be a program name with args.
31415set dummy link; ac_word=$2
31416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31417$as_echo_n "checking for $ac_word... " >&6; }
31418if ${ac_cv_prog_LD+:} false; then :
31419  $as_echo_n "(cached) " >&6
31420else
31421  if test -n "$LD"; then
31422  ac_cv_prog_LD="$LD" # Let the user override the test.
31423else
31424  ac_prog_rejected=no
31425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31426for as_dir in $PATH
31427do
31428  IFS=$as_save_IFS
31429  test -z "$as_dir" && as_dir=.
31430    for ac_exec_ext in '' $ac_executable_extensions; do
31431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31432    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31433       ac_prog_rejected=yes
31434       continue
31435     fi
31436    ac_cv_prog_LD="link"
31437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31438    break 2
31439  fi
31440done
31441  done
31442IFS=$as_save_IFS
31443
31444if test $ac_prog_rejected = yes; then
31445  # We found a bogon in the path, so make sure we never use it.
31446  set dummy $ac_cv_prog_LD
31447  shift
31448  if test $# != 0; then
31449    # We chose a different compiler from the bogus one.
31450    # However, it has the same basename, so the bogon will be chosen
31451    # first if we set LD to just the basename; use the full file name.
31452    shift
31453    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31454  fi
31455fi
31456fi
31457fi
31458LD=$ac_cv_prog_LD
31459if test -n "$LD"; then
31460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31461$as_echo "$LD" >&6; }
31462else
31463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31464$as_echo "no" >&6; }
31465fi
31466
31467
31468
31469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31470
31471  # First separate the path from the arguments. This will split at the first
31472  # space.
31473  complete="$LD"
31474  path="${complete%% *}"
31475  tmp="$complete EOL"
31476  arguments="${tmp#* }"
31477
31478  # Input might be given as Windows format, start by converting to
31479  # unix format.
31480  new_path=`$CYGPATH -u "$path"`
31481
31482  # Now try to locate executable using which
31483  new_path=`$WHICH "$new_path" 2> /dev/null`
31484  # bat and cmd files are not always considered executable in cygwin causing which
31485  # to not find them
31486  if test "x$new_path" = x \
31487      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31488      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31489    new_path=`$CYGPATH -u "$path"`
31490  fi
31491  if test "x$new_path" = x; then
31492    # Oops. Which didn't find the executable.
31493    # The splitting of arguments from the executable at a space might have been incorrect,
31494    # since paths with space are more likely in Windows. Give it another try with the whole
31495    # argument.
31496    path="$complete"
31497    arguments="EOL"
31498    new_path=`$CYGPATH -u "$path"`
31499    new_path=`$WHICH "$new_path" 2> /dev/null`
31500    # bat and cmd files are not always considered executable in cygwin causing which
31501    # to not find them
31502    if test "x$new_path" = x \
31503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31505      new_path=`$CYGPATH -u "$path"`
31506    fi
31507    if test "x$new_path" = x; then
31508      # It's still not found. Now this is an unrecoverable error.
31509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31510$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31511      has_space=`$ECHO "$complete" | $GREP " "`
31512      if test "x$has_space" != x; then
31513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31515      fi
31516      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31517    fi
31518  fi
31519
31520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31523  # "foo.exe" is OK but "foo" is an error.
31524  #
31525  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31526  # It is also a way to make sure we got the proper file name for the real test later on.
31527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31528  if test "x$test_shortpath" = x; then
31529    # Short path failed, file does not exist as specified.
31530    # Try adding .exe or .cmd
31531    if test -f "${new_path}.exe"; then
31532      input_to_shortpath="${new_path}.exe"
31533    elif test -f "${new_path}.cmd"; then
31534      input_to_shortpath="${new_path}.cmd"
31535    else
31536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31537$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31538      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31539$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31540      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31541    fi
31542  else
31543    input_to_shortpath="$new_path"
31544  fi
31545
31546  # Call helper function which possibly converts this using DOS-style short mode.
31547  # If so, the updated path is stored in $new_path.
31548  new_path="$input_to_shortpath"
31549
31550  input_path="$input_to_shortpath"
31551  # Check if we need to convert this using DOS-style short mode. If the path
31552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31553  # take no chances and rewrite it.
31554  # Note: m4 eats our [], so we need to use [ and ] instead.
31555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31556  if test "x$has_forbidden_chars" != x; then
31557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31561      # Going to short mode and back again did indeed matter. Since short mode is
31562      # case insensitive, let's make it lowercase to improve readability.
31563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31564      # Now convert it back to Unix-stile (cygpath)
31565      input_path=`$CYGPATH -u "$shortmode_path"`
31566      new_path="$input_path"
31567    fi
31568  fi
31569
31570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31571  if test "x$test_cygdrive_prefix" = x; then
31572    # As a simple fix, exclude /usr/bin since it's not a real path.
31573    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31575      # a path prefixed by /cygdrive for fixpath to work.
31576      new_path="$CYGWIN_ROOT_PATH$input_path"
31577    fi
31578  fi
31579
31580  # remove trailing .exe if any
31581  new_path="${new_path/%.exe/}"
31582
31583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31584
31585  # First separate the path from the arguments. This will split at the first
31586  # space.
31587  complete="$LD"
31588  path="${complete%% *}"
31589  tmp="$complete EOL"
31590  arguments="${tmp#* }"
31591
31592  # Input might be given as Windows format, start by converting to
31593  # unix format.
31594  new_path="$path"
31595
31596  windows_path="$new_path"
31597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31598    unix_path=`$CYGPATH -u "$windows_path"`
31599    new_path="$unix_path"
31600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31602    new_path="$unix_path"
31603  fi
31604
31605
31606  # Now try to locate executable using which
31607  new_path=`$WHICH "$new_path" 2> /dev/null`
31608
31609  if test "x$new_path" = x; then
31610    # Oops. Which didn't find the executable.
31611    # The splitting of arguments from the executable at a space might have been incorrect,
31612    # since paths with space are more likely in Windows. Give it another try with the whole
31613    # argument.
31614    path="$complete"
31615    arguments="EOL"
31616    new_path="$path"
31617
31618  windows_path="$new_path"
31619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31620    unix_path=`$CYGPATH -u "$windows_path"`
31621    new_path="$unix_path"
31622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31624    new_path="$unix_path"
31625  fi
31626
31627
31628    new_path=`$WHICH "$new_path" 2> /dev/null`
31629
31630    if test "x$new_path" = x; then
31631      # It's still not found. Now this is an unrecoverable error.
31632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31633$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31634      has_space=`$ECHO "$complete" | $GREP " "`
31635      if test "x$has_space" != x; then
31636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31638      fi
31639      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31640    fi
31641  fi
31642
31643  # Now new_path has a complete unix path to the binary
31644  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31645    # Keep paths in /bin as-is, but remove trailing .exe if any
31646    new_path="${new_path/%.exe/}"
31647    # Do not save /bin paths to all_fixpath_prefixes!
31648  else
31649    # Not in mixed or Windows style, start by that.
31650    new_path=`cmd //c echo $new_path`
31651
31652  input_path="$new_path"
31653  # Check if we need to convert this using DOS-style short mode. If the path
31654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31655  # take no chances and rewrite it.
31656  # Note: m4 eats our [], so we need to use [ and ] instead.
31657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31658  if test "x$has_forbidden_chars" != x; then
31659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31661  fi
31662
31663    # Output is in $new_path
31664
31665  windows_path="$new_path"
31666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31667    unix_path=`$CYGPATH -u "$windows_path"`
31668    new_path="$unix_path"
31669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31671    new_path="$unix_path"
31672  fi
31673
31674    # remove trailing .exe if any
31675    new_path="${new_path/%.exe/}"
31676
31677    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31678    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31679  fi
31680
31681  else
31682    # We're on a posix platform. Hooray! :)
31683    # First separate the path from the arguments. This will split at the first
31684    # space.
31685    complete="$LD"
31686    path="${complete%% *}"
31687    tmp="$complete EOL"
31688    arguments="${tmp#* }"
31689
31690    # Cannot rely on the command "which" here since it doesn't always work.
31691    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31692    if test -z "$is_absolute_path"; then
31693      # Path to executable is not absolute. Find it.
31694      IFS_save="$IFS"
31695      IFS=:
31696      for p in $PATH; do
31697        if test -f "$p/$path" && test -x "$p/$path"; then
31698          new_path="$p/$path"
31699          break
31700        fi
31701      done
31702      IFS="$IFS_save"
31703    else
31704      # This is an absolute path, we can use it without further modifications.
31705      new_path="$path"
31706    fi
31707
31708    if test "x$new_path" = x; then
31709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31710$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31711      has_space=`$ECHO "$complete" | $GREP " "`
31712      if test "x$has_space" != x; then
31713        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31714$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31715      fi
31716      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31717    fi
31718  fi
31719
31720  # Now join together the path and the arguments once again
31721  if test "x$arguments" != xEOL; then
31722    new_complete="$new_path ${arguments% *}"
31723  else
31724    new_complete="$new_path"
31725  fi
31726
31727  if test "x$complete" != "x$new_complete"; then
31728    LD="$new_complete"
31729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31730$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31731  fi
31732
31733    # Verify that we indeed succeeded with this trick.
31734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31735$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31736    "$LD" --version > /dev/null
31737    if test $? -eq 0 ; then
31738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31739$as_echo "no" >&6; }
31740      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31741    else
31742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31743$as_echo "yes" >&6; }
31744    fi
31745    LDCXX="$LD"
31746  else
31747    # All other toolchains use the compiler to link.
31748    LD="$CC"
31749    LDCXX="$CXX"
31750  fi
31751
31752  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31753
31754
31755  #
31756  # Setup the assembler (AS)
31757  #
31758  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31759    # FIXME: should this really be solaris, or solstudio?
31760
31761
31762  # Publish this variable in the help.
31763
31764
31765  if test "x$AS" = x; then
31766    # The variable is not set by user, try to locate tool using the code snippet
31767    for ac_prog in as
31768do
31769  # Extract the first word of "$ac_prog", so it can be a program name with args.
31770set dummy $ac_prog; ac_word=$2
31771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31772$as_echo_n "checking for $ac_word... " >&6; }
31773if ${ac_cv_path_AS+:} false; then :
31774  $as_echo_n "(cached) " >&6
31775else
31776  case $AS in
31777  [\\/]* | ?:[\\/]*)
31778  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31779  ;;
31780  *)
31781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31782for as_dir in $PATH
31783do
31784  IFS=$as_save_IFS
31785  test -z "$as_dir" && as_dir=.
31786    for ac_exec_ext in '' $ac_executable_extensions; do
31787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31788    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31790    break 2
31791  fi
31792done
31793  done
31794IFS=$as_save_IFS
31795
31796  ;;
31797esac
31798fi
31799AS=$ac_cv_path_AS
31800if test -n "$AS"; then
31801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31802$as_echo "$AS" >&6; }
31803else
31804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31805$as_echo "no" >&6; }
31806fi
31807
31808
31809  test -n "$AS" && break
31810done
31811
31812  else
31813    # The variable is set, but is it from the command line or the environment?
31814
31815    # Try to remove the string !AS! from our list.
31816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31818      # If it failed, the variable was not from the command line. Ignore it,
31819      # but warn the user (except for BASH, which is always set by the calling BASH).
31820      if test "xAS" != xBASH; then
31821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31822$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31823      fi
31824      # Try to locate tool using the code snippet
31825      for ac_prog in as
31826do
31827  # Extract the first word of "$ac_prog", so it can be a program name with args.
31828set dummy $ac_prog; ac_word=$2
31829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31830$as_echo_n "checking for $ac_word... " >&6; }
31831if ${ac_cv_path_AS+:} false; then :
31832  $as_echo_n "(cached) " >&6
31833else
31834  case $AS in
31835  [\\/]* | ?:[\\/]*)
31836  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31837  ;;
31838  *)
31839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31840for as_dir in $PATH
31841do
31842  IFS=$as_save_IFS
31843  test -z "$as_dir" && as_dir=.
31844    for ac_exec_ext in '' $ac_executable_extensions; do
31845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31846    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31848    break 2
31849  fi
31850done
31851  done
31852IFS=$as_save_IFS
31853
31854  ;;
31855esac
31856fi
31857AS=$ac_cv_path_AS
31858if test -n "$AS"; then
31859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31860$as_echo "$AS" >&6; }
31861else
31862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31863$as_echo "no" >&6; }
31864fi
31865
31866
31867  test -n "$AS" && break
31868done
31869
31870    else
31871      # If it succeeded, then it was overridden by the user. We will use it
31872      # for the tool.
31873
31874      # First remove it from the list of overridden variables, so we can test
31875      # for unknown variables in the end.
31876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31877
31878      # Check if the provided tool contains a complete path.
31879      tool_specified="$AS"
31880      tool_basename="${tool_specified##*/}"
31881      if test "x$tool_basename" = "x$tool_specified"; then
31882        # A command without a complete path is provided, search $PATH.
31883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31884$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31885        # Extract the first word of "$tool_basename", so it can be a program name with args.
31886set dummy $tool_basename; ac_word=$2
31887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31888$as_echo_n "checking for $ac_word... " >&6; }
31889if ${ac_cv_path_AS+:} false; then :
31890  $as_echo_n "(cached) " >&6
31891else
31892  case $AS in
31893  [\\/]* | ?:[\\/]*)
31894  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31895  ;;
31896  *)
31897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31898for as_dir in $PATH
31899do
31900  IFS=$as_save_IFS
31901  test -z "$as_dir" && as_dir=.
31902    for ac_exec_ext in '' $ac_executable_extensions; do
31903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31904    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31906    break 2
31907  fi
31908done
31909  done
31910IFS=$as_save_IFS
31911
31912  ;;
31913esac
31914fi
31915AS=$ac_cv_path_AS
31916if test -n "$AS"; then
31917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31918$as_echo "$AS" >&6; }
31919else
31920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31921$as_echo "no" >&6; }
31922fi
31923
31924
31925        if test "x$AS" = x; then
31926          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31927        fi
31928      else
31929        # Otherwise we believe it is a complete path. Use it as it is.
31930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31931$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31933$as_echo_n "checking for AS... " >&6; }
31934        if test ! -x "$tool_specified"; then
31935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31936$as_echo "not found" >&6; }
31937          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31938        fi
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31940$as_echo "$tool_specified" >&6; }
31941      fi
31942    fi
31943  fi
31944
31945
31946
31947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31948
31949  # First separate the path from the arguments. This will split at the first
31950  # space.
31951  complete="$AS"
31952  path="${complete%% *}"
31953  tmp="$complete EOL"
31954  arguments="${tmp#* }"
31955
31956  # Input might be given as Windows format, start by converting to
31957  # unix format.
31958  new_path=`$CYGPATH -u "$path"`
31959
31960  # Now try to locate executable using which
31961  new_path=`$WHICH "$new_path" 2> /dev/null`
31962  # bat and cmd files are not always considered executable in cygwin causing which
31963  # to not find them
31964  if test "x$new_path" = x \
31965      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31966      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31967    new_path=`$CYGPATH -u "$path"`
31968  fi
31969  if test "x$new_path" = x; then
31970    # Oops. Which didn't find the executable.
31971    # The splitting of arguments from the executable at a space might have been incorrect,
31972    # since paths with space are more likely in Windows. Give it another try with the whole
31973    # argument.
31974    path="$complete"
31975    arguments="EOL"
31976    new_path=`$CYGPATH -u "$path"`
31977    new_path=`$WHICH "$new_path" 2> /dev/null`
31978    # bat and cmd files are not always considered executable in cygwin causing which
31979    # to not find them
31980    if test "x$new_path" = x \
31981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31983      new_path=`$CYGPATH -u "$path"`
31984    fi
31985    if test "x$new_path" = x; then
31986      # It's still not found. Now this is an unrecoverable error.
31987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31988$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31989      has_space=`$ECHO "$complete" | $GREP " "`
31990      if test "x$has_space" != x; then
31991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31993      fi
31994      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31995    fi
31996  fi
31997
31998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32001  # "foo.exe" is OK but "foo" is an error.
32002  #
32003  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32004  # It is also a way to make sure we got the proper file name for the real test later on.
32005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32006  if test "x$test_shortpath" = x; then
32007    # Short path failed, file does not exist as specified.
32008    # Try adding .exe or .cmd
32009    if test -f "${new_path}.exe"; then
32010      input_to_shortpath="${new_path}.exe"
32011    elif test -f "${new_path}.cmd"; then
32012      input_to_shortpath="${new_path}.cmd"
32013    else
32014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32015$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32018      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32019    fi
32020  else
32021    input_to_shortpath="$new_path"
32022  fi
32023
32024  # Call helper function which possibly converts this using DOS-style short mode.
32025  # If so, the updated path is stored in $new_path.
32026  new_path="$input_to_shortpath"
32027
32028  input_path="$input_to_shortpath"
32029  # Check if we need to convert this using DOS-style short mode. If the path
32030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32031  # take no chances and rewrite it.
32032  # Note: m4 eats our [], so we need to use [ and ] instead.
32033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32034  if test "x$has_forbidden_chars" != x; then
32035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32039      # Going to short mode and back again did indeed matter. Since short mode is
32040      # case insensitive, let's make it lowercase to improve readability.
32041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32042      # Now convert it back to Unix-stile (cygpath)
32043      input_path=`$CYGPATH -u "$shortmode_path"`
32044      new_path="$input_path"
32045    fi
32046  fi
32047
32048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32049  if test "x$test_cygdrive_prefix" = x; then
32050    # As a simple fix, exclude /usr/bin since it's not a real path.
32051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32053      # a path prefixed by /cygdrive for fixpath to work.
32054      new_path="$CYGWIN_ROOT_PATH$input_path"
32055    fi
32056  fi
32057
32058  # remove trailing .exe if any
32059  new_path="${new_path/%.exe/}"
32060
32061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32062
32063  # First separate the path from the arguments. This will split at the first
32064  # space.
32065  complete="$AS"
32066  path="${complete%% *}"
32067  tmp="$complete EOL"
32068  arguments="${tmp#* }"
32069
32070  # Input might be given as Windows format, start by converting to
32071  # unix format.
32072  new_path="$path"
32073
32074  windows_path="$new_path"
32075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32076    unix_path=`$CYGPATH -u "$windows_path"`
32077    new_path="$unix_path"
32078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32080    new_path="$unix_path"
32081  fi
32082
32083
32084  # Now try to locate executable using which
32085  new_path=`$WHICH "$new_path" 2> /dev/null`
32086
32087  if test "x$new_path" = x; then
32088    # Oops. Which didn't find the executable.
32089    # The splitting of arguments from the executable at a space might have been incorrect,
32090    # since paths with space are more likely in Windows. Give it another try with the whole
32091    # argument.
32092    path="$complete"
32093    arguments="EOL"
32094    new_path="$path"
32095
32096  windows_path="$new_path"
32097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32098    unix_path=`$CYGPATH -u "$windows_path"`
32099    new_path="$unix_path"
32100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32102    new_path="$unix_path"
32103  fi
32104
32105
32106    new_path=`$WHICH "$new_path" 2> /dev/null`
32107
32108    if test "x$new_path" = x; then
32109      # It's still not found. Now this is an unrecoverable error.
32110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32111$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32112      has_space=`$ECHO "$complete" | $GREP " "`
32113      if test "x$has_space" != x; then
32114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32116      fi
32117      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32118    fi
32119  fi
32120
32121  # Now new_path has a complete unix path to the binary
32122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32123    # Keep paths in /bin as-is, but remove trailing .exe if any
32124    new_path="${new_path/%.exe/}"
32125    # Do not save /bin paths to all_fixpath_prefixes!
32126  else
32127    # Not in mixed or Windows style, start by that.
32128    new_path=`cmd //c echo $new_path`
32129
32130  input_path="$new_path"
32131  # Check if we need to convert this using DOS-style short mode. If the path
32132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32133  # take no chances and rewrite it.
32134  # Note: m4 eats our [], so we need to use [ and ] instead.
32135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32136  if test "x$has_forbidden_chars" != x; then
32137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32139  fi
32140
32141    # Output is in $new_path
32142
32143  windows_path="$new_path"
32144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32145    unix_path=`$CYGPATH -u "$windows_path"`
32146    new_path="$unix_path"
32147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32149    new_path="$unix_path"
32150  fi
32151
32152    # remove trailing .exe if any
32153    new_path="${new_path/%.exe/}"
32154
32155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32157  fi
32158
32159  else
32160    # We're on a posix platform. Hooray! :)
32161    # First separate the path from the arguments. This will split at the first
32162    # space.
32163    complete="$AS"
32164    path="${complete%% *}"
32165    tmp="$complete EOL"
32166    arguments="${tmp#* }"
32167
32168    # Cannot rely on the command "which" here since it doesn't always work.
32169    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32170    if test -z "$is_absolute_path"; then
32171      # Path to executable is not absolute. Find it.
32172      IFS_save="$IFS"
32173      IFS=:
32174      for p in $PATH; do
32175        if test -f "$p/$path" && test -x "$p/$path"; then
32176          new_path="$p/$path"
32177          break
32178        fi
32179      done
32180      IFS="$IFS_save"
32181    else
32182      # This is an absolute path, we can use it without further modifications.
32183      new_path="$path"
32184    fi
32185
32186    if test "x$new_path" = x; then
32187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32188$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32189      has_space=`$ECHO "$complete" | $GREP " "`
32190      if test "x$has_space" != x; then
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32192$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32193      fi
32194      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32195    fi
32196  fi
32197
32198  # Now join together the path and the arguments once again
32199  if test "x$arguments" != xEOL; then
32200    new_complete="$new_path ${arguments% *}"
32201  else
32202    new_complete="$new_path"
32203  fi
32204
32205  if test "x$complete" != "x$new_complete"; then
32206    AS="$new_complete"
32207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32208$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32209  fi
32210
32211  else
32212    # FIXME: is this correct for microsoft?
32213    AS="$CC -c"
32214  fi
32215
32216
32217  #
32218  # Setup the archiver (AR)
32219  #
32220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32221    # The corresponding ar tool is lib.exe (used to create static libraries)
32222    # Extract the first word of "lib", so it can be a program name with args.
32223set dummy lib; ac_word=$2
32224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32225$as_echo_n "checking for $ac_word... " >&6; }
32226if ${ac_cv_prog_AR+:} false; then :
32227  $as_echo_n "(cached) " >&6
32228else
32229  if test -n "$AR"; then
32230  ac_cv_prog_AR="$AR" # Let the user override the test.
32231else
32232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32233for as_dir in $PATH
32234do
32235  IFS=$as_save_IFS
32236  test -z "$as_dir" && as_dir=.
32237    for ac_exec_ext in '' $ac_executable_extensions; do
32238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32239    ac_cv_prog_AR="lib"
32240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32241    break 2
32242  fi
32243done
32244  done
32245IFS=$as_save_IFS
32246
32247fi
32248fi
32249AR=$ac_cv_prog_AR
32250if test -n "$AR"; then
32251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32252$as_echo "$AR" >&6; }
32253else
32254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32255$as_echo "no" >&6; }
32256fi
32257
32258
32259  else
32260
32261
32262  # Publish this variable in the help.
32263
32264
32265  if test "x$AR" = x; then
32266    # The variable is not set by user, try to locate tool using the code snippet
32267    if test -n "$ac_tool_prefix"; then
32268  for ac_prog in ar
32269  do
32270    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32271set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32273$as_echo_n "checking for $ac_word... " >&6; }
32274if ${ac_cv_prog_AR+:} false; then :
32275  $as_echo_n "(cached) " >&6
32276else
32277  if test -n "$AR"; then
32278  ac_cv_prog_AR="$AR" # Let the user override the test.
32279else
32280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32281for as_dir in $PATH
32282do
32283  IFS=$as_save_IFS
32284  test -z "$as_dir" && as_dir=.
32285    for ac_exec_ext in '' $ac_executable_extensions; do
32286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32287    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32289    break 2
32290  fi
32291done
32292  done
32293IFS=$as_save_IFS
32294
32295fi
32296fi
32297AR=$ac_cv_prog_AR
32298if test -n "$AR"; then
32299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32300$as_echo "$AR" >&6; }
32301else
32302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32303$as_echo "no" >&6; }
32304fi
32305
32306
32307    test -n "$AR" && break
32308  done
32309fi
32310if test -z "$AR"; then
32311  ac_ct_AR=$AR
32312  for ac_prog in ar
32313do
32314  # Extract the first word of "$ac_prog", so it can be a program name with args.
32315set dummy $ac_prog; ac_word=$2
32316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32317$as_echo_n "checking for $ac_word... " >&6; }
32318if ${ac_cv_prog_ac_ct_AR+:} false; then :
32319  $as_echo_n "(cached) " >&6
32320else
32321  if test -n "$ac_ct_AR"; then
32322  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32323else
32324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32325for as_dir in $PATH
32326do
32327  IFS=$as_save_IFS
32328  test -z "$as_dir" && as_dir=.
32329    for ac_exec_ext in '' $ac_executable_extensions; do
32330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32331    ac_cv_prog_ac_ct_AR="$ac_prog"
32332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32333    break 2
32334  fi
32335done
32336  done
32337IFS=$as_save_IFS
32338
32339fi
32340fi
32341ac_ct_AR=$ac_cv_prog_ac_ct_AR
32342if test -n "$ac_ct_AR"; then
32343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32344$as_echo "$ac_ct_AR" >&6; }
32345else
32346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32347$as_echo "no" >&6; }
32348fi
32349
32350
32351  test -n "$ac_ct_AR" && break
32352done
32353
32354  if test "x$ac_ct_AR" = x; then
32355    AR=""
32356  else
32357    case $cross_compiling:$ac_tool_warned in
32358yes:)
32359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32361ac_tool_warned=yes ;;
32362esac
32363    AR=$ac_ct_AR
32364  fi
32365fi
32366
32367  else
32368    # The variable is set, but is it from the command line or the environment?
32369
32370    # Try to remove the string !AR! from our list.
32371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32373      # If it failed, the variable was not from the command line. Ignore it,
32374      # but warn the user (except for BASH, which is always set by the calling BASH).
32375      if test "xAR" != xBASH; then
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32377$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32378      fi
32379      # Try to locate tool using the code snippet
32380      if test -n "$ac_tool_prefix"; then
32381  for ac_prog in ar
32382  do
32383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32386$as_echo_n "checking for $ac_word... " >&6; }
32387if ${ac_cv_prog_AR+:} false; then :
32388  $as_echo_n "(cached) " >&6
32389else
32390  if test -n "$AR"; then
32391  ac_cv_prog_AR="$AR" # Let the user override the test.
32392else
32393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32394for as_dir in $PATH
32395do
32396  IFS=$as_save_IFS
32397  test -z "$as_dir" && as_dir=.
32398    for ac_exec_ext in '' $ac_executable_extensions; do
32399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32400    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32402    break 2
32403  fi
32404done
32405  done
32406IFS=$as_save_IFS
32407
32408fi
32409fi
32410AR=$ac_cv_prog_AR
32411if test -n "$AR"; then
32412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32413$as_echo "$AR" >&6; }
32414else
32415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32416$as_echo "no" >&6; }
32417fi
32418
32419
32420    test -n "$AR" && break
32421  done
32422fi
32423if test -z "$AR"; then
32424  ac_ct_AR=$AR
32425  for ac_prog in ar
32426do
32427  # Extract the first word of "$ac_prog", so it can be a program name with args.
32428set dummy $ac_prog; ac_word=$2
32429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32430$as_echo_n "checking for $ac_word... " >&6; }
32431if ${ac_cv_prog_ac_ct_AR+:} false; then :
32432  $as_echo_n "(cached) " >&6
32433else
32434  if test -n "$ac_ct_AR"; then
32435  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32436else
32437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32438for as_dir in $PATH
32439do
32440  IFS=$as_save_IFS
32441  test -z "$as_dir" && as_dir=.
32442    for ac_exec_ext in '' $ac_executable_extensions; do
32443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32444    ac_cv_prog_ac_ct_AR="$ac_prog"
32445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32446    break 2
32447  fi
32448done
32449  done
32450IFS=$as_save_IFS
32451
32452fi
32453fi
32454ac_ct_AR=$ac_cv_prog_ac_ct_AR
32455if test -n "$ac_ct_AR"; then
32456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32457$as_echo "$ac_ct_AR" >&6; }
32458else
32459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32460$as_echo "no" >&6; }
32461fi
32462
32463
32464  test -n "$ac_ct_AR" && break
32465done
32466
32467  if test "x$ac_ct_AR" = x; then
32468    AR=""
32469  else
32470    case $cross_compiling:$ac_tool_warned in
32471yes:)
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32474ac_tool_warned=yes ;;
32475esac
32476    AR=$ac_ct_AR
32477  fi
32478fi
32479
32480    else
32481      # If it succeeded, then it was overridden by the user. We will use it
32482      # for the tool.
32483
32484      # First remove it from the list of overridden variables, so we can test
32485      # for unknown variables in the end.
32486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32487
32488      # Check if the provided tool contains a complete path.
32489      tool_specified="$AR"
32490      tool_basename="${tool_specified##*/}"
32491      if test "x$tool_basename" = "x$tool_specified"; then
32492        # A command without a complete path is provided, search $PATH.
32493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32494$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32495        # Extract the first word of "$tool_basename", so it can be a program name with args.
32496set dummy $tool_basename; ac_word=$2
32497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32498$as_echo_n "checking for $ac_word... " >&6; }
32499if ${ac_cv_path_AR+:} false; then :
32500  $as_echo_n "(cached) " >&6
32501else
32502  case $AR in
32503  [\\/]* | ?:[\\/]*)
32504  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32505  ;;
32506  *)
32507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32508for as_dir in $PATH
32509do
32510  IFS=$as_save_IFS
32511  test -z "$as_dir" && as_dir=.
32512    for ac_exec_ext in '' $ac_executable_extensions; do
32513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32514    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32516    break 2
32517  fi
32518done
32519  done
32520IFS=$as_save_IFS
32521
32522  ;;
32523esac
32524fi
32525AR=$ac_cv_path_AR
32526if test -n "$AR"; then
32527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32528$as_echo "$AR" >&6; }
32529else
32530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32531$as_echo "no" >&6; }
32532fi
32533
32534
32535        if test "x$AR" = x; then
32536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32537        fi
32538      else
32539        # Otherwise we believe it is a complete path. Use it as it is.
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32541$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32543$as_echo_n "checking for AR... " >&6; }
32544        if test ! -x "$tool_specified"; then
32545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32546$as_echo "not found" >&6; }
32547          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32548        fi
32549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32550$as_echo "$tool_specified" >&6; }
32551      fi
32552    fi
32553  fi
32554
32555
32556  fi
32557
32558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32559
32560  # First separate the path from the arguments. This will split at the first
32561  # space.
32562  complete="$AR"
32563  path="${complete%% *}"
32564  tmp="$complete EOL"
32565  arguments="${tmp#* }"
32566
32567  # Input might be given as Windows format, start by converting to
32568  # unix format.
32569  new_path=`$CYGPATH -u "$path"`
32570
32571  # Now try to locate executable using which
32572  new_path=`$WHICH "$new_path" 2> /dev/null`
32573  # bat and cmd files are not always considered executable in cygwin causing which
32574  # to not find them
32575  if test "x$new_path" = x \
32576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32578    new_path=`$CYGPATH -u "$path"`
32579  fi
32580  if test "x$new_path" = x; then
32581    # Oops. Which didn't find the executable.
32582    # The splitting of arguments from the executable at a space might have been incorrect,
32583    # since paths with space are more likely in Windows. Give it another try with the whole
32584    # argument.
32585    path="$complete"
32586    arguments="EOL"
32587    new_path=`$CYGPATH -u "$path"`
32588    new_path=`$WHICH "$new_path" 2> /dev/null`
32589    # bat and cmd files are not always considered executable in cygwin causing which
32590    # to not find them
32591    if test "x$new_path" = x \
32592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32594      new_path=`$CYGPATH -u "$path"`
32595    fi
32596    if test "x$new_path" = x; then
32597      # It's still not found. Now this is an unrecoverable error.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32599$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32600      has_space=`$ECHO "$complete" | $GREP " "`
32601      if test "x$has_space" != x; then
32602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32604      fi
32605      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32606    fi
32607  fi
32608
32609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32612  # "foo.exe" is OK but "foo" is an error.
32613  #
32614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32615  # It is also a way to make sure we got the proper file name for the real test later on.
32616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32617  if test "x$test_shortpath" = x; then
32618    # Short path failed, file does not exist as specified.
32619    # Try adding .exe or .cmd
32620    if test -f "${new_path}.exe"; then
32621      input_to_shortpath="${new_path}.exe"
32622    elif test -f "${new_path}.cmd"; then
32623      input_to_shortpath="${new_path}.cmd"
32624    else
32625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32626$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32629      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32630    fi
32631  else
32632    input_to_shortpath="$new_path"
32633  fi
32634
32635  # Call helper function which possibly converts this using DOS-style short mode.
32636  # If so, the updated path is stored in $new_path.
32637  new_path="$input_to_shortpath"
32638
32639  input_path="$input_to_shortpath"
32640  # Check if we need to convert this using DOS-style short mode. If the path
32641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32642  # take no chances and rewrite it.
32643  # Note: m4 eats our [], so we need to use [ and ] instead.
32644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32645  if test "x$has_forbidden_chars" != x; then
32646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32650      # Going to short mode and back again did indeed matter. Since short mode is
32651      # case insensitive, let's make it lowercase to improve readability.
32652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32653      # Now convert it back to Unix-stile (cygpath)
32654      input_path=`$CYGPATH -u "$shortmode_path"`
32655      new_path="$input_path"
32656    fi
32657  fi
32658
32659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32660  if test "x$test_cygdrive_prefix" = x; then
32661    # As a simple fix, exclude /usr/bin since it's not a real path.
32662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32664      # a path prefixed by /cygdrive for fixpath to work.
32665      new_path="$CYGWIN_ROOT_PATH$input_path"
32666    fi
32667  fi
32668
32669  # remove trailing .exe if any
32670  new_path="${new_path/%.exe/}"
32671
32672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32673
32674  # First separate the path from the arguments. This will split at the first
32675  # space.
32676  complete="$AR"
32677  path="${complete%% *}"
32678  tmp="$complete EOL"
32679  arguments="${tmp#* }"
32680
32681  # Input might be given as Windows format, start by converting to
32682  # unix format.
32683  new_path="$path"
32684
32685  windows_path="$new_path"
32686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32687    unix_path=`$CYGPATH -u "$windows_path"`
32688    new_path="$unix_path"
32689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32691    new_path="$unix_path"
32692  fi
32693
32694
32695  # Now try to locate executable using which
32696  new_path=`$WHICH "$new_path" 2> /dev/null`
32697
32698  if test "x$new_path" = x; then
32699    # Oops. Which didn't find the executable.
32700    # The splitting of arguments from the executable at a space might have been incorrect,
32701    # since paths with space are more likely in Windows. Give it another try with the whole
32702    # argument.
32703    path="$complete"
32704    arguments="EOL"
32705    new_path="$path"
32706
32707  windows_path="$new_path"
32708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32709    unix_path=`$CYGPATH -u "$windows_path"`
32710    new_path="$unix_path"
32711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32713    new_path="$unix_path"
32714  fi
32715
32716
32717    new_path=`$WHICH "$new_path" 2> /dev/null`
32718
32719    if test "x$new_path" = x; then
32720      # It's still not found. Now this is an unrecoverable error.
32721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32722$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32723      has_space=`$ECHO "$complete" | $GREP " "`
32724      if test "x$has_space" != x; then
32725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32727      fi
32728      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32729    fi
32730  fi
32731
32732  # Now new_path has a complete unix path to the binary
32733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32734    # Keep paths in /bin as-is, but remove trailing .exe if any
32735    new_path="${new_path/%.exe/}"
32736    # Do not save /bin paths to all_fixpath_prefixes!
32737  else
32738    # Not in mixed or Windows style, start by that.
32739    new_path=`cmd //c echo $new_path`
32740
32741  input_path="$new_path"
32742  # Check if we need to convert this using DOS-style short mode. If the path
32743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32744  # take no chances and rewrite it.
32745  # Note: m4 eats our [], so we need to use [ and ] instead.
32746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32747  if test "x$has_forbidden_chars" != x; then
32748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32750  fi
32751
32752    # Output is in $new_path
32753
32754  windows_path="$new_path"
32755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32756    unix_path=`$CYGPATH -u "$windows_path"`
32757    new_path="$unix_path"
32758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32760    new_path="$unix_path"
32761  fi
32762
32763    # remove trailing .exe if any
32764    new_path="${new_path/%.exe/}"
32765
32766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32768  fi
32769
32770  else
32771    # We're on a posix platform. Hooray! :)
32772    # First separate the path from the arguments. This will split at the first
32773    # space.
32774    complete="$AR"
32775    path="${complete%% *}"
32776    tmp="$complete EOL"
32777    arguments="${tmp#* }"
32778
32779    # Cannot rely on the command "which" here since it doesn't always work.
32780    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32781    if test -z "$is_absolute_path"; then
32782      # Path to executable is not absolute. Find it.
32783      IFS_save="$IFS"
32784      IFS=:
32785      for p in $PATH; do
32786        if test -f "$p/$path" && test -x "$p/$path"; then
32787          new_path="$p/$path"
32788          break
32789        fi
32790      done
32791      IFS="$IFS_save"
32792    else
32793      # This is an absolute path, we can use it without further modifications.
32794      new_path="$path"
32795    fi
32796
32797    if test "x$new_path" = x; then
32798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32799$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32800      has_space=`$ECHO "$complete" | $GREP " "`
32801      if test "x$has_space" != x; then
32802        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32804      fi
32805      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32806    fi
32807  fi
32808
32809  # Now join together the path and the arguments once again
32810  if test "x$arguments" != xEOL; then
32811    new_complete="$new_path ${arguments% *}"
32812  else
32813    new_complete="$new_path"
32814  fi
32815
32816  if test "x$complete" != "x$new_complete"; then
32817    AR="$new_complete"
32818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32819$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32820  fi
32821
32822
32823
32824  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32825    ac_ext=m
32826ac_cpp='$OBJCPP $CPPFLAGS'
32827ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32828ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32829ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32830if test -n "$ac_tool_prefix"; then
32831  for ac_prog in gcc objcc objc cc CC
32832  do
32833    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32834set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32836$as_echo_n "checking for $ac_word... " >&6; }
32837if ${ac_cv_prog_OBJC+:} false; then :
32838  $as_echo_n "(cached) " >&6
32839else
32840  if test -n "$OBJC"; then
32841  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32842else
32843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32844for as_dir in $PATH
32845do
32846  IFS=$as_save_IFS
32847  test -z "$as_dir" && as_dir=.
32848    for ac_exec_ext in '' $ac_executable_extensions; do
32849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32850    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32852    break 2
32853  fi
32854done
32855  done
32856IFS=$as_save_IFS
32857
32858fi
32859fi
32860OBJC=$ac_cv_prog_OBJC
32861if test -n "$OBJC"; then
32862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32863$as_echo "$OBJC" >&6; }
32864else
32865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32866$as_echo "no" >&6; }
32867fi
32868
32869
32870    test -n "$OBJC" && break
32871  done
32872fi
32873if test -z "$OBJC"; then
32874  ac_ct_OBJC=$OBJC
32875  for ac_prog in gcc objcc objc cc CC
32876do
32877  # Extract the first word of "$ac_prog", so it can be a program name with args.
32878set dummy $ac_prog; ac_word=$2
32879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32880$as_echo_n "checking for $ac_word... " >&6; }
32881if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32882  $as_echo_n "(cached) " >&6
32883else
32884  if test -n "$ac_ct_OBJC"; then
32885  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32886else
32887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32888for as_dir in $PATH
32889do
32890  IFS=$as_save_IFS
32891  test -z "$as_dir" && as_dir=.
32892    for ac_exec_ext in '' $ac_executable_extensions; do
32893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32894    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32896    break 2
32897  fi
32898done
32899  done
32900IFS=$as_save_IFS
32901
32902fi
32903fi
32904ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32905if test -n "$ac_ct_OBJC"; then
32906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32907$as_echo "$ac_ct_OBJC" >&6; }
32908else
32909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32910$as_echo "no" >&6; }
32911fi
32912
32913
32914  test -n "$ac_ct_OBJC" && break
32915done
32916
32917  if test "x$ac_ct_OBJC" = x; then
32918    OBJC="gcc"
32919  else
32920    case $cross_compiling:$ac_tool_warned in
32921yes:)
32922{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32923$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32924ac_tool_warned=yes ;;
32925esac
32926    OBJC=$ac_ct_OBJC
32927  fi
32928fi
32929
32930# Provide some information about the compiler.
32931$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32932set X $ac_compile
32933ac_compiler=$2
32934for ac_option in --version -v -V -qversion; do
32935  { { ac_try="$ac_compiler $ac_option >&5"
32936case "(($ac_try" in
32937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32938  *) ac_try_echo=$ac_try;;
32939esac
32940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32941$as_echo "$ac_try_echo"; } >&5
32942  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32943  ac_status=$?
32944  if test -s conftest.err; then
32945    sed '10a\
32946... rest of stderr output deleted ...
32947         10q' conftest.err >conftest.er1
32948    cat conftest.er1 >&5
32949  fi
32950  rm -f conftest.er1 conftest.err
32951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32952  test $ac_status = 0; }
32953done
32954
32955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32956$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32957if ${ac_cv_objc_compiler_gnu+:} false; then :
32958  $as_echo_n "(cached) " >&6
32959else
32960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32961/* end confdefs.h.  */
32962
32963int
32964main ()
32965{
32966#ifndef __GNUC__
32967       choke me
32968#endif
32969
32970  ;
32971  return 0;
32972}
32973_ACEOF
32974if ac_fn_objc_try_compile "$LINENO"; then :
32975  ac_compiler_gnu=yes
32976else
32977  ac_compiler_gnu=no
32978fi
32979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32980ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32981
32982fi
32983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32984$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32985if test $ac_compiler_gnu = yes; then
32986  GOBJC=yes
32987else
32988  GOBJC=
32989fi
32990ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32991ac_save_OBJCFLAGS=$OBJCFLAGS
32992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32993$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32994if ${ac_cv_prog_objc_g+:} false; then :
32995  $as_echo_n "(cached) " >&6
32996else
32997  ac_save_objc_werror_flag=$ac_objc_werror_flag
32998   ac_objc_werror_flag=yes
32999   ac_cv_prog_objc_g=no
33000   OBJCFLAGS="-g"
33001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33002/* end confdefs.h.  */
33003
33004int
33005main ()
33006{
33007
33008  ;
33009  return 0;
33010}
33011_ACEOF
33012if ac_fn_objc_try_compile "$LINENO"; then :
33013  ac_cv_prog_objc_g=yes
33014else
33015  OBJCFLAGS=""
33016      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33017/* end confdefs.h.  */
33018
33019int
33020main ()
33021{
33022
33023  ;
33024  return 0;
33025}
33026_ACEOF
33027if ac_fn_objc_try_compile "$LINENO"; then :
33028
33029else
33030  ac_objc_werror_flag=$ac_save_objc_werror_flag
33031	 OBJCFLAGS="-g"
33032	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33033/* end confdefs.h.  */
33034
33035int
33036main ()
33037{
33038
33039  ;
33040  return 0;
33041}
33042_ACEOF
33043if ac_fn_objc_try_compile "$LINENO"; then :
33044  ac_cv_prog_objc_g=yes
33045fi
33046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33047fi
33048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33049fi
33050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33051   ac_objc_werror_flag=$ac_save_objc_werror_flag
33052fi
33053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33054$as_echo "$ac_cv_prog_objc_g" >&6; }
33055if test "$ac_test_OBJCFLAGS" = set; then
33056  OBJCFLAGS=$ac_save_OBJCFLAGS
33057elif test $ac_cv_prog_objc_g = yes; then
33058  if test "$GOBJC" = yes; then
33059    OBJCFLAGS="-g -O2"
33060  else
33061    OBJCFLAGS="-g"
33062  fi
33063else
33064  if test "$GOBJC" = yes; then
33065    OBJCFLAGS="-O2"
33066  else
33067    OBJCFLAGS=
33068  fi
33069fi
33070ac_ext=cpp
33071ac_cpp='$CXXCPP $CPPFLAGS'
33072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33075
33076
33077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33078
33079  # First separate the path from the arguments. This will split at the first
33080  # space.
33081  complete="$OBJC"
33082  path="${complete%% *}"
33083  tmp="$complete EOL"
33084  arguments="${tmp#* }"
33085
33086  # Input might be given as Windows format, start by converting to
33087  # unix format.
33088  new_path=`$CYGPATH -u "$path"`
33089
33090  # Now try to locate executable using which
33091  new_path=`$WHICH "$new_path" 2> /dev/null`
33092  # bat and cmd files are not always considered executable in cygwin causing which
33093  # to not find them
33094  if test "x$new_path" = x \
33095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33097    new_path=`$CYGPATH -u "$path"`
33098  fi
33099  if test "x$new_path" = x; then
33100    # Oops. Which didn't find the executable.
33101    # The splitting of arguments from the executable at a space might have been incorrect,
33102    # since paths with space are more likely in Windows. Give it another try with the whole
33103    # argument.
33104    path="$complete"
33105    arguments="EOL"
33106    new_path=`$CYGPATH -u "$path"`
33107    new_path=`$WHICH "$new_path" 2> /dev/null`
33108    # bat and cmd files are not always considered executable in cygwin causing which
33109    # to not find them
33110    if test "x$new_path" = x \
33111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33113      new_path=`$CYGPATH -u "$path"`
33114    fi
33115    if test "x$new_path" = x; then
33116      # It's still not found. Now this is an unrecoverable error.
33117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33118$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33119      has_space=`$ECHO "$complete" | $GREP " "`
33120      if test "x$has_space" != x; then
33121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33123      fi
33124      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33125    fi
33126  fi
33127
33128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33131  # "foo.exe" is OK but "foo" is an error.
33132  #
33133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33134  # It is also a way to make sure we got the proper file name for the real test later on.
33135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33136  if test "x$test_shortpath" = x; then
33137    # Short path failed, file does not exist as specified.
33138    # Try adding .exe or .cmd
33139    if test -f "${new_path}.exe"; then
33140      input_to_shortpath="${new_path}.exe"
33141    elif test -f "${new_path}.cmd"; then
33142      input_to_shortpath="${new_path}.cmd"
33143    else
33144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33145$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33148      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33149    fi
33150  else
33151    input_to_shortpath="$new_path"
33152  fi
33153
33154  # Call helper function which possibly converts this using DOS-style short mode.
33155  # If so, the updated path is stored in $new_path.
33156  new_path="$input_to_shortpath"
33157
33158  input_path="$input_to_shortpath"
33159  # Check if we need to convert this using DOS-style short mode. If the path
33160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33161  # take no chances and rewrite it.
33162  # Note: m4 eats our [], so we need to use [ and ] instead.
33163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33164  if test "x$has_forbidden_chars" != x; then
33165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33169      # Going to short mode and back again did indeed matter. Since short mode is
33170      # case insensitive, let's make it lowercase to improve readability.
33171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33172      # Now convert it back to Unix-stile (cygpath)
33173      input_path=`$CYGPATH -u "$shortmode_path"`
33174      new_path="$input_path"
33175    fi
33176  fi
33177
33178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33179  if test "x$test_cygdrive_prefix" = x; then
33180    # As a simple fix, exclude /usr/bin since it's not a real path.
33181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33183      # a path prefixed by /cygdrive for fixpath to work.
33184      new_path="$CYGWIN_ROOT_PATH$input_path"
33185    fi
33186  fi
33187
33188  # remove trailing .exe if any
33189  new_path="${new_path/%.exe/}"
33190
33191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33192
33193  # First separate the path from the arguments. This will split at the first
33194  # space.
33195  complete="$OBJC"
33196  path="${complete%% *}"
33197  tmp="$complete EOL"
33198  arguments="${tmp#* }"
33199
33200  # Input might be given as Windows format, start by converting to
33201  # unix format.
33202  new_path="$path"
33203
33204  windows_path="$new_path"
33205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33206    unix_path=`$CYGPATH -u "$windows_path"`
33207    new_path="$unix_path"
33208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33210    new_path="$unix_path"
33211  fi
33212
33213
33214  # Now try to locate executable using which
33215  new_path=`$WHICH "$new_path" 2> /dev/null`
33216
33217  if test "x$new_path" = x; then
33218    # Oops. Which didn't find the executable.
33219    # The splitting of arguments from the executable at a space might have been incorrect,
33220    # since paths with space are more likely in Windows. Give it another try with the whole
33221    # argument.
33222    path="$complete"
33223    arguments="EOL"
33224    new_path="$path"
33225
33226  windows_path="$new_path"
33227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33228    unix_path=`$CYGPATH -u "$windows_path"`
33229    new_path="$unix_path"
33230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33232    new_path="$unix_path"
33233  fi
33234
33235
33236    new_path=`$WHICH "$new_path" 2> /dev/null`
33237
33238    if test "x$new_path" = x; then
33239      # It's still not found. Now this is an unrecoverable error.
33240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33241$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33242      has_space=`$ECHO "$complete" | $GREP " "`
33243      if test "x$has_space" != x; then
33244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33246      fi
33247      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33248    fi
33249  fi
33250
33251  # Now new_path has a complete unix path to the binary
33252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33253    # Keep paths in /bin as-is, but remove trailing .exe if any
33254    new_path="${new_path/%.exe/}"
33255    # Do not save /bin paths to all_fixpath_prefixes!
33256  else
33257    # Not in mixed or Windows style, start by that.
33258    new_path=`cmd //c echo $new_path`
33259
33260  input_path="$new_path"
33261  # Check if we need to convert this using DOS-style short mode. If the path
33262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33263  # take no chances and rewrite it.
33264  # Note: m4 eats our [], so we need to use [ and ] instead.
33265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33266  if test "x$has_forbidden_chars" != x; then
33267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33269  fi
33270
33271    # Output is in $new_path
33272
33273  windows_path="$new_path"
33274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33275    unix_path=`$CYGPATH -u "$windows_path"`
33276    new_path="$unix_path"
33277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33279    new_path="$unix_path"
33280  fi
33281
33282    # remove trailing .exe if any
33283    new_path="${new_path/%.exe/}"
33284
33285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33287  fi
33288
33289  else
33290    # We're on a posix platform. Hooray! :)
33291    # First separate the path from the arguments. This will split at the first
33292    # space.
33293    complete="$OBJC"
33294    path="${complete%% *}"
33295    tmp="$complete EOL"
33296    arguments="${tmp#* }"
33297
33298    # Cannot rely on the command "which" here since it doesn't always work.
33299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33300    if test -z "$is_absolute_path"; then
33301      # Path to executable is not absolute. Find it.
33302      IFS_save="$IFS"
33303      IFS=:
33304      for p in $PATH; do
33305        if test -f "$p/$path" && test -x "$p/$path"; then
33306          new_path="$p/$path"
33307          break
33308        fi
33309      done
33310      IFS="$IFS_save"
33311    else
33312      # This is an absolute path, we can use it without further modifications.
33313      new_path="$path"
33314    fi
33315
33316    if test "x$new_path" = x; then
33317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33318$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33319      has_space=`$ECHO "$complete" | $GREP " "`
33320      if test "x$has_space" != x; then
33321        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33323      fi
33324      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33325    fi
33326  fi
33327
33328  # Now join together the path and the arguments once again
33329  if test "x$arguments" != xEOL; then
33330    new_complete="$new_path ${arguments% *}"
33331  else
33332    new_complete="$new_path"
33333  fi
33334
33335  if test "x$complete" != "x$new_complete"; then
33336    OBJC="$new_complete"
33337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33338$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33339  fi
33340
33341
33342
33343  # Publish this variable in the help.
33344
33345
33346  if test "x$LIPO" = x; then
33347    # The variable is not set by user, try to locate tool using the code snippet
33348    for ac_prog in lipo
33349do
33350  # Extract the first word of "$ac_prog", so it can be a program name with args.
33351set dummy $ac_prog; ac_word=$2
33352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33353$as_echo_n "checking for $ac_word... " >&6; }
33354if ${ac_cv_path_LIPO+:} false; then :
33355  $as_echo_n "(cached) " >&6
33356else
33357  case $LIPO in
33358  [\\/]* | ?:[\\/]*)
33359  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33360  ;;
33361  *)
33362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33363for as_dir in $PATH
33364do
33365  IFS=$as_save_IFS
33366  test -z "$as_dir" && as_dir=.
33367    for ac_exec_ext in '' $ac_executable_extensions; do
33368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33369    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33371    break 2
33372  fi
33373done
33374  done
33375IFS=$as_save_IFS
33376
33377  ;;
33378esac
33379fi
33380LIPO=$ac_cv_path_LIPO
33381if test -n "$LIPO"; then
33382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33383$as_echo "$LIPO" >&6; }
33384else
33385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33386$as_echo "no" >&6; }
33387fi
33388
33389
33390  test -n "$LIPO" && break
33391done
33392
33393  else
33394    # The variable is set, but is it from the command line or the environment?
33395
33396    # Try to remove the string !LIPO! from our list.
33397    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33398    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33399      # If it failed, the variable was not from the command line. Ignore it,
33400      # but warn the user (except for BASH, which is always set by the calling BASH).
33401      if test "xLIPO" != xBASH; then
33402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33403$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33404      fi
33405      # Try to locate tool using the code snippet
33406      for ac_prog in lipo
33407do
33408  # Extract the first word of "$ac_prog", so it can be a program name with args.
33409set dummy $ac_prog; ac_word=$2
33410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33411$as_echo_n "checking for $ac_word... " >&6; }
33412if ${ac_cv_path_LIPO+:} false; then :
33413  $as_echo_n "(cached) " >&6
33414else
33415  case $LIPO in
33416  [\\/]* | ?:[\\/]*)
33417  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33418  ;;
33419  *)
33420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33421for as_dir in $PATH
33422do
33423  IFS=$as_save_IFS
33424  test -z "$as_dir" && as_dir=.
33425    for ac_exec_ext in '' $ac_executable_extensions; do
33426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33427    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33429    break 2
33430  fi
33431done
33432  done
33433IFS=$as_save_IFS
33434
33435  ;;
33436esac
33437fi
33438LIPO=$ac_cv_path_LIPO
33439if test -n "$LIPO"; then
33440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33441$as_echo "$LIPO" >&6; }
33442else
33443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33444$as_echo "no" >&6; }
33445fi
33446
33447
33448  test -n "$LIPO" && break
33449done
33450
33451    else
33452      # If it succeeded, then it was overridden by the user. We will use it
33453      # for the tool.
33454
33455      # First remove it from the list of overridden variables, so we can test
33456      # for unknown variables in the end.
33457      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33458
33459      # Check if the provided tool contains a complete path.
33460      tool_specified="$LIPO"
33461      tool_basename="${tool_specified##*/}"
33462      if test "x$tool_basename" = "x$tool_specified"; then
33463        # A command without a complete path is provided, search $PATH.
33464        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33465$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33466        # Extract the first word of "$tool_basename", so it can be a program name with args.
33467set dummy $tool_basename; ac_word=$2
33468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33469$as_echo_n "checking for $ac_word... " >&6; }
33470if ${ac_cv_path_LIPO+:} false; then :
33471  $as_echo_n "(cached) " >&6
33472else
33473  case $LIPO in
33474  [\\/]* | ?:[\\/]*)
33475  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33476  ;;
33477  *)
33478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33479for as_dir in $PATH
33480do
33481  IFS=$as_save_IFS
33482  test -z "$as_dir" && as_dir=.
33483    for ac_exec_ext in '' $ac_executable_extensions; do
33484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33485    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33487    break 2
33488  fi
33489done
33490  done
33491IFS=$as_save_IFS
33492
33493  ;;
33494esac
33495fi
33496LIPO=$ac_cv_path_LIPO
33497if test -n "$LIPO"; then
33498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33499$as_echo "$LIPO" >&6; }
33500else
33501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33502$as_echo "no" >&6; }
33503fi
33504
33505
33506        if test "x$LIPO" = x; then
33507          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33508        fi
33509      else
33510        # Otherwise we believe it is a complete path. Use it as it is.
33511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33512$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33514$as_echo_n "checking for LIPO... " >&6; }
33515        if test ! -x "$tool_specified"; then
33516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33517$as_echo "not found" >&6; }
33518          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33519        fi
33520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33521$as_echo "$tool_specified" >&6; }
33522      fi
33523    fi
33524  fi
33525
33526
33527
33528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33529
33530  # First separate the path from the arguments. This will split at the first
33531  # space.
33532  complete="$LIPO"
33533  path="${complete%% *}"
33534  tmp="$complete EOL"
33535  arguments="${tmp#* }"
33536
33537  # Input might be given as Windows format, start by converting to
33538  # unix format.
33539  new_path=`$CYGPATH -u "$path"`
33540
33541  # Now try to locate executable using which
33542  new_path=`$WHICH "$new_path" 2> /dev/null`
33543  # bat and cmd files are not always considered executable in cygwin causing which
33544  # to not find them
33545  if test "x$new_path" = x \
33546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33548    new_path=`$CYGPATH -u "$path"`
33549  fi
33550  if test "x$new_path" = x; then
33551    # Oops. Which didn't find the executable.
33552    # The splitting of arguments from the executable at a space might have been incorrect,
33553    # since paths with space are more likely in Windows. Give it another try with the whole
33554    # argument.
33555    path="$complete"
33556    arguments="EOL"
33557    new_path=`$CYGPATH -u "$path"`
33558    new_path=`$WHICH "$new_path" 2> /dev/null`
33559    # bat and cmd files are not always considered executable in cygwin causing which
33560    # to not find them
33561    if test "x$new_path" = x \
33562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33564      new_path=`$CYGPATH -u "$path"`
33565    fi
33566    if test "x$new_path" = x; then
33567      # It's still not found. Now this is an unrecoverable error.
33568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33569$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33570      has_space=`$ECHO "$complete" | $GREP " "`
33571      if test "x$has_space" != x; then
33572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33574      fi
33575      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33576    fi
33577  fi
33578
33579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33582  # "foo.exe" is OK but "foo" is an error.
33583  #
33584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33585  # It is also a way to make sure we got the proper file name for the real test later on.
33586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33587  if test "x$test_shortpath" = x; then
33588    # Short path failed, file does not exist as specified.
33589    # Try adding .exe or .cmd
33590    if test -f "${new_path}.exe"; then
33591      input_to_shortpath="${new_path}.exe"
33592    elif test -f "${new_path}.cmd"; then
33593      input_to_shortpath="${new_path}.cmd"
33594    else
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33596$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33599      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33600    fi
33601  else
33602    input_to_shortpath="$new_path"
33603  fi
33604
33605  # Call helper function which possibly converts this using DOS-style short mode.
33606  # If so, the updated path is stored in $new_path.
33607  new_path="$input_to_shortpath"
33608
33609  input_path="$input_to_shortpath"
33610  # Check if we need to convert this using DOS-style short mode. If the path
33611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33612  # take no chances and rewrite it.
33613  # Note: m4 eats our [], so we need to use [ and ] instead.
33614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33615  if test "x$has_forbidden_chars" != x; then
33616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33620      # Going to short mode and back again did indeed matter. Since short mode is
33621      # case insensitive, let's make it lowercase to improve readability.
33622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33623      # Now convert it back to Unix-stile (cygpath)
33624      input_path=`$CYGPATH -u "$shortmode_path"`
33625      new_path="$input_path"
33626    fi
33627  fi
33628
33629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33630  if test "x$test_cygdrive_prefix" = x; then
33631    # As a simple fix, exclude /usr/bin since it's not a real path.
33632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33634      # a path prefixed by /cygdrive for fixpath to work.
33635      new_path="$CYGWIN_ROOT_PATH$input_path"
33636    fi
33637  fi
33638
33639  # remove trailing .exe if any
33640  new_path="${new_path/%.exe/}"
33641
33642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33643
33644  # First separate the path from the arguments. This will split at the first
33645  # space.
33646  complete="$LIPO"
33647  path="${complete%% *}"
33648  tmp="$complete EOL"
33649  arguments="${tmp#* }"
33650
33651  # Input might be given as Windows format, start by converting to
33652  # unix format.
33653  new_path="$path"
33654
33655  windows_path="$new_path"
33656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33657    unix_path=`$CYGPATH -u "$windows_path"`
33658    new_path="$unix_path"
33659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33661    new_path="$unix_path"
33662  fi
33663
33664
33665  # Now try to locate executable using which
33666  new_path=`$WHICH "$new_path" 2> /dev/null`
33667
33668  if test "x$new_path" = x; then
33669    # Oops. Which didn't find the executable.
33670    # The splitting of arguments from the executable at a space might have been incorrect,
33671    # since paths with space are more likely in Windows. Give it another try with the whole
33672    # argument.
33673    path="$complete"
33674    arguments="EOL"
33675    new_path="$path"
33676
33677  windows_path="$new_path"
33678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33679    unix_path=`$CYGPATH -u "$windows_path"`
33680    new_path="$unix_path"
33681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33683    new_path="$unix_path"
33684  fi
33685
33686
33687    new_path=`$WHICH "$new_path" 2> /dev/null`
33688
33689    if test "x$new_path" = x; then
33690      # It's still not found. Now this is an unrecoverable error.
33691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33692$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33693      has_space=`$ECHO "$complete" | $GREP " "`
33694      if test "x$has_space" != x; then
33695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33697      fi
33698      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33699    fi
33700  fi
33701
33702  # Now new_path has a complete unix path to the binary
33703  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33704    # Keep paths in /bin as-is, but remove trailing .exe if any
33705    new_path="${new_path/%.exe/}"
33706    # Do not save /bin paths to all_fixpath_prefixes!
33707  else
33708    # Not in mixed or Windows style, start by that.
33709    new_path=`cmd //c echo $new_path`
33710
33711  input_path="$new_path"
33712  # Check if we need to convert this using DOS-style short mode. If the path
33713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33714  # take no chances and rewrite it.
33715  # Note: m4 eats our [], so we need to use [ and ] instead.
33716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33717  if test "x$has_forbidden_chars" != x; then
33718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33720  fi
33721
33722    # Output is in $new_path
33723
33724  windows_path="$new_path"
33725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33726    unix_path=`$CYGPATH -u "$windows_path"`
33727    new_path="$unix_path"
33728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33730    new_path="$unix_path"
33731  fi
33732
33733    # remove trailing .exe if any
33734    new_path="${new_path/%.exe/}"
33735
33736    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33737    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33738  fi
33739
33740  else
33741    # We're on a posix platform. Hooray! :)
33742    # First separate the path from the arguments. This will split at the first
33743    # space.
33744    complete="$LIPO"
33745    path="${complete%% *}"
33746    tmp="$complete EOL"
33747    arguments="${tmp#* }"
33748
33749    # Cannot rely on the command "which" here since it doesn't always work.
33750    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33751    if test -z "$is_absolute_path"; then
33752      # Path to executable is not absolute. Find it.
33753      IFS_save="$IFS"
33754      IFS=:
33755      for p in $PATH; do
33756        if test -f "$p/$path" && test -x "$p/$path"; then
33757          new_path="$p/$path"
33758          break
33759        fi
33760      done
33761      IFS="$IFS_save"
33762    else
33763      # This is an absolute path, we can use it without further modifications.
33764      new_path="$path"
33765    fi
33766
33767    if test "x$new_path" = x; then
33768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33769$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33770      has_space=`$ECHO "$complete" | $GREP " "`
33771      if test "x$has_space" != x; then
33772        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33774      fi
33775      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33776    fi
33777  fi
33778
33779  # Now join together the path and the arguments once again
33780  if test "x$arguments" != xEOL; then
33781    new_complete="$new_path ${arguments% *}"
33782  else
33783    new_complete="$new_path"
33784  fi
33785
33786  if test "x$complete" != "x$new_complete"; then
33787    LIPO="$new_complete"
33788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33789$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33790  fi
33791
33792  else
33793    OBJC=
33794  fi
33795
33796  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33797    # Extract the first word of "mt", so it can be a program name with args.
33798set dummy mt; ac_word=$2
33799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33800$as_echo_n "checking for $ac_word... " >&6; }
33801if ${ac_cv_prog_MT+:} false; then :
33802  $as_echo_n "(cached) " >&6
33803else
33804  if test -n "$MT"; then
33805  ac_cv_prog_MT="$MT" # Let the user override the test.
33806else
33807  ac_prog_rejected=no
33808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33809for as_dir in $PATH
33810do
33811  IFS=$as_save_IFS
33812  test -z "$as_dir" && as_dir=.
33813    for ac_exec_ext in '' $ac_executable_extensions; do
33814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33815    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33816       ac_prog_rejected=yes
33817       continue
33818     fi
33819    ac_cv_prog_MT="mt"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827if test $ac_prog_rejected = yes; then
33828  # We found a bogon in the path, so make sure we never use it.
33829  set dummy $ac_cv_prog_MT
33830  shift
33831  if test $# != 0; then
33832    # We chose a different compiler from the bogus one.
33833    # However, it has the same basename, so the bogon will be chosen
33834    # first if we set MT to just the basename; use the full file name.
33835    shift
33836    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33837  fi
33838fi
33839fi
33840fi
33841MT=$ac_cv_prog_MT
33842if test -n "$MT"; then
33843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33844$as_echo "$MT" >&6; }
33845else
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33847$as_echo "no" >&6; }
33848fi
33849
33850
33851
33852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33853
33854  # First separate the path from the arguments. This will split at the first
33855  # space.
33856  complete="$MT"
33857  path="${complete%% *}"
33858  tmp="$complete EOL"
33859  arguments="${tmp#* }"
33860
33861  # Input might be given as Windows format, start by converting to
33862  # unix format.
33863  new_path=`$CYGPATH -u "$path"`
33864
33865  # Now try to locate executable using which
33866  new_path=`$WHICH "$new_path" 2> /dev/null`
33867  # bat and cmd files are not always considered executable in cygwin causing which
33868  # to not find them
33869  if test "x$new_path" = x \
33870      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33871      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33872    new_path=`$CYGPATH -u "$path"`
33873  fi
33874  if test "x$new_path" = x; then
33875    # Oops. Which didn't find the executable.
33876    # The splitting of arguments from the executable at a space might have been incorrect,
33877    # since paths with space are more likely in Windows. Give it another try with the whole
33878    # argument.
33879    path="$complete"
33880    arguments="EOL"
33881    new_path=`$CYGPATH -u "$path"`
33882    new_path=`$WHICH "$new_path" 2> /dev/null`
33883    # bat and cmd files are not always considered executable in cygwin causing which
33884    # to not find them
33885    if test "x$new_path" = x \
33886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33888      new_path=`$CYGPATH -u "$path"`
33889    fi
33890    if test "x$new_path" = x; then
33891      # It's still not found. Now this is an unrecoverable error.
33892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33893$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33894      has_space=`$ECHO "$complete" | $GREP " "`
33895      if test "x$has_space" != x; then
33896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33898      fi
33899      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33900    fi
33901  fi
33902
33903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33906  # "foo.exe" is OK but "foo" is an error.
33907  #
33908  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33909  # It is also a way to make sure we got the proper file name for the real test later on.
33910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33911  if test "x$test_shortpath" = x; then
33912    # Short path failed, file does not exist as specified.
33913    # Try adding .exe or .cmd
33914    if test -f "${new_path}.exe"; then
33915      input_to_shortpath="${new_path}.exe"
33916    elif test -f "${new_path}.cmd"; then
33917      input_to_shortpath="${new_path}.cmd"
33918    else
33919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33920$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33921      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33922$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33923      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33924    fi
33925  else
33926    input_to_shortpath="$new_path"
33927  fi
33928
33929  # Call helper function which possibly converts this using DOS-style short mode.
33930  # If so, the updated path is stored in $new_path.
33931  new_path="$input_to_shortpath"
33932
33933  input_path="$input_to_shortpath"
33934  # Check if we need to convert this using DOS-style short mode. If the path
33935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33936  # take no chances and rewrite it.
33937  # Note: m4 eats our [], so we need to use [ and ] instead.
33938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33939  if test "x$has_forbidden_chars" != x; then
33940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33944      # Going to short mode and back again did indeed matter. Since short mode is
33945      # case insensitive, let's make it lowercase to improve readability.
33946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33947      # Now convert it back to Unix-stile (cygpath)
33948      input_path=`$CYGPATH -u "$shortmode_path"`
33949      new_path="$input_path"
33950    fi
33951  fi
33952
33953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33954  if test "x$test_cygdrive_prefix" = x; then
33955    # As a simple fix, exclude /usr/bin since it's not a real path.
33956    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33958      # a path prefixed by /cygdrive for fixpath to work.
33959      new_path="$CYGWIN_ROOT_PATH$input_path"
33960    fi
33961  fi
33962
33963  # remove trailing .exe if any
33964  new_path="${new_path/%.exe/}"
33965
33966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33967
33968  # First separate the path from the arguments. This will split at the first
33969  # space.
33970  complete="$MT"
33971  path="${complete%% *}"
33972  tmp="$complete EOL"
33973  arguments="${tmp#* }"
33974
33975  # Input might be given as Windows format, start by converting to
33976  # unix format.
33977  new_path="$path"
33978
33979  windows_path="$new_path"
33980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33981    unix_path=`$CYGPATH -u "$windows_path"`
33982    new_path="$unix_path"
33983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33985    new_path="$unix_path"
33986  fi
33987
33988
33989  # Now try to locate executable using which
33990  new_path=`$WHICH "$new_path" 2> /dev/null`
33991
33992  if test "x$new_path" = x; then
33993    # Oops. Which didn't find the executable.
33994    # The splitting of arguments from the executable at a space might have been incorrect,
33995    # since paths with space are more likely in Windows. Give it another try with the whole
33996    # argument.
33997    path="$complete"
33998    arguments="EOL"
33999    new_path="$path"
34000
34001  windows_path="$new_path"
34002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34003    unix_path=`$CYGPATH -u "$windows_path"`
34004    new_path="$unix_path"
34005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34007    new_path="$unix_path"
34008  fi
34009
34010
34011    new_path=`$WHICH "$new_path" 2> /dev/null`
34012
34013    if test "x$new_path" = x; then
34014      # It's still not found. Now this is an unrecoverable error.
34015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34016$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34017      has_space=`$ECHO "$complete" | $GREP " "`
34018      if test "x$has_space" != x; then
34019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34021      fi
34022      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34023    fi
34024  fi
34025
34026  # Now new_path has a complete unix path to the binary
34027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34028    # Keep paths in /bin as-is, but remove trailing .exe if any
34029    new_path="${new_path/%.exe/}"
34030    # Do not save /bin paths to all_fixpath_prefixes!
34031  else
34032    # Not in mixed or Windows style, start by that.
34033    new_path=`cmd //c echo $new_path`
34034
34035  input_path="$new_path"
34036  # Check if we need to convert this using DOS-style short mode. If the path
34037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34038  # take no chances and rewrite it.
34039  # Note: m4 eats our [], so we need to use [ and ] instead.
34040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34041  if test "x$has_forbidden_chars" != x; then
34042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34044  fi
34045
34046    # Output is in $new_path
34047
34048  windows_path="$new_path"
34049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34050    unix_path=`$CYGPATH -u "$windows_path"`
34051    new_path="$unix_path"
34052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34054    new_path="$unix_path"
34055  fi
34056
34057    # remove trailing .exe if any
34058    new_path="${new_path/%.exe/}"
34059
34060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34062  fi
34063
34064  else
34065    # We're on a posix platform. Hooray! :)
34066    # First separate the path from the arguments. This will split at the first
34067    # space.
34068    complete="$MT"
34069    path="${complete%% *}"
34070    tmp="$complete EOL"
34071    arguments="${tmp#* }"
34072
34073    # Cannot rely on the command "which" here since it doesn't always work.
34074    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34075    if test -z "$is_absolute_path"; then
34076      # Path to executable is not absolute. Find it.
34077      IFS_save="$IFS"
34078      IFS=:
34079      for p in $PATH; do
34080        if test -f "$p/$path" && test -x "$p/$path"; then
34081          new_path="$p/$path"
34082          break
34083        fi
34084      done
34085      IFS="$IFS_save"
34086    else
34087      # This is an absolute path, we can use it without further modifications.
34088      new_path="$path"
34089    fi
34090
34091    if test "x$new_path" = x; then
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34093$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34094      has_space=`$ECHO "$complete" | $GREP " "`
34095      if test "x$has_space" != x; then
34096        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34098      fi
34099      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34100    fi
34101  fi
34102
34103  # Now join together the path and the arguments once again
34104  if test "x$arguments" != xEOL; then
34105    new_complete="$new_path ${arguments% *}"
34106  else
34107    new_complete="$new_path"
34108  fi
34109
34110  if test "x$complete" != "x$new_complete"; then
34111    MT="$new_complete"
34112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34113$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34114  fi
34115
34116    # Setup the resource compiler (RC)
34117    # Extract the first word of "rc", so it can be a program name with args.
34118set dummy rc; ac_word=$2
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34120$as_echo_n "checking for $ac_word... " >&6; }
34121if ${ac_cv_prog_RC+:} false; then :
34122  $as_echo_n "(cached) " >&6
34123else
34124  if test -n "$RC"; then
34125  ac_cv_prog_RC="$RC" # Let the user override the test.
34126else
34127  ac_prog_rejected=no
34128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34129for as_dir in $PATH
34130do
34131  IFS=$as_save_IFS
34132  test -z "$as_dir" && as_dir=.
34133    for ac_exec_ext in '' $ac_executable_extensions; do
34134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34135    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34136       ac_prog_rejected=yes
34137       continue
34138     fi
34139    ac_cv_prog_RC="rc"
34140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34141    break 2
34142  fi
34143done
34144  done
34145IFS=$as_save_IFS
34146
34147if test $ac_prog_rejected = yes; then
34148  # We found a bogon in the path, so make sure we never use it.
34149  set dummy $ac_cv_prog_RC
34150  shift
34151  if test $# != 0; then
34152    # We chose a different compiler from the bogus one.
34153    # However, it has the same basename, so the bogon will be chosen
34154    # first if we set RC to just the basename; use the full file name.
34155    shift
34156    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34157  fi
34158fi
34159fi
34160fi
34161RC=$ac_cv_prog_RC
34162if test -n "$RC"; then
34163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34164$as_echo "$RC" >&6; }
34165else
34166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34167$as_echo "no" >&6; }
34168fi
34169
34170
34171
34172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34173
34174  # First separate the path from the arguments. This will split at the first
34175  # space.
34176  complete="$RC"
34177  path="${complete%% *}"
34178  tmp="$complete EOL"
34179  arguments="${tmp#* }"
34180
34181  # Input might be given as Windows format, start by converting to
34182  # unix format.
34183  new_path=`$CYGPATH -u "$path"`
34184
34185  # Now try to locate executable using which
34186  new_path=`$WHICH "$new_path" 2> /dev/null`
34187  # bat and cmd files are not always considered executable in cygwin causing which
34188  # to not find them
34189  if test "x$new_path" = x \
34190      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34191      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34192    new_path=`$CYGPATH -u "$path"`
34193  fi
34194  if test "x$new_path" = x; then
34195    # Oops. Which didn't find the executable.
34196    # The splitting of arguments from the executable at a space might have been incorrect,
34197    # since paths with space are more likely in Windows. Give it another try with the whole
34198    # argument.
34199    path="$complete"
34200    arguments="EOL"
34201    new_path=`$CYGPATH -u "$path"`
34202    new_path=`$WHICH "$new_path" 2> /dev/null`
34203    # bat and cmd files are not always considered executable in cygwin causing which
34204    # to not find them
34205    if test "x$new_path" = x \
34206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34208      new_path=`$CYGPATH -u "$path"`
34209    fi
34210    if test "x$new_path" = x; then
34211      # It's still not found. Now this is an unrecoverable error.
34212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34213$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34214      has_space=`$ECHO "$complete" | $GREP " "`
34215      if test "x$has_space" != x; then
34216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34218      fi
34219      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34220    fi
34221  fi
34222
34223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34226  # "foo.exe" is OK but "foo" is an error.
34227  #
34228  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34229  # It is also a way to make sure we got the proper file name for the real test later on.
34230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34231  if test "x$test_shortpath" = x; then
34232    # Short path failed, file does not exist as specified.
34233    # Try adding .exe or .cmd
34234    if test -f "${new_path}.exe"; then
34235      input_to_shortpath="${new_path}.exe"
34236    elif test -f "${new_path}.cmd"; then
34237      input_to_shortpath="${new_path}.cmd"
34238    else
34239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34240$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34243      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34244    fi
34245  else
34246    input_to_shortpath="$new_path"
34247  fi
34248
34249  # Call helper function which possibly converts this using DOS-style short mode.
34250  # If so, the updated path is stored in $new_path.
34251  new_path="$input_to_shortpath"
34252
34253  input_path="$input_to_shortpath"
34254  # Check if we need to convert this using DOS-style short mode. If the path
34255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34256  # take no chances and rewrite it.
34257  # Note: m4 eats our [], so we need to use [ and ] instead.
34258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34259  if test "x$has_forbidden_chars" != x; then
34260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34264      # Going to short mode and back again did indeed matter. Since short mode is
34265      # case insensitive, let's make it lowercase to improve readability.
34266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34267      # Now convert it back to Unix-stile (cygpath)
34268      input_path=`$CYGPATH -u "$shortmode_path"`
34269      new_path="$input_path"
34270    fi
34271  fi
34272
34273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34274  if test "x$test_cygdrive_prefix" = x; then
34275    # As a simple fix, exclude /usr/bin since it's not a real path.
34276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34278      # a path prefixed by /cygdrive for fixpath to work.
34279      new_path="$CYGWIN_ROOT_PATH$input_path"
34280    fi
34281  fi
34282
34283  # remove trailing .exe if any
34284  new_path="${new_path/%.exe/}"
34285
34286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34287
34288  # First separate the path from the arguments. This will split at the first
34289  # space.
34290  complete="$RC"
34291  path="${complete%% *}"
34292  tmp="$complete EOL"
34293  arguments="${tmp#* }"
34294
34295  # Input might be given as Windows format, start by converting to
34296  # unix format.
34297  new_path="$path"
34298
34299  windows_path="$new_path"
34300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34301    unix_path=`$CYGPATH -u "$windows_path"`
34302    new_path="$unix_path"
34303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34305    new_path="$unix_path"
34306  fi
34307
34308
34309  # Now try to locate executable using which
34310  new_path=`$WHICH "$new_path" 2> /dev/null`
34311
34312  if test "x$new_path" = x; then
34313    # Oops. Which didn't find the executable.
34314    # The splitting of arguments from the executable at a space might have been incorrect,
34315    # since paths with space are more likely in Windows. Give it another try with the whole
34316    # argument.
34317    path="$complete"
34318    arguments="EOL"
34319    new_path="$path"
34320
34321  windows_path="$new_path"
34322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34323    unix_path=`$CYGPATH -u "$windows_path"`
34324    new_path="$unix_path"
34325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34327    new_path="$unix_path"
34328  fi
34329
34330
34331    new_path=`$WHICH "$new_path" 2> /dev/null`
34332
34333    if test "x$new_path" = x; then
34334      # It's still not found. Now this is an unrecoverable error.
34335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34336$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34337      has_space=`$ECHO "$complete" | $GREP " "`
34338      if test "x$has_space" != x; then
34339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34341      fi
34342      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34343    fi
34344  fi
34345
34346  # Now new_path has a complete unix path to the binary
34347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34348    # Keep paths in /bin as-is, but remove trailing .exe if any
34349    new_path="${new_path/%.exe/}"
34350    # Do not save /bin paths to all_fixpath_prefixes!
34351  else
34352    # Not in mixed or Windows style, start by that.
34353    new_path=`cmd //c echo $new_path`
34354
34355  input_path="$new_path"
34356  # Check if we need to convert this using DOS-style short mode. If the path
34357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34358  # take no chances and rewrite it.
34359  # Note: m4 eats our [], so we need to use [ and ] instead.
34360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34361  if test "x$has_forbidden_chars" != x; then
34362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34364  fi
34365
34366    # Output is in $new_path
34367
34368  windows_path="$new_path"
34369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34370    unix_path=`$CYGPATH -u "$windows_path"`
34371    new_path="$unix_path"
34372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34374    new_path="$unix_path"
34375  fi
34376
34377    # remove trailing .exe if any
34378    new_path="${new_path/%.exe/}"
34379
34380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34382  fi
34383
34384  else
34385    # We're on a posix platform. Hooray! :)
34386    # First separate the path from the arguments. This will split at the first
34387    # space.
34388    complete="$RC"
34389    path="${complete%% *}"
34390    tmp="$complete EOL"
34391    arguments="${tmp#* }"
34392
34393    # Cannot rely on the command "which" here since it doesn't always work.
34394    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34395    if test -z "$is_absolute_path"; then
34396      # Path to executable is not absolute. Find it.
34397      IFS_save="$IFS"
34398      IFS=:
34399      for p in $PATH; do
34400        if test -f "$p/$path" && test -x "$p/$path"; then
34401          new_path="$p/$path"
34402          break
34403        fi
34404      done
34405      IFS="$IFS_save"
34406    else
34407      # This is an absolute path, we can use it without further modifications.
34408      new_path="$path"
34409    fi
34410
34411    if test "x$new_path" = x; then
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34413$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34414      has_space=`$ECHO "$complete" | $GREP " "`
34415      if test "x$has_space" != x; then
34416        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34418      fi
34419      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34420    fi
34421  fi
34422
34423  # Now join together the path and the arguments once again
34424  if test "x$arguments" != xEOL; then
34425    new_complete="$new_path ${arguments% *}"
34426  else
34427    new_complete="$new_path"
34428  fi
34429
34430  if test "x$complete" != "x$new_complete"; then
34431    RC="$new_complete"
34432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34433$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34434  fi
34435
34436    # Extract the first word of "dumpbin", so it can be a program name with args.
34437set dummy dumpbin; ac_word=$2
34438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34439$as_echo_n "checking for $ac_word... " >&6; }
34440if ${ac_cv_prog_DUMPBIN+:} false; then :
34441  $as_echo_n "(cached) " >&6
34442else
34443  if test -n "$DUMPBIN"; then
34444  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34445else
34446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34447for as_dir in $PATH
34448do
34449  IFS=$as_save_IFS
34450  test -z "$as_dir" && as_dir=.
34451    for ac_exec_ext in '' $ac_executable_extensions; do
34452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34453    ac_cv_prog_DUMPBIN="dumpbin"
34454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34455    break 2
34456  fi
34457done
34458  done
34459IFS=$as_save_IFS
34460
34461fi
34462fi
34463DUMPBIN=$ac_cv_prog_DUMPBIN
34464if test -n "$DUMPBIN"; then
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34466$as_echo "$DUMPBIN" >&6; }
34467else
34468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34469$as_echo "no" >&6; }
34470fi
34471
34472
34473
34474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34475
34476  # First separate the path from the arguments. This will split at the first
34477  # space.
34478  complete="$DUMPBIN"
34479  path="${complete%% *}"
34480  tmp="$complete EOL"
34481  arguments="${tmp#* }"
34482
34483  # Input might be given as Windows format, start by converting to
34484  # unix format.
34485  new_path=`$CYGPATH -u "$path"`
34486
34487  # Now try to locate executable using which
34488  new_path=`$WHICH "$new_path" 2> /dev/null`
34489  # bat and cmd files are not always considered executable in cygwin causing which
34490  # to not find them
34491  if test "x$new_path" = x \
34492      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34493      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34494    new_path=`$CYGPATH -u "$path"`
34495  fi
34496  if test "x$new_path" = x; then
34497    # Oops. Which didn't find the executable.
34498    # The splitting of arguments from the executable at a space might have been incorrect,
34499    # since paths with space are more likely in Windows. Give it another try with the whole
34500    # argument.
34501    path="$complete"
34502    arguments="EOL"
34503    new_path=`$CYGPATH -u "$path"`
34504    new_path=`$WHICH "$new_path" 2> /dev/null`
34505    # bat and cmd files are not always considered executable in cygwin causing which
34506    # to not find them
34507    if test "x$new_path" = x \
34508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34510      new_path=`$CYGPATH -u "$path"`
34511    fi
34512    if test "x$new_path" = x; then
34513      # It's still not found. Now this is an unrecoverable error.
34514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34515$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34516      has_space=`$ECHO "$complete" | $GREP " "`
34517      if test "x$has_space" != x; then
34518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34520      fi
34521      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34522    fi
34523  fi
34524
34525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34528  # "foo.exe" is OK but "foo" is an error.
34529  #
34530  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34531  # It is also a way to make sure we got the proper file name for the real test later on.
34532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34533  if test "x$test_shortpath" = x; then
34534    # Short path failed, file does not exist as specified.
34535    # Try adding .exe or .cmd
34536    if test -f "${new_path}.exe"; then
34537      input_to_shortpath="${new_path}.exe"
34538    elif test -f "${new_path}.cmd"; then
34539      input_to_shortpath="${new_path}.cmd"
34540    else
34541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34542$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34545      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34546    fi
34547  else
34548    input_to_shortpath="$new_path"
34549  fi
34550
34551  # Call helper function which possibly converts this using DOS-style short mode.
34552  # If so, the updated path is stored in $new_path.
34553  new_path="$input_to_shortpath"
34554
34555  input_path="$input_to_shortpath"
34556  # Check if we need to convert this using DOS-style short mode. If the path
34557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34558  # take no chances and rewrite it.
34559  # Note: m4 eats our [], so we need to use [ and ] instead.
34560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34561  if test "x$has_forbidden_chars" != x; then
34562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34566      # Going to short mode and back again did indeed matter. Since short mode is
34567      # case insensitive, let's make it lowercase to improve readability.
34568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34569      # Now convert it back to Unix-stile (cygpath)
34570      input_path=`$CYGPATH -u "$shortmode_path"`
34571      new_path="$input_path"
34572    fi
34573  fi
34574
34575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34576  if test "x$test_cygdrive_prefix" = x; then
34577    # As a simple fix, exclude /usr/bin since it's not a real path.
34578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34580      # a path prefixed by /cygdrive for fixpath to work.
34581      new_path="$CYGWIN_ROOT_PATH$input_path"
34582    fi
34583  fi
34584
34585  # remove trailing .exe if any
34586  new_path="${new_path/%.exe/}"
34587
34588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34589
34590  # First separate the path from the arguments. This will split at the first
34591  # space.
34592  complete="$DUMPBIN"
34593  path="${complete%% *}"
34594  tmp="$complete EOL"
34595  arguments="${tmp#* }"
34596
34597  # Input might be given as Windows format, start by converting to
34598  # unix format.
34599  new_path="$path"
34600
34601  windows_path="$new_path"
34602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34603    unix_path=`$CYGPATH -u "$windows_path"`
34604    new_path="$unix_path"
34605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34607    new_path="$unix_path"
34608  fi
34609
34610
34611  # Now try to locate executable using which
34612  new_path=`$WHICH "$new_path" 2> /dev/null`
34613
34614  if test "x$new_path" = x; then
34615    # Oops. Which didn't find the executable.
34616    # The splitting of arguments from the executable at a space might have been incorrect,
34617    # since paths with space are more likely in Windows. Give it another try with the whole
34618    # argument.
34619    path="$complete"
34620    arguments="EOL"
34621    new_path="$path"
34622
34623  windows_path="$new_path"
34624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34625    unix_path=`$CYGPATH -u "$windows_path"`
34626    new_path="$unix_path"
34627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34629    new_path="$unix_path"
34630  fi
34631
34632
34633    new_path=`$WHICH "$new_path" 2> /dev/null`
34634
34635    if test "x$new_path" = x; then
34636      # It's still not found. Now this is an unrecoverable error.
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34638$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34639      has_space=`$ECHO "$complete" | $GREP " "`
34640      if test "x$has_space" != x; then
34641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34643      fi
34644      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34645    fi
34646  fi
34647
34648  # Now new_path has a complete unix path to the binary
34649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34650    # Keep paths in /bin as-is, but remove trailing .exe if any
34651    new_path="${new_path/%.exe/}"
34652    # Do not save /bin paths to all_fixpath_prefixes!
34653  else
34654    # Not in mixed or Windows style, start by that.
34655    new_path=`cmd //c echo $new_path`
34656
34657  input_path="$new_path"
34658  # Check if we need to convert this using DOS-style short mode. If the path
34659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34660  # take no chances and rewrite it.
34661  # Note: m4 eats our [], so we need to use [ and ] instead.
34662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34663  if test "x$has_forbidden_chars" != x; then
34664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34666  fi
34667
34668    # Output is in $new_path
34669
34670  windows_path="$new_path"
34671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34672    unix_path=`$CYGPATH -u "$windows_path"`
34673    new_path="$unix_path"
34674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34676    new_path="$unix_path"
34677  fi
34678
34679    # remove trailing .exe if any
34680    new_path="${new_path/%.exe/}"
34681
34682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34684  fi
34685
34686  else
34687    # We're on a posix platform. Hooray! :)
34688    # First separate the path from the arguments. This will split at the first
34689    # space.
34690    complete="$DUMPBIN"
34691    path="${complete%% *}"
34692    tmp="$complete EOL"
34693    arguments="${tmp#* }"
34694
34695    # Cannot rely on the command "which" here since it doesn't always work.
34696    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34697    if test -z "$is_absolute_path"; then
34698      # Path to executable is not absolute. Find it.
34699      IFS_save="$IFS"
34700      IFS=:
34701      for p in $PATH; do
34702        if test -f "$p/$path" && test -x "$p/$path"; then
34703          new_path="$p/$path"
34704          break
34705        fi
34706      done
34707      IFS="$IFS_save"
34708    else
34709      # This is an absolute path, we can use it without further modifications.
34710      new_path="$path"
34711    fi
34712
34713    if test "x$new_path" = x; then
34714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34715$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34716      has_space=`$ECHO "$complete" | $GREP " "`
34717      if test "x$has_space" != x; then
34718        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34720      fi
34721      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34722    fi
34723  fi
34724
34725  # Now join together the path and the arguments once again
34726  if test "x$arguments" != xEOL; then
34727    new_complete="$new_path ${arguments% *}"
34728  else
34729    new_complete="$new_path"
34730  fi
34731
34732  if test "x$complete" != "x$new_complete"; then
34733    DUMPBIN="$new_complete"
34734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34735$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34736  fi
34737
34738  fi
34739
34740  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34741
34742
34743  # Publish this variable in the help.
34744
34745
34746  if test "x$STRIP" = x; then
34747    # The variable is not set by user, try to locate tool using the code snippet
34748    for ac_prog in strip
34749do
34750  # Extract the first word of "$ac_prog", so it can be a program name with args.
34751set dummy $ac_prog; ac_word=$2
34752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34753$as_echo_n "checking for $ac_word... " >&6; }
34754if ${ac_cv_path_STRIP+:} false; then :
34755  $as_echo_n "(cached) " >&6
34756else
34757  case $STRIP in
34758  [\\/]* | ?:[\\/]*)
34759  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34760  ;;
34761  *)
34762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34763for as_dir in $PATH
34764do
34765  IFS=$as_save_IFS
34766  test -z "$as_dir" && as_dir=.
34767    for ac_exec_ext in '' $ac_executable_extensions; do
34768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34769    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34771    break 2
34772  fi
34773done
34774  done
34775IFS=$as_save_IFS
34776
34777  ;;
34778esac
34779fi
34780STRIP=$ac_cv_path_STRIP
34781if test -n "$STRIP"; then
34782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34783$as_echo "$STRIP" >&6; }
34784else
34785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34786$as_echo "no" >&6; }
34787fi
34788
34789
34790  test -n "$STRIP" && break
34791done
34792
34793  else
34794    # The variable is set, but is it from the command line or the environment?
34795
34796    # Try to remove the string !STRIP! from our list.
34797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34799      # If it failed, the variable was not from the command line. Ignore it,
34800      # but warn the user (except for BASH, which is always set by the calling BASH).
34801      if test "xSTRIP" != xBASH; then
34802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34803$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34804      fi
34805      # Try to locate tool using the code snippet
34806      for ac_prog in strip
34807do
34808  # Extract the first word of "$ac_prog", so it can be a program name with args.
34809set dummy $ac_prog; ac_word=$2
34810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34811$as_echo_n "checking for $ac_word... " >&6; }
34812if ${ac_cv_path_STRIP+:} false; then :
34813  $as_echo_n "(cached) " >&6
34814else
34815  case $STRIP in
34816  [\\/]* | ?:[\\/]*)
34817  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34818  ;;
34819  *)
34820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34821for as_dir in $PATH
34822do
34823  IFS=$as_save_IFS
34824  test -z "$as_dir" && as_dir=.
34825    for ac_exec_ext in '' $ac_executable_extensions; do
34826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34827    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34829    break 2
34830  fi
34831done
34832  done
34833IFS=$as_save_IFS
34834
34835  ;;
34836esac
34837fi
34838STRIP=$ac_cv_path_STRIP
34839if test -n "$STRIP"; then
34840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34841$as_echo "$STRIP" >&6; }
34842else
34843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34844$as_echo "no" >&6; }
34845fi
34846
34847
34848  test -n "$STRIP" && break
34849done
34850
34851    else
34852      # If it succeeded, then it was overridden by the user. We will use it
34853      # for the tool.
34854
34855      # First remove it from the list of overridden variables, so we can test
34856      # for unknown variables in the end.
34857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34858
34859      # Check if the provided tool contains a complete path.
34860      tool_specified="$STRIP"
34861      tool_basename="${tool_specified##*/}"
34862      if test "x$tool_basename" = "x$tool_specified"; then
34863        # A command without a complete path is provided, search $PATH.
34864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34865$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34866        # Extract the first word of "$tool_basename", so it can be a program name with args.
34867set dummy $tool_basename; ac_word=$2
34868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34869$as_echo_n "checking for $ac_word... " >&6; }
34870if ${ac_cv_path_STRIP+:} false; then :
34871  $as_echo_n "(cached) " >&6
34872else
34873  case $STRIP in
34874  [\\/]* | ?:[\\/]*)
34875  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34876  ;;
34877  *)
34878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34879for as_dir in $PATH
34880do
34881  IFS=$as_save_IFS
34882  test -z "$as_dir" && as_dir=.
34883    for ac_exec_ext in '' $ac_executable_extensions; do
34884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34885    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34887    break 2
34888  fi
34889done
34890  done
34891IFS=$as_save_IFS
34892
34893  ;;
34894esac
34895fi
34896STRIP=$ac_cv_path_STRIP
34897if test -n "$STRIP"; then
34898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34899$as_echo "$STRIP" >&6; }
34900else
34901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34902$as_echo "no" >&6; }
34903fi
34904
34905
34906        if test "x$STRIP" = x; then
34907          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34908        fi
34909      else
34910        # Otherwise we believe it is a complete path. Use it as it is.
34911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34912$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34914$as_echo_n "checking for STRIP... " >&6; }
34915        if test ! -x "$tool_specified"; then
34916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34917$as_echo "not found" >&6; }
34918          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34919        fi
34920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34921$as_echo "$tool_specified" >&6; }
34922      fi
34923    fi
34924  fi
34925
34926
34927
34928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34929
34930  # First separate the path from the arguments. This will split at the first
34931  # space.
34932  complete="$STRIP"
34933  path="${complete%% *}"
34934  tmp="$complete EOL"
34935  arguments="${tmp#* }"
34936
34937  # Input might be given as Windows format, start by converting to
34938  # unix format.
34939  new_path=`$CYGPATH -u "$path"`
34940
34941  # Now try to locate executable using which
34942  new_path=`$WHICH "$new_path" 2> /dev/null`
34943  # bat and cmd files are not always considered executable in cygwin causing which
34944  # to not find them
34945  if test "x$new_path" = x \
34946      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34947      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34948    new_path=`$CYGPATH -u "$path"`
34949  fi
34950  if test "x$new_path" = x; then
34951    # Oops. Which didn't find the executable.
34952    # The splitting of arguments from the executable at a space might have been incorrect,
34953    # since paths with space are more likely in Windows. Give it another try with the whole
34954    # argument.
34955    path="$complete"
34956    arguments="EOL"
34957    new_path=`$CYGPATH -u "$path"`
34958    new_path=`$WHICH "$new_path" 2> /dev/null`
34959    # bat and cmd files are not always considered executable in cygwin causing which
34960    # to not find them
34961    if test "x$new_path" = x \
34962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34964      new_path=`$CYGPATH -u "$path"`
34965    fi
34966    if test "x$new_path" = x; then
34967      # It's still not found. Now this is an unrecoverable error.
34968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34969$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34970      has_space=`$ECHO "$complete" | $GREP " "`
34971      if test "x$has_space" != x; then
34972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34974      fi
34975      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34976    fi
34977  fi
34978
34979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34982  # "foo.exe" is OK but "foo" is an error.
34983  #
34984  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34985  # It is also a way to make sure we got the proper file name for the real test later on.
34986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34987  if test "x$test_shortpath" = x; then
34988    # Short path failed, file does not exist as specified.
34989    # Try adding .exe or .cmd
34990    if test -f "${new_path}.exe"; then
34991      input_to_shortpath="${new_path}.exe"
34992    elif test -f "${new_path}.cmd"; then
34993      input_to_shortpath="${new_path}.cmd"
34994    else
34995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34996$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34997      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34998$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34999      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35000    fi
35001  else
35002    input_to_shortpath="$new_path"
35003  fi
35004
35005  # Call helper function which possibly converts this using DOS-style short mode.
35006  # If so, the updated path is stored in $new_path.
35007  new_path="$input_to_shortpath"
35008
35009  input_path="$input_to_shortpath"
35010  # Check if we need to convert this using DOS-style short mode. If the path
35011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35012  # take no chances and rewrite it.
35013  # Note: m4 eats our [], so we need to use [ and ] instead.
35014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35015  if test "x$has_forbidden_chars" != x; then
35016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35020      # Going to short mode and back again did indeed matter. Since short mode is
35021      # case insensitive, let's make it lowercase to improve readability.
35022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35023      # Now convert it back to Unix-stile (cygpath)
35024      input_path=`$CYGPATH -u "$shortmode_path"`
35025      new_path="$input_path"
35026    fi
35027  fi
35028
35029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35030  if test "x$test_cygdrive_prefix" = x; then
35031    # As a simple fix, exclude /usr/bin since it's not a real path.
35032    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35034      # a path prefixed by /cygdrive for fixpath to work.
35035      new_path="$CYGWIN_ROOT_PATH$input_path"
35036    fi
35037  fi
35038
35039  # remove trailing .exe if any
35040  new_path="${new_path/%.exe/}"
35041
35042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35043
35044  # First separate the path from the arguments. This will split at the first
35045  # space.
35046  complete="$STRIP"
35047  path="${complete%% *}"
35048  tmp="$complete EOL"
35049  arguments="${tmp#* }"
35050
35051  # Input might be given as Windows format, start by converting to
35052  # unix format.
35053  new_path="$path"
35054
35055  windows_path="$new_path"
35056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35057    unix_path=`$CYGPATH -u "$windows_path"`
35058    new_path="$unix_path"
35059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35061    new_path="$unix_path"
35062  fi
35063
35064
35065  # Now try to locate executable using which
35066  new_path=`$WHICH "$new_path" 2> /dev/null`
35067
35068  if test "x$new_path" = x; then
35069    # Oops. Which didn't find the executable.
35070    # The splitting of arguments from the executable at a space might have been incorrect,
35071    # since paths with space are more likely in Windows. Give it another try with the whole
35072    # argument.
35073    path="$complete"
35074    arguments="EOL"
35075    new_path="$path"
35076
35077  windows_path="$new_path"
35078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35079    unix_path=`$CYGPATH -u "$windows_path"`
35080    new_path="$unix_path"
35081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35083    new_path="$unix_path"
35084  fi
35085
35086
35087    new_path=`$WHICH "$new_path" 2> /dev/null`
35088
35089    if test "x$new_path" = x; then
35090      # It's still not found. Now this is an unrecoverable error.
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35092$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35093      has_space=`$ECHO "$complete" | $GREP " "`
35094      if test "x$has_space" != x; then
35095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35097      fi
35098      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35099    fi
35100  fi
35101
35102  # Now new_path has a complete unix path to the binary
35103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35104    # Keep paths in /bin as-is, but remove trailing .exe if any
35105    new_path="${new_path/%.exe/}"
35106    # Do not save /bin paths to all_fixpath_prefixes!
35107  else
35108    # Not in mixed or Windows style, start by that.
35109    new_path=`cmd //c echo $new_path`
35110
35111  input_path="$new_path"
35112  # Check if we need to convert this using DOS-style short mode. If the path
35113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35114  # take no chances and rewrite it.
35115  # Note: m4 eats our [], so we need to use [ and ] instead.
35116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35117  if test "x$has_forbidden_chars" != x; then
35118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35120  fi
35121
35122    # Output is in $new_path
35123
35124  windows_path="$new_path"
35125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35126    unix_path=`$CYGPATH -u "$windows_path"`
35127    new_path="$unix_path"
35128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35130    new_path="$unix_path"
35131  fi
35132
35133    # remove trailing .exe if any
35134    new_path="${new_path/%.exe/}"
35135
35136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35138  fi
35139
35140  else
35141    # We're on a posix platform. Hooray! :)
35142    # First separate the path from the arguments. This will split at the first
35143    # space.
35144    complete="$STRIP"
35145    path="${complete%% *}"
35146    tmp="$complete EOL"
35147    arguments="${tmp#* }"
35148
35149    # Cannot rely on the command "which" here since it doesn't always work.
35150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35151    if test -z "$is_absolute_path"; then
35152      # Path to executable is not absolute. Find it.
35153      IFS_save="$IFS"
35154      IFS=:
35155      for p in $PATH; do
35156        if test -f "$p/$path" && test -x "$p/$path"; then
35157          new_path="$p/$path"
35158          break
35159        fi
35160      done
35161      IFS="$IFS_save"
35162    else
35163      # This is an absolute path, we can use it without further modifications.
35164      new_path="$path"
35165    fi
35166
35167    if test "x$new_path" = x; then
35168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35169$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35170      has_space=`$ECHO "$complete" | $GREP " "`
35171      if test "x$has_space" != x; then
35172        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35173$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35174      fi
35175      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35176    fi
35177  fi
35178
35179  # Now join together the path and the arguments once again
35180  if test "x$arguments" != xEOL; then
35181    new_complete="$new_path ${arguments% *}"
35182  else
35183    new_complete="$new_path"
35184  fi
35185
35186  if test "x$complete" != "x$new_complete"; then
35187    STRIP="$new_complete"
35188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35189$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35190  fi
35191
35192
35193
35194  # Publish this variable in the help.
35195
35196
35197  if test "x$NM" = x; then
35198    # The variable is not set by user, try to locate tool using the code snippet
35199    for ac_prog in nm
35200do
35201  # Extract the first word of "$ac_prog", so it can be a program name with args.
35202set dummy $ac_prog; ac_word=$2
35203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35204$as_echo_n "checking for $ac_word... " >&6; }
35205if ${ac_cv_path_NM+:} false; then :
35206  $as_echo_n "(cached) " >&6
35207else
35208  case $NM in
35209  [\\/]* | ?:[\\/]*)
35210  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35211  ;;
35212  *)
35213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35214for as_dir in $PATH
35215do
35216  IFS=$as_save_IFS
35217  test -z "$as_dir" && as_dir=.
35218    for ac_exec_ext in '' $ac_executable_extensions; do
35219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35220    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35222    break 2
35223  fi
35224done
35225  done
35226IFS=$as_save_IFS
35227
35228  ;;
35229esac
35230fi
35231NM=$ac_cv_path_NM
35232if test -n "$NM"; then
35233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35234$as_echo "$NM" >&6; }
35235else
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35237$as_echo "no" >&6; }
35238fi
35239
35240
35241  test -n "$NM" && break
35242done
35243
35244  else
35245    # The variable is set, but is it from the command line or the environment?
35246
35247    # Try to remove the string !NM! from our list.
35248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35250      # If it failed, the variable was not from the command line. Ignore it,
35251      # but warn the user (except for BASH, which is always set by the calling BASH).
35252      if test "xNM" != xBASH; then
35253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35254$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35255      fi
35256      # Try to locate tool using the code snippet
35257      for ac_prog in nm
35258do
35259  # Extract the first word of "$ac_prog", so it can be a program name with args.
35260set dummy $ac_prog; ac_word=$2
35261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35262$as_echo_n "checking for $ac_word... " >&6; }
35263if ${ac_cv_path_NM+:} false; then :
35264  $as_echo_n "(cached) " >&6
35265else
35266  case $NM in
35267  [\\/]* | ?:[\\/]*)
35268  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35269  ;;
35270  *)
35271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35272for as_dir in $PATH
35273do
35274  IFS=$as_save_IFS
35275  test -z "$as_dir" && as_dir=.
35276    for ac_exec_ext in '' $ac_executable_extensions; do
35277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35278    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35280    break 2
35281  fi
35282done
35283  done
35284IFS=$as_save_IFS
35285
35286  ;;
35287esac
35288fi
35289NM=$ac_cv_path_NM
35290if test -n "$NM"; then
35291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35292$as_echo "$NM" >&6; }
35293else
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35295$as_echo "no" >&6; }
35296fi
35297
35298
35299  test -n "$NM" && break
35300done
35301
35302    else
35303      # If it succeeded, then it was overridden by the user. We will use it
35304      # for the tool.
35305
35306      # First remove it from the list of overridden variables, so we can test
35307      # for unknown variables in the end.
35308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35309
35310      # Check if the provided tool contains a complete path.
35311      tool_specified="$NM"
35312      tool_basename="${tool_specified##*/}"
35313      if test "x$tool_basename" = "x$tool_specified"; then
35314        # A command without a complete path is provided, search $PATH.
35315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35316$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35317        # Extract the first word of "$tool_basename", so it can be a program name with args.
35318set dummy $tool_basename; ac_word=$2
35319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35320$as_echo_n "checking for $ac_word... " >&6; }
35321if ${ac_cv_path_NM+:} false; then :
35322  $as_echo_n "(cached) " >&6
35323else
35324  case $NM in
35325  [\\/]* | ?:[\\/]*)
35326  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35327  ;;
35328  *)
35329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35330for as_dir in $PATH
35331do
35332  IFS=$as_save_IFS
35333  test -z "$as_dir" && as_dir=.
35334    for ac_exec_ext in '' $ac_executable_extensions; do
35335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35336    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35338    break 2
35339  fi
35340done
35341  done
35342IFS=$as_save_IFS
35343
35344  ;;
35345esac
35346fi
35347NM=$ac_cv_path_NM
35348if test -n "$NM"; then
35349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35350$as_echo "$NM" >&6; }
35351else
35352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35353$as_echo "no" >&6; }
35354fi
35355
35356
35357        if test "x$NM" = x; then
35358          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35359        fi
35360      else
35361        # Otherwise we believe it is a complete path. Use it as it is.
35362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35363$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35365$as_echo_n "checking for NM... " >&6; }
35366        if test ! -x "$tool_specified"; then
35367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35368$as_echo "not found" >&6; }
35369          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35370        fi
35371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35372$as_echo "$tool_specified" >&6; }
35373      fi
35374    fi
35375  fi
35376
35377
35378
35379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35380
35381  # First separate the path from the arguments. This will split at the first
35382  # space.
35383  complete="$NM"
35384  path="${complete%% *}"
35385  tmp="$complete EOL"
35386  arguments="${tmp#* }"
35387
35388  # Input might be given as Windows format, start by converting to
35389  # unix format.
35390  new_path=`$CYGPATH -u "$path"`
35391
35392  # Now try to locate executable using which
35393  new_path=`$WHICH "$new_path" 2> /dev/null`
35394  # bat and cmd files are not always considered executable in cygwin causing which
35395  # to not find them
35396  if test "x$new_path" = x \
35397      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35398      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35399    new_path=`$CYGPATH -u "$path"`
35400  fi
35401  if test "x$new_path" = x; then
35402    # Oops. Which didn't find the executable.
35403    # The splitting of arguments from the executable at a space might have been incorrect,
35404    # since paths with space are more likely in Windows. Give it another try with the whole
35405    # argument.
35406    path="$complete"
35407    arguments="EOL"
35408    new_path=`$CYGPATH -u "$path"`
35409    new_path=`$WHICH "$new_path" 2> /dev/null`
35410    # bat and cmd files are not always considered executable in cygwin causing which
35411    # to not find them
35412    if test "x$new_path" = x \
35413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35415      new_path=`$CYGPATH -u "$path"`
35416    fi
35417    if test "x$new_path" = x; then
35418      # It's still not found. Now this is an unrecoverable error.
35419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35420$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35421      has_space=`$ECHO "$complete" | $GREP " "`
35422      if test "x$has_space" != x; then
35423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35425      fi
35426      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35427    fi
35428  fi
35429
35430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35433  # "foo.exe" is OK but "foo" is an error.
35434  #
35435  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35436  # It is also a way to make sure we got the proper file name for the real test later on.
35437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35438  if test "x$test_shortpath" = x; then
35439    # Short path failed, file does not exist as specified.
35440    # Try adding .exe or .cmd
35441    if test -f "${new_path}.exe"; then
35442      input_to_shortpath="${new_path}.exe"
35443    elif test -f "${new_path}.cmd"; then
35444      input_to_shortpath="${new_path}.cmd"
35445    else
35446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35447$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35448      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35449$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35450      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35451    fi
35452  else
35453    input_to_shortpath="$new_path"
35454  fi
35455
35456  # Call helper function which possibly converts this using DOS-style short mode.
35457  # If so, the updated path is stored in $new_path.
35458  new_path="$input_to_shortpath"
35459
35460  input_path="$input_to_shortpath"
35461  # Check if we need to convert this using DOS-style short mode. If the path
35462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35463  # take no chances and rewrite it.
35464  # Note: m4 eats our [], so we need to use [ and ] instead.
35465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35466  if test "x$has_forbidden_chars" != x; then
35467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35471      # Going to short mode and back again did indeed matter. Since short mode is
35472      # case insensitive, let's make it lowercase to improve readability.
35473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35474      # Now convert it back to Unix-stile (cygpath)
35475      input_path=`$CYGPATH -u "$shortmode_path"`
35476      new_path="$input_path"
35477    fi
35478  fi
35479
35480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35481  if test "x$test_cygdrive_prefix" = x; then
35482    # As a simple fix, exclude /usr/bin since it's not a real path.
35483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35485      # a path prefixed by /cygdrive for fixpath to work.
35486      new_path="$CYGWIN_ROOT_PATH$input_path"
35487    fi
35488  fi
35489
35490  # remove trailing .exe if any
35491  new_path="${new_path/%.exe/}"
35492
35493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35494
35495  # First separate the path from the arguments. This will split at the first
35496  # space.
35497  complete="$NM"
35498  path="${complete%% *}"
35499  tmp="$complete EOL"
35500  arguments="${tmp#* }"
35501
35502  # Input might be given as Windows format, start by converting to
35503  # unix format.
35504  new_path="$path"
35505
35506  windows_path="$new_path"
35507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35508    unix_path=`$CYGPATH -u "$windows_path"`
35509    new_path="$unix_path"
35510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35512    new_path="$unix_path"
35513  fi
35514
35515
35516  # Now try to locate executable using which
35517  new_path=`$WHICH "$new_path" 2> /dev/null`
35518
35519  if test "x$new_path" = x; then
35520    # Oops. Which didn't find the executable.
35521    # The splitting of arguments from the executable at a space might have been incorrect,
35522    # since paths with space are more likely in Windows. Give it another try with the whole
35523    # argument.
35524    path="$complete"
35525    arguments="EOL"
35526    new_path="$path"
35527
35528  windows_path="$new_path"
35529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35530    unix_path=`$CYGPATH -u "$windows_path"`
35531    new_path="$unix_path"
35532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35534    new_path="$unix_path"
35535  fi
35536
35537
35538    new_path=`$WHICH "$new_path" 2> /dev/null`
35539
35540    if test "x$new_path" = x; then
35541      # It's still not found. Now this is an unrecoverable error.
35542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35543$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35544      has_space=`$ECHO "$complete" | $GREP " "`
35545      if test "x$has_space" != x; then
35546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35548      fi
35549      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35550    fi
35551  fi
35552
35553  # Now new_path has a complete unix path to the binary
35554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35555    # Keep paths in /bin as-is, but remove trailing .exe if any
35556    new_path="${new_path/%.exe/}"
35557    # Do not save /bin paths to all_fixpath_prefixes!
35558  else
35559    # Not in mixed or Windows style, start by that.
35560    new_path=`cmd //c echo $new_path`
35561
35562  input_path="$new_path"
35563  # Check if we need to convert this using DOS-style short mode. If the path
35564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35565  # take no chances and rewrite it.
35566  # Note: m4 eats our [], so we need to use [ and ] instead.
35567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35568  if test "x$has_forbidden_chars" != x; then
35569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35571  fi
35572
35573    # Output is in $new_path
35574
35575  windows_path="$new_path"
35576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35577    unix_path=`$CYGPATH -u "$windows_path"`
35578    new_path="$unix_path"
35579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35581    new_path="$unix_path"
35582  fi
35583
35584    # remove trailing .exe if any
35585    new_path="${new_path/%.exe/}"
35586
35587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35589  fi
35590
35591  else
35592    # We're on a posix platform. Hooray! :)
35593    # First separate the path from the arguments. This will split at the first
35594    # space.
35595    complete="$NM"
35596    path="${complete%% *}"
35597    tmp="$complete EOL"
35598    arguments="${tmp#* }"
35599
35600    # Cannot rely on the command "which" here since it doesn't always work.
35601    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35602    if test -z "$is_absolute_path"; then
35603      # Path to executable is not absolute. Find it.
35604      IFS_save="$IFS"
35605      IFS=:
35606      for p in $PATH; do
35607        if test -f "$p/$path" && test -x "$p/$path"; then
35608          new_path="$p/$path"
35609          break
35610        fi
35611      done
35612      IFS="$IFS_save"
35613    else
35614      # This is an absolute path, we can use it without further modifications.
35615      new_path="$path"
35616    fi
35617
35618    if test "x$new_path" = x; then
35619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35620$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35621      has_space=`$ECHO "$complete" | $GREP " "`
35622      if test "x$has_space" != x; then
35623        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35625      fi
35626      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35627    fi
35628  fi
35629
35630  # Now join together the path and the arguments once again
35631  if test "x$arguments" != xEOL; then
35632    new_complete="$new_path ${arguments% *}"
35633  else
35634    new_complete="$new_path"
35635  fi
35636
35637  if test "x$complete" != "x$new_complete"; then
35638    NM="$new_complete"
35639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35640$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35641  fi
35642
35643
35644
35645  # Publish this variable in the help.
35646
35647
35648  if test "x$GNM" = x; then
35649    # The variable is not set by user, try to locate tool using the code snippet
35650    for ac_prog in gnm
35651do
35652  # Extract the first word of "$ac_prog", so it can be a program name with args.
35653set dummy $ac_prog; ac_word=$2
35654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35655$as_echo_n "checking for $ac_word... " >&6; }
35656if ${ac_cv_path_GNM+:} false; then :
35657  $as_echo_n "(cached) " >&6
35658else
35659  case $GNM in
35660  [\\/]* | ?:[\\/]*)
35661  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35662  ;;
35663  *)
35664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35665for as_dir in $PATH
35666do
35667  IFS=$as_save_IFS
35668  test -z "$as_dir" && as_dir=.
35669    for ac_exec_ext in '' $ac_executable_extensions; do
35670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35671    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35673    break 2
35674  fi
35675done
35676  done
35677IFS=$as_save_IFS
35678
35679  ;;
35680esac
35681fi
35682GNM=$ac_cv_path_GNM
35683if test -n "$GNM"; then
35684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35685$as_echo "$GNM" >&6; }
35686else
35687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35688$as_echo "no" >&6; }
35689fi
35690
35691
35692  test -n "$GNM" && break
35693done
35694
35695  else
35696    # The variable is set, but is it from the command line or the environment?
35697
35698    # Try to remove the string !GNM! from our list.
35699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35701      # If it failed, the variable was not from the command line. Ignore it,
35702      # but warn the user (except for BASH, which is always set by the calling BASH).
35703      if test "xGNM" != xBASH; then
35704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35705$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35706      fi
35707      # Try to locate tool using the code snippet
35708      for ac_prog in gnm
35709do
35710  # Extract the first word of "$ac_prog", so it can be a program name with args.
35711set dummy $ac_prog; ac_word=$2
35712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35713$as_echo_n "checking for $ac_word... " >&6; }
35714if ${ac_cv_path_GNM+:} false; then :
35715  $as_echo_n "(cached) " >&6
35716else
35717  case $GNM in
35718  [\\/]* | ?:[\\/]*)
35719  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35720  ;;
35721  *)
35722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35723for as_dir in $PATH
35724do
35725  IFS=$as_save_IFS
35726  test -z "$as_dir" && as_dir=.
35727    for ac_exec_ext in '' $ac_executable_extensions; do
35728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35729    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35731    break 2
35732  fi
35733done
35734  done
35735IFS=$as_save_IFS
35736
35737  ;;
35738esac
35739fi
35740GNM=$ac_cv_path_GNM
35741if test -n "$GNM"; then
35742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35743$as_echo "$GNM" >&6; }
35744else
35745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35746$as_echo "no" >&6; }
35747fi
35748
35749
35750  test -n "$GNM" && break
35751done
35752
35753    else
35754      # If it succeeded, then it was overridden by the user. We will use it
35755      # for the tool.
35756
35757      # First remove it from the list of overridden variables, so we can test
35758      # for unknown variables in the end.
35759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35760
35761      # Check if the provided tool contains a complete path.
35762      tool_specified="$GNM"
35763      tool_basename="${tool_specified##*/}"
35764      if test "x$tool_basename" = "x$tool_specified"; then
35765        # A command without a complete path is provided, search $PATH.
35766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35767$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35768        # Extract the first word of "$tool_basename", so it can be a program name with args.
35769set dummy $tool_basename; ac_word=$2
35770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35771$as_echo_n "checking for $ac_word... " >&6; }
35772if ${ac_cv_path_GNM+:} false; then :
35773  $as_echo_n "(cached) " >&6
35774else
35775  case $GNM in
35776  [\\/]* | ?:[\\/]*)
35777  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35778  ;;
35779  *)
35780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35781for as_dir in $PATH
35782do
35783  IFS=$as_save_IFS
35784  test -z "$as_dir" && as_dir=.
35785    for ac_exec_ext in '' $ac_executable_extensions; do
35786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35787    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35789    break 2
35790  fi
35791done
35792  done
35793IFS=$as_save_IFS
35794
35795  ;;
35796esac
35797fi
35798GNM=$ac_cv_path_GNM
35799if test -n "$GNM"; then
35800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35801$as_echo "$GNM" >&6; }
35802else
35803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35804$as_echo "no" >&6; }
35805fi
35806
35807
35808        if test "x$GNM" = x; then
35809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35810        fi
35811      else
35812        # Otherwise we believe it is a complete path. Use it as it is.
35813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35814$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35816$as_echo_n "checking for GNM... " >&6; }
35817        if test ! -x "$tool_specified"; then
35818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35819$as_echo "not found" >&6; }
35820          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35821        fi
35822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35823$as_echo "$tool_specified" >&6; }
35824      fi
35825    fi
35826  fi
35827
35828
35829
35830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35831
35832  # First separate the path from the arguments. This will split at the first
35833  # space.
35834  complete="$GNM"
35835  path="${complete%% *}"
35836  tmp="$complete EOL"
35837  arguments="${tmp#* }"
35838
35839  # Input might be given as Windows format, start by converting to
35840  # unix format.
35841  new_path=`$CYGPATH -u "$path"`
35842
35843  # Now try to locate executable using which
35844  new_path=`$WHICH "$new_path" 2> /dev/null`
35845  # bat and cmd files are not always considered executable in cygwin causing which
35846  # to not find them
35847  if test "x$new_path" = x \
35848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35850    new_path=`$CYGPATH -u "$path"`
35851  fi
35852  if test "x$new_path" = x; then
35853    # Oops. Which didn't find the executable.
35854    # The splitting of arguments from the executable at a space might have been incorrect,
35855    # since paths with space are more likely in Windows. Give it another try with the whole
35856    # argument.
35857    path="$complete"
35858    arguments="EOL"
35859    new_path=`$CYGPATH -u "$path"`
35860    new_path=`$WHICH "$new_path" 2> /dev/null`
35861    # bat and cmd files are not always considered executable in cygwin causing which
35862    # to not find them
35863    if test "x$new_path" = x \
35864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35866      new_path=`$CYGPATH -u "$path"`
35867    fi
35868    if test "x$new_path" = x; then
35869      # It's still not found. Now this is an unrecoverable error.
35870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35871$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35872      has_space=`$ECHO "$complete" | $GREP " "`
35873      if test "x$has_space" != x; then
35874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35876      fi
35877      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35878    fi
35879  fi
35880
35881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35884  # "foo.exe" is OK but "foo" is an error.
35885  #
35886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35887  # It is also a way to make sure we got the proper file name for the real test later on.
35888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35889  if test "x$test_shortpath" = x; then
35890    # Short path failed, file does not exist as specified.
35891    # Try adding .exe or .cmd
35892    if test -f "${new_path}.exe"; then
35893      input_to_shortpath="${new_path}.exe"
35894    elif test -f "${new_path}.cmd"; then
35895      input_to_shortpath="${new_path}.cmd"
35896    else
35897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35898$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35901      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35902    fi
35903  else
35904    input_to_shortpath="$new_path"
35905  fi
35906
35907  # Call helper function which possibly converts this using DOS-style short mode.
35908  # If so, the updated path is stored in $new_path.
35909  new_path="$input_to_shortpath"
35910
35911  input_path="$input_to_shortpath"
35912  # Check if we need to convert this using DOS-style short mode. If the path
35913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35914  # take no chances and rewrite it.
35915  # Note: m4 eats our [], so we need to use [ and ] instead.
35916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35917  if test "x$has_forbidden_chars" != x; then
35918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35922      # Going to short mode and back again did indeed matter. Since short mode is
35923      # case insensitive, let's make it lowercase to improve readability.
35924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35925      # Now convert it back to Unix-stile (cygpath)
35926      input_path=`$CYGPATH -u "$shortmode_path"`
35927      new_path="$input_path"
35928    fi
35929  fi
35930
35931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35932  if test "x$test_cygdrive_prefix" = x; then
35933    # As a simple fix, exclude /usr/bin since it's not a real path.
35934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35936      # a path prefixed by /cygdrive for fixpath to work.
35937      new_path="$CYGWIN_ROOT_PATH$input_path"
35938    fi
35939  fi
35940
35941  # remove trailing .exe if any
35942  new_path="${new_path/%.exe/}"
35943
35944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35945
35946  # First separate the path from the arguments. This will split at the first
35947  # space.
35948  complete="$GNM"
35949  path="${complete%% *}"
35950  tmp="$complete EOL"
35951  arguments="${tmp#* }"
35952
35953  # Input might be given as Windows format, start by converting to
35954  # unix format.
35955  new_path="$path"
35956
35957  windows_path="$new_path"
35958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35959    unix_path=`$CYGPATH -u "$windows_path"`
35960    new_path="$unix_path"
35961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35963    new_path="$unix_path"
35964  fi
35965
35966
35967  # Now try to locate executable using which
35968  new_path=`$WHICH "$new_path" 2> /dev/null`
35969
35970  if test "x$new_path" = x; then
35971    # Oops. Which didn't find the executable.
35972    # The splitting of arguments from the executable at a space might have been incorrect,
35973    # since paths with space are more likely in Windows. Give it another try with the whole
35974    # argument.
35975    path="$complete"
35976    arguments="EOL"
35977    new_path="$path"
35978
35979  windows_path="$new_path"
35980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35981    unix_path=`$CYGPATH -u "$windows_path"`
35982    new_path="$unix_path"
35983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35985    new_path="$unix_path"
35986  fi
35987
35988
35989    new_path=`$WHICH "$new_path" 2> /dev/null`
35990
35991    if test "x$new_path" = x; then
35992      # It's still not found. Now this is an unrecoverable error.
35993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35994$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35995      has_space=`$ECHO "$complete" | $GREP " "`
35996      if test "x$has_space" != x; then
35997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35999      fi
36000      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36001    fi
36002  fi
36003
36004  # Now new_path has a complete unix path to the binary
36005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36006    # Keep paths in /bin as-is, but remove trailing .exe if any
36007    new_path="${new_path/%.exe/}"
36008    # Do not save /bin paths to all_fixpath_prefixes!
36009  else
36010    # Not in mixed or Windows style, start by that.
36011    new_path=`cmd //c echo $new_path`
36012
36013  input_path="$new_path"
36014  # Check if we need to convert this using DOS-style short mode. If the path
36015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36016  # take no chances and rewrite it.
36017  # Note: m4 eats our [], so we need to use [ and ] instead.
36018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36019  if test "x$has_forbidden_chars" != x; then
36020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36022  fi
36023
36024    # Output is in $new_path
36025
36026  windows_path="$new_path"
36027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36028    unix_path=`$CYGPATH -u "$windows_path"`
36029    new_path="$unix_path"
36030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36032    new_path="$unix_path"
36033  fi
36034
36035    # remove trailing .exe if any
36036    new_path="${new_path/%.exe/}"
36037
36038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36040  fi
36041
36042  else
36043    # We're on a posix platform. Hooray! :)
36044    # First separate the path from the arguments. This will split at the first
36045    # space.
36046    complete="$GNM"
36047    path="${complete%% *}"
36048    tmp="$complete EOL"
36049    arguments="${tmp#* }"
36050
36051    # Cannot rely on the command "which" here since it doesn't always work.
36052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36053    if test -z "$is_absolute_path"; then
36054      # Path to executable is not absolute. Find it.
36055      IFS_save="$IFS"
36056      IFS=:
36057      for p in $PATH; do
36058        if test -f "$p/$path" && test -x "$p/$path"; then
36059          new_path="$p/$path"
36060          break
36061        fi
36062      done
36063      IFS="$IFS_save"
36064    else
36065      # This is an absolute path, we can use it without further modifications.
36066      new_path="$path"
36067    fi
36068
36069    if test "x$new_path" = x; then
36070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36071$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36072      has_space=`$ECHO "$complete" | $GREP " "`
36073      if test "x$has_space" != x; then
36074        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36076      fi
36077      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36078    fi
36079  fi
36080
36081  # Now join together the path and the arguments once again
36082  if test "x$arguments" != xEOL; then
36083    new_complete="$new_path ${arguments% *}"
36084  else
36085    new_complete="$new_path"
36086  fi
36087
36088  if test "x$complete" != "x$new_complete"; then
36089    GNM="$new_complete"
36090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36091$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36092  fi
36093
36094
36095
36096
36097  # Publish this variable in the help.
36098
36099
36100  if test "x$MCS" = x; then
36101    # The variable is not set by user, try to locate tool using the code snippet
36102    for ac_prog in mcs
36103do
36104  # Extract the first word of "$ac_prog", so it can be a program name with args.
36105set dummy $ac_prog; ac_word=$2
36106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36107$as_echo_n "checking for $ac_word... " >&6; }
36108if ${ac_cv_path_MCS+:} false; then :
36109  $as_echo_n "(cached) " >&6
36110else
36111  case $MCS in
36112  [\\/]* | ?:[\\/]*)
36113  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36114  ;;
36115  *)
36116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36117for as_dir in $PATH
36118do
36119  IFS=$as_save_IFS
36120  test -z "$as_dir" && as_dir=.
36121    for ac_exec_ext in '' $ac_executable_extensions; do
36122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36123    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36125    break 2
36126  fi
36127done
36128  done
36129IFS=$as_save_IFS
36130
36131  ;;
36132esac
36133fi
36134MCS=$ac_cv_path_MCS
36135if test -n "$MCS"; then
36136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36137$as_echo "$MCS" >&6; }
36138else
36139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36140$as_echo "no" >&6; }
36141fi
36142
36143
36144  test -n "$MCS" && break
36145done
36146
36147  else
36148    # The variable is set, but is it from the command line or the environment?
36149
36150    # Try to remove the string !MCS! from our list.
36151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36153      # If it failed, the variable was not from the command line. Ignore it,
36154      # but warn the user (except for BASH, which is always set by the calling BASH).
36155      if test "xMCS" != xBASH; then
36156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36157$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36158      fi
36159      # Try to locate tool using the code snippet
36160      for ac_prog in mcs
36161do
36162  # Extract the first word of "$ac_prog", so it can be a program name with args.
36163set dummy $ac_prog; ac_word=$2
36164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36165$as_echo_n "checking for $ac_word... " >&6; }
36166if ${ac_cv_path_MCS+:} false; then :
36167  $as_echo_n "(cached) " >&6
36168else
36169  case $MCS in
36170  [\\/]* | ?:[\\/]*)
36171  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36172  ;;
36173  *)
36174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36175for as_dir in $PATH
36176do
36177  IFS=$as_save_IFS
36178  test -z "$as_dir" && as_dir=.
36179    for ac_exec_ext in '' $ac_executable_extensions; do
36180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36181    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36183    break 2
36184  fi
36185done
36186  done
36187IFS=$as_save_IFS
36188
36189  ;;
36190esac
36191fi
36192MCS=$ac_cv_path_MCS
36193if test -n "$MCS"; then
36194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36195$as_echo "$MCS" >&6; }
36196else
36197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36198$as_echo "no" >&6; }
36199fi
36200
36201
36202  test -n "$MCS" && break
36203done
36204
36205    else
36206      # If it succeeded, then it was overridden by the user. We will use it
36207      # for the tool.
36208
36209      # First remove it from the list of overridden variables, so we can test
36210      # for unknown variables in the end.
36211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36212
36213      # Check if the provided tool contains a complete path.
36214      tool_specified="$MCS"
36215      tool_basename="${tool_specified##*/}"
36216      if test "x$tool_basename" = "x$tool_specified"; then
36217        # A command without a complete path is provided, search $PATH.
36218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36219$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36220        # Extract the first word of "$tool_basename", so it can be a program name with args.
36221set dummy $tool_basename; ac_word=$2
36222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36223$as_echo_n "checking for $ac_word... " >&6; }
36224if ${ac_cv_path_MCS+:} false; then :
36225  $as_echo_n "(cached) " >&6
36226else
36227  case $MCS in
36228  [\\/]* | ?:[\\/]*)
36229  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36230  ;;
36231  *)
36232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36233for as_dir in $PATH
36234do
36235  IFS=$as_save_IFS
36236  test -z "$as_dir" && as_dir=.
36237    for ac_exec_ext in '' $ac_executable_extensions; do
36238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36239    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36241    break 2
36242  fi
36243done
36244  done
36245IFS=$as_save_IFS
36246
36247  ;;
36248esac
36249fi
36250MCS=$ac_cv_path_MCS
36251if test -n "$MCS"; then
36252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36253$as_echo "$MCS" >&6; }
36254else
36255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36256$as_echo "no" >&6; }
36257fi
36258
36259
36260        if test "x$MCS" = x; then
36261          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36262        fi
36263      else
36264        # Otherwise we believe it is a complete path. Use it as it is.
36265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36266$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36268$as_echo_n "checking for MCS... " >&6; }
36269        if test ! -x "$tool_specified"; then
36270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36271$as_echo "not found" >&6; }
36272          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36273        fi
36274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36275$as_echo "$tool_specified" >&6; }
36276      fi
36277    fi
36278  fi
36279
36280
36281
36282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36283
36284  # First separate the path from the arguments. This will split at the first
36285  # space.
36286  complete="$MCS"
36287  path="${complete%% *}"
36288  tmp="$complete EOL"
36289  arguments="${tmp#* }"
36290
36291  # Input might be given as Windows format, start by converting to
36292  # unix format.
36293  new_path=`$CYGPATH -u "$path"`
36294
36295  # Now try to locate executable using which
36296  new_path=`$WHICH "$new_path" 2> /dev/null`
36297  # bat and cmd files are not always considered executable in cygwin causing which
36298  # to not find them
36299  if test "x$new_path" = x \
36300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36302    new_path=`$CYGPATH -u "$path"`
36303  fi
36304  if test "x$new_path" = x; then
36305    # Oops. Which didn't find the executable.
36306    # The splitting of arguments from the executable at a space might have been incorrect,
36307    # since paths with space are more likely in Windows. Give it another try with the whole
36308    # argument.
36309    path="$complete"
36310    arguments="EOL"
36311    new_path=`$CYGPATH -u "$path"`
36312    new_path=`$WHICH "$new_path" 2> /dev/null`
36313    # bat and cmd files are not always considered executable in cygwin causing which
36314    # to not find them
36315    if test "x$new_path" = x \
36316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36318      new_path=`$CYGPATH -u "$path"`
36319    fi
36320    if test "x$new_path" = x; then
36321      # It's still not found. Now this is an unrecoverable error.
36322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36323$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36324      has_space=`$ECHO "$complete" | $GREP " "`
36325      if test "x$has_space" != x; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36328      fi
36329      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36330    fi
36331  fi
36332
36333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36336  # "foo.exe" is OK but "foo" is an error.
36337  #
36338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36339  # It is also a way to make sure we got the proper file name for the real test later on.
36340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36341  if test "x$test_shortpath" = x; then
36342    # Short path failed, file does not exist as specified.
36343    # Try adding .exe or .cmd
36344    if test -f "${new_path}.exe"; then
36345      input_to_shortpath="${new_path}.exe"
36346    elif test -f "${new_path}.cmd"; then
36347      input_to_shortpath="${new_path}.cmd"
36348    else
36349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36350$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36353      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36354    fi
36355  else
36356    input_to_shortpath="$new_path"
36357  fi
36358
36359  # Call helper function which possibly converts this using DOS-style short mode.
36360  # If so, the updated path is stored in $new_path.
36361  new_path="$input_to_shortpath"
36362
36363  input_path="$input_to_shortpath"
36364  # Check if we need to convert this using DOS-style short mode. If the path
36365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36366  # take no chances and rewrite it.
36367  # Note: m4 eats our [], so we need to use [ and ] instead.
36368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36369  if test "x$has_forbidden_chars" != x; then
36370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36374      # Going to short mode and back again did indeed matter. Since short mode is
36375      # case insensitive, let's make it lowercase to improve readability.
36376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36377      # Now convert it back to Unix-stile (cygpath)
36378      input_path=`$CYGPATH -u "$shortmode_path"`
36379      new_path="$input_path"
36380    fi
36381  fi
36382
36383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36384  if test "x$test_cygdrive_prefix" = x; then
36385    # As a simple fix, exclude /usr/bin since it's not a real path.
36386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36388      # a path prefixed by /cygdrive for fixpath to work.
36389      new_path="$CYGWIN_ROOT_PATH$input_path"
36390    fi
36391  fi
36392
36393  # remove trailing .exe if any
36394  new_path="${new_path/%.exe/}"
36395
36396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397
36398  # First separate the path from the arguments. This will split at the first
36399  # space.
36400  complete="$MCS"
36401  path="${complete%% *}"
36402  tmp="$complete EOL"
36403  arguments="${tmp#* }"
36404
36405  # Input might be given as Windows format, start by converting to
36406  # unix format.
36407  new_path="$path"
36408
36409  windows_path="$new_path"
36410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411    unix_path=`$CYGPATH -u "$windows_path"`
36412    new_path="$unix_path"
36413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36415    new_path="$unix_path"
36416  fi
36417
36418
36419  # Now try to locate executable using which
36420  new_path=`$WHICH "$new_path" 2> /dev/null`
36421
36422  if test "x$new_path" = x; then
36423    # Oops. Which didn't find the executable.
36424    # The splitting of arguments from the executable at a space might have been incorrect,
36425    # since paths with space are more likely in Windows. Give it another try with the whole
36426    # argument.
36427    path="$complete"
36428    arguments="EOL"
36429    new_path="$path"
36430
36431  windows_path="$new_path"
36432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36433    unix_path=`$CYGPATH -u "$windows_path"`
36434    new_path="$unix_path"
36435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36437    new_path="$unix_path"
36438  fi
36439
36440
36441    new_path=`$WHICH "$new_path" 2> /dev/null`
36442
36443    if test "x$new_path" = x; then
36444      # It's still not found. Now this is an unrecoverable error.
36445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36446$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36447      has_space=`$ECHO "$complete" | $GREP " "`
36448      if test "x$has_space" != x; then
36449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36451      fi
36452      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36453    fi
36454  fi
36455
36456  # Now new_path has a complete unix path to the binary
36457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36458    # Keep paths in /bin as-is, but remove trailing .exe if any
36459    new_path="${new_path/%.exe/}"
36460    # Do not save /bin paths to all_fixpath_prefixes!
36461  else
36462    # Not in mixed or Windows style, start by that.
36463    new_path=`cmd //c echo $new_path`
36464
36465  input_path="$new_path"
36466  # Check if we need to convert this using DOS-style short mode. If the path
36467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36468  # take no chances and rewrite it.
36469  # Note: m4 eats our [], so we need to use [ and ] instead.
36470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36471  if test "x$has_forbidden_chars" != x; then
36472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36474  fi
36475
36476    # Output is in $new_path
36477
36478  windows_path="$new_path"
36479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36480    unix_path=`$CYGPATH -u "$windows_path"`
36481    new_path="$unix_path"
36482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36484    new_path="$unix_path"
36485  fi
36486
36487    # remove trailing .exe if any
36488    new_path="${new_path/%.exe/}"
36489
36490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36492  fi
36493
36494  else
36495    # We're on a posix platform. Hooray! :)
36496    # First separate the path from the arguments. This will split at the first
36497    # space.
36498    complete="$MCS"
36499    path="${complete%% *}"
36500    tmp="$complete EOL"
36501    arguments="${tmp#* }"
36502
36503    # Cannot rely on the command "which" here since it doesn't always work.
36504    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36505    if test -z "$is_absolute_path"; then
36506      # Path to executable is not absolute. Find it.
36507      IFS_save="$IFS"
36508      IFS=:
36509      for p in $PATH; do
36510        if test -f "$p/$path" && test -x "$p/$path"; then
36511          new_path="$p/$path"
36512          break
36513        fi
36514      done
36515      IFS="$IFS_save"
36516    else
36517      # This is an absolute path, we can use it without further modifications.
36518      new_path="$path"
36519    fi
36520
36521    if test "x$new_path" = x; then
36522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36523$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36524      has_space=`$ECHO "$complete" | $GREP " "`
36525      if test "x$has_space" != x; then
36526        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36528      fi
36529      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36530    fi
36531  fi
36532
36533  # Now join together the path and the arguments once again
36534  if test "x$arguments" != xEOL; then
36535    new_complete="$new_path ${arguments% *}"
36536  else
36537    new_complete="$new_path"
36538  fi
36539
36540  if test "x$complete" != "x$new_complete"; then
36541    MCS="$new_complete"
36542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36543$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36544  fi
36545
36546  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36547    # FIXME: we should unify this with the solaris case above.
36548
36549
36550  # Publish this variable in the help.
36551
36552
36553  if test "x$STRIP" = x; then
36554    # The variable is not set by user, try to locate tool using the code snippet
36555    if test -n "$ac_tool_prefix"; then
36556  for ac_prog in strip
36557  do
36558    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36561$as_echo_n "checking for $ac_word... " >&6; }
36562if ${ac_cv_prog_STRIP+:} false; then :
36563  $as_echo_n "(cached) " >&6
36564else
36565  if test -n "$STRIP"; then
36566  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36567else
36568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36569for as_dir in $PATH
36570do
36571  IFS=$as_save_IFS
36572  test -z "$as_dir" && as_dir=.
36573    for ac_exec_ext in '' $ac_executable_extensions; do
36574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36575    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36577    break 2
36578  fi
36579done
36580  done
36581IFS=$as_save_IFS
36582
36583fi
36584fi
36585STRIP=$ac_cv_prog_STRIP
36586if test -n "$STRIP"; then
36587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36588$as_echo "$STRIP" >&6; }
36589else
36590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36591$as_echo "no" >&6; }
36592fi
36593
36594
36595    test -n "$STRIP" && break
36596  done
36597fi
36598if test -z "$STRIP"; then
36599  ac_ct_STRIP=$STRIP
36600  for ac_prog in strip
36601do
36602  # Extract the first word of "$ac_prog", so it can be a program name with args.
36603set dummy $ac_prog; ac_word=$2
36604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36605$as_echo_n "checking for $ac_word... " >&6; }
36606if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36607  $as_echo_n "(cached) " >&6
36608else
36609  if test -n "$ac_ct_STRIP"; then
36610  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36611else
36612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36613for as_dir in $PATH
36614do
36615  IFS=$as_save_IFS
36616  test -z "$as_dir" && as_dir=.
36617    for ac_exec_ext in '' $ac_executable_extensions; do
36618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36619    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36621    break 2
36622  fi
36623done
36624  done
36625IFS=$as_save_IFS
36626
36627fi
36628fi
36629ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36630if test -n "$ac_ct_STRIP"; then
36631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36632$as_echo "$ac_ct_STRIP" >&6; }
36633else
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36635$as_echo "no" >&6; }
36636fi
36637
36638
36639  test -n "$ac_ct_STRIP" && break
36640done
36641
36642  if test "x$ac_ct_STRIP" = x; then
36643    STRIP=""
36644  else
36645    case $cross_compiling:$ac_tool_warned in
36646yes:)
36647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36649ac_tool_warned=yes ;;
36650esac
36651    STRIP=$ac_ct_STRIP
36652  fi
36653fi
36654
36655  else
36656    # The variable is set, but is it from the command line or the environment?
36657
36658    # Try to remove the string !STRIP! from our list.
36659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36661      # If it failed, the variable was not from the command line. Ignore it,
36662      # but warn the user (except for BASH, which is always set by the calling BASH).
36663      if test "xSTRIP" != xBASH; then
36664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36665$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36666      fi
36667      # Try to locate tool using the code snippet
36668      if test -n "$ac_tool_prefix"; then
36669  for ac_prog in strip
36670  do
36671    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36672set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36674$as_echo_n "checking for $ac_word... " >&6; }
36675if ${ac_cv_prog_STRIP+:} false; then :
36676  $as_echo_n "(cached) " >&6
36677else
36678  if test -n "$STRIP"; then
36679  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36680else
36681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36682for as_dir in $PATH
36683do
36684  IFS=$as_save_IFS
36685  test -z "$as_dir" && as_dir=.
36686    for ac_exec_ext in '' $ac_executable_extensions; do
36687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36688    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36690    break 2
36691  fi
36692done
36693  done
36694IFS=$as_save_IFS
36695
36696fi
36697fi
36698STRIP=$ac_cv_prog_STRIP
36699if test -n "$STRIP"; then
36700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36701$as_echo "$STRIP" >&6; }
36702else
36703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36704$as_echo "no" >&6; }
36705fi
36706
36707
36708    test -n "$STRIP" && break
36709  done
36710fi
36711if test -z "$STRIP"; then
36712  ac_ct_STRIP=$STRIP
36713  for ac_prog in strip
36714do
36715  # Extract the first word of "$ac_prog", so it can be a program name with args.
36716set dummy $ac_prog; ac_word=$2
36717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36718$as_echo_n "checking for $ac_word... " >&6; }
36719if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36720  $as_echo_n "(cached) " >&6
36721else
36722  if test -n "$ac_ct_STRIP"; then
36723  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36724else
36725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36726for as_dir in $PATH
36727do
36728  IFS=$as_save_IFS
36729  test -z "$as_dir" && as_dir=.
36730    for ac_exec_ext in '' $ac_executable_extensions; do
36731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36732    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36734    break 2
36735  fi
36736done
36737  done
36738IFS=$as_save_IFS
36739
36740fi
36741fi
36742ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36743if test -n "$ac_ct_STRIP"; then
36744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36745$as_echo "$ac_ct_STRIP" >&6; }
36746else
36747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36748$as_echo "no" >&6; }
36749fi
36750
36751
36752  test -n "$ac_ct_STRIP" && break
36753done
36754
36755  if test "x$ac_ct_STRIP" = x; then
36756    STRIP=""
36757  else
36758    case $cross_compiling:$ac_tool_warned in
36759yes:)
36760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36762ac_tool_warned=yes ;;
36763esac
36764    STRIP=$ac_ct_STRIP
36765  fi
36766fi
36767
36768    else
36769      # If it succeeded, then it was overridden by the user. We will use it
36770      # for the tool.
36771
36772      # First remove it from the list of overridden variables, so we can test
36773      # for unknown variables in the end.
36774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36775
36776      # Check if the provided tool contains a complete path.
36777      tool_specified="$STRIP"
36778      tool_basename="${tool_specified##*/}"
36779      if test "x$tool_basename" = "x$tool_specified"; then
36780        # A command without a complete path is provided, search $PATH.
36781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36782$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36783        # Extract the first word of "$tool_basename", so it can be a program name with args.
36784set dummy $tool_basename; ac_word=$2
36785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36786$as_echo_n "checking for $ac_word... " >&6; }
36787if ${ac_cv_path_STRIP+:} false; then :
36788  $as_echo_n "(cached) " >&6
36789else
36790  case $STRIP in
36791  [\\/]* | ?:[\\/]*)
36792  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36793  ;;
36794  *)
36795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36796for as_dir in $PATH
36797do
36798  IFS=$as_save_IFS
36799  test -z "$as_dir" && as_dir=.
36800    for ac_exec_ext in '' $ac_executable_extensions; do
36801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36802    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36804    break 2
36805  fi
36806done
36807  done
36808IFS=$as_save_IFS
36809
36810  ;;
36811esac
36812fi
36813STRIP=$ac_cv_path_STRIP
36814if test -n "$STRIP"; then
36815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36816$as_echo "$STRIP" >&6; }
36817else
36818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36819$as_echo "no" >&6; }
36820fi
36821
36822
36823        if test "x$STRIP" = x; then
36824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36825        fi
36826      else
36827        # Otherwise we believe it is a complete path. Use it as it is.
36828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36829$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36831$as_echo_n "checking for STRIP... " >&6; }
36832        if test ! -x "$tool_specified"; then
36833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36834$as_echo "not found" >&6; }
36835          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36836        fi
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36838$as_echo "$tool_specified" >&6; }
36839      fi
36840    fi
36841  fi
36842
36843
36844
36845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36846
36847  # First separate the path from the arguments. This will split at the first
36848  # space.
36849  complete="$STRIP"
36850  path="${complete%% *}"
36851  tmp="$complete EOL"
36852  arguments="${tmp#* }"
36853
36854  # Input might be given as Windows format, start by converting to
36855  # unix format.
36856  new_path=`$CYGPATH -u "$path"`
36857
36858  # Now try to locate executable using which
36859  new_path=`$WHICH "$new_path" 2> /dev/null`
36860  # bat and cmd files are not always considered executable in cygwin causing which
36861  # to not find them
36862  if test "x$new_path" = x \
36863      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36864      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36865    new_path=`$CYGPATH -u "$path"`
36866  fi
36867  if test "x$new_path" = x; then
36868    # Oops. Which didn't find the executable.
36869    # The splitting of arguments from the executable at a space might have been incorrect,
36870    # since paths with space are more likely in Windows. Give it another try with the whole
36871    # argument.
36872    path="$complete"
36873    arguments="EOL"
36874    new_path=`$CYGPATH -u "$path"`
36875    new_path=`$WHICH "$new_path" 2> /dev/null`
36876    # bat and cmd files are not always considered executable in cygwin causing which
36877    # to not find them
36878    if test "x$new_path" = x \
36879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36881      new_path=`$CYGPATH -u "$path"`
36882    fi
36883    if test "x$new_path" = x; then
36884      # It's still not found. Now this is an unrecoverable error.
36885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36886$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36887      has_space=`$ECHO "$complete" | $GREP " "`
36888      if test "x$has_space" != x; then
36889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36891      fi
36892      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36893    fi
36894  fi
36895
36896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36899  # "foo.exe" is OK but "foo" is an error.
36900  #
36901  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36902  # It is also a way to make sure we got the proper file name for the real test later on.
36903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36904  if test "x$test_shortpath" = x; then
36905    # Short path failed, file does not exist as specified.
36906    # Try adding .exe or .cmd
36907    if test -f "${new_path}.exe"; then
36908      input_to_shortpath="${new_path}.exe"
36909    elif test -f "${new_path}.cmd"; then
36910      input_to_shortpath="${new_path}.cmd"
36911    else
36912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36913$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36916      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36917    fi
36918  else
36919    input_to_shortpath="$new_path"
36920  fi
36921
36922  # Call helper function which possibly converts this using DOS-style short mode.
36923  # If so, the updated path is stored in $new_path.
36924  new_path="$input_to_shortpath"
36925
36926  input_path="$input_to_shortpath"
36927  # Check if we need to convert this using DOS-style short mode. If the path
36928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36929  # take no chances and rewrite it.
36930  # Note: m4 eats our [], so we need to use [ and ] instead.
36931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36932  if test "x$has_forbidden_chars" != x; then
36933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36937      # Going to short mode and back again did indeed matter. Since short mode is
36938      # case insensitive, let's make it lowercase to improve readability.
36939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36940      # Now convert it back to Unix-stile (cygpath)
36941      input_path=`$CYGPATH -u "$shortmode_path"`
36942      new_path="$input_path"
36943    fi
36944  fi
36945
36946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36947  if test "x$test_cygdrive_prefix" = x; then
36948    # As a simple fix, exclude /usr/bin since it's not a real path.
36949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36951      # a path prefixed by /cygdrive for fixpath to work.
36952      new_path="$CYGWIN_ROOT_PATH$input_path"
36953    fi
36954  fi
36955
36956  # remove trailing .exe if any
36957  new_path="${new_path/%.exe/}"
36958
36959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36960
36961  # First separate the path from the arguments. This will split at the first
36962  # space.
36963  complete="$STRIP"
36964  path="${complete%% *}"
36965  tmp="$complete EOL"
36966  arguments="${tmp#* }"
36967
36968  # Input might be given as Windows format, start by converting to
36969  # unix format.
36970  new_path="$path"
36971
36972  windows_path="$new_path"
36973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36974    unix_path=`$CYGPATH -u "$windows_path"`
36975    new_path="$unix_path"
36976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36978    new_path="$unix_path"
36979  fi
36980
36981
36982  # Now try to locate executable using which
36983  new_path=`$WHICH "$new_path" 2> /dev/null`
36984
36985  if test "x$new_path" = x; then
36986    # Oops. Which didn't find the executable.
36987    # The splitting of arguments from the executable at a space might have been incorrect,
36988    # since paths with space are more likely in Windows. Give it another try with the whole
36989    # argument.
36990    path="$complete"
36991    arguments="EOL"
36992    new_path="$path"
36993
36994  windows_path="$new_path"
36995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36996    unix_path=`$CYGPATH -u "$windows_path"`
36997    new_path="$unix_path"
36998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37000    new_path="$unix_path"
37001  fi
37002
37003
37004    new_path=`$WHICH "$new_path" 2> /dev/null`
37005
37006    if test "x$new_path" = x; then
37007      # It's still not found. Now this is an unrecoverable error.
37008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37009$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37010      has_space=`$ECHO "$complete" | $GREP " "`
37011      if test "x$has_space" != x; then
37012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37014      fi
37015      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37016    fi
37017  fi
37018
37019  # Now new_path has a complete unix path to the binary
37020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37021    # Keep paths in /bin as-is, but remove trailing .exe if any
37022    new_path="${new_path/%.exe/}"
37023    # Do not save /bin paths to all_fixpath_prefixes!
37024  else
37025    # Not in mixed or Windows style, start by that.
37026    new_path=`cmd //c echo $new_path`
37027
37028  input_path="$new_path"
37029  # Check if we need to convert this using DOS-style short mode. If the path
37030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37031  # take no chances and rewrite it.
37032  # Note: m4 eats our [], so we need to use [ and ] instead.
37033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37034  if test "x$has_forbidden_chars" != x; then
37035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37037  fi
37038
37039    # Output is in $new_path
37040
37041  windows_path="$new_path"
37042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37043    unix_path=`$CYGPATH -u "$windows_path"`
37044    new_path="$unix_path"
37045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37047    new_path="$unix_path"
37048  fi
37049
37050    # remove trailing .exe if any
37051    new_path="${new_path/%.exe/}"
37052
37053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37055  fi
37056
37057  else
37058    # We're on a posix platform. Hooray! :)
37059    # First separate the path from the arguments. This will split at the first
37060    # space.
37061    complete="$STRIP"
37062    path="${complete%% *}"
37063    tmp="$complete EOL"
37064    arguments="${tmp#* }"
37065
37066    # Cannot rely on the command "which" here since it doesn't always work.
37067    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37068    if test -z "$is_absolute_path"; then
37069      # Path to executable is not absolute. Find it.
37070      IFS_save="$IFS"
37071      IFS=:
37072      for p in $PATH; do
37073        if test -f "$p/$path" && test -x "$p/$path"; then
37074          new_path="$p/$path"
37075          break
37076        fi
37077      done
37078      IFS="$IFS_save"
37079    else
37080      # This is an absolute path, we can use it without further modifications.
37081      new_path="$path"
37082    fi
37083
37084    if test "x$new_path" = x; then
37085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37086$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37087      has_space=`$ECHO "$complete" | $GREP " "`
37088      if test "x$has_space" != x; then
37089        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37090$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37091      fi
37092      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37093    fi
37094  fi
37095
37096  # Now join together the path and the arguments once again
37097  if test "x$arguments" != xEOL; then
37098    new_complete="$new_path ${arguments% *}"
37099  else
37100    new_complete="$new_path"
37101  fi
37102
37103  if test "x$complete" != "x$new_complete"; then
37104    STRIP="$new_complete"
37105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37106$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37107  fi
37108
37109
37110
37111  # Publish this variable in the help.
37112
37113
37114  if test "x$NM" = x; then
37115    # The variable is not set by user, try to locate tool using the code snippet
37116    if test -n "$ac_tool_prefix"; then
37117  for ac_prog in nm
37118  do
37119    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37120set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37122$as_echo_n "checking for $ac_word... " >&6; }
37123if ${ac_cv_prog_NM+:} false; then :
37124  $as_echo_n "(cached) " >&6
37125else
37126  if test -n "$NM"; then
37127  ac_cv_prog_NM="$NM" # Let the user override the test.
37128else
37129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37130for as_dir in $PATH
37131do
37132  IFS=$as_save_IFS
37133  test -z "$as_dir" && as_dir=.
37134    for ac_exec_ext in '' $ac_executable_extensions; do
37135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37136    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37138    break 2
37139  fi
37140done
37141  done
37142IFS=$as_save_IFS
37143
37144fi
37145fi
37146NM=$ac_cv_prog_NM
37147if test -n "$NM"; then
37148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37149$as_echo "$NM" >&6; }
37150else
37151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37152$as_echo "no" >&6; }
37153fi
37154
37155
37156    test -n "$NM" && break
37157  done
37158fi
37159if test -z "$NM"; then
37160  ac_ct_NM=$NM
37161  for ac_prog in nm
37162do
37163  # Extract the first word of "$ac_prog", so it can be a program name with args.
37164set dummy $ac_prog; ac_word=$2
37165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37166$as_echo_n "checking for $ac_word... " >&6; }
37167if ${ac_cv_prog_ac_ct_NM+:} false; then :
37168  $as_echo_n "(cached) " >&6
37169else
37170  if test -n "$ac_ct_NM"; then
37171  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37172else
37173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37174for as_dir in $PATH
37175do
37176  IFS=$as_save_IFS
37177  test -z "$as_dir" && as_dir=.
37178    for ac_exec_ext in '' $ac_executable_extensions; do
37179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37180    ac_cv_prog_ac_ct_NM="$ac_prog"
37181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37182    break 2
37183  fi
37184done
37185  done
37186IFS=$as_save_IFS
37187
37188fi
37189fi
37190ac_ct_NM=$ac_cv_prog_ac_ct_NM
37191if test -n "$ac_ct_NM"; then
37192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37193$as_echo "$ac_ct_NM" >&6; }
37194else
37195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37196$as_echo "no" >&6; }
37197fi
37198
37199
37200  test -n "$ac_ct_NM" && break
37201done
37202
37203  if test "x$ac_ct_NM" = x; then
37204    NM=""
37205  else
37206    case $cross_compiling:$ac_tool_warned in
37207yes:)
37208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37210ac_tool_warned=yes ;;
37211esac
37212    NM=$ac_ct_NM
37213  fi
37214fi
37215
37216  else
37217    # The variable is set, but is it from the command line or the environment?
37218
37219    # Try to remove the string !NM! from our list.
37220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37222      # If it failed, the variable was not from the command line. Ignore it,
37223      # but warn the user (except for BASH, which is always set by the calling BASH).
37224      if test "xNM" != xBASH; then
37225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37226$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37227      fi
37228      # Try to locate tool using the code snippet
37229      if test -n "$ac_tool_prefix"; then
37230  for ac_prog in nm
37231  do
37232    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37233set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37235$as_echo_n "checking for $ac_word... " >&6; }
37236if ${ac_cv_prog_NM+:} false; then :
37237  $as_echo_n "(cached) " >&6
37238else
37239  if test -n "$NM"; then
37240  ac_cv_prog_NM="$NM" # Let the user override the test.
37241else
37242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37243for as_dir in $PATH
37244do
37245  IFS=$as_save_IFS
37246  test -z "$as_dir" && as_dir=.
37247    for ac_exec_ext in '' $ac_executable_extensions; do
37248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37249    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37251    break 2
37252  fi
37253done
37254  done
37255IFS=$as_save_IFS
37256
37257fi
37258fi
37259NM=$ac_cv_prog_NM
37260if test -n "$NM"; then
37261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37262$as_echo "$NM" >&6; }
37263else
37264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37265$as_echo "no" >&6; }
37266fi
37267
37268
37269    test -n "$NM" && break
37270  done
37271fi
37272if test -z "$NM"; then
37273  ac_ct_NM=$NM
37274  for ac_prog in nm
37275do
37276  # Extract the first word of "$ac_prog", so it can be a program name with args.
37277set dummy $ac_prog; ac_word=$2
37278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37279$as_echo_n "checking for $ac_word... " >&6; }
37280if ${ac_cv_prog_ac_ct_NM+:} false; then :
37281  $as_echo_n "(cached) " >&6
37282else
37283  if test -n "$ac_ct_NM"; then
37284  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37285else
37286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37287for as_dir in $PATH
37288do
37289  IFS=$as_save_IFS
37290  test -z "$as_dir" && as_dir=.
37291    for ac_exec_ext in '' $ac_executable_extensions; do
37292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37293    ac_cv_prog_ac_ct_NM="$ac_prog"
37294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37295    break 2
37296  fi
37297done
37298  done
37299IFS=$as_save_IFS
37300
37301fi
37302fi
37303ac_ct_NM=$ac_cv_prog_ac_ct_NM
37304if test -n "$ac_ct_NM"; then
37305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37306$as_echo "$ac_ct_NM" >&6; }
37307else
37308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37309$as_echo "no" >&6; }
37310fi
37311
37312
37313  test -n "$ac_ct_NM" && break
37314done
37315
37316  if test "x$ac_ct_NM" = x; then
37317    NM=""
37318  else
37319    case $cross_compiling:$ac_tool_warned in
37320yes:)
37321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37323ac_tool_warned=yes ;;
37324esac
37325    NM=$ac_ct_NM
37326  fi
37327fi
37328
37329    else
37330      # If it succeeded, then it was overridden by the user. We will use it
37331      # for the tool.
37332
37333      # First remove it from the list of overridden variables, so we can test
37334      # for unknown variables in the end.
37335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37336
37337      # Check if the provided tool contains a complete path.
37338      tool_specified="$NM"
37339      tool_basename="${tool_specified##*/}"
37340      if test "x$tool_basename" = "x$tool_specified"; then
37341        # A command without a complete path is provided, search $PATH.
37342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37343$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37344        # Extract the first word of "$tool_basename", so it can be a program name with args.
37345set dummy $tool_basename; ac_word=$2
37346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37347$as_echo_n "checking for $ac_word... " >&6; }
37348if ${ac_cv_path_NM+:} false; then :
37349  $as_echo_n "(cached) " >&6
37350else
37351  case $NM in
37352  [\\/]* | ?:[\\/]*)
37353  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37354  ;;
37355  *)
37356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37357for as_dir in $PATH
37358do
37359  IFS=$as_save_IFS
37360  test -z "$as_dir" && as_dir=.
37361    for ac_exec_ext in '' $ac_executable_extensions; do
37362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37363    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37365    break 2
37366  fi
37367done
37368  done
37369IFS=$as_save_IFS
37370
37371  ;;
37372esac
37373fi
37374NM=$ac_cv_path_NM
37375if test -n "$NM"; then
37376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37377$as_echo "$NM" >&6; }
37378else
37379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37380$as_echo "no" >&6; }
37381fi
37382
37383
37384        if test "x$NM" = x; then
37385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37386        fi
37387      else
37388        # Otherwise we believe it is a complete path. Use it as it is.
37389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37390$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37392$as_echo_n "checking for NM... " >&6; }
37393        if test ! -x "$tool_specified"; then
37394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37395$as_echo "not found" >&6; }
37396          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37397        fi
37398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37399$as_echo "$tool_specified" >&6; }
37400      fi
37401    fi
37402  fi
37403
37404
37405
37406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37407
37408  # First separate the path from the arguments. This will split at the first
37409  # space.
37410  complete="$NM"
37411  path="${complete%% *}"
37412  tmp="$complete EOL"
37413  arguments="${tmp#* }"
37414
37415  # Input might be given as Windows format, start by converting to
37416  # unix format.
37417  new_path=`$CYGPATH -u "$path"`
37418
37419  # Now try to locate executable using which
37420  new_path=`$WHICH "$new_path" 2> /dev/null`
37421  # bat and cmd files are not always considered executable in cygwin causing which
37422  # to not find them
37423  if test "x$new_path" = x \
37424      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37425      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37426    new_path=`$CYGPATH -u "$path"`
37427  fi
37428  if test "x$new_path" = x; then
37429    # Oops. Which didn't find the executable.
37430    # The splitting of arguments from the executable at a space might have been incorrect,
37431    # since paths with space are more likely in Windows. Give it another try with the whole
37432    # argument.
37433    path="$complete"
37434    arguments="EOL"
37435    new_path=`$CYGPATH -u "$path"`
37436    new_path=`$WHICH "$new_path" 2> /dev/null`
37437    # bat and cmd files are not always considered executable in cygwin causing which
37438    # to not find them
37439    if test "x$new_path" = x \
37440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37442      new_path=`$CYGPATH -u "$path"`
37443    fi
37444    if test "x$new_path" = x; then
37445      # It's still not found. Now this is an unrecoverable error.
37446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37447$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37448      has_space=`$ECHO "$complete" | $GREP " "`
37449      if test "x$has_space" != x; then
37450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37452      fi
37453      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37454    fi
37455  fi
37456
37457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37460  # "foo.exe" is OK but "foo" is an error.
37461  #
37462  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37463  # It is also a way to make sure we got the proper file name for the real test later on.
37464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37465  if test "x$test_shortpath" = x; then
37466    # Short path failed, file does not exist as specified.
37467    # Try adding .exe or .cmd
37468    if test -f "${new_path}.exe"; then
37469      input_to_shortpath="${new_path}.exe"
37470    elif test -f "${new_path}.cmd"; then
37471      input_to_shortpath="${new_path}.cmd"
37472    else
37473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37474$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37475      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37476$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37477      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37478    fi
37479  else
37480    input_to_shortpath="$new_path"
37481  fi
37482
37483  # Call helper function which possibly converts this using DOS-style short mode.
37484  # If so, the updated path is stored in $new_path.
37485  new_path="$input_to_shortpath"
37486
37487  input_path="$input_to_shortpath"
37488  # Check if we need to convert this using DOS-style short mode. If the path
37489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37490  # take no chances and rewrite it.
37491  # Note: m4 eats our [], so we need to use [ and ] instead.
37492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37493  if test "x$has_forbidden_chars" != x; then
37494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37498      # Going to short mode and back again did indeed matter. Since short mode is
37499      # case insensitive, let's make it lowercase to improve readability.
37500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37501      # Now convert it back to Unix-stile (cygpath)
37502      input_path=`$CYGPATH -u "$shortmode_path"`
37503      new_path="$input_path"
37504    fi
37505  fi
37506
37507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37508  if test "x$test_cygdrive_prefix" = x; then
37509    # As a simple fix, exclude /usr/bin since it's not a real path.
37510    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37512      # a path prefixed by /cygdrive for fixpath to work.
37513      new_path="$CYGWIN_ROOT_PATH$input_path"
37514    fi
37515  fi
37516
37517  # remove trailing .exe if any
37518  new_path="${new_path/%.exe/}"
37519
37520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37521
37522  # First separate the path from the arguments. This will split at the first
37523  # space.
37524  complete="$NM"
37525  path="${complete%% *}"
37526  tmp="$complete EOL"
37527  arguments="${tmp#* }"
37528
37529  # Input might be given as Windows format, start by converting to
37530  # unix format.
37531  new_path="$path"
37532
37533  windows_path="$new_path"
37534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37535    unix_path=`$CYGPATH -u "$windows_path"`
37536    new_path="$unix_path"
37537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37539    new_path="$unix_path"
37540  fi
37541
37542
37543  # Now try to locate executable using which
37544  new_path=`$WHICH "$new_path" 2> /dev/null`
37545
37546  if test "x$new_path" = x; then
37547    # Oops. Which didn't find the executable.
37548    # The splitting of arguments from the executable at a space might have been incorrect,
37549    # since paths with space are more likely in Windows. Give it another try with the whole
37550    # argument.
37551    path="$complete"
37552    arguments="EOL"
37553    new_path="$path"
37554
37555  windows_path="$new_path"
37556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37557    unix_path=`$CYGPATH -u "$windows_path"`
37558    new_path="$unix_path"
37559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37561    new_path="$unix_path"
37562  fi
37563
37564
37565    new_path=`$WHICH "$new_path" 2> /dev/null`
37566
37567    if test "x$new_path" = x; then
37568      # It's still not found. Now this is an unrecoverable error.
37569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37570$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37571      has_space=`$ECHO "$complete" | $GREP " "`
37572      if test "x$has_space" != x; then
37573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37575      fi
37576      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37577    fi
37578  fi
37579
37580  # Now new_path has a complete unix path to the binary
37581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37582    # Keep paths in /bin as-is, but remove trailing .exe if any
37583    new_path="${new_path/%.exe/}"
37584    # Do not save /bin paths to all_fixpath_prefixes!
37585  else
37586    # Not in mixed or Windows style, start by that.
37587    new_path=`cmd //c echo $new_path`
37588
37589  input_path="$new_path"
37590  # Check if we need to convert this using DOS-style short mode. If the path
37591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37592  # take no chances and rewrite it.
37593  # Note: m4 eats our [], so we need to use [ and ] instead.
37594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37595  if test "x$has_forbidden_chars" != x; then
37596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37598  fi
37599
37600    # Output is in $new_path
37601
37602  windows_path="$new_path"
37603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37604    unix_path=`$CYGPATH -u "$windows_path"`
37605    new_path="$unix_path"
37606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37608    new_path="$unix_path"
37609  fi
37610
37611    # remove trailing .exe if any
37612    new_path="${new_path/%.exe/}"
37613
37614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37616  fi
37617
37618  else
37619    # We're on a posix platform. Hooray! :)
37620    # First separate the path from the arguments. This will split at the first
37621    # space.
37622    complete="$NM"
37623    path="${complete%% *}"
37624    tmp="$complete EOL"
37625    arguments="${tmp#* }"
37626
37627    # Cannot rely on the command "which" here since it doesn't always work.
37628    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37629    if test -z "$is_absolute_path"; then
37630      # Path to executable is not absolute. Find it.
37631      IFS_save="$IFS"
37632      IFS=:
37633      for p in $PATH; do
37634        if test -f "$p/$path" && test -x "$p/$path"; then
37635          new_path="$p/$path"
37636          break
37637        fi
37638      done
37639      IFS="$IFS_save"
37640    else
37641      # This is an absolute path, we can use it without further modifications.
37642      new_path="$path"
37643    fi
37644
37645    if test "x$new_path" = x; then
37646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37647$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37648      has_space=`$ECHO "$complete" | $GREP " "`
37649      if test "x$has_space" != x; then
37650        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37652      fi
37653      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37654    fi
37655  fi
37656
37657  # Now join together the path and the arguments once again
37658  if test "x$arguments" != xEOL; then
37659    new_complete="$new_path ${arguments% *}"
37660  else
37661    new_complete="$new_path"
37662  fi
37663
37664  if test "x$complete" != "x$new_complete"; then
37665    NM="$new_complete"
37666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37667$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37668  fi
37669
37670    GNM="$NM"
37671
37672  fi
37673
37674  # objcopy is used for moving debug symbols to separate files when
37675  # full debug symbols are enabled.
37676  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37677
37678
37679  # Publish this variable in the help.
37680
37681
37682  if test "x$OBJCOPY" = x; then
37683    # The variable is not set by user, try to locate tool using the code snippet
37684    if test -n "$ac_tool_prefix"; then
37685  for ac_prog in gobjcopy objcopy
37686  do
37687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37690$as_echo_n "checking for $ac_word... " >&6; }
37691if ${ac_cv_prog_OBJCOPY+:} false; then :
37692  $as_echo_n "(cached) " >&6
37693else
37694  if test -n "$OBJCOPY"; then
37695  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37696else
37697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37698for as_dir in $PATH
37699do
37700  IFS=$as_save_IFS
37701  test -z "$as_dir" && as_dir=.
37702    for ac_exec_ext in '' $ac_executable_extensions; do
37703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37704    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37706    break 2
37707  fi
37708done
37709  done
37710IFS=$as_save_IFS
37711
37712fi
37713fi
37714OBJCOPY=$ac_cv_prog_OBJCOPY
37715if test -n "$OBJCOPY"; then
37716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37717$as_echo "$OBJCOPY" >&6; }
37718else
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37720$as_echo "no" >&6; }
37721fi
37722
37723
37724    test -n "$OBJCOPY" && break
37725  done
37726fi
37727if test -z "$OBJCOPY"; then
37728  ac_ct_OBJCOPY=$OBJCOPY
37729  for ac_prog in gobjcopy objcopy
37730do
37731  # Extract the first word of "$ac_prog", so it can be a program name with args.
37732set dummy $ac_prog; ac_word=$2
37733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37734$as_echo_n "checking for $ac_word... " >&6; }
37735if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37736  $as_echo_n "(cached) " >&6
37737else
37738  if test -n "$ac_ct_OBJCOPY"; then
37739  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37740else
37741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37742for as_dir in $PATH
37743do
37744  IFS=$as_save_IFS
37745  test -z "$as_dir" && as_dir=.
37746    for ac_exec_ext in '' $ac_executable_extensions; do
37747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37748    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37750    break 2
37751  fi
37752done
37753  done
37754IFS=$as_save_IFS
37755
37756fi
37757fi
37758ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37759if test -n "$ac_ct_OBJCOPY"; then
37760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37761$as_echo "$ac_ct_OBJCOPY" >&6; }
37762else
37763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37764$as_echo "no" >&6; }
37765fi
37766
37767
37768  test -n "$ac_ct_OBJCOPY" && break
37769done
37770
37771  if test "x$ac_ct_OBJCOPY" = x; then
37772    OBJCOPY=""
37773  else
37774    case $cross_compiling:$ac_tool_warned in
37775yes:)
37776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37778ac_tool_warned=yes ;;
37779esac
37780    OBJCOPY=$ac_ct_OBJCOPY
37781  fi
37782fi
37783
37784  else
37785    # The variable is set, but is it from the command line or the environment?
37786
37787    # Try to remove the string !OBJCOPY! from our list.
37788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37790      # If it failed, the variable was not from the command line. Ignore it,
37791      # but warn the user (except for BASH, which is always set by the calling BASH).
37792      if test "xOBJCOPY" != xBASH; then
37793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37794$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37795      fi
37796      # Try to locate tool using the code snippet
37797      if test -n "$ac_tool_prefix"; then
37798  for ac_prog in gobjcopy objcopy
37799  do
37800    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37803$as_echo_n "checking for $ac_word... " >&6; }
37804if ${ac_cv_prog_OBJCOPY+:} false; then :
37805  $as_echo_n "(cached) " >&6
37806else
37807  if test -n "$OBJCOPY"; then
37808  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37809else
37810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37811for as_dir in $PATH
37812do
37813  IFS=$as_save_IFS
37814  test -z "$as_dir" && as_dir=.
37815    for ac_exec_ext in '' $ac_executable_extensions; do
37816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37817    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37819    break 2
37820  fi
37821done
37822  done
37823IFS=$as_save_IFS
37824
37825fi
37826fi
37827OBJCOPY=$ac_cv_prog_OBJCOPY
37828if test -n "$OBJCOPY"; then
37829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37830$as_echo "$OBJCOPY" >&6; }
37831else
37832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37833$as_echo "no" >&6; }
37834fi
37835
37836
37837    test -n "$OBJCOPY" && break
37838  done
37839fi
37840if test -z "$OBJCOPY"; then
37841  ac_ct_OBJCOPY=$OBJCOPY
37842  for ac_prog in gobjcopy objcopy
37843do
37844  # Extract the first word of "$ac_prog", so it can be a program name with args.
37845set dummy $ac_prog; ac_word=$2
37846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37847$as_echo_n "checking for $ac_word... " >&6; }
37848if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37849  $as_echo_n "(cached) " >&6
37850else
37851  if test -n "$ac_ct_OBJCOPY"; then
37852  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37853else
37854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37855for as_dir in $PATH
37856do
37857  IFS=$as_save_IFS
37858  test -z "$as_dir" && as_dir=.
37859    for ac_exec_ext in '' $ac_executable_extensions; do
37860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37861    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37863    break 2
37864  fi
37865done
37866  done
37867IFS=$as_save_IFS
37868
37869fi
37870fi
37871ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37872if test -n "$ac_ct_OBJCOPY"; then
37873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37874$as_echo "$ac_ct_OBJCOPY" >&6; }
37875else
37876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37877$as_echo "no" >&6; }
37878fi
37879
37880
37881  test -n "$ac_ct_OBJCOPY" && break
37882done
37883
37884  if test "x$ac_ct_OBJCOPY" = x; then
37885    OBJCOPY=""
37886  else
37887    case $cross_compiling:$ac_tool_warned in
37888yes:)
37889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37891ac_tool_warned=yes ;;
37892esac
37893    OBJCOPY=$ac_ct_OBJCOPY
37894  fi
37895fi
37896
37897    else
37898      # If it succeeded, then it was overridden by the user. We will use it
37899      # for the tool.
37900
37901      # First remove it from the list of overridden variables, so we can test
37902      # for unknown variables in the end.
37903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37904
37905      # Check if the provided tool contains a complete path.
37906      tool_specified="$OBJCOPY"
37907      tool_basename="${tool_specified##*/}"
37908      if test "x$tool_basename" = "x$tool_specified"; then
37909        # A command without a complete path is provided, search $PATH.
37910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37911$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37912        # Extract the first word of "$tool_basename", so it can be a program name with args.
37913set dummy $tool_basename; ac_word=$2
37914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37915$as_echo_n "checking for $ac_word... " >&6; }
37916if ${ac_cv_path_OBJCOPY+:} false; then :
37917  $as_echo_n "(cached) " >&6
37918else
37919  case $OBJCOPY in
37920  [\\/]* | ?:[\\/]*)
37921  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37922  ;;
37923  *)
37924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37925for as_dir in $PATH
37926do
37927  IFS=$as_save_IFS
37928  test -z "$as_dir" && as_dir=.
37929    for ac_exec_ext in '' $ac_executable_extensions; do
37930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37931    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37933    break 2
37934  fi
37935done
37936  done
37937IFS=$as_save_IFS
37938
37939  ;;
37940esac
37941fi
37942OBJCOPY=$ac_cv_path_OBJCOPY
37943if test -n "$OBJCOPY"; then
37944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37945$as_echo "$OBJCOPY" >&6; }
37946else
37947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37948$as_echo "no" >&6; }
37949fi
37950
37951
37952        if test "x$OBJCOPY" = x; then
37953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37954        fi
37955      else
37956        # Otherwise we believe it is a complete path. Use it as it is.
37957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37958$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37960$as_echo_n "checking for OBJCOPY... " >&6; }
37961        if test ! -x "$tool_specified"; then
37962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37963$as_echo "not found" >&6; }
37964          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37965        fi
37966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37967$as_echo "$tool_specified" >&6; }
37968      fi
37969    fi
37970  fi
37971
37972
37973    # Only call fixup if objcopy was found.
37974    if test -n "$OBJCOPY"; then
37975
37976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977
37978  # First separate the path from the arguments. This will split at the first
37979  # space.
37980  complete="$OBJCOPY"
37981  path="${complete%% *}"
37982  tmp="$complete EOL"
37983  arguments="${tmp#* }"
37984
37985  # Input might be given as Windows format, start by converting to
37986  # unix format.
37987  new_path=`$CYGPATH -u "$path"`
37988
37989  # Now try to locate executable using which
37990  new_path=`$WHICH "$new_path" 2> /dev/null`
37991  # bat and cmd files are not always considered executable in cygwin causing which
37992  # to not find them
37993  if test "x$new_path" = x \
37994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37996    new_path=`$CYGPATH -u "$path"`
37997  fi
37998  if test "x$new_path" = x; then
37999    # Oops. Which didn't find the executable.
38000    # The splitting of arguments from the executable at a space might have been incorrect,
38001    # since paths with space are more likely in Windows. Give it another try with the whole
38002    # argument.
38003    path="$complete"
38004    arguments="EOL"
38005    new_path=`$CYGPATH -u "$path"`
38006    new_path=`$WHICH "$new_path" 2> /dev/null`
38007    # bat and cmd files are not always considered executable in cygwin causing which
38008    # to not find them
38009    if test "x$new_path" = x \
38010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38012      new_path=`$CYGPATH -u "$path"`
38013    fi
38014    if test "x$new_path" = x; then
38015      # It's still not found. Now this is an unrecoverable error.
38016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38017$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38018      has_space=`$ECHO "$complete" | $GREP " "`
38019      if test "x$has_space" != x; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38022      fi
38023      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38024    fi
38025  fi
38026
38027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38030  # "foo.exe" is OK but "foo" is an error.
38031  #
38032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38033  # It is also a way to make sure we got the proper file name for the real test later on.
38034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38035  if test "x$test_shortpath" = x; then
38036    # Short path failed, file does not exist as specified.
38037    # Try adding .exe or .cmd
38038    if test -f "${new_path}.exe"; then
38039      input_to_shortpath="${new_path}.exe"
38040    elif test -f "${new_path}.cmd"; then
38041      input_to_shortpath="${new_path}.cmd"
38042    else
38043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38044$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38047      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38048    fi
38049  else
38050    input_to_shortpath="$new_path"
38051  fi
38052
38053  # Call helper function which possibly converts this using DOS-style short mode.
38054  # If so, the updated path is stored in $new_path.
38055  new_path="$input_to_shortpath"
38056
38057  input_path="$input_to_shortpath"
38058  # Check if we need to convert this using DOS-style short mode. If the path
38059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38060  # take no chances and rewrite it.
38061  # Note: m4 eats our [], so we need to use [ and ] instead.
38062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38063  if test "x$has_forbidden_chars" != x; then
38064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38068      # Going to short mode and back again did indeed matter. Since short mode is
38069      # case insensitive, let's make it lowercase to improve readability.
38070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071      # Now convert it back to Unix-stile (cygpath)
38072      input_path=`$CYGPATH -u "$shortmode_path"`
38073      new_path="$input_path"
38074    fi
38075  fi
38076
38077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38078  if test "x$test_cygdrive_prefix" = x; then
38079    # As a simple fix, exclude /usr/bin since it's not a real path.
38080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38082      # a path prefixed by /cygdrive for fixpath to work.
38083      new_path="$CYGWIN_ROOT_PATH$input_path"
38084    fi
38085  fi
38086
38087  # remove trailing .exe if any
38088  new_path="${new_path/%.exe/}"
38089
38090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38091
38092  # First separate the path from the arguments. This will split at the first
38093  # space.
38094  complete="$OBJCOPY"
38095  path="${complete%% *}"
38096  tmp="$complete EOL"
38097  arguments="${tmp#* }"
38098
38099  # Input might be given as Windows format, start by converting to
38100  # unix format.
38101  new_path="$path"
38102
38103  windows_path="$new_path"
38104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38105    unix_path=`$CYGPATH -u "$windows_path"`
38106    new_path="$unix_path"
38107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38109    new_path="$unix_path"
38110  fi
38111
38112
38113  # Now try to locate executable using which
38114  new_path=`$WHICH "$new_path" 2> /dev/null`
38115
38116  if test "x$new_path" = x; then
38117    # Oops. Which didn't find the executable.
38118    # The splitting of arguments from the executable at a space might have been incorrect,
38119    # since paths with space are more likely in Windows. Give it another try with the whole
38120    # argument.
38121    path="$complete"
38122    arguments="EOL"
38123    new_path="$path"
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134
38135    new_path=`$WHICH "$new_path" 2> /dev/null`
38136
38137    if test "x$new_path" = x; then
38138      # It's still not found. Now this is an unrecoverable error.
38139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38140$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38141      has_space=`$ECHO "$complete" | $GREP " "`
38142      if test "x$has_space" != x; then
38143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38145      fi
38146      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38147    fi
38148  fi
38149
38150  # Now new_path has a complete unix path to the binary
38151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38152    # Keep paths in /bin as-is, but remove trailing .exe if any
38153    new_path="${new_path/%.exe/}"
38154    # Do not save /bin paths to all_fixpath_prefixes!
38155  else
38156    # Not in mixed or Windows style, start by that.
38157    new_path=`cmd //c echo $new_path`
38158
38159  input_path="$new_path"
38160  # Check if we need to convert this using DOS-style short mode. If the path
38161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38162  # take no chances and rewrite it.
38163  # Note: m4 eats our [], so we need to use [ and ] instead.
38164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38165  if test "x$has_forbidden_chars" != x; then
38166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38168  fi
38169
38170    # Output is in $new_path
38171
38172  windows_path="$new_path"
38173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38174    unix_path=`$CYGPATH -u "$windows_path"`
38175    new_path="$unix_path"
38176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38178    new_path="$unix_path"
38179  fi
38180
38181    # remove trailing .exe if any
38182    new_path="${new_path/%.exe/}"
38183
38184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38186  fi
38187
38188  else
38189    # We're on a posix platform. Hooray! :)
38190    # First separate the path from the arguments. This will split at the first
38191    # space.
38192    complete="$OBJCOPY"
38193    path="${complete%% *}"
38194    tmp="$complete EOL"
38195    arguments="${tmp#* }"
38196
38197    # Cannot rely on the command "which" here since it doesn't always work.
38198    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38199    if test -z "$is_absolute_path"; then
38200      # Path to executable is not absolute. Find it.
38201      IFS_save="$IFS"
38202      IFS=:
38203      for p in $PATH; do
38204        if test -f "$p/$path" && test -x "$p/$path"; then
38205          new_path="$p/$path"
38206          break
38207        fi
38208      done
38209      IFS="$IFS_save"
38210    else
38211      # This is an absolute path, we can use it without further modifications.
38212      new_path="$path"
38213    fi
38214
38215    if test "x$new_path" = x; then
38216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38217$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38218      has_space=`$ECHO "$complete" | $GREP " "`
38219      if test "x$has_space" != x; then
38220        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38222      fi
38223      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38224    fi
38225  fi
38226
38227  # Now join together the path and the arguments once again
38228  if test "x$arguments" != xEOL; then
38229    new_complete="$new_path ${arguments% *}"
38230  else
38231    new_complete="$new_path"
38232  fi
38233
38234  if test "x$complete" != "x$new_complete"; then
38235    OBJCOPY="$new_complete"
38236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38237$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38238  fi
38239
38240    fi
38241  fi
38242
38243
38244
38245  # Publish this variable in the help.
38246
38247
38248  if test "x$OBJDUMP" = x; then
38249    # The variable is not set by user, try to locate tool using the code snippet
38250    if test -n "$ac_tool_prefix"; then
38251  for ac_prog in gobjdump objdump
38252  do
38253    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38254set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38256$as_echo_n "checking for $ac_word... " >&6; }
38257if ${ac_cv_prog_OBJDUMP+:} false; then :
38258  $as_echo_n "(cached) " >&6
38259else
38260  if test -n "$OBJDUMP"; then
38261  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38262else
38263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38264for as_dir in $PATH
38265do
38266  IFS=$as_save_IFS
38267  test -z "$as_dir" && as_dir=.
38268    for ac_exec_ext in '' $ac_executable_extensions; do
38269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38270    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38272    break 2
38273  fi
38274done
38275  done
38276IFS=$as_save_IFS
38277
38278fi
38279fi
38280OBJDUMP=$ac_cv_prog_OBJDUMP
38281if test -n "$OBJDUMP"; then
38282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38283$as_echo "$OBJDUMP" >&6; }
38284else
38285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38286$as_echo "no" >&6; }
38287fi
38288
38289
38290    test -n "$OBJDUMP" && break
38291  done
38292fi
38293if test -z "$OBJDUMP"; then
38294  ac_ct_OBJDUMP=$OBJDUMP
38295  for ac_prog in gobjdump objdump
38296do
38297  # Extract the first word of "$ac_prog", so it can be a program name with args.
38298set dummy $ac_prog; ac_word=$2
38299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38300$as_echo_n "checking for $ac_word... " >&6; }
38301if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38302  $as_echo_n "(cached) " >&6
38303else
38304  if test -n "$ac_ct_OBJDUMP"; then
38305  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38306else
38307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38308for as_dir in $PATH
38309do
38310  IFS=$as_save_IFS
38311  test -z "$as_dir" && as_dir=.
38312    for ac_exec_ext in '' $ac_executable_extensions; do
38313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38314    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38316    break 2
38317  fi
38318done
38319  done
38320IFS=$as_save_IFS
38321
38322fi
38323fi
38324ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38325if test -n "$ac_ct_OBJDUMP"; then
38326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38327$as_echo "$ac_ct_OBJDUMP" >&6; }
38328else
38329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38330$as_echo "no" >&6; }
38331fi
38332
38333
38334  test -n "$ac_ct_OBJDUMP" && break
38335done
38336
38337  if test "x$ac_ct_OBJDUMP" = x; then
38338    OBJDUMP=""
38339  else
38340    case $cross_compiling:$ac_tool_warned in
38341yes:)
38342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38344ac_tool_warned=yes ;;
38345esac
38346    OBJDUMP=$ac_ct_OBJDUMP
38347  fi
38348fi
38349
38350  else
38351    # The variable is set, but is it from the command line or the environment?
38352
38353    # Try to remove the string !OBJDUMP! from our list.
38354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38356      # If it failed, the variable was not from the command line. Ignore it,
38357      # but warn the user (except for BASH, which is always set by the calling BASH).
38358      if test "xOBJDUMP" != xBASH; then
38359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38360$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38361      fi
38362      # Try to locate tool using the code snippet
38363      if test -n "$ac_tool_prefix"; then
38364  for ac_prog in gobjdump objdump
38365  do
38366    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38367set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38369$as_echo_n "checking for $ac_word... " >&6; }
38370if ${ac_cv_prog_OBJDUMP+:} false; then :
38371  $as_echo_n "(cached) " >&6
38372else
38373  if test -n "$OBJDUMP"; then
38374  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38375else
38376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38377for as_dir in $PATH
38378do
38379  IFS=$as_save_IFS
38380  test -z "$as_dir" && as_dir=.
38381    for ac_exec_ext in '' $ac_executable_extensions; do
38382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38383    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38385    break 2
38386  fi
38387done
38388  done
38389IFS=$as_save_IFS
38390
38391fi
38392fi
38393OBJDUMP=$ac_cv_prog_OBJDUMP
38394if test -n "$OBJDUMP"; then
38395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38396$as_echo "$OBJDUMP" >&6; }
38397else
38398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38399$as_echo "no" >&6; }
38400fi
38401
38402
38403    test -n "$OBJDUMP" && break
38404  done
38405fi
38406if test -z "$OBJDUMP"; then
38407  ac_ct_OBJDUMP=$OBJDUMP
38408  for ac_prog in gobjdump objdump
38409do
38410  # Extract the first word of "$ac_prog", so it can be a program name with args.
38411set dummy $ac_prog; ac_word=$2
38412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38413$as_echo_n "checking for $ac_word... " >&6; }
38414if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38415  $as_echo_n "(cached) " >&6
38416else
38417  if test -n "$ac_ct_OBJDUMP"; then
38418  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38419else
38420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38421for as_dir in $PATH
38422do
38423  IFS=$as_save_IFS
38424  test -z "$as_dir" && as_dir=.
38425    for ac_exec_ext in '' $ac_executable_extensions; do
38426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38427    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38429    break 2
38430  fi
38431done
38432  done
38433IFS=$as_save_IFS
38434
38435fi
38436fi
38437ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38438if test -n "$ac_ct_OBJDUMP"; then
38439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38440$as_echo "$ac_ct_OBJDUMP" >&6; }
38441else
38442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38443$as_echo "no" >&6; }
38444fi
38445
38446
38447  test -n "$ac_ct_OBJDUMP" && break
38448done
38449
38450  if test "x$ac_ct_OBJDUMP" = x; then
38451    OBJDUMP=""
38452  else
38453    case $cross_compiling:$ac_tool_warned in
38454yes:)
38455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38457ac_tool_warned=yes ;;
38458esac
38459    OBJDUMP=$ac_ct_OBJDUMP
38460  fi
38461fi
38462
38463    else
38464      # If it succeeded, then it was overridden by the user. We will use it
38465      # for the tool.
38466
38467      # First remove it from the list of overridden variables, so we can test
38468      # for unknown variables in the end.
38469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38470
38471      # Check if the provided tool contains a complete path.
38472      tool_specified="$OBJDUMP"
38473      tool_basename="${tool_specified##*/}"
38474      if test "x$tool_basename" = "x$tool_specified"; then
38475        # A command without a complete path is provided, search $PATH.
38476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38477$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38478        # Extract the first word of "$tool_basename", so it can be a program name with args.
38479set dummy $tool_basename; ac_word=$2
38480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38481$as_echo_n "checking for $ac_word... " >&6; }
38482if ${ac_cv_path_OBJDUMP+:} false; then :
38483  $as_echo_n "(cached) " >&6
38484else
38485  case $OBJDUMP in
38486  [\\/]* | ?:[\\/]*)
38487  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38488  ;;
38489  *)
38490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38491for as_dir in $PATH
38492do
38493  IFS=$as_save_IFS
38494  test -z "$as_dir" && as_dir=.
38495    for ac_exec_ext in '' $ac_executable_extensions; do
38496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38497    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38499    break 2
38500  fi
38501done
38502  done
38503IFS=$as_save_IFS
38504
38505  ;;
38506esac
38507fi
38508OBJDUMP=$ac_cv_path_OBJDUMP
38509if test -n "$OBJDUMP"; then
38510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38511$as_echo "$OBJDUMP" >&6; }
38512else
38513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38514$as_echo "no" >&6; }
38515fi
38516
38517
38518        if test "x$OBJDUMP" = x; then
38519          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38520        fi
38521      else
38522        # Otherwise we believe it is a complete path. Use it as it is.
38523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38524$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38526$as_echo_n "checking for OBJDUMP... " >&6; }
38527        if test ! -x "$tool_specified"; then
38528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38529$as_echo "not found" >&6; }
38530          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38531        fi
38532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38533$as_echo "$tool_specified" >&6; }
38534      fi
38535    fi
38536  fi
38537
38538
38539  if test "x$OBJDUMP" != x; then
38540    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38541    # bails if argument is missing.
38542
38543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38544
38545  # First separate the path from the arguments. This will split at the first
38546  # space.
38547  complete="$OBJDUMP"
38548  path="${complete%% *}"
38549  tmp="$complete EOL"
38550  arguments="${tmp#* }"
38551
38552  # Input might be given as Windows format, start by converting to
38553  # unix format.
38554  new_path=`$CYGPATH -u "$path"`
38555
38556  # Now try to locate executable using which
38557  new_path=`$WHICH "$new_path" 2> /dev/null`
38558  # bat and cmd files are not always considered executable in cygwin causing which
38559  # to not find them
38560  if test "x$new_path" = x \
38561      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38562      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38563    new_path=`$CYGPATH -u "$path"`
38564  fi
38565  if test "x$new_path" = x; then
38566    # Oops. Which didn't find the executable.
38567    # The splitting of arguments from the executable at a space might have been incorrect,
38568    # since paths with space are more likely in Windows. Give it another try with the whole
38569    # argument.
38570    path="$complete"
38571    arguments="EOL"
38572    new_path=`$CYGPATH -u "$path"`
38573    new_path=`$WHICH "$new_path" 2> /dev/null`
38574    # bat and cmd files are not always considered executable in cygwin causing which
38575    # to not find them
38576    if test "x$new_path" = x \
38577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38579      new_path=`$CYGPATH -u "$path"`
38580    fi
38581    if test "x$new_path" = x; then
38582      # It's still not found. Now this is an unrecoverable error.
38583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38584$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38585      has_space=`$ECHO "$complete" | $GREP " "`
38586      if test "x$has_space" != x; then
38587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38589      fi
38590      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38591    fi
38592  fi
38593
38594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38597  # "foo.exe" is OK but "foo" is an error.
38598  #
38599  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38600  # It is also a way to make sure we got the proper file name for the real test later on.
38601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38602  if test "x$test_shortpath" = x; then
38603    # Short path failed, file does not exist as specified.
38604    # Try adding .exe or .cmd
38605    if test -f "${new_path}.exe"; then
38606      input_to_shortpath="${new_path}.exe"
38607    elif test -f "${new_path}.cmd"; then
38608      input_to_shortpath="${new_path}.cmd"
38609    else
38610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38611$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38614      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38615    fi
38616  else
38617    input_to_shortpath="$new_path"
38618  fi
38619
38620  # Call helper function which possibly converts this using DOS-style short mode.
38621  # If so, the updated path is stored in $new_path.
38622  new_path="$input_to_shortpath"
38623
38624  input_path="$input_to_shortpath"
38625  # Check if we need to convert this using DOS-style short mode. If the path
38626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38627  # take no chances and rewrite it.
38628  # Note: m4 eats our [], so we need to use [ and ] instead.
38629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38630  if test "x$has_forbidden_chars" != x; then
38631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38635      # Going to short mode and back again did indeed matter. Since short mode is
38636      # case insensitive, let's make it lowercase to improve readability.
38637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38638      # Now convert it back to Unix-stile (cygpath)
38639      input_path=`$CYGPATH -u "$shortmode_path"`
38640      new_path="$input_path"
38641    fi
38642  fi
38643
38644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38645  if test "x$test_cygdrive_prefix" = x; then
38646    # As a simple fix, exclude /usr/bin since it's not a real path.
38647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38649      # a path prefixed by /cygdrive for fixpath to work.
38650      new_path="$CYGWIN_ROOT_PATH$input_path"
38651    fi
38652  fi
38653
38654  # remove trailing .exe if any
38655  new_path="${new_path/%.exe/}"
38656
38657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38658
38659  # First separate the path from the arguments. This will split at the first
38660  # space.
38661  complete="$OBJDUMP"
38662  path="${complete%% *}"
38663  tmp="$complete EOL"
38664  arguments="${tmp#* }"
38665
38666  # Input might be given as Windows format, start by converting to
38667  # unix format.
38668  new_path="$path"
38669
38670  windows_path="$new_path"
38671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38672    unix_path=`$CYGPATH -u "$windows_path"`
38673    new_path="$unix_path"
38674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38676    new_path="$unix_path"
38677  fi
38678
38679
38680  # Now try to locate executable using which
38681  new_path=`$WHICH "$new_path" 2> /dev/null`
38682
38683  if test "x$new_path" = x; then
38684    # Oops. Which didn't find the executable.
38685    # The splitting of arguments from the executable at a space might have been incorrect,
38686    # since paths with space are more likely in Windows. Give it another try with the whole
38687    # argument.
38688    path="$complete"
38689    arguments="EOL"
38690    new_path="$path"
38691
38692  windows_path="$new_path"
38693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38694    unix_path=`$CYGPATH -u "$windows_path"`
38695    new_path="$unix_path"
38696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38698    new_path="$unix_path"
38699  fi
38700
38701
38702    new_path=`$WHICH "$new_path" 2> /dev/null`
38703
38704    if test "x$new_path" = x; then
38705      # It's still not found. Now this is an unrecoverable error.
38706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38707$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38708      has_space=`$ECHO "$complete" | $GREP " "`
38709      if test "x$has_space" != x; then
38710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38712      fi
38713      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38714    fi
38715  fi
38716
38717  # Now new_path has a complete unix path to the binary
38718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38719    # Keep paths in /bin as-is, but remove trailing .exe if any
38720    new_path="${new_path/%.exe/}"
38721    # Do not save /bin paths to all_fixpath_prefixes!
38722  else
38723    # Not in mixed or Windows style, start by that.
38724    new_path=`cmd //c echo $new_path`
38725
38726  input_path="$new_path"
38727  # Check if we need to convert this using DOS-style short mode. If the path
38728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38729  # take no chances and rewrite it.
38730  # Note: m4 eats our [], so we need to use [ and ] instead.
38731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38732  if test "x$has_forbidden_chars" != x; then
38733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38735  fi
38736
38737    # Output is in $new_path
38738
38739  windows_path="$new_path"
38740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38741    unix_path=`$CYGPATH -u "$windows_path"`
38742    new_path="$unix_path"
38743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38745    new_path="$unix_path"
38746  fi
38747
38748    # remove trailing .exe if any
38749    new_path="${new_path/%.exe/}"
38750
38751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38753  fi
38754
38755  else
38756    # We're on a posix platform. Hooray! :)
38757    # First separate the path from the arguments. This will split at the first
38758    # space.
38759    complete="$OBJDUMP"
38760    path="${complete%% *}"
38761    tmp="$complete EOL"
38762    arguments="${tmp#* }"
38763
38764    # Cannot rely on the command "which" here since it doesn't always work.
38765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38766    if test -z "$is_absolute_path"; then
38767      # Path to executable is not absolute. Find it.
38768      IFS_save="$IFS"
38769      IFS=:
38770      for p in $PATH; do
38771        if test -f "$p/$path" && test -x "$p/$path"; then
38772          new_path="$p/$path"
38773          break
38774        fi
38775      done
38776      IFS="$IFS_save"
38777    else
38778      # This is an absolute path, we can use it without further modifications.
38779      new_path="$path"
38780    fi
38781
38782    if test "x$new_path" = x; then
38783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38784$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38785      has_space=`$ECHO "$complete" | $GREP " "`
38786      if test "x$has_space" != x; then
38787        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38788$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38789      fi
38790      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38791    fi
38792  fi
38793
38794  # Now join together the path and the arguments once again
38795  if test "x$arguments" != xEOL; then
38796    new_complete="$new_path ${arguments% *}"
38797  else
38798    new_complete="$new_path"
38799  fi
38800
38801  if test "x$complete" != "x$new_complete"; then
38802    OBJDUMP="$new_complete"
38803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38804$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38805  fi
38806
38807  fi
38808
38809
38810  # Restore old path.
38811  PATH="$OLD_PATH"
38812
38813  # Restore the flags to the user specified values.
38814  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38815  CFLAGS="$ORG_CFLAGS"
38816  CXXFLAGS="$ORG_CXXFLAGS"
38817  OBJCFLAGS="$ORG_OBJCFLAGS"
38818
38819
38820# Finally do some processing after the detection phase
38821
38822  if test "x$COMPILE_TYPE" = "xcross"; then
38823    # Now we need to find a C/C++ compiler that can build executables for the
38824    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38825    # used once. Also, we need to do this without adding a tools dir to the
38826    # path, otherwise we might pick up cross-compilers which don't use standard
38827    # naming.
38828
38829    # FIXME: we should list the discovered compilers as an exclude pattern!
38830    # If we do that, we can do this detection before POST_DETECTION, and still
38831    # find the build compilers in the tools dir, if needed.
38832
38833
38834  # Publish this variable in the help.
38835
38836
38837  if test "x$BUILD_CC" = x; then
38838    # The variable is not set by user, try to locate tool using the code snippet
38839    for ac_prog in cl cc gcc
38840do
38841  # Extract the first word of "$ac_prog", so it can be a program name with args.
38842set dummy $ac_prog; ac_word=$2
38843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38844$as_echo_n "checking for $ac_word... " >&6; }
38845if ${ac_cv_path_BUILD_CC+:} false; then :
38846  $as_echo_n "(cached) " >&6
38847else
38848  case $BUILD_CC in
38849  [\\/]* | ?:[\\/]*)
38850  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38851  ;;
38852  *)
38853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38854for as_dir in $PATH
38855do
38856  IFS=$as_save_IFS
38857  test -z "$as_dir" && as_dir=.
38858    for ac_exec_ext in '' $ac_executable_extensions; do
38859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38860    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38862    break 2
38863  fi
38864done
38865  done
38866IFS=$as_save_IFS
38867
38868  ;;
38869esac
38870fi
38871BUILD_CC=$ac_cv_path_BUILD_CC
38872if test -n "$BUILD_CC"; then
38873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38874$as_echo "$BUILD_CC" >&6; }
38875else
38876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38877$as_echo "no" >&6; }
38878fi
38879
38880
38881  test -n "$BUILD_CC" && break
38882done
38883
38884  else
38885    # The variable is set, but is it from the command line or the environment?
38886
38887    # Try to remove the string !BUILD_CC! from our list.
38888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38890      # If it failed, the variable was not from the command line. Ignore it,
38891      # but warn the user (except for BASH, which is always set by the calling BASH).
38892      if test "xBUILD_CC" != xBASH; then
38893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38894$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38895      fi
38896      # Try to locate tool using the code snippet
38897      for ac_prog in cl cc gcc
38898do
38899  # Extract the first word of "$ac_prog", so it can be a program name with args.
38900set dummy $ac_prog; ac_word=$2
38901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38902$as_echo_n "checking for $ac_word... " >&6; }
38903if ${ac_cv_path_BUILD_CC+:} false; then :
38904  $as_echo_n "(cached) " >&6
38905else
38906  case $BUILD_CC in
38907  [\\/]* | ?:[\\/]*)
38908  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38909  ;;
38910  *)
38911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38912for as_dir in $PATH
38913do
38914  IFS=$as_save_IFS
38915  test -z "$as_dir" && as_dir=.
38916    for ac_exec_ext in '' $ac_executable_extensions; do
38917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38918    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38920    break 2
38921  fi
38922done
38923  done
38924IFS=$as_save_IFS
38925
38926  ;;
38927esac
38928fi
38929BUILD_CC=$ac_cv_path_BUILD_CC
38930if test -n "$BUILD_CC"; then
38931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38932$as_echo "$BUILD_CC" >&6; }
38933else
38934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38935$as_echo "no" >&6; }
38936fi
38937
38938
38939  test -n "$BUILD_CC" && break
38940done
38941
38942    else
38943      # If it succeeded, then it was overridden by the user. We will use it
38944      # for the tool.
38945
38946      # First remove it from the list of overridden variables, so we can test
38947      # for unknown variables in the end.
38948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38949
38950      # Check if the provided tool contains a complete path.
38951      tool_specified="$BUILD_CC"
38952      tool_basename="${tool_specified##*/}"
38953      if test "x$tool_basename" = "x$tool_specified"; then
38954        # A command without a complete path is provided, search $PATH.
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38956$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38957        # Extract the first word of "$tool_basename", so it can be a program name with args.
38958set dummy $tool_basename; ac_word=$2
38959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38960$as_echo_n "checking for $ac_word... " >&6; }
38961if ${ac_cv_path_BUILD_CC+:} false; then :
38962  $as_echo_n "(cached) " >&6
38963else
38964  case $BUILD_CC in
38965  [\\/]* | ?:[\\/]*)
38966  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38967  ;;
38968  *)
38969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38970for as_dir in $PATH
38971do
38972  IFS=$as_save_IFS
38973  test -z "$as_dir" && as_dir=.
38974    for ac_exec_ext in '' $ac_executable_extensions; do
38975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38976    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38978    break 2
38979  fi
38980done
38981  done
38982IFS=$as_save_IFS
38983
38984  ;;
38985esac
38986fi
38987BUILD_CC=$ac_cv_path_BUILD_CC
38988if test -n "$BUILD_CC"; then
38989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38990$as_echo "$BUILD_CC" >&6; }
38991else
38992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38993$as_echo "no" >&6; }
38994fi
38995
38996
38997        if test "x$BUILD_CC" = x; then
38998          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38999        fi
39000      else
39001        # Otherwise we believe it is a complete path. Use it as it is.
39002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39003$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39005$as_echo_n "checking for BUILD_CC... " >&6; }
39006        if test ! -x "$tool_specified"; then
39007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39008$as_echo "not found" >&6; }
39009          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39010        fi
39011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39012$as_echo "$tool_specified" >&6; }
39013      fi
39014    fi
39015  fi
39016
39017
39018
39019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39020
39021  # First separate the path from the arguments. This will split at the first
39022  # space.
39023  complete="$BUILD_CC"
39024  path="${complete%% *}"
39025  tmp="$complete EOL"
39026  arguments="${tmp#* }"
39027
39028  # Input might be given as Windows format, start by converting to
39029  # unix format.
39030  new_path=`$CYGPATH -u "$path"`
39031
39032  # Now try to locate executable using which
39033  new_path=`$WHICH "$new_path" 2> /dev/null`
39034  # bat and cmd files are not always considered executable in cygwin causing which
39035  # to not find them
39036  if test "x$new_path" = x \
39037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039    new_path=`$CYGPATH -u "$path"`
39040  fi
39041  if test "x$new_path" = x; then
39042    # Oops. Which didn't find the executable.
39043    # The splitting of arguments from the executable at a space might have been incorrect,
39044    # since paths with space are more likely in Windows. Give it another try with the whole
39045    # argument.
39046    path="$complete"
39047    arguments="EOL"
39048    new_path=`$CYGPATH -u "$path"`
39049    new_path=`$WHICH "$new_path" 2> /dev/null`
39050    # bat and cmd files are not always considered executable in cygwin causing which
39051    # to not find them
39052    if test "x$new_path" = x \
39053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39055      new_path=`$CYGPATH -u "$path"`
39056    fi
39057    if test "x$new_path" = x; then
39058      # It's still not found. Now this is an unrecoverable error.
39059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39060$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39061      has_space=`$ECHO "$complete" | $GREP " "`
39062      if test "x$has_space" != x; then
39063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39065      fi
39066      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39067    fi
39068  fi
39069
39070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39073  # "foo.exe" is OK but "foo" is an error.
39074  #
39075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39076  # It is also a way to make sure we got the proper file name for the real test later on.
39077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39078  if test "x$test_shortpath" = x; then
39079    # Short path failed, file does not exist as specified.
39080    # Try adding .exe or .cmd
39081    if test -f "${new_path}.exe"; then
39082      input_to_shortpath="${new_path}.exe"
39083    elif test -f "${new_path}.cmd"; then
39084      input_to_shortpath="${new_path}.cmd"
39085    else
39086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39087$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39090      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39091    fi
39092  else
39093    input_to_shortpath="$new_path"
39094  fi
39095
39096  # Call helper function which possibly converts this using DOS-style short mode.
39097  # If so, the updated path is stored in $new_path.
39098  new_path="$input_to_shortpath"
39099
39100  input_path="$input_to_shortpath"
39101  # Check if we need to convert this using DOS-style short mode. If the path
39102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39103  # take no chances and rewrite it.
39104  # Note: m4 eats our [], so we need to use [ and ] instead.
39105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39106  if test "x$has_forbidden_chars" != x; then
39107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39111      # Going to short mode and back again did indeed matter. Since short mode is
39112      # case insensitive, let's make it lowercase to improve readability.
39113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39114      # Now convert it back to Unix-stile (cygpath)
39115      input_path=`$CYGPATH -u "$shortmode_path"`
39116      new_path="$input_path"
39117    fi
39118  fi
39119
39120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39121  if test "x$test_cygdrive_prefix" = x; then
39122    # As a simple fix, exclude /usr/bin since it's not a real path.
39123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39125      # a path prefixed by /cygdrive for fixpath to work.
39126      new_path="$CYGWIN_ROOT_PATH$input_path"
39127    fi
39128  fi
39129
39130  # remove trailing .exe if any
39131  new_path="${new_path/%.exe/}"
39132
39133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39134
39135  # First separate the path from the arguments. This will split at the first
39136  # space.
39137  complete="$BUILD_CC"
39138  path="${complete%% *}"
39139  tmp="$complete EOL"
39140  arguments="${tmp#* }"
39141
39142  # Input might be given as Windows format, start by converting to
39143  # unix format.
39144  new_path="$path"
39145
39146  windows_path="$new_path"
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148    unix_path=`$CYGPATH -u "$windows_path"`
39149    new_path="$unix_path"
39150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152    new_path="$unix_path"
39153  fi
39154
39155
39156  # Now try to locate executable using which
39157  new_path=`$WHICH "$new_path" 2> /dev/null`
39158
39159  if test "x$new_path" = x; then
39160    # Oops. Which didn't find the executable.
39161    # The splitting of arguments from the executable at a space might have been incorrect,
39162    # since paths with space are more likely in Windows. Give it another try with the whole
39163    # argument.
39164    path="$complete"
39165    arguments="EOL"
39166    new_path="$path"
39167
39168  windows_path="$new_path"
39169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170    unix_path=`$CYGPATH -u "$windows_path"`
39171    new_path="$unix_path"
39172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174    new_path="$unix_path"
39175  fi
39176
39177
39178    new_path=`$WHICH "$new_path" 2> /dev/null`
39179
39180    if test "x$new_path" = x; then
39181      # It's still not found. Now this is an unrecoverable error.
39182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39183$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39184      has_space=`$ECHO "$complete" | $GREP " "`
39185      if test "x$has_space" != x; then
39186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39188      fi
39189      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39190    fi
39191  fi
39192
39193  # Now new_path has a complete unix path to the binary
39194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39195    # Keep paths in /bin as-is, but remove trailing .exe if any
39196    new_path="${new_path/%.exe/}"
39197    # Do not save /bin paths to all_fixpath_prefixes!
39198  else
39199    # Not in mixed or Windows style, start by that.
39200    new_path=`cmd //c echo $new_path`
39201
39202  input_path="$new_path"
39203  # Check if we need to convert this using DOS-style short mode. If the path
39204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39205  # take no chances and rewrite it.
39206  # Note: m4 eats our [], so we need to use [ and ] instead.
39207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39208  if test "x$has_forbidden_chars" != x; then
39209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39211  fi
39212
39213    # Output is in $new_path
39214
39215  windows_path="$new_path"
39216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39217    unix_path=`$CYGPATH -u "$windows_path"`
39218    new_path="$unix_path"
39219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39221    new_path="$unix_path"
39222  fi
39223
39224    # remove trailing .exe if any
39225    new_path="${new_path/%.exe/}"
39226
39227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39229  fi
39230
39231  else
39232    # We're on a posix platform. Hooray! :)
39233    # First separate the path from the arguments. This will split at the first
39234    # space.
39235    complete="$BUILD_CC"
39236    path="${complete%% *}"
39237    tmp="$complete EOL"
39238    arguments="${tmp#* }"
39239
39240    # Cannot rely on the command "which" here since it doesn't always work.
39241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39242    if test -z "$is_absolute_path"; then
39243      # Path to executable is not absolute. Find it.
39244      IFS_save="$IFS"
39245      IFS=:
39246      for p in $PATH; do
39247        if test -f "$p/$path" && test -x "$p/$path"; then
39248          new_path="$p/$path"
39249          break
39250        fi
39251      done
39252      IFS="$IFS_save"
39253    else
39254      # This is an absolute path, we can use it without further modifications.
39255      new_path="$path"
39256    fi
39257
39258    if test "x$new_path" = x; then
39259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39260$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39261      has_space=`$ECHO "$complete" | $GREP " "`
39262      if test "x$has_space" != x; then
39263        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39264$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39265      fi
39266      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39267    fi
39268  fi
39269
39270  # Now join together the path and the arguments once again
39271  if test "x$arguments" != xEOL; then
39272    new_complete="$new_path ${arguments% *}"
39273  else
39274    new_complete="$new_path"
39275  fi
39276
39277  if test "x$complete" != "x$new_complete"; then
39278    BUILD_CC="$new_complete"
39279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39280$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39281  fi
39282
39283
39284
39285  # Publish this variable in the help.
39286
39287
39288  if test "x$BUILD_CXX" = x; then
39289    # The variable is not set by user, try to locate tool using the code snippet
39290    for ac_prog in cl CC g++
39291do
39292  # Extract the first word of "$ac_prog", so it can be a program name with args.
39293set dummy $ac_prog; ac_word=$2
39294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39295$as_echo_n "checking for $ac_word... " >&6; }
39296if ${ac_cv_path_BUILD_CXX+:} false; then :
39297  $as_echo_n "(cached) " >&6
39298else
39299  case $BUILD_CXX in
39300  [\\/]* | ?:[\\/]*)
39301  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39302  ;;
39303  *)
39304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39305for as_dir in $PATH
39306do
39307  IFS=$as_save_IFS
39308  test -z "$as_dir" && as_dir=.
39309    for ac_exec_ext in '' $ac_executable_extensions; do
39310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39311    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39313    break 2
39314  fi
39315done
39316  done
39317IFS=$as_save_IFS
39318
39319  ;;
39320esac
39321fi
39322BUILD_CXX=$ac_cv_path_BUILD_CXX
39323if test -n "$BUILD_CXX"; then
39324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39325$as_echo "$BUILD_CXX" >&6; }
39326else
39327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39328$as_echo "no" >&6; }
39329fi
39330
39331
39332  test -n "$BUILD_CXX" && break
39333done
39334
39335  else
39336    # The variable is set, but is it from the command line or the environment?
39337
39338    # Try to remove the string !BUILD_CXX! from our list.
39339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39341      # If it failed, the variable was not from the command line. Ignore it,
39342      # but warn the user (except for BASH, which is always set by the calling BASH).
39343      if test "xBUILD_CXX" != xBASH; then
39344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39345$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39346      fi
39347      # Try to locate tool using the code snippet
39348      for ac_prog in cl CC g++
39349do
39350  # Extract the first word of "$ac_prog", so it can be a program name with args.
39351set dummy $ac_prog; ac_word=$2
39352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39353$as_echo_n "checking for $ac_word... " >&6; }
39354if ${ac_cv_path_BUILD_CXX+:} false; then :
39355  $as_echo_n "(cached) " >&6
39356else
39357  case $BUILD_CXX in
39358  [\\/]* | ?:[\\/]*)
39359  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39360  ;;
39361  *)
39362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39363for as_dir in $PATH
39364do
39365  IFS=$as_save_IFS
39366  test -z "$as_dir" && as_dir=.
39367    for ac_exec_ext in '' $ac_executable_extensions; do
39368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39369    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39371    break 2
39372  fi
39373done
39374  done
39375IFS=$as_save_IFS
39376
39377  ;;
39378esac
39379fi
39380BUILD_CXX=$ac_cv_path_BUILD_CXX
39381if test -n "$BUILD_CXX"; then
39382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39383$as_echo "$BUILD_CXX" >&6; }
39384else
39385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39386$as_echo "no" >&6; }
39387fi
39388
39389
39390  test -n "$BUILD_CXX" && break
39391done
39392
39393    else
39394      # If it succeeded, then it was overridden by the user. We will use it
39395      # for the tool.
39396
39397      # First remove it from the list of overridden variables, so we can test
39398      # for unknown variables in the end.
39399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39400
39401      # Check if the provided tool contains a complete path.
39402      tool_specified="$BUILD_CXX"
39403      tool_basename="${tool_specified##*/}"
39404      if test "x$tool_basename" = "x$tool_specified"; then
39405        # A command without a complete path is provided, search $PATH.
39406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39407$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39408        # Extract the first word of "$tool_basename", so it can be a program name with args.
39409set dummy $tool_basename; ac_word=$2
39410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39411$as_echo_n "checking for $ac_word... " >&6; }
39412if ${ac_cv_path_BUILD_CXX+:} false; then :
39413  $as_echo_n "(cached) " >&6
39414else
39415  case $BUILD_CXX in
39416  [\\/]* | ?:[\\/]*)
39417  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39418  ;;
39419  *)
39420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39421for as_dir in $PATH
39422do
39423  IFS=$as_save_IFS
39424  test -z "$as_dir" && as_dir=.
39425    for ac_exec_ext in '' $ac_executable_extensions; do
39426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39427    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39429    break 2
39430  fi
39431done
39432  done
39433IFS=$as_save_IFS
39434
39435  ;;
39436esac
39437fi
39438BUILD_CXX=$ac_cv_path_BUILD_CXX
39439if test -n "$BUILD_CXX"; then
39440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39441$as_echo "$BUILD_CXX" >&6; }
39442else
39443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39444$as_echo "no" >&6; }
39445fi
39446
39447
39448        if test "x$BUILD_CXX" = x; then
39449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39450        fi
39451      else
39452        # Otherwise we believe it is a complete path. Use it as it is.
39453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39454$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39456$as_echo_n "checking for BUILD_CXX... " >&6; }
39457        if test ! -x "$tool_specified"; then
39458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39459$as_echo "not found" >&6; }
39460          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39461        fi
39462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39463$as_echo "$tool_specified" >&6; }
39464      fi
39465    fi
39466  fi
39467
39468
39469
39470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39471
39472  # First separate the path from the arguments. This will split at the first
39473  # space.
39474  complete="$BUILD_CXX"
39475  path="${complete%% *}"
39476  tmp="$complete EOL"
39477  arguments="${tmp#* }"
39478
39479  # Input might be given as Windows format, start by converting to
39480  # unix format.
39481  new_path=`$CYGPATH -u "$path"`
39482
39483  # Now try to locate executable using which
39484  new_path=`$WHICH "$new_path" 2> /dev/null`
39485  # bat and cmd files are not always considered executable in cygwin causing which
39486  # to not find them
39487  if test "x$new_path" = x \
39488      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39489      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39490    new_path=`$CYGPATH -u "$path"`
39491  fi
39492  if test "x$new_path" = x; then
39493    # Oops. Which didn't find the executable.
39494    # The splitting of arguments from the executable at a space might have been incorrect,
39495    # since paths with space are more likely in Windows. Give it another try with the whole
39496    # argument.
39497    path="$complete"
39498    arguments="EOL"
39499    new_path=`$CYGPATH -u "$path"`
39500    new_path=`$WHICH "$new_path" 2> /dev/null`
39501    # bat and cmd files are not always considered executable in cygwin causing which
39502    # to not find them
39503    if test "x$new_path" = x \
39504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39506      new_path=`$CYGPATH -u "$path"`
39507    fi
39508    if test "x$new_path" = x; then
39509      # It's still not found. Now this is an unrecoverable error.
39510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39511$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39512      has_space=`$ECHO "$complete" | $GREP " "`
39513      if test "x$has_space" != x; then
39514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39516      fi
39517      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39518    fi
39519  fi
39520
39521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39524  # "foo.exe" is OK but "foo" is an error.
39525  #
39526  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39527  # It is also a way to make sure we got the proper file name for the real test later on.
39528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39529  if test "x$test_shortpath" = x; then
39530    # Short path failed, file does not exist as specified.
39531    # Try adding .exe or .cmd
39532    if test -f "${new_path}.exe"; then
39533      input_to_shortpath="${new_path}.exe"
39534    elif test -f "${new_path}.cmd"; then
39535      input_to_shortpath="${new_path}.cmd"
39536    else
39537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39538$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39541      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39542    fi
39543  else
39544    input_to_shortpath="$new_path"
39545  fi
39546
39547  # Call helper function which possibly converts this using DOS-style short mode.
39548  # If so, the updated path is stored in $new_path.
39549  new_path="$input_to_shortpath"
39550
39551  input_path="$input_to_shortpath"
39552  # Check if we need to convert this using DOS-style short mode. If the path
39553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39554  # take no chances and rewrite it.
39555  # Note: m4 eats our [], so we need to use [ and ] instead.
39556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39557  if test "x$has_forbidden_chars" != x; then
39558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39562      # Going to short mode and back again did indeed matter. Since short mode is
39563      # case insensitive, let's make it lowercase to improve readability.
39564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39565      # Now convert it back to Unix-stile (cygpath)
39566      input_path=`$CYGPATH -u "$shortmode_path"`
39567      new_path="$input_path"
39568    fi
39569  fi
39570
39571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39572  if test "x$test_cygdrive_prefix" = x; then
39573    # As a simple fix, exclude /usr/bin since it's not a real path.
39574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39576      # a path prefixed by /cygdrive for fixpath to work.
39577      new_path="$CYGWIN_ROOT_PATH$input_path"
39578    fi
39579  fi
39580
39581  # remove trailing .exe if any
39582  new_path="${new_path/%.exe/}"
39583
39584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39585
39586  # First separate the path from the arguments. This will split at the first
39587  # space.
39588  complete="$BUILD_CXX"
39589  path="${complete%% *}"
39590  tmp="$complete EOL"
39591  arguments="${tmp#* }"
39592
39593  # Input might be given as Windows format, start by converting to
39594  # unix format.
39595  new_path="$path"
39596
39597  windows_path="$new_path"
39598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39599    unix_path=`$CYGPATH -u "$windows_path"`
39600    new_path="$unix_path"
39601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39603    new_path="$unix_path"
39604  fi
39605
39606
39607  # Now try to locate executable using which
39608  new_path=`$WHICH "$new_path" 2> /dev/null`
39609
39610  if test "x$new_path" = x; then
39611    # Oops. Which didn't find the executable.
39612    # The splitting of arguments from the executable at a space might have been incorrect,
39613    # since paths with space are more likely in Windows. Give it another try with the whole
39614    # argument.
39615    path="$complete"
39616    arguments="EOL"
39617    new_path="$path"
39618
39619  windows_path="$new_path"
39620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39621    unix_path=`$CYGPATH -u "$windows_path"`
39622    new_path="$unix_path"
39623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39625    new_path="$unix_path"
39626  fi
39627
39628
39629    new_path=`$WHICH "$new_path" 2> /dev/null`
39630
39631    if test "x$new_path" = x; then
39632      # It's still not found. Now this is an unrecoverable error.
39633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39634$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39635      has_space=`$ECHO "$complete" | $GREP " "`
39636      if test "x$has_space" != x; then
39637        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39638$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39639      fi
39640      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39641    fi
39642  fi
39643
39644  # Now new_path has a complete unix path to the binary
39645  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39646    # Keep paths in /bin as-is, but remove trailing .exe if any
39647    new_path="${new_path/%.exe/}"
39648    # Do not save /bin paths to all_fixpath_prefixes!
39649  else
39650    # Not in mixed or Windows style, start by that.
39651    new_path=`cmd //c echo $new_path`
39652
39653  input_path="$new_path"
39654  # Check if we need to convert this using DOS-style short mode. If the path
39655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39656  # take no chances and rewrite it.
39657  # Note: m4 eats our [], so we need to use [ and ] instead.
39658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39659  if test "x$has_forbidden_chars" != x; then
39660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39662  fi
39663
39664    # Output is in $new_path
39665
39666  windows_path="$new_path"
39667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39668    unix_path=`$CYGPATH -u "$windows_path"`
39669    new_path="$unix_path"
39670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39672    new_path="$unix_path"
39673  fi
39674
39675    # remove trailing .exe if any
39676    new_path="${new_path/%.exe/}"
39677
39678    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39679    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39680  fi
39681
39682  else
39683    # We're on a posix platform. Hooray! :)
39684    # First separate the path from the arguments. This will split at the first
39685    # space.
39686    complete="$BUILD_CXX"
39687    path="${complete%% *}"
39688    tmp="$complete EOL"
39689    arguments="${tmp#* }"
39690
39691    # Cannot rely on the command "which" here since it doesn't always work.
39692    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39693    if test -z "$is_absolute_path"; then
39694      # Path to executable is not absolute. Find it.
39695      IFS_save="$IFS"
39696      IFS=:
39697      for p in $PATH; do
39698        if test -f "$p/$path" && test -x "$p/$path"; then
39699          new_path="$p/$path"
39700          break
39701        fi
39702      done
39703      IFS="$IFS_save"
39704    else
39705      # This is an absolute path, we can use it without further modifications.
39706      new_path="$path"
39707    fi
39708
39709    if test "x$new_path" = x; then
39710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39711$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39712      has_space=`$ECHO "$complete" | $GREP " "`
39713      if test "x$has_space" != x; then
39714        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39715$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39716      fi
39717      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39718    fi
39719  fi
39720
39721  # Now join together the path and the arguments once again
39722  if test "x$arguments" != xEOL; then
39723    new_complete="$new_path ${arguments% *}"
39724  else
39725    new_complete="$new_path"
39726  fi
39727
39728  if test "x$complete" != "x$new_complete"; then
39729    BUILD_CXX="$new_complete"
39730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39731$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39732  fi
39733
39734
39735
39736  # Publish this variable in the help.
39737
39738
39739  if test "x$BUILD_LD" = x; then
39740    # The variable is not set by user, try to locate tool using the code snippet
39741    for ac_prog in ld
39742do
39743  # Extract the first word of "$ac_prog", so it can be a program name with args.
39744set dummy $ac_prog; ac_word=$2
39745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39746$as_echo_n "checking for $ac_word... " >&6; }
39747if ${ac_cv_path_BUILD_LD+:} false; then :
39748  $as_echo_n "(cached) " >&6
39749else
39750  case $BUILD_LD in
39751  [\\/]* | ?:[\\/]*)
39752  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39753  ;;
39754  *)
39755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39756for as_dir in $PATH
39757do
39758  IFS=$as_save_IFS
39759  test -z "$as_dir" && as_dir=.
39760    for ac_exec_ext in '' $ac_executable_extensions; do
39761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39762    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39764    break 2
39765  fi
39766done
39767  done
39768IFS=$as_save_IFS
39769
39770  ;;
39771esac
39772fi
39773BUILD_LD=$ac_cv_path_BUILD_LD
39774if test -n "$BUILD_LD"; then
39775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39776$as_echo "$BUILD_LD" >&6; }
39777else
39778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39779$as_echo "no" >&6; }
39780fi
39781
39782
39783  test -n "$BUILD_LD" && break
39784done
39785
39786  else
39787    # The variable is set, but is it from the command line or the environment?
39788
39789    # Try to remove the string !BUILD_LD! from our list.
39790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39792      # If it failed, the variable was not from the command line. Ignore it,
39793      # but warn the user (except for BASH, which is always set by the calling BASH).
39794      if test "xBUILD_LD" != xBASH; then
39795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39796$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39797      fi
39798      # Try to locate tool using the code snippet
39799      for ac_prog in ld
39800do
39801  # Extract the first word of "$ac_prog", so it can be a program name with args.
39802set dummy $ac_prog; ac_word=$2
39803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39804$as_echo_n "checking for $ac_word... " >&6; }
39805if ${ac_cv_path_BUILD_LD+:} false; then :
39806  $as_echo_n "(cached) " >&6
39807else
39808  case $BUILD_LD in
39809  [\\/]* | ?:[\\/]*)
39810  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39811  ;;
39812  *)
39813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39814for as_dir in $PATH
39815do
39816  IFS=$as_save_IFS
39817  test -z "$as_dir" && as_dir=.
39818    for ac_exec_ext in '' $ac_executable_extensions; do
39819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39820    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39822    break 2
39823  fi
39824done
39825  done
39826IFS=$as_save_IFS
39827
39828  ;;
39829esac
39830fi
39831BUILD_LD=$ac_cv_path_BUILD_LD
39832if test -n "$BUILD_LD"; then
39833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39834$as_echo "$BUILD_LD" >&6; }
39835else
39836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39837$as_echo "no" >&6; }
39838fi
39839
39840
39841  test -n "$BUILD_LD" && break
39842done
39843
39844    else
39845      # If it succeeded, then it was overridden by the user. We will use it
39846      # for the tool.
39847
39848      # First remove it from the list of overridden variables, so we can test
39849      # for unknown variables in the end.
39850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39851
39852      # Check if the provided tool contains a complete path.
39853      tool_specified="$BUILD_LD"
39854      tool_basename="${tool_specified##*/}"
39855      if test "x$tool_basename" = "x$tool_specified"; then
39856        # A command without a complete path is provided, search $PATH.
39857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39858$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39859        # Extract the first word of "$tool_basename", so it can be a program name with args.
39860set dummy $tool_basename; ac_word=$2
39861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39862$as_echo_n "checking for $ac_word... " >&6; }
39863if ${ac_cv_path_BUILD_LD+:} false; then :
39864  $as_echo_n "(cached) " >&6
39865else
39866  case $BUILD_LD in
39867  [\\/]* | ?:[\\/]*)
39868  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39869  ;;
39870  *)
39871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39872for as_dir in $PATH
39873do
39874  IFS=$as_save_IFS
39875  test -z "$as_dir" && as_dir=.
39876    for ac_exec_ext in '' $ac_executable_extensions; do
39877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39878    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39880    break 2
39881  fi
39882done
39883  done
39884IFS=$as_save_IFS
39885
39886  ;;
39887esac
39888fi
39889BUILD_LD=$ac_cv_path_BUILD_LD
39890if test -n "$BUILD_LD"; then
39891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39892$as_echo "$BUILD_LD" >&6; }
39893else
39894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39895$as_echo "no" >&6; }
39896fi
39897
39898
39899        if test "x$BUILD_LD" = x; then
39900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39901        fi
39902      else
39903        # Otherwise we believe it is a complete path. Use it as it is.
39904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39905$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39907$as_echo_n "checking for BUILD_LD... " >&6; }
39908        if test ! -x "$tool_specified"; then
39909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39910$as_echo "not found" >&6; }
39911          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39912        fi
39913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39914$as_echo "$tool_specified" >&6; }
39915      fi
39916    fi
39917  fi
39918
39919
39920
39921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39922
39923  # First separate the path from the arguments. This will split at the first
39924  # space.
39925  complete="$BUILD_LD"
39926  path="${complete%% *}"
39927  tmp="$complete EOL"
39928  arguments="${tmp#* }"
39929
39930  # Input might be given as Windows format, start by converting to
39931  # unix format.
39932  new_path=`$CYGPATH -u "$path"`
39933
39934  # Now try to locate executable using which
39935  new_path=`$WHICH "$new_path" 2> /dev/null`
39936  # bat and cmd files are not always considered executable in cygwin causing which
39937  # to not find them
39938  if test "x$new_path" = x \
39939      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39940      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39941    new_path=`$CYGPATH -u "$path"`
39942  fi
39943  if test "x$new_path" = x; then
39944    # Oops. Which didn't find the executable.
39945    # The splitting of arguments from the executable at a space might have been incorrect,
39946    # since paths with space are more likely in Windows. Give it another try with the whole
39947    # argument.
39948    path="$complete"
39949    arguments="EOL"
39950    new_path=`$CYGPATH -u "$path"`
39951    new_path=`$WHICH "$new_path" 2> /dev/null`
39952    # bat and cmd files are not always considered executable in cygwin causing which
39953    # to not find them
39954    if test "x$new_path" = x \
39955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39957      new_path=`$CYGPATH -u "$path"`
39958    fi
39959    if test "x$new_path" = x; then
39960      # It's still not found. Now this is an unrecoverable error.
39961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39962$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39963      has_space=`$ECHO "$complete" | $GREP " "`
39964      if test "x$has_space" != x; then
39965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39967      fi
39968      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39969    fi
39970  fi
39971
39972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39975  # "foo.exe" is OK but "foo" is an error.
39976  #
39977  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39978  # It is also a way to make sure we got the proper file name for the real test later on.
39979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39980  if test "x$test_shortpath" = x; then
39981    # Short path failed, file does not exist as specified.
39982    # Try adding .exe or .cmd
39983    if test -f "${new_path}.exe"; then
39984      input_to_shortpath="${new_path}.exe"
39985    elif test -f "${new_path}.cmd"; then
39986      input_to_shortpath="${new_path}.cmd"
39987    else
39988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39989$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39990      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39991$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39992      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39993    fi
39994  else
39995    input_to_shortpath="$new_path"
39996  fi
39997
39998  # Call helper function which possibly converts this using DOS-style short mode.
39999  # If so, the updated path is stored in $new_path.
40000  new_path="$input_to_shortpath"
40001
40002  input_path="$input_to_shortpath"
40003  # Check if we need to convert this using DOS-style short mode. If the path
40004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40005  # take no chances and rewrite it.
40006  # Note: m4 eats our [], so we need to use [ and ] instead.
40007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40008  if test "x$has_forbidden_chars" != x; then
40009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40013      # Going to short mode and back again did indeed matter. Since short mode is
40014      # case insensitive, let's make it lowercase to improve readability.
40015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40016      # Now convert it back to Unix-stile (cygpath)
40017      input_path=`$CYGPATH -u "$shortmode_path"`
40018      new_path="$input_path"
40019    fi
40020  fi
40021
40022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40023  if test "x$test_cygdrive_prefix" = x; then
40024    # As a simple fix, exclude /usr/bin since it's not a real path.
40025    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40027      # a path prefixed by /cygdrive for fixpath to work.
40028      new_path="$CYGWIN_ROOT_PATH$input_path"
40029    fi
40030  fi
40031
40032  # remove trailing .exe if any
40033  new_path="${new_path/%.exe/}"
40034
40035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40036
40037  # First separate the path from the arguments. This will split at the first
40038  # space.
40039  complete="$BUILD_LD"
40040  path="${complete%% *}"
40041  tmp="$complete EOL"
40042  arguments="${tmp#* }"
40043
40044  # Input might be given as Windows format, start by converting to
40045  # unix format.
40046  new_path="$path"
40047
40048  windows_path="$new_path"
40049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40050    unix_path=`$CYGPATH -u "$windows_path"`
40051    new_path="$unix_path"
40052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40054    new_path="$unix_path"
40055  fi
40056
40057
40058  # Now try to locate executable using which
40059  new_path=`$WHICH "$new_path" 2> /dev/null`
40060
40061  if test "x$new_path" = x; then
40062    # Oops. Which didn't find the executable.
40063    # The splitting of arguments from the executable at a space might have been incorrect,
40064    # since paths with space are more likely in Windows. Give it another try with the whole
40065    # argument.
40066    path="$complete"
40067    arguments="EOL"
40068    new_path="$path"
40069
40070  windows_path="$new_path"
40071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40072    unix_path=`$CYGPATH -u "$windows_path"`
40073    new_path="$unix_path"
40074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40076    new_path="$unix_path"
40077  fi
40078
40079
40080    new_path=`$WHICH "$new_path" 2> /dev/null`
40081
40082    if test "x$new_path" = x; then
40083      # It's still not found. Now this is an unrecoverable error.
40084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40085$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40086      has_space=`$ECHO "$complete" | $GREP " "`
40087      if test "x$has_space" != x; then
40088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40090      fi
40091      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40092    fi
40093  fi
40094
40095  # Now new_path has a complete unix path to the binary
40096  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40097    # Keep paths in /bin as-is, but remove trailing .exe if any
40098    new_path="${new_path/%.exe/}"
40099    # Do not save /bin paths to all_fixpath_prefixes!
40100  else
40101    # Not in mixed or Windows style, start by that.
40102    new_path=`cmd //c echo $new_path`
40103
40104  input_path="$new_path"
40105  # Check if we need to convert this using DOS-style short mode. If the path
40106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40107  # take no chances and rewrite it.
40108  # Note: m4 eats our [], so we need to use [ and ] instead.
40109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40110  if test "x$has_forbidden_chars" != x; then
40111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40113  fi
40114
40115    # Output is in $new_path
40116
40117  windows_path="$new_path"
40118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40119    unix_path=`$CYGPATH -u "$windows_path"`
40120    new_path="$unix_path"
40121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40123    new_path="$unix_path"
40124  fi
40125
40126    # remove trailing .exe if any
40127    new_path="${new_path/%.exe/}"
40128
40129    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40130    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40131  fi
40132
40133  else
40134    # We're on a posix platform. Hooray! :)
40135    # First separate the path from the arguments. This will split at the first
40136    # space.
40137    complete="$BUILD_LD"
40138    path="${complete%% *}"
40139    tmp="$complete EOL"
40140    arguments="${tmp#* }"
40141
40142    # Cannot rely on the command "which" here since it doesn't always work.
40143    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40144    if test -z "$is_absolute_path"; then
40145      # Path to executable is not absolute. Find it.
40146      IFS_save="$IFS"
40147      IFS=:
40148      for p in $PATH; do
40149        if test -f "$p/$path" && test -x "$p/$path"; then
40150          new_path="$p/$path"
40151          break
40152        fi
40153      done
40154      IFS="$IFS_save"
40155    else
40156      # This is an absolute path, we can use it without further modifications.
40157      new_path="$path"
40158    fi
40159
40160    if test "x$new_path" = x; then
40161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40162$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40163      has_space=`$ECHO "$complete" | $GREP " "`
40164      if test "x$has_space" != x; then
40165        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40166$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40167      fi
40168      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40169    fi
40170  fi
40171
40172  # Now join together the path and the arguments once again
40173  if test "x$arguments" != xEOL; then
40174    new_complete="$new_path ${arguments% *}"
40175  else
40176    new_complete="$new_path"
40177  fi
40178
40179  if test "x$complete" != "x$new_complete"; then
40180    BUILD_LD="$new_complete"
40181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40182$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40183  fi
40184
40185  else
40186    # If we are not cross compiling, use the normal target compilers for
40187    # building the build platform executables.
40188    BUILD_CC="$CC"
40189    BUILD_CXX="$CXX"
40190    BUILD_LD="$LD"
40191  fi
40192
40193
40194
40195
40196
40197
40198  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40199    # For hotspot, we need these in Windows mixed path,
40200    # so rewrite them all. Need added .exe suffix.
40201    HOTSPOT_CXX="$CXX.exe"
40202    HOTSPOT_LD="$LD.exe"
40203    HOTSPOT_MT="$MT.exe"
40204    HOTSPOT_RC="$RC.exe"
40205
40206  unix_path="$HOTSPOT_CXX"
40207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40208    windows_path=`$CYGPATH -m "$unix_path"`
40209    HOTSPOT_CXX="$windows_path"
40210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40211    windows_path=`cmd //c echo $unix_path`
40212    HOTSPOT_CXX="$windows_path"
40213  fi
40214
40215
40216  unix_path="$HOTSPOT_LD"
40217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40218    windows_path=`$CYGPATH -m "$unix_path"`
40219    HOTSPOT_LD="$windows_path"
40220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40221    windows_path=`cmd //c echo $unix_path`
40222    HOTSPOT_LD="$windows_path"
40223  fi
40224
40225
40226  unix_path="$HOTSPOT_MT"
40227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228    windows_path=`$CYGPATH -m "$unix_path"`
40229    HOTSPOT_MT="$windows_path"
40230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231    windows_path=`cmd //c echo $unix_path`
40232    HOTSPOT_MT="$windows_path"
40233  fi
40234
40235
40236  unix_path="$HOTSPOT_RC"
40237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40238    windows_path=`$CYGPATH -m "$unix_path"`
40239    HOTSPOT_RC="$windows_path"
40240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40241    windows_path=`cmd //c echo $unix_path`
40242    HOTSPOT_RC="$windows_path"
40243  fi
40244
40245
40246
40247  else
40248    HOTSPOT_CXX="$CXX"
40249    HOTSPOT_LD="$LD"
40250  fi
40251
40252
40253
40254  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40255    USE_CLANG=true
40256  fi
40257
40258
40259  # LDEXE is the linker to use, when creating executables. Not really used.
40260  # FIXME: These should just be removed!
40261  LDEXE="$LD"
40262  LDEXECXX="$LDCXX"
40263
40264
40265
40266
40267  # The package path is used only on macosx?
40268  # FIXME: clean this up, and/or move it elsewhere.
40269  PACKAGE_PATH=/opt/local
40270
40271
40272  # Check for extra potential brokenness.
40273  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40274    # On Windows, double-check that we got the right compiler.
40275    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40276    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40277    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40278      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40279        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40280      fi
40281    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40282      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40283        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40284      fi
40285    fi
40286  fi
40287
40288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40289    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40290    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40291    # This is later checked when setting flags.
40292  fi
40293
40294  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40295  # in executable.'
40296  USING_BROKEN_SUSE_LD=no
40297  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40299$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40300    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40301    echo "int main() { }" > main.c
40302    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40304$as_echo "no" >&6; }
40305      USING_BROKEN_SUSE_LD=no
40306    else
40307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40308$as_echo "yes" >&6; }
40309      USING_BROKEN_SUSE_LD=yes
40310    fi
40311    rm -rf version-script.map main.c a.out
40312  fi
40313
40314
40315
40316# Setup the JTReg Regression Test Harness.
40317
40318
40319# Check whether --with-jtreg was given.
40320if test "${with_jtreg+set}" = set; then :
40321  withval=$with_jtreg;
40322else
40323  with_jtreg=no
40324fi
40325
40326
40327  if test "x$with_jtreg" = xno; then
40328    # jtreg disabled
40329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40330$as_echo_n "checking for jtreg... " >&6; }
40331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40332$as_echo "no" >&6; }
40333  else
40334    if test "x$with_jtreg" != xyes; then
40335      # with path specified.
40336      JT_HOME="$with_jtreg"
40337    fi
40338
40339    if test "x$JT_HOME" != x; then
40340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40341$as_echo_n "checking for jtreg... " >&6; }
40342
40343      # use JT_HOME enviroment var.
40344
40345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40346
40347  # Input might be given as Windows format, start by converting to
40348  # unix format.
40349  path="$JT_HOME"
40350  new_path=`$CYGPATH -u "$path"`
40351
40352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40355  # "foo.exe" is OK but "foo" is an error.
40356  #
40357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40358  # It is also a way to make sure we got the proper file name for the real test later on.
40359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40360  if test "x$test_shortpath" = x; then
40361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40362$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40363    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40364  fi
40365
40366  # Call helper function which possibly converts this using DOS-style short mode.
40367  # If so, the updated path is stored in $new_path.
40368
40369  input_path="$new_path"
40370  # Check if we need to convert this using DOS-style short mode. If the path
40371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40372  # take no chances and rewrite it.
40373  # Note: m4 eats our [], so we need to use [ and ] instead.
40374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40375  if test "x$has_forbidden_chars" != x; then
40376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40380      # Going to short mode and back again did indeed matter. Since short mode is
40381      # case insensitive, let's make it lowercase to improve readability.
40382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40383      # Now convert it back to Unix-stile (cygpath)
40384      input_path=`$CYGPATH -u "$shortmode_path"`
40385      new_path="$input_path"
40386    fi
40387  fi
40388
40389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40390  if test "x$test_cygdrive_prefix" = x; then
40391    # As a simple fix, exclude /usr/bin since it's not a real path.
40392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40394      # a path prefixed by /cygdrive for fixpath to work.
40395      new_path="$CYGWIN_ROOT_PATH$input_path"
40396    fi
40397  fi
40398
40399
40400  if test "x$path" != "x$new_path"; then
40401    JT_HOME="$new_path"
40402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40403$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40404  fi
40405
40406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407
40408  path="$JT_HOME"
40409  has_colon=`$ECHO $path | $GREP ^.:`
40410  new_path="$path"
40411  if test "x$has_colon" = x; then
40412    # Not in mixed or Windows style, start by that.
40413    new_path=`cmd //c echo $path`
40414  fi
40415
40416
40417  input_path="$new_path"
40418  # Check if we need to convert this using DOS-style short mode. If the path
40419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40420  # take no chances and rewrite it.
40421  # Note: m4 eats our [], so we need to use [ and ] instead.
40422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40423  if test "x$has_forbidden_chars" != x; then
40424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40426  fi
40427
40428
40429  windows_path="$new_path"
40430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40431    unix_path=`$CYGPATH -u "$windows_path"`
40432    new_path="$unix_path"
40433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40435    new_path="$unix_path"
40436  fi
40437
40438  if test "x$path" != "x$new_path"; then
40439    JT_HOME="$new_path"
40440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40441$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40442  fi
40443
40444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40446
40447  else
40448    # We're on a posix platform. Hooray! :)
40449    path="$JT_HOME"
40450    has_space=`$ECHO "$path" | $GREP " "`
40451    if test "x$has_space" != x; then
40452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40453$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40454      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40455    fi
40456
40457    # Use eval to expand a potential ~
40458    eval path="$path"
40459    if test ! -f "$path" && test ! -d "$path"; then
40460      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40461    fi
40462
40463    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40464  fi
40465
40466
40467      # jtreg win32 script works for everybody
40468      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40469
40470      if test ! -f "$JTREGEXE"; then
40471        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40472      fi
40473
40474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40475$as_echo "$JTREGEXE" >&6; }
40476    else
40477      # try to find jtreg on path
40478
40479
40480
40481  # Publish this variable in the help.
40482
40483
40484  if test "x$JTREGEXE" = x; then
40485    # The variable is not set by user, try to locate tool using the code snippet
40486    for ac_prog in jtreg
40487do
40488  # Extract the first word of "$ac_prog", so it can be a program name with args.
40489set dummy $ac_prog; ac_word=$2
40490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40491$as_echo_n "checking for $ac_word... " >&6; }
40492if ${ac_cv_path_JTREGEXE+:} false; then :
40493  $as_echo_n "(cached) " >&6
40494else
40495  case $JTREGEXE in
40496  [\\/]* | ?:[\\/]*)
40497  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40498  ;;
40499  *)
40500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40501for as_dir in $PATH
40502do
40503  IFS=$as_save_IFS
40504  test -z "$as_dir" && as_dir=.
40505    for ac_exec_ext in '' $ac_executable_extensions; do
40506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40507    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40509    break 2
40510  fi
40511done
40512  done
40513IFS=$as_save_IFS
40514
40515  ;;
40516esac
40517fi
40518JTREGEXE=$ac_cv_path_JTREGEXE
40519if test -n "$JTREGEXE"; then
40520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40521$as_echo "$JTREGEXE" >&6; }
40522else
40523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40524$as_echo "no" >&6; }
40525fi
40526
40527
40528  test -n "$JTREGEXE" && break
40529done
40530
40531  else
40532    # The variable is set, but is it from the command line or the environment?
40533
40534    # Try to remove the string !JTREGEXE! from our list.
40535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40537      # If it failed, the variable was not from the command line. Ignore it,
40538      # but warn the user (except for BASH, which is always set by the calling BASH).
40539      if test "xJTREGEXE" != xBASH; then
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40541$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40542      fi
40543      # Try to locate tool using the code snippet
40544      for ac_prog in jtreg
40545do
40546  # Extract the first word of "$ac_prog", so it can be a program name with args.
40547set dummy $ac_prog; ac_word=$2
40548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40549$as_echo_n "checking for $ac_word... " >&6; }
40550if ${ac_cv_path_JTREGEXE+:} false; then :
40551  $as_echo_n "(cached) " >&6
40552else
40553  case $JTREGEXE in
40554  [\\/]* | ?:[\\/]*)
40555  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40556  ;;
40557  *)
40558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40559for as_dir in $PATH
40560do
40561  IFS=$as_save_IFS
40562  test -z "$as_dir" && as_dir=.
40563    for ac_exec_ext in '' $ac_executable_extensions; do
40564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40565    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40567    break 2
40568  fi
40569done
40570  done
40571IFS=$as_save_IFS
40572
40573  ;;
40574esac
40575fi
40576JTREGEXE=$ac_cv_path_JTREGEXE
40577if test -n "$JTREGEXE"; then
40578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40579$as_echo "$JTREGEXE" >&6; }
40580else
40581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40582$as_echo "no" >&6; }
40583fi
40584
40585
40586  test -n "$JTREGEXE" && break
40587done
40588
40589    else
40590      # If it succeeded, then it was overridden by the user. We will use it
40591      # for the tool.
40592
40593      # First remove it from the list of overridden variables, so we can test
40594      # for unknown variables in the end.
40595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40596
40597      # Check if the provided tool contains a complete path.
40598      tool_specified="$JTREGEXE"
40599      tool_basename="${tool_specified##*/}"
40600      if test "x$tool_basename" = "x$tool_specified"; then
40601        # A command without a complete path is provided, search $PATH.
40602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40603$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40604        # Extract the first word of "$tool_basename", so it can be a program name with args.
40605set dummy $tool_basename; ac_word=$2
40606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40607$as_echo_n "checking for $ac_word... " >&6; }
40608if ${ac_cv_path_JTREGEXE+:} false; then :
40609  $as_echo_n "(cached) " >&6
40610else
40611  case $JTREGEXE in
40612  [\\/]* | ?:[\\/]*)
40613  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40614  ;;
40615  *)
40616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40617for as_dir in $PATH
40618do
40619  IFS=$as_save_IFS
40620  test -z "$as_dir" && as_dir=.
40621    for ac_exec_ext in '' $ac_executable_extensions; do
40622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40623    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40625    break 2
40626  fi
40627done
40628  done
40629IFS=$as_save_IFS
40630
40631  ;;
40632esac
40633fi
40634JTREGEXE=$ac_cv_path_JTREGEXE
40635if test -n "$JTREGEXE"; then
40636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40637$as_echo "$JTREGEXE" >&6; }
40638else
40639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40640$as_echo "no" >&6; }
40641fi
40642
40643
40644        if test "x$JTREGEXE" = x; then
40645          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40646        fi
40647      else
40648        # Otherwise we believe it is a complete path. Use it as it is.
40649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40650$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40652$as_echo_n "checking for JTREGEXE... " >&6; }
40653        if test ! -x "$tool_specified"; then
40654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40655$as_echo "not found" >&6; }
40656          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40657        fi
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40659$as_echo "$tool_specified" >&6; }
40660      fi
40661    fi
40662  fi
40663
40664
40665
40666  if test "x$JTREGEXE" = x; then
40667    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40668  fi
40669
40670
40671      JT_HOME="`$DIRNAME $JTREGEXE`"
40672    fi
40673  fi
40674
40675
40676
40677
40678
40679
40680  # Option used to tell the compiler whether to create 32- or 64-bit executables
40681  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40682    COMPILER_TARGET_BITS_FLAG="-q"
40683  else
40684    COMPILER_TARGET_BITS_FLAG="-m"
40685  fi
40686
40687
40688  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40689  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40690    ARFLAGS="-r"
40691  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40692    ARFLAGS="-X64"
40693  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40694    # lib.exe is used as AR to create static libraries.
40695    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40696  else
40697    ARFLAGS=""
40698  fi
40699
40700
40701  ## Setup strip.
40702  # FIXME: should this really be per platform, or should it be per toolchain type?
40703  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40704  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40705  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40706    STRIPFLAGS="-g"
40707  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40708    STRIPFLAGS="-x"
40709  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40710    STRIPFLAGS="-S"
40711  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40712    STRIPFLAGS="-X32_64"
40713  fi
40714
40715  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40716    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40717  fi
40718
40719
40720  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40721    # FIXME: break out into MCSFLAGS
40722    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40723  fi
40724
40725
40726  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40727    CC_OUT_OPTION=-Fo
40728    EXE_OUT_OPTION=-out:
40729    LD_OUT_OPTION=-out:
40730    AR_OUT_OPTION=-out:
40731  else
40732    # The option used to specify the target .o,.a or .so file.
40733    # When compiling, how to specify the to be created object file.
40734    CC_OUT_OPTION='-o$(SPACE)'
40735    # When linking, how to specify the to be created executable.
40736    EXE_OUT_OPTION='-o$(SPACE)'
40737    # When linking, how to specify the to be created dynamically linkable library.
40738    LD_OUT_OPTION='-o$(SPACE)'
40739    # When archiving, how to specify the to be create static archive for object files.
40740    AR_OUT_OPTION='rcs$(SPACE)'
40741  fi
40742
40743
40744
40745
40746
40747  # On Windows, we need to set RC flags.
40748  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40749    RC_FLAGS="-nologo -l 0x409 -r"
40750    if test "x$VARIANT" = xOPT; then
40751      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40752    fi
40753
40754    # The version variables used to create RC_FLAGS may be overridden
40755    # in a custom configure script, or possibly the command line.
40756    # Let those variables be expanded at make time in spec.gmk.
40757    # The \$ are escaped to the shell, and the $(...) variables
40758    # are evaluated by make.
40759    RC_FLAGS="$RC_FLAGS \
40760        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40761        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40762        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40763        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40764        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40765        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40766        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40767  fi
40768
40769
40770  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40771    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40772    CCXXFLAGS="$CCXXFLAGS -nologo"
40773  fi
40774
40775
40776# FIXME: Currently we must test this after toolchain but before flags. Fix!
40777
40778# Now we can test some aspects on the target using configure macros.
40779
40780
40781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40782$as_echo_n "checking for ANSI C header files... " >&6; }
40783if ${ac_cv_header_stdc+:} false; then :
40784  $as_echo_n "(cached) " >&6
40785else
40786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40787/* end confdefs.h.  */
40788#include <stdlib.h>
40789#include <stdarg.h>
40790#include <string.h>
40791#include <float.h>
40792
40793int
40794main ()
40795{
40796
40797  ;
40798  return 0;
40799}
40800_ACEOF
40801if ac_fn_cxx_try_compile "$LINENO"; then :
40802  ac_cv_header_stdc=yes
40803else
40804  ac_cv_header_stdc=no
40805fi
40806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40807
40808if test $ac_cv_header_stdc = yes; then
40809  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40811/* end confdefs.h.  */
40812#include <string.h>
40813
40814_ACEOF
40815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40816  $EGREP "memchr" >/dev/null 2>&1; then :
40817
40818else
40819  ac_cv_header_stdc=no
40820fi
40821rm -f conftest*
40822
40823fi
40824
40825if test $ac_cv_header_stdc = yes; then
40826  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40828/* end confdefs.h.  */
40829#include <stdlib.h>
40830
40831_ACEOF
40832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40833  $EGREP "free" >/dev/null 2>&1; then :
40834
40835else
40836  ac_cv_header_stdc=no
40837fi
40838rm -f conftest*
40839
40840fi
40841
40842if test $ac_cv_header_stdc = yes; then
40843  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40844  if test "$cross_compiling" = yes; then :
40845  :
40846else
40847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40848/* end confdefs.h.  */
40849#include <ctype.h>
40850#include <stdlib.h>
40851#if ((' ' & 0x0FF) == 0x020)
40852# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40853# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40854#else
40855# define ISLOWER(c) \
40856		   (('a' <= (c) && (c) <= 'i') \
40857		     || ('j' <= (c) && (c) <= 'r') \
40858		     || ('s' <= (c) && (c) <= 'z'))
40859# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40860#endif
40861
40862#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40863int
40864main ()
40865{
40866  int i;
40867  for (i = 0; i < 256; i++)
40868    if (XOR (islower (i), ISLOWER (i))
40869	|| toupper (i) != TOUPPER (i))
40870      return 2;
40871  return 0;
40872}
40873_ACEOF
40874if ac_fn_cxx_try_run "$LINENO"; then :
40875
40876else
40877  ac_cv_header_stdc=no
40878fi
40879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40880  conftest.$ac_objext conftest.beam conftest.$ac_ext
40881fi
40882
40883fi
40884fi
40885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40886$as_echo "$ac_cv_header_stdc" >&6; }
40887if test $ac_cv_header_stdc = yes; then
40888
40889$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40890
40891fi
40892
40893# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40894for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40895		  inttypes.h stdint.h unistd.h
40896do :
40897  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40898ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40899"
40900if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40901  cat >>confdefs.h <<_ACEOF
40902#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40903_ACEOF
40904
40905fi
40906
40907done
40908
40909
40910
40911  ###############################################################################
40912  #
40913  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40914  # (The JVM can use 32 or 64 bit Java pointers but that decision
40915  # is made at runtime.)
40916  #
40917
40918  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40919    # Always specify -m flag on Solaris
40920    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40921
40922  # When we add flags to the "official" CFLAGS etc, we need to
40923  # keep track of these additions in ADDED_CFLAGS etc. These
40924  # will later be checked to make sure only controlled additions
40925  # have been made to CFLAGS etc.
40926  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40927  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40928  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40929
40930  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40931  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40932  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40933
40934  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40935  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40936  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40937
40938  elif test "x$COMPILE_TYPE" = xreduced; then
40939    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40940      # Specify -m if running reduced on other Posix platforms
40941
40942  # When we add flags to the "official" CFLAGS etc, we need to
40943  # keep track of these additions in ADDED_CFLAGS etc. These
40944  # will later be checked to make sure only controlled additions
40945  # have been made to CFLAGS etc.
40946  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40947  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40948  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40949
40950  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40951  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40952  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40953
40954  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40955  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40956  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40957
40958    fi
40959  fi
40960
40961  # Make compilation sanity check
40962  for ac_header in stdio.h
40963do :
40964  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40965if test "x$ac_cv_header_stdio_h" = xyes; then :
40966  cat >>confdefs.h <<_ACEOF
40967#define HAVE_STDIO_H 1
40968_ACEOF
40969
40970else
40971
40972    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40973$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40974    if test "x$COMPILE_TYPE" = xreduced; then
40975      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40976$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40977    elif test "x$COMPILE_TYPE" = xcross; then
40978      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40979$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40980    fi
40981    as_fn_error $? "Cannot continue." "$LINENO" 5
40982
40983fi
40984
40985done
40986
40987
40988  # The cast to long int works around a bug in the HP C Compiler
40989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40991# This bug is HP SR number 8606223364.
40992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40993$as_echo_n "checking size of int *... " >&6; }
40994if ${ac_cv_sizeof_int_p+:} false; then :
40995  $as_echo_n "(cached) " >&6
40996else
40997  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40998
40999else
41000  if test "$ac_cv_type_int_p" = yes; then
41001     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41003as_fn_error 77 "cannot compute sizeof (int *)
41004See \`config.log' for more details" "$LINENO" 5; }
41005   else
41006     ac_cv_sizeof_int_p=0
41007   fi
41008fi
41009
41010fi
41011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41012$as_echo "$ac_cv_sizeof_int_p" >&6; }
41013
41014
41015
41016cat >>confdefs.h <<_ACEOF
41017#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41018_ACEOF
41019
41020
41021
41022  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41023  if test "x$ac_cv_sizeof_int_p" = x; then
41024    # The test failed, lets stick to the assumed value.
41025    { $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
41026$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41027  else
41028    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41029
41030    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41031      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41032      # Let's try to implicitely set the compilers target architecture and retry the test
41033      { $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
41034$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;}
41035      { $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
41036$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;}
41037
41038  # When we add flags to the "official" CFLAGS etc, we need to
41039  # keep track of these additions in ADDED_CFLAGS etc. These
41040  # will later be checked to make sure only controlled additions
41041  # have been made to CFLAGS etc.
41042  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41043  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41044  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41045
41046  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41047  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41048  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41049
41050  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41051  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41052  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41053
41054
41055      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41056      unset ac_cv_sizeof_int_p
41057      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41058      cat >>confdefs.h <<_ACEOF
41059#undef SIZEOF_INT_P
41060_ACEOF
41061
41062      # The cast to long int works around a bug in the HP C Compiler
41063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41065# This bug is HP SR number 8606223364.
41066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41067$as_echo_n "checking size of int *... " >&6; }
41068if ${ac_cv_sizeof_int_p+:} false; then :
41069  $as_echo_n "(cached) " >&6
41070else
41071  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41072
41073else
41074  if test "$ac_cv_type_int_p" = yes; then
41075     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41077as_fn_error 77 "cannot compute sizeof (int *)
41078See \`config.log' for more details" "$LINENO" 5; }
41079   else
41080     ac_cv_sizeof_int_p=0
41081   fi
41082fi
41083
41084fi
41085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41086$as_echo "$ac_cv_sizeof_int_p" >&6; }
41087
41088
41089
41090cat >>confdefs.h <<_ACEOF
41091#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41092_ACEOF
41093
41094
41095
41096      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41097
41098      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41099        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
41100      fi
41101    fi
41102  fi
41103
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41105$as_echo_n "checking for target address size... " >&6; }
41106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41107$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41108
41109
41110  ###############################################################################
41111  #
41112  # Is the target little of big endian?
41113  #
41114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41115$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41116if ${ac_cv_c_bigendian+:} false; then :
41117  $as_echo_n "(cached) " >&6
41118else
41119  ac_cv_c_bigendian=unknown
41120    # See if we're dealing with a universal compiler.
41121    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41122/* end confdefs.h.  */
41123#ifndef __APPLE_CC__
41124	       not a universal capable compiler
41125	     #endif
41126	     typedef int dummy;
41127
41128_ACEOF
41129if ac_fn_cxx_try_compile "$LINENO"; then :
41130
41131	# Check for potential -arch flags.  It is not universal unless
41132	# there are at least two -arch flags with different values.
41133	ac_arch=
41134	ac_prev=
41135	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41136	 if test -n "$ac_prev"; then
41137	   case $ac_word in
41138	     i?86 | x86_64 | ppc | ppc64)
41139	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41140		 ac_arch=$ac_word
41141	       else
41142		 ac_cv_c_bigendian=universal
41143		 break
41144	       fi
41145	       ;;
41146	   esac
41147	   ac_prev=
41148	 elif test "x$ac_word" = "x-arch"; then
41149	   ac_prev=arch
41150	 fi
41151       done
41152fi
41153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41154    if test $ac_cv_c_bigendian = unknown; then
41155      # See if sys/param.h defines the BYTE_ORDER macro.
41156      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41157/* end confdefs.h.  */
41158#include <sys/types.h>
41159	     #include <sys/param.h>
41160
41161int
41162main ()
41163{
41164#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41165		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41166		     && LITTLE_ENDIAN)
41167	      bogus endian macros
41168	     #endif
41169
41170  ;
41171  return 0;
41172}
41173_ACEOF
41174if ac_fn_cxx_try_compile "$LINENO"; then :
41175  # It does; now see whether it defined to BIG_ENDIAN or not.
41176	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41177/* end confdefs.h.  */
41178#include <sys/types.h>
41179		#include <sys/param.h>
41180
41181int
41182main ()
41183{
41184#if BYTE_ORDER != BIG_ENDIAN
41185		 not big endian
41186		#endif
41187
41188  ;
41189  return 0;
41190}
41191_ACEOF
41192if ac_fn_cxx_try_compile "$LINENO"; then :
41193  ac_cv_c_bigendian=yes
41194else
41195  ac_cv_c_bigendian=no
41196fi
41197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41198fi
41199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41200    fi
41201    if test $ac_cv_c_bigendian = unknown; then
41202      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41203      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41204/* end confdefs.h.  */
41205#include <limits.h>
41206
41207int
41208main ()
41209{
41210#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41211	      bogus endian macros
41212	     #endif
41213
41214  ;
41215  return 0;
41216}
41217_ACEOF
41218if ac_fn_cxx_try_compile "$LINENO"; then :
41219  # It does; now see whether it defined to _BIG_ENDIAN or not.
41220	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41221/* end confdefs.h.  */
41222#include <limits.h>
41223
41224int
41225main ()
41226{
41227#ifndef _BIG_ENDIAN
41228		 not big endian
41229		#endif
41230
41231  ;
41232  return 0;
41233}
41234_ACEOF
41235if ac_fn_cxx_try_compile "$LINENO"; then :
41236  ac_cv_c_bigendian=yes
41237else
41238  ac_cv_c_bigendian=no
41239fi
41240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41241fi
41242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41243    fi
41244    if test $ac_cv_c_bigendian = unknown; then
41245      # Compile a test program.
41246      if test "$cross_compiling" = yes; then :
41247  # Try to guess by grepping values from an object file.
41248	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41249/* end confdefs.h.  */
41250short int ascii_mm[] =
41251		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41252		short int ascii_ii[] =
41253		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41254		int use_ascii (int i) {
41255		  return ascii_mm[i] + ascii_ii[i];
41256		}
41257		short int ebcdic_ii[] =
41258		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41259		short int ebcdic_mm[] =
41260		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41261		int use_ebcdic (int i) {
41262		  return ebcdic_mm[i] + ebcdic_ii[i];
41263		}
41264		extern int foo;
41265
41266int
41267main ()
41268{
41269return use_ascii (foo) == use_ebcdic (foo);
41270  ;
41271  return 0;
41272}
41273_ACEOF
41274if ac_fn_cxx_try_compile "$LINENO"; then :
41275  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41276	      ac_cv_c_bigendian=yes
41277	    fi
41278	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41279	      if test "$ac_cv_c_bigendian" = unknown; then
41280		ac_cv_c_bigendian=no
41281	      else
41282		# finding both strings is unlikely to happen, but who knows?
41283		ac_cv_c_bigendian=unknown
41284	      fi
41285	    fi
41286fi
41287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41288else
41289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41290/* end confdefs.h.  */
41291$ac_includes_default
41292int
41293main ()
41294{
41295
41296	     /* Are we little or big endian?  From Harbison&Steele.  */
41297	     union
41298	     {
41299	       long int l;
41300	       char c[sizeof (long int)];
41301	     } u;
41302	     u.l = 1;
41303	     return u.c[sizeof (long int) - 1] == 1;
41304
41305  ;
41306  return 0;
41307}
41308_ACEOF
41309if ac_fn_cxx_try_run "$LINENO"; then :
41310  ac_cv_c_bigendian=no
41311else
41312  ac_cv_c_bigendian=yes
41313fi
41314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41315  conftest.$ac_objext conftest.beam conftest.$ac_ext
41316fi
41317
41318    fi
41319fi
41320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41321$as_echo "$ac_cv_c_bigendian" >&6; }
41322 case $ac_cv_c_bigendian in #(
41323   yes)
41324     ENDIAN="big";; #(
41325   no)
41326     ENDIAN="little" ;; #(
41327   universal)
41328     ENDIAN="universal_endianness"
41329     ;; #(
41330   *)
41331     ENDIAN="unknown" ;;
41332 esac
41333
41334
41335  if test "x$ENDIAN" = xuniversal_endianness; then
41336    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41337  fi
41338  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41339    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
41340  fi
41341
41342
41343# Configure flags for the tools
41344
41345  ###############################################################################
41346  #
41347  # How to compile shared libraries.
41348  #
41349
41350  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41351    PICFLAG="-fPIC"
41352    C_FLAG_REORDER=''
41353    CXX_FLAG_REORDER=''
41354
41355    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41356      # Linking is different on MacOSX
41357      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41358      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41359      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41360      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41361      SET_SHARED_LIBRARY_MAPFILE=''
41362    else
41363      # Default works for linux, might work on other platforms as well.
41364      SHARED_LIBRARY_FLAGS='-shared'
41365      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41366      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41367      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41368      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41369    fi
41370  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41371    PICFLAG=''
41372    C_FLAG_REORDER=''
41373    CXX_FLAG_REORDER=''
41374
41375    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41376      # Linking is different on MacOSX
41377      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41378      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41379      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41380      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41381      SET_SHARED_LIBRARY_MAPFILE=''
41382    else
41383      # Default works for linux, might work on other platforms as well.
41384      SHARED_LIBRARY_FLAGS='-shared'
41385      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41386      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41387      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41388      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41389    fi
41390  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41391    PICFLAG="-KPIC"
41392    C_FLAG_REORDER='-xF'
41393    CXX_FLAG_REORDER='-xF'
41394    SHARED_LIBRARY_FLAGS="-G"
41395    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41396    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41397    SET_SHARED_LIBRARY_NAME=''
41398    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41399  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41400    PICFLAG="-qpic=large"
41401    C_FLAG_REORDER=''
41402    CXX_FLAG_REORDER=''
41403    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41404    SET_EXECUTABLE_ORIGIN=""
41405    SET_SHARED_LIBRARY_ORIGIN=''
41406    SET_SHARED_LIBRARY_NAME=''
41407    SET_SHARED_LIBRARY_MAPFILE=''
41408  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41409    PICFLAG=""
41410    C_FLAG_REORDER=''
41411    CXX_FLAG_REORDER=''
41412    SHARED_LIBRARY_FLAGS="-LD"
41413    SET_EXECUTABLE_ORIGIN=''
41414    SET_SHARED_LIBRARY_ORIGIN=''
41415    SET_SHARED_LIBRARY_NAME=''
41416    SET_SHARED_LIBRARY_MAPFILE=''
41417  fi
41418
41419
41420
41421
41422
41423
41424
41425
41426
41427  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41428    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41429    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41430    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41431  fi
41432  # The (cross) compiler is now configured, we can now test capabilities
41433  # of the target platform.
41434
41435
41436
41437  ###############################################################################
41438  #
41439  # Setup the opt flags for different compilers
41440  # and different operating systems.
41441  #
41442
41443  # FIXME: this was indirectly the old default, but just inherited.
41444  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41445  #   C_FLAG_DEPS="-MMD -MF"
41446  # fi
41447
41448  # Generate make dependency files
41449  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41450    C_FLAG_DEPS="-MMD -MF"
41451  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41452    C_FLAG_DEPS="-MMD -MF"
41453  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41454    C_FLAG_DEPS="-xMMD -xMF"
41455  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41456    C_FLAG_DEPS="-qmakedep=gcc -MF"
41457  fi
41458  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41459
41460
41461
41462  # Debug symbols
41463  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41464    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41465      CFLAGS_DEBUG_SYMBOLS="-g1"
41466      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41467    else
41468      CFLAGS_DEBUG_SYMBOLS="-g"
41469      CXXFLAGS_DEBUG_SYMBOLS="-g"
41470    fi
41471  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41472    CFLAGS_DEBUG_SYMBOLS="-g"
41473    CXXFLAGS_DEBUG_SYMBOLS="-g"
41474  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41475    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41476    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41477  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41478    CFLAGS_DEBUG_SYMBOLS="-g"
41479    CXXFLAGS_DEBUG_SYMBOLS="-g"
41480  fi
41481
41482
41483
41484  # Optimization levels
41485  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41486    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41487
41488    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41489      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41490      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41491      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41492      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41493      C_O_FLAG_NONE="-xregs=no%frameptr"
41494      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41495      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41496      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41497      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41498      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41499        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41500        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41501      fi
41502    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41503      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41504      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41505      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41506      C_O_FLAG_NONE=""
41507      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41508      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41509      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41510      CXX_O_FLAG_NONE=""
41511    fi
41512  else
41513    # The remaining toolchains share opt flags between CC and CXX;
41514    # setup for C and duplicate afterwards.
41515    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41516      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41517        # On MacOSX we optimize for size, something
41518        # we should do for all platforms?
41519        C_O_FLAG_HIGHEST="-Os"
41520        C_O_FLAG_HI="-Os"
41521        C_O_FLAG_NORM="-Os"
41522        C_O_FLAG_NONE=""
41523      else
41524        C_O_FLAG_HIGHEST="-O3"
41525        C_O_FLAG_HI="-O3"
41526        C_O_FLAG_NORM="-O2"
41527        C_O_FLAG_NONE="-O0"
41528      fi
41529    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41530      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41531        # On MacOSX we optimize for size, something
41532        # we should do for all platforms?
41533        C_O_FLAG_HIGHEST="-Os"
41534        C_O_FLAG_HI="-Os"
41535        C_O_FLAG_NORM="-Os"
41536        C_O_FLAG_NONE=""
41537      else
41538        C_O_FLAG_HIGHEST="-O3"
41539        C_O_FLAG_HI="-O3"
41540        C_O_FLAG_NORM="-O2"
41541        C_O_FLAG_NONE="-O0"
41542      fi
41543    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41544      C_O_FLAG_HIGHEST="-O3"
41545      C_O_FLAG_HI="-O3 -qstrict"
41546      C_O_FLAG_NORM="-O2"
41547      C_O_FLAG_NONE=""
41548    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41549      C_O_FLAG_HIGHEST="-O2"
41550      C_O_FLAG_HI="-O1"
41551      C_O_FLAG_NORM="-O1"
41552      C_O_FLAG_NONE="-Od"
41553    fi
41554    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41555    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41556    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41557    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41558  fi
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570  # Special extras...
41571  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41572    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41573      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41574      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41575    fi
41576  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41577    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41578    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41579    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41580  fi
41581
41582  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41583    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41584$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41585  fi
41586
41587  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41588    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41589$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41590  fi
41591
41592  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41593    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41594$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41595  fi
41596
41597
41598# Check whether --with-extra-cflags was given.
41599if test "${with_extra_cflags+set}" = set; then :
41600  withval=$with_extra_cflags;
41601fi
41602
41603
41604
41605# Check whether --with-extra-cxxflags was given.
41606if test "${with_extra_cxxflags+set}" = set; then :
41607  withval=$with_extra_cxxflags;
41608fi
41609
41610
41611
41612# Check whether --with-extra-ldflags was given.
41613if test "${with_extra_ldflags+set}" = set; then :
41614  withval=$with_extra_ldflags;
41615fi
41616
41617
41618  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41619  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41620  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41621
41622  # Hotspot needs these set in their legacy form
41623  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41624  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41625  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41626
41627
41628
41629
41630
41631  ###############################################################################
41632  #
41633  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41634  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41635  #
41636
41637  # Setup compiler/platform specific flags to CFLAGS_JDK,
41638  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41639  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41640    # these options are used for both C and C++ compiles
41641    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41642        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41643    case $OPENJDK_TARGET_CPU_ARCH in
41644      arm )
41645        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41646        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41647        ;;
41648      ppc )
41649        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41650        ;;
41651      * )
41652        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41653        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41654        ;;
41655    esac
41656  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41657    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41658    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41659      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41660      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41661    fi
41662
41663    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41664    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41665  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41666    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41667    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41668  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41669    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41670    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41671    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41672    -DWIN32 -DIAL"
41673    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41674      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41675    else
41676      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41677    fi
41678  fi
41679
41680  ###############################################################################
41681
41682  # Adjust flags according to debug level.
41683  case $DEBUG_LEVEL in
41684    fastdebug )
41685      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41686      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41687      C_O_FLAG_HI="$C_O_FLAG_NORM"
41688      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41689      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41690      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41691      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41692      ;;
41693    slowdebug )
41694      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41695      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41696      C_O_FLAG_HI="$C_O_FLAG_NONE"
41697      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41698      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41699      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41700      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41701      ;;
41702  esac
41703
41704  # Setup LP64
41705  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41706
41707  # Set some common defines. These works for all compilers, but assume
41708  # -D is universally accepted.
41709
41710  # Setup endianness
41711  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41712    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41713    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41714    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41715    #   Note: -Dmacro         is the same as    #define macro 1
41716    #         -Dmacro=        is the same as    #define macro
41717    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41718      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41719    else
41720      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41721    fi
41722  else
41723    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41724  fi
41725
41726  # Setup target OS define. Use OS target name but in upper case.
41727  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41728  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41729
41730  # Setup target CPU
41731  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41732
41733  # Setup debug/release defines
41734  if test "x$DEBUG_LEVEL" = xrelease; then
41735    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41736    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41737      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41738    fi
41739  else
41740    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41741  fi
41742
41743  # Setup release name
41744  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41745
41746
41747  # Set some additional per-OS defines.
41748  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41749    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41750  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41751    # FIXME: PPC64 should not be here.
41752    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41753  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41754    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41755  fi
41756
41757  # Additional macosx handling
41758  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41759    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41760      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41761      # FIXME: clean this up, and/or move it elsewhere.
41762
41763      # Setting these parameters makes it an error to link to macosx APIs that are
41764      # newer than the given OS version and makes the linked binaries compatible
41765      # even if built on a newer version of the OS.
41766      # The expected format is X.Y.Z
41767      MACOSX_VERSION_MIN=10.7.0
41768
41769
41770      # The macro takes the version with no dots, ex: 1070
41771      # Let the flags variables get resolved in make for easier override on make
41772      # command line.
41773      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41774      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41775    fi
41776  fi
41777
41778  # Setup some hard coded includes
41779  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41780      -I${JDK_OUTPUTDIR}/include \
41781      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41782      -I${JDK_TOPDIR}/src/share/javavm/export \
41783      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41784      -I${JDK_TOPDIR}/src/share/native/common \
41785      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41786
41787  # The shared libraries are compiled using the picflag.
41788  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41789  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41790
41791  # Executable flags
41792  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41793  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41794
41795
41796
41797
41798
41799
41800  # Setup LDFLAGS et al.
41801  #
41802  # Now this is odd. The JDK native libraries have to link against libjvm.so
41803  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41804  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41805  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41806  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41807  # libraries will link to whatever is in memory. Yuck.
41808  #
41809  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41810  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41811    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41812    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41813      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41814    fi
41815    # TODO: make -debug optional "--disable-full-debug-symbols"
41816    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41817    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41818    LDFLAGS_JDKLIB_SUFFIX=""
41819    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41820      LDFLAGS_STACK_SIZE=1048576
41821    else
41822      LDFLAGS_STACK_SIZE=327680
41823    fi
41824    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41825  else
41826    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41827      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41828      # We have previously set HAS_GNU_HASH if this is the case
41829      if test -n "$HAS_GNU_HASH"; then
41830        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41831      fi
41832      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41833        # And since we now know that the linker is gnu, then add -z defs, to forbid
41834        # undefined symbols in object files.
41835        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41836        if test "x$DEBUG_LEVEL" = "xrelease"; then
41837          # When building release libraries, tell the linker optimize them.
41838          # Should this be supplied to the OSS linker as well?
41839          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41840        fi
41841      fi
41842    fi
41843
41844    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41845      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41846      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41847    fi
41848
41849    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41850        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41851
41852    # On some platforms (mac) the linker warns about non existing -L dirs.
41853    # Add server first if available. Linking aginst client does not always produce the same results.
41854    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41855    # Default to server for other variants.
41856    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41857      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41858    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41859      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41860    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41861      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41862    else
41863      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41864    fi
41865
41866    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41867    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41868      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41869    fi
41870
41871    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41872    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41873      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41874    fi
41875  fi
41876
41877
41878
41879
41880
41881
41882
41883
41884  # Some Zero and Shark settings.
41885  # ZERO_ARCHFLAG tells the compiler which mode to build for
41886  case "${OPENJDK_TARGET_CPU}" in
41887    s390)
41888      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41889      ;;
41890    *)
41891      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41892  esac
41893
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41895$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41896  supports=yes
41897
41898  saved_cflags="$CFLAGS"
41899  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41900  ac_ext=c
41901ac_cpp='$CPP $CPPFLAGS'
41902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41904ac_compiler_gnu=$ac_cv_c_compiler_gnu
41905
41906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41907/* end confdefs.h.  */
41908int i;
41909_ACEOF
41910if ac_fn_c_try_compile "$LINENO"; then :
41911
41912else
41913  supports=no
41914fi
41915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41916  ac_ext=cpp
41917ac_cpp='$CXXCPP $CPPFLAGS'
41918ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41919ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41920ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41921
41922  CFLAGS="$saved_cflags"
41923
41924  saved_cxxflags="$CXXFLAGS"
41925  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41926  ac_ext=cpp
41927ac_cpp='$CXXCPP $CPPFLAGS'
41928ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41929ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41930ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41931
41932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41933/* end confdefs.h.  */
41934int i;
41935_ACEOF
41936if ac_fn_cxx_try_compile "$LINENO"; then :
41937
41938else
41939  supports=no
41940fi
41941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41942  ac_ext=cpp
41943ac_cpp='$CXXCPP $CPPFLAGS'
41944ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41945ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41946ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41947
41948  CXXFLAGS="$saved_cxxflags"
41949
41950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41951$as_echo "$supports" >&6; }
41952  if test "x$supports" = "xyes" ; then
41953    :
41954  else
41955    ZERO_ARCHFLAG=""
41956  fi
41957
41958
41959
41960  # Check that the compiler supports -mX (or -qX on AIX) flags
41961  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41962
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41964$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41965  supports=yes
41966
41967  saved_cflags="$CFLAGS"
41968  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41969  ac_ext=c
41970ac_cpp='$CPP $CPPFLAGS'
41971ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41972ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41973ac_compiler_gnu=$ac_cv_c_compiler_gnu
41974
41975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41976/* end confdefs.h.  */
41977int i;
41978_ACEOF
41979if ac_fn_c_try_compile "$LINENO"; then :
41980
41981else
41982  supports=no
41983fi
41984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41985  ac_ext=cpp
41986ac_cpp='$CXXCPP $CPPFLAGS'
41987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41988ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41990
41991  CFLAGS="$saved_cflags"
41992
41993  saved_cxxflags="$CXXFLAGS"
41994  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41995  ac_ext=cpp
41996ac_cpp='$CXXCPP $CPPFLAGS'
41997ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41998ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41999ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42000
42001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42002/* end confdefs.h.  */
42003int i;
42004_ACEOF
42005if ac_fn_cxx_try_compile "$LINENO"; then :
42006
42007else
42008  supports=no
42009fi
42010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42011  ac_ext=cpp
42012ac_cpp='$CXXCPP $CPPFLAGS'
42013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42016
42017  CXXFLAGS="$saved_cxxflags"
42018
42019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42020$as_echo "$supports" >&6; }
42021  if test "x$supports" = "xyes" ; then
42022    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42023  else
42024    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42025  fi
42026
42027
42028
42029  case "${TOOLCHAIN_TYPE}" in
42030    microsoft)
42031      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42032      ;;
42033    solstudio)
42034      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42035      ;;
42036    gcc)
42037      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42038      ;;
42039    clang)
42040      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42041      ;;
42042  esac
42043
42044
42045
42046# Setup debug symbols (need objcopy from the toolchain for that)
42047
42048  #
42049  # ENABLE_DEBUG_SYMBOLS
42050  # This must be done after the toolchain is setup, since we're looking at objcopy.
42051  #
42052  # Check whether --enable-debug-symbols was given.
42053if test "${enable_debug_symbols+set}" = set; then :
42054  enableval=$enable_debug_symbols;
42055fi
42056
42057
42058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42059$as_echo_n "checking if we should generate debug symbols... " >&6; }
42060
42061  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42062    # explicit enabling of enable-debug-symbols and can't find objcopy
42063    #   this is an error
42064    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42065  fi
42066
42067  if test "x$enable_debug_symbols" = "xyes"; then
42068    ENABLE_DEBUG_SYMBOLS=true
42069  elif test "x$enable_debug_symbols" = "xno"; then
42070    ENABLE_DEBUG_SYMBOLS=false
42071  else
42072    # Default is on if objcopy is found
42073    if test "x$OBJCOPY" != x; then
42074      ENABLE_DEBUG_SYMBOLS=true
42075    # MacOS X and Windows don't use objcopy but default is on for those OSes
42076    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42077      ENABLE_DEBUG_SYMBOLS=true
42078    else
42079      ENABLE_DEBUG_SYMBOLS=false
42080    fi
42081  fi
42082
42083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42084$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42085
42086  #
42087  # ZIP_DEBUGINFO_FILES
42088  #
42089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42090$as_echo_n "checking if we should zip debug-info files... " >&6; }
42091  # Check whether --enable-zip-debug-info was given.
42092if test "${enable_zip_debug_info+set}" = set; then :
42093  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42094else
42095  enable_zip_debug_info="yes"
42096fi
42097
42098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42099$as_echo "${enable_zip_debug_info}" >&6; }
42100
42101  if test "x${enable_zip_debug_info}" = "xno"; then
42102    ZIP_DEBUGINFO_FILES=false
42103  else
42104    ZIP_DEBUGINFO_FILES=true
42105  fi
42106
42107
42108
42109
42110
42111###############################################################################
42112#
42113# Check dependencies for external and internal libraries.
42114#
42115###############################################################################
42116
42117# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42118
42119  # When using cygwin or msys, we need a wrapper binary that renames
42120  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42121  # @files and rewrites these too! This wrapper binary is
42122  # called fixpath.
42123  FIXPATH=
42124  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42126$as_echo_n "checking if fixpath can be created... " >&6; }
42127    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42128    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42129    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42130      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42131      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42132      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42133      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42134    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42135      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42136      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42137
42138      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42139      # @ was chosen as separator to minimize risk of other tools messing around with it
42140      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42141      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42142
42143      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42144    fi
42145    rm -f $OUTPUT_ROOT/fixpath*
42146    cd $OUTPUT_ROOT
42147    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42148    cd $CURDIR
42149
42150    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42152$as_echo "no" >&6; }
42153      cat $OUTPUT_ROOT/fixpath1.log
42154      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42155    fi
42156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42157$as_echo "yes" >&6; }
42158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42159$as_echo_n "checking if fixpath.exe works... " >&6; }
42160    cd $OUTPUT_ROOT
42161    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42162    cd $CURDIR
42163    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42165$as_echo "no" >&6; }
42166      cat $OUTPUT_ROOT/fixpath2.log
42167      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42168    fi
42169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42170$as_echo "yes" >&6; }
42171    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42172  fi
42173
42174
42175
42176
42177
42178
42179  ###############################################################################
42180  #
42181  # OS specific settings that we never will need to probe.
42182  #
42183  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42185$as_echo_n "checking what is not needed on Linux?... " >&6; }
42186    PULSE_NOT_NEEDED=yes
42187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42188$as_echo "pulse" >&6; }
42189  fi
42190
42191  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42193$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42194    ALSA_NOT_NEEDED=yes
42195    PULSE_NOT_NEEDED=yes
42196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42197$as_echo "alsa pulse" >&6; }
42198  fi
42199
42200  if test "x$OPENJDK_TARGET_OS" = xaix; then
42201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42202$as_echo_n "checking what is not needed on AIX?... " >&6; }
42203    ALSA_NOT_NEEDED=yes
42204    PULSE_NOT_NEEDED=yes
42205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42206$as_echo "alsa pulse" >&6; }
42207  fi
42208
42209
42210  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42212$as_echo_n "checking what is not needed on Windows?... " >&6; }
42213    CUPS_NOT_NEEDED=yes
42214    ALSA_NOT_NEEDED=yes
42215    PULSE_NOT_NEEDED=yes
42216    X11_NOT_NEEDED=yes
42217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42218$as_echo "alsa cups pulse x11" >&6; }
42219  fi
42220
42221  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42223$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42224    ALSA_NOT_NEEDED=yes
42225    PULSE_NOT_NEEDED=yes
42226    X11_NOT_NEEDED=yes
42227    # If the java runtime framework is disabled, then we need X11.
42228    # This will be adjusted below.
42229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42230$as_echo "alsa pulse x11" >&6; }
42231  fi
42232
42233  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42235$as_echo_n "checking what is not needed on bsd?... " >&6; }
42236    ALSA_NOT_NEEDED=yes
42237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42238$as_echo "alsa" >&6; }
42239  fi
42240
42241  if test "x$OPENJDK" = "xfalse"; then
42242    FREETYPE_NOT_NEEDED=yes
42243  fi
42244
42245  if test "x$SUPPORT_HEADFUL" = xno; then
42246    X11_NOT_NEEDED=yes
42247  fi
42248
42249  ###############################################################################
42250  #
42251  # Check for MacOSX support for OpenJDK.
42252  #
42253
42254
42255  # Check whether --enable-macosx-runtime-support was given.
42256if test "${enable_macosx_runtime_support+set}" = set; then :
42257  enableval=$enable_macosx_runtime_support;
42258fi
42259
42260  if test "x$enable_macosx_runtime_support" != x; then
42261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42262$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42263  fi
42264
42265
42266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42267$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42268  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42270$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42271  else
42272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42273$as_echo "no" >&6; }
42274  fi
42275
42276
42277
42278  ###############################################################################
42279  #
42280  # Check for X Windows
42281  #
42282
42283  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42284  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42285  # --x-libraries for the sysroot, if that seems to be correct.
42286  if test "x$SYS_ROOT" != "x/"; then
42287    if test "x$x_includes" = xNONE; then
42288      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42289        x_includes="$SYS_ROOT/usr/X11R6/include"
42290      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42291        x_includes="$SYS_ROOT/usr/include"
42292      fi
42293    fi
42294    if test "x$x_libraries" = xNONE; then
42295      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42296        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42297      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42298        x_libraries="$SYS_ROOT/usr/lib64"
42299      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42300        x_libraries="$SYS_ROOT/usr/lib"
42301      fi
42302    fi
42303  fi
42304
42305  # Now let autoconf do it's magic
42306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42307$as_echo_n "checking for X... " >&6; }
42308
42309
42310# Check whether --with-x was given.
42311if test "${with_x+set}" = set; then :
42312  withval=$with_x;
42313fi
42314
42315# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42316if test "x$with_x" = xno; then
42317  # The user explicitly disabled X.
42318  have_x=disabled
42319else
42320  case $x_includes,$x_libraries in #(
42321    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42322    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42323  $as_echo_n "(cached) " >&6
42324else
42325  # One or both of the vars are not set, and there is no cached value.
42326ac_x_includes=no ac_x_libraries=no
42327rm -f -r conftest.dir
42328if mkdir conftest.dir; then
42329  cd conftest.dir
42330  cat >Imakefile <<'_ACEOF'
42331incroot:
42332	@echo incroot='${INCROOT}'
42333usrlibdir:
42334	@echo usrlibdir='${USRLIBDIR}'
42335libdir:
42336	@echo libdir='${LIBDIR}'
42337_ACEOF
42338  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42339    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42340    for ac_var in incroot usrlibdir libdir; do
42341      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42342    done
42343    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42344    for ac_extension in a so sl dylib la dll; do
42345      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42346	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42347	ac_im_usrlibdir=$ac_im_libdir; break
42348      fi
42349    done
42350    # Screen out bogus values from the imake configuration.  They are
42351    # bogus both because they are the default anyway, and because
42352    # using them would break gcc on systems where it needs fixed includes.
42353    case $ac_im_incroot in
42354	/usr/include) ac_x_includes= ;;
42355	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42356    esac
42357    case $ac_im_usrlibdir in
42358	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42359	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42360    esac
42361  fi
42362  cd ..
42363  rm -f -r conftest.dir
42364fi
42365
42366# Standard set of common directories for X headers.
42367# Check X11 before X11Rn because it is often a symlink to the current release.
42368ac_x_header_dirs='
42369/usr/X11/include
42370/usr/X11R7/include
42371/usr/X11R6/include
42372/usr/X11R5/include
42373/usr/X11R4/include
42374
42375/usr/include/X11
42376/usr/include/X11R7
42377/usr/include/X11R6
42378/usr/include/X11R5
42379/usr/include/X11R4
42380
42381/usr/local/X11/include
42382/usr/local/X11R7/include
42383/usr/local/X11R6/include
42384/usr/local/X11R5/include
42385/usr/local/X11R4/include
42386
42387/usr/local/include/X11
42388/usr/local/include/X11R7
42389/usr/local/include/X11R6
42390/usr/local/include/X11R5
42391/usr/local/include/X11R4
42392
42393/usr/X386/include
42394/usr/x386/include
42395/usr/XFree86/include/X11
42396
42397/usr/include
42398/usr/local/include
42399/usr/unsupported/include
42400/usr/athena/include
42401/usr/local/x11r5/include
42402/usr/lpp/Xamples/include
42403
42404/usr/openwin/include
42405/usr/openwin/share/include'
42406
42407if test "$ac_x_includes" = no; then
42408  # Guess where to find include files, by looking for Xlib.h.
42409  # First, try using that file with no special directory specified.
42410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42411/* end confdefs.h.  */
42412#include <X11/Xlib.h>
42413_ACEOF
42414if ac_fn_cxx_try_cpp "$LINENO"; then :
42415  # We can compile using X headers with no special include directory.
42416ac_x_includes=
42417else
42418  for ac_dir in $ac_x_header_dirs; do
42419  if test -r "$ac_dir/X11/Xlib.h"; then
42420    ac_x_includes=$ac_dir
42421    break
42422  fi
42423done
42424fi
42425rm -f conftest.err conftest.i conftest.$ac_ext
42426fi # $ac_x_includes = no
42427
42428if test "$ac_x_libraries" = no; then
42429  # Check for the libraries.
42430  # See if we find them without any special options.
42431  # Don't add to $LIBS permanently.
42432  ac_save_LIBS=$LIBS
42433  LIBS="-lX11 $LIBS"
42434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42435/* end confdefs.h.  */
42436#include <X11/Xlib.h>
42437int
42438main ()
42439{
42440XrmInitialize ()
42441  ;
42442  return 0;
42443}
42444_ACEOF
42445if ac_fn_cxx_try_link "$LINENO"; then :
42446  LIBS=$ac_save_LIBS
42447# We can link X programs with no special library path.
42448ac_x_libraries=
42449else
42450  LIBS=$ac_save_LIBS
42451for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42452do
42453  # Don't even attempt the hair of trying to link an X program!
42454  for ac_extension in a so sl dylib la dll; do
42455    if test -r "$ac_dir/libX11.$ac_extension"; then
42456      ac_x_libraries=$ac_dir
42457      break 2
42458    fi
42459  done
42460done
42461fi
42462rm -f core conftest.err conftest.$ac_objext \
42463    conftest$ac_exeext conftest.$ac_ext
42464fi # $ac_x_libraries = no
42465
42466case $ac_x_includes,$ac_x_libraries in #(
42467  no,* | *,no | *\'*)
42468    # Didn't find X, or a directory has "'" in its name.
42469    ac_cv_have_x="have_x=no";; #(
42470  *)
42471    # Record where we found X for the cache.
42472    ac_cv_have_x="have_x=yes\
42473	ac_x_includes='$ac_x_includes'\
42474	ac_x_libraries='$ac_x_libraries'"
42475esac
42476fi
42477;; #(
42478    *) have_x=yes;;
42479  esac
42480  eval "$ac_cv_have_x"
42481fi # $with_x != no
42482
42483if test "$have_x" != yes; then
42484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42485$as_echo "$have_x" >&6; }
42486  no_x=yes
42487else
42488  # If each of the values was on the command line, it overrides each guess.
42489  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42490  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42491  # Update the cache value to reflect the command line values.
42492  ac_cv_have_x="have_x=yes\
42493	ac_x_includes='$x_includes'\
42494	ac_x_libraries='$x_libraries'"
42495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42496$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42497fi
42498
42499  if test "$no_x" = yes; then
42500  # Not all programs may use this symbol, but it does not hurt to define it.
42501
42502$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42503
42504  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42505else
42506  if test -n "$x_includes"; then
42507    X_CFLAGS="$X_CFLAGS -I$x_includes"
42508  fi
42509
42510  # It would also be nice to do this for all -L options, not just this one.
42511  if test -n "$x_libraries"; then
42512    X_LIBS="$X_LIBS -L$x_libraries"
42513    # For Solaris; some versions of Sun CC require a space after -R and
42514    # others require no space.  Words are not sufficient . . . .
42515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42516$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42517    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42518    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42519    ac_cxx_werror_flag=yes
42520    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42521/* end confdefs.h.  */
42522
42523int
42524main ()
42525{
42526
42527  ;
42528  return 0;
42529}
42530_ACEOF
42531if ac_fn_cxx_try_link "$LINENO"; then :
42532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42533$as_echo "no" >&6; }
42534       X_LIBS="$X_LIBS -R$x_libraries"
42535else
42536  LIBS="$ac_xsave_LIBS -R $x_libraries"
42537       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42538/* end confdefs.h.  */
42539
42540int
42541main ()
42542{
42543
42544  ;
42545  return 0;
42546}
42547_ACEOF
42548if ac_fn_cxx_try_link "$LINENO"; then :
42549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42550$as_echo "yes" >&6; }
42551	  X_LIBS="$X_LIBS -R $x_libraries"
42552else
42553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42554$as_echo "neither works" >&6; }
42555fi
42556rm -f core conftest.err conftest.$ac_objext \
42557    conftest$ac_exeext conftest.$ac_ext
42558fi
42559rm -f core conftest.err conftest.$ac_objext \
42560    conftest$ac_exeext conftest.$ac_ext
42561    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42562    LIBS=$ac_xsave_LIBS
42563  fi
42564
42565  # Check for system-dependent libraries X programs must link with.
42566  # Do this before checking for the system-independent R6 libraries
42567  # (-lICE), since we may need -lsocket or whatever for X linking.
42568
42569  if test "$ISC" = yes; then
42570    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42571  else
42572    # Martyn Johnson says this is needed for Ultrix, if the X
42573    # libraries were built with DECnet support.  And Karl Berry says
42574    # the Alpha needs dnet_stub (dnet does not exist).
42575    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42577/* end confdefs.h.  */
42578
42579/* Override any GCC internal prototype to avoid an error.
42580   Use char because int might match the return type of a GCC
42581   builtin and then its argument prototype would still apply.  */
42582#ifdef __cplusplus
42583extern "C"
42584#endif
42585char XOpenDisplay ();
42586int
42587main ()
42588{
42589return XOpenDisplay ();
42590  ;
42591  return 0;
42592}
42593_ACEOF
42594if ac_fn_cxx_try_link "$LINENO"; then :
42595
42596else
42597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42598$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42599if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42600  $as_echo_n "(cached) " >&6
42601else
42602  ac_check_lib_save_LIBS=$LIBS
42603LIBS="-ldnet  $LIBS"
42604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42605/* end confdefs.h.  */
42606
42607/* Override any GCC internal prototype to avoid an error.
42608   Use char because int might match the return type of a GCC
42609   builtin and then its argument prototype would still apply.  */
42610#ifdef __cplusplus
42611extern "C"
42612#endif
42613char dnet_ntoa ();
42614int
42615main ()
42616{
42617return dnet_ntoa ();
42618  ;
42619  return 0;
42620}
42621_ACEOF
42622if ac_fn_cxx_try_link "$LINENO"; then :
42623  ac_cv_lib_dnet_dnet_ntoa=yes
42624else
42625  ac_cv_lib_dnet_dnet_ntoa=no
42626fi
42627rm -f core conftest.err conftest.$ac_objext \
42628    conftest$ac_exeext conftest.$ac_ext
42629LIBS=$ac_check_lib_save_LIBS
42630fi
42631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42632$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42633if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42634  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42635fi
42636
42637    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42639$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42640if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42641  $as_echo_n "(cached) " >&6
42642else
42643  ac_check_lib_save_LIBS=$LIBS
42644LIBS="-ldnet_stub  $LIBS"
42645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42646/* end confdefs.h.  */
42647
42648/* Override any GCC internal prototype to avoid an error.
42649   Use char because int might match the return type of a GCC
42650   builtin and then its argument prototype would still apply.  */
42651#ifdef __cplusplus
42652extern "C"
42653#endif
42654char dnet_ntoa ();
42655int
42656main ()
42657{
42658return dnet_ntoa ();
42659  ;
42660  return 0;
42661}
42662_ACEOF
42663if ac_fn_cxx_try_link "$LINENO"; then :
42664  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42665else
42666  ac_cv_lib_dnet_stub_dnet_ntoa=no
42667fi
42668rm -f core conftest.err conftest.$ac_objext \
42669    conftest$ac_exeext conftest.$ac_ext
42670LIBS=$ac_check_lib_save_LIBS
42671fi
42672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42673$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42674if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42675  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42676fi
42677
42678    fi
42679fi
42680rm -f core conftest.err conftest.$ac_objext \
42681    conftest$ac_exeext conftest.$ac_ext
42682    LIBS="$ac_xsave_LIBS"
42683
42684    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42685    # to get the SysV transport functions.
42686    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42687    # needs -lnsl.
42688    # The nsl library prevents programs from opening the X display
42689    # on Irix 5.2, according to T.E. Dickey.
42690    # The functions gethostbyname, getservbyname, and inet_addr are
42691    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42692    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42693if test "x$ac_cv_func_gethostbyname" = xyes; then :
42694
42695fi
42696
42697    if test $ac_cv_func_gethostbyname = no; then
42698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42699$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42700if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42701  $as_echo_n "(cached) " >&6
42702else
42703  ac_check_lib_save_LIBS=$LIBS
42704LIBS="-lnsl  $LIBS"
42705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42706/* end confdefs.h.  */
42707
42708/* Override any GCC internal prototype to avoid an error.
42709   Use char because int might match the return type of a GCC
42710   builtin and then its argument prototype would still apply.  */
42711#ifdef __cplusplus
42712extern "C"
42713#endif
42714char gethostbyname ();
42715int
42716main ()
42717{
42718return gethostbyname ();
42719  ;
42720  return 0;
42721}
42722_ACEOF
42723if ac_fn_cxx_try_link "$LINENO"; then :
42724  ac_cv_lib_nsl_gethostbyname=yes
42725else
42726  ac_cv_lib_nsl_gethostbyname=no
42727fi
42728rm -f core conftest.err conftest.$ac_objext \
42729    conftest$ac_exeext conftest.$ac_ext
42730LIBS=$ac_check_lib_save_LIBS
42731fi
42732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42733$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42734if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42735  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42736fi
42737
42738      if test $ac_cv_lib_nsl_gethostbyname = no; then
42739	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42740$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42741if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42742  $as_echo_n "(cached) " >&6
42743else
42744  ac_check_lib_save_LIBS=$LIBS
42745LIBS="-lbsd  $LIBS"
42746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42747/* end confdefs.h.  */
42748
42749/* Override any GCC internal prototype to avoid an error.
42750   Use char because int might match the return type of a GCC
42751   builtin and then its argument prototype would still apply.  */
42752#ifdef __cplusplus
42753extern "C"
42754#endif
42755char gethostbyname ();
42756int
42757main ()
42758{
42759return gethostbyname ();
42760  ;
42761  return 0;
42762}
42763_ACEOF
42764if ac_fn_cxx_try_link "$LINENO"; then :
42765  ac_cv_lib_bsd_gethostbyname=yes
42766else
42767  ac_cv_lib_bsd_gethostbyname=no
42768fi
42769rm -f core conftest.err conftest.$ac_objext \
42770    conftest$ac_exeext conftest.$ac_ext
42771LIBS=$ac_check_lib_save_LIBS
42772fi
42773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42774$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42775if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42776  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42777fi
42778
42779      fi
42780    fi
42781
42782    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42783    # socket/setsockopt and other routines are undefined under SCO ODT
42784    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42785    # on later versions), says Simon Leinen: it contains gethostby*
42786    # variants that don't use the name server (or something).  -lsocket
42787    # must be given before -lnsl if both are needed.  We assume that
42788    # if connect needs -lnsl, so does gethostbyname.
42789    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42790if test "x$ac_cv_func_connect" = xyes; then :
42791
42792fi
42793
42794    if test $ac_cv_func_connect = no; then
42795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42796$as_echo_n "checking for connect in -lsocket... " >&6; }
42797if ${ac_cv_lib_socket_connect+:} false; then :
42798  $as_echo_n "(cached) " >&6
42799else
42800  ac_check_lib_save_LIBS=$LIBS
42801LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42803/* end confdefs.h.  */
42804
42805/* Override any GCC internal prototype to avoid an error.
42806   Use char because int might match the return type of a GCC
42807   builtin and then its argument prototype would still apply.  */
42808#ifdef __cplusplus
42809extern "C"
42810#endif
42811char connect ();
42812int
42813main ()
42814{
42815return connect ();
42816  ;
42817  return 0;
42818}
42819_ACEOF
42820if ac_fn_cxx_try_link "$LINENO"; then :
42821  ac_cv_lib_socket_connect=yes
42822else
42823  ac_cv_lib_socket_connect=no
42824fi
42825rm -f core conftest.err conftest.$ac_objext \
42826    conftest$ac_exeext conftest.$ac_ext
42827LIBS=$ac_check_lib_save_LIBS
42828fi
42829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42830$as_echo "$ac_cv_lib_socket_connect" >&6; }
42831if test "x$ac_cv_lib_socket_connect" = xyes; then :
42832  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42833fi
42834
42835    fi
42836
42837    # Guillermo Gomez says -lposix is necessary on A/UX.
42838    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42839if test "x$ac_cv_func_remove" = xyes; then :
42840
42841fi
42842
42843    if test $ac_cv_func_remove = no; then
42844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42845$as_echo_n "checking for remove in -lposix... " >&6; }
42846if ${ac_cv_lib_posix_remove+:} false; then :
42847  $as_echo_n "(cached) " >&6
42848else
42849  ac_check_lib_save_LIBS=$LIBS
42850LIBS="-lposix  $LIBS"
42851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42852/* end confdefs.h.  */
42853
42854/* Override any GCC internal prototype to avoid an error.
42855   Use char because int might match the return type of a GCC
42856   builtin and then its argument prototype would still apply.  */
42857#ifdef __cplusplus
42858extern "C"
42859#endif
42860char remove ();
42861int
42862main ()
42863{
42864return remove ();
42865  ;
42866  return 0;
42867}
42868_ACEOF
42869if ac_fn_cxx_try_link "$LINENO"; then :
42870  ac_cv_lib_posix_remove=yes
42871else
42872  ac_cv_lib_posix_remove=no
42873fi
42874rm -f core conftest.err conftest.$ac_objext \
42875    conftest$ac_exeext conftest.$ac_ext
42876LIBS=$ac_check_lib_save_LIBS
42877fi
42878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42879$as_echo "$ac_cv_lib_posix_remove" >&6; }
42880if test "x$ac_cv_lib_posix_remove" = xyes; then :
42881  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42882fi
42883
42884    fi
42885
42886    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42887    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42888if test "x$ac_cv_func_shmat" = xyes; then :
42889
42890fi
42891
42892    if test $ac_cv_func_shmat = no; then
42893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42894$as_echo_n "checking for shmat in -lipc... " >&6; }
42895if ${ac_cv_lib_ipc_shmat+:} false; then :
42896  $as_echo_n "(cached) " >&6
42897else
42898  ac_check_lib_save_LIBS=$LIBS
42899LIBS="-lipc  $LIBS"
42900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42901/* end confdefs.h.  */
42902
42903/* Override any GCC internal prototype to avoid an error.
42904   Use char because int might match the return type of a GCC
42905   builtin and then its argument prototype would still apply.  */
42906#ifdef __cplusplus
42907extern "C"
42908#endif
42909char shmat ();
42910int
42911main ()
42912{
42913return shmat ();
42914  ;
42915  return 0;
42916}
42917_ACEOF
42918if ac_fn_cxx_try_link "$LINENO"; then :
42919  ac_cv_lib_ipc_shmat=yes
42920else
42921  ac_cv_lib_ipc_shmat=no
42922fi
42923rm -f core conftest.err conftest.$ac_objext \
42924    conftest$ac_exeext conftest.$ac_ext
42925LIBS=$ac_check_lib_save_LIBS
42926fi
42927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42928$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42929if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42930  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42931fi
42932
42933    fi
42934  fi
42935
42936  # Check for libraries that X11R6 Xt/Xaw programs need.
42937  ac_save_LDFLAGS=$LDFLAGS
42938  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42939  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42940  # check for ICE first), but we must link in the order -lSM -lICE or
42941  # we get undefined symbols.  So assume we have SM if we have ICE.
42942  # These have to be linked with before -lX11, unlike the other
42943  # libraries we check for below, so use a different variable.
42944  # John Interrante, Karl Berry
42945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42946$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42947if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42948  $as_echo_n "(cached) " >&6
42949else
42950  ac_check_lib_save_LIBS=$LIBS
42951LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42953/* end confdefs.h.  */
42954
42955/* Override any GCC internal prototype to avoid an error.
42956   Use char because int might match the return type of a GCC
42957   builtin and then its argument prototype would still apply.  */
42958#ifdef __cplusplus
42959extern "C"
42960#endif
42961char IceConnectionNumber ();
42962int
42963main ()
42964{
42965return IceConnectionNumber ();
42966  ;
42967  return 0;
42968}
42969_ACEOF
42970if ac_fn_cxx_try_link "$LINENO"; then :
42971  ac_cv_lib_ICE_IceConnectionNumber=yes
42972else
42973  ac_cv_lib_ICE_IceConnectionNumber=no
42974fi
42975rm -f core conftest.err conftest.$ac_objext \
42976    conftest$ac_exeext conftest.$ac_ext
42977LIBS=$ac_check_lib_save_LIBS
42978fi
42979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42980$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42981if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42982  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42983fi
42984
42985  LDFLAGS=$ac_save_LDFLAGS
42986
42987fi
42988
42989
42990  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42991  # this doesn't make sense so we remove it.
42992  if test "x$COMPILE_TYPE" = xcross; then
42993    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42994  fi
42995
42996  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42997
42998  # Print a helpful message on how to acquire the necessary build dependency.
42999  # x11 is the help tag: freetype, cups, pulse, alsa etc
43000  MISSING_DEPENDENCY=x11
43001
43002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43003    cygwin_help $MISSING_DEPENDENCY
43004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43005    msys_help $MISSING_DEPENDENCY
43006  else
43007    PKGHANDLER_COMMAND=
43008
43009    case $PKGHANDLER in
43010      apt-get)
43011        apt_help     $MISSING_DEPENDENCY ;;
43012      yum)
43013        yum_help     $MISSING_DEPENDENCY ;;
43014      port)
43015        port_help    $MISSING_DEPENDENCY ;;
43016      pkgutil)
43017        pkgutil_help $MISSING_DEPENDENCY ;;
43018      pkgadd)
43019        pkgadd_help  $MISSING_DEPENDENCY ;;
43020    esac
43021
43022    if test "x$PKGHANDLER_COMMAND" != x; then
43023      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43024    fi
43025  fi
43026
43027    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43028  fi
43029
43030  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43031    OPENWIN_HOME="/usr/openwin"
43032  fi
43033
43034
43035
43036  #
43037  # Weird Sol10 something check...TODO change to try compile
43038  #
43039  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43040    if test "`uname -r`" = "5.10"; then
43041      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43042        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43043      fi
43044    fi
43045  fi
43046
43047  ac_ext=c
43048ac_cpp='$CPP $CPPFLAGS'
43049ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43050ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43051ac_compiler_gnu=$ac_cv_c_compiler_gnu
43052
43053  OLD_CFLAGS="$CFLAGS"
43054  CFLAGS="$CFLAGS $X_CFLAGS"
43055
43056  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43057  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43058do :
43059  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43060ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43061        # include <X11/Xlib.h>
43062        # include <X11/Xutil.h>
43063
43064
43065"
43066if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43067  cat >>confdefs.h <<_ACEOF
43068#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43069_ACEOF
43070 X11_A_OK=yes
43071else
43072  X11_A_OK=no; break
43073fi
43074
43075done
43076
43077
43078  CFLAGS="$OLD_CFLAGS"
43079  ac_ext=cpp
43080ac_cpp='$CXXCPP $CPPFLAGS'
43081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43084
43085
43086  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43087
43088  # Print a helpful message on how to acquire the necessary build dependency.
43089  # x11 is the help tag: freetype, cups, pulse, alsa etc
43090  MISSING_DEPENDENCY=x11
43091
43092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43093    cygwin_help $MISSING_DEPENDENCY
43094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43095    msys_help $MISSING_DEPENDENCY
43096  else
43097    PKGHANDLER_COMMAND=
43098
43099    case $PKGHANDLER in
43100      apt-get)
43101        apt_help     $MISSING_DEPENDENCY ;;
43102      yum)
43103        yum_help     $MISSING_DEPENDENCY ;;
43104      port)
43105        port_help    $MISSING_DEPENDENCY ;;
43106      pkgutil)
43107        pkgutil_help $MISSING_DEPENDENCY ;;
43108      pkgadd)
43109        pkgadd_help  $MISSING_DEPENDENCY ;;
43110    esac
43111
43112    if test "x$PKGHANDLER_COMMAND" != x; then
43113      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43114    fi
43115  fi
43116
43117    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43118  fi
43119
43120
43121
43122
43123
43124
43125  ###############################################################################
43126  #
43127  # The common unix printing system cups is used to print from java.
43128  #
43129
43130# Check whether --with-cups was given.
43131if test "${with_cups+set}" = set; then :
43132  withval=$with_cups;
43133fi
43134
43135
43136# Check whether --with-cups-include was given.
43137if test "${with_cups_include+set}" = set; then :
43138  withval=$with_cups_include;
43139fi
43140
43141
43142  if test "x$CUPS_NOT_NEEDED" = xyes; then
43143    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43144      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43145$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43146    fi
43147    CUPS_CFLAGS=
43148  else
43149    CUPS_FOUND=no
43150
43151    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43152      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43153    fi
43154
43155    if test "x${with_cups}" != x; then
43156      CUPS_CFLAGS="-I${with_cups}/include"
43157      CUPS_FOUND=yes
43158    fi
43159    if test "x${with_cups_include}" != x; then
43160      CUPS_CFLAGS="-I${with_cups_include}"
43161      CUPS_FOUND=yes
43162    fi
43163    if test "x$CUPS_FOUND" = xno; then
43164
43165
43166  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43167    # Source the builddeps file again, to make sure it uses the latest variables!
43168    . $builddepsfile
43169    # Look for a target and build machine specific resource!
43170    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43171    if test "x$resource" = x; then
43172      # Ok, lets instead look for a target specific resource
43173      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43174    fi
43175    if test "x$resource" = x; then
43176      # Ok, lets instead look for a build specific resource
43177      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43178    fi
43179    if test "x$resource" = x; then
43180      # Ok, lets instead look for a generic resource
43181      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43182      resource=${builddep_cups}
43183    fi
43184    if test "x$resource" != x; then
43185      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43186$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43187      # If the resource in the builddeps.conf file is an existing directory,
43188      # for example /java/linux/cups
43189      if test -d ${resource}; then
43190        depdir=${resource}
43191      else
43192
43193  # cups is for example mymodule
43194  # $resource is for example libs/general/libmymod_1_2_3.zip
43195  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43196  # $with_builddeps_dir is for example /localhome/builddeps
43197  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43198  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43199  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43200  filename=`basename $resource`
43201  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43202  filebase=${filename%%.*}
43203  extension=${filename#*.}
43204  installdir=$with_builddeps_dir/$filebase
43205  if test ! -f $installdir/$filename.unpacked; then
43206    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43207$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43208    if test ! -d $installdir; then
43209      mkdir -p $installdir
43210    fi
43211    if test ! -d $installdir; then
43212      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43213    fi
43214    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43215    touch $tmpfile
43216    if test ! -f $tmpfile; then
43217      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43218    fi
43219
43220  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43221  # $tmpfile is the local file name for the downloaded file.
43222  VALID_TOOL=no
43223  if test "x$BDEPS_FTP" = xwget; then
43224    VALID_TOOL=yes
43225    wget -O $tmpfile $with_builddeps_server/$resource
43226  fi
43227  if test "x$BDEPS_FTP" = xlftp; then
43228    VALID_TOOL=yes
43229    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43230  fi
43231  if test "x$BDEPS_FTP" = xftp; then
43232    VALID_TOOL=yes
43233    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43234    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43235    FTPUSERPWD=${FTPSERVER%%@*}
43236    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43237      FTPUSER=${userpwd%%:*}
43238      FTPPWD=${userpwd#*@}
43239      FTPSERVER=${FTPSERVER#*@}
43240    else
43241      FTPUSER=ftp
43242      FTPPWD=ftp
43243    fi
43244    # the "pass" command does not work on some
43245    # ftp clients (read ftp.exe) but if it works,
43246    # passive mode is better!
43247    ( \
43248        echo "user $FTPUSER $FTPPWD"        ; \
43249        echo "pass"                         ; \
43250        echo "bin"                          ; \
43251        echo "get $FTPPATH $tmpfile"              ; \
43252    ) | ftp -in $FTPSERVER
43253  fi
43254  if test "x$VALID_TOOL" != xyes; then
43255    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43256  fi
43257
43258    mv $tmpfile $installdir/$filename
43259    if test ! -s $installdir/$filename; then
43260      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43261    fi
43262    case "$extension" in
43263      zip)  echo "Unzipping $installdir/$filename..."
43264        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43265        ;;
43266      tar.gz) echo "Untaring $installdir/$filename..."
43267        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43268        ;;
43269      tgz) echo "Untaring $installdir/$filename..."
43270        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43271        ;;
43272      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43273        ;;
43274    esac
43275  fi
43276  if test -f $installdir/$filename.unpacked; then
43277    depdir=$installdir
43278  fi
43279
43280      fi
43281      # Source the builddeps file again, because in the previous command, the depdir
43282      # was updated to point at the current build dependency install directory.
43283      . $builddepsfile
43284      # Now extract variables from the builddeps.conf files.
43285      theroot=${builddep_cups_ROOT}
43286      thecflags=${builddep_cups_CFLAGS}
43287      thelibs=${builddep_cups_LIBS}
43288      if test "x$depdir" = x; then
43289        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43290      fi
43291      CUPS=$depdir
43292      if test "x$theroot" != x; then
43293        CUPS="$theroot"
43294      fi
43295      if test "x$thecflags" != x; then
43296        CUPS_CFLAGS="$thecflags"
43297      fi
43298      if test "x$thelibs" != x; then
43299        CUPS_LIBS="$thelibs"
43300      fi
43301      CUPS_FOUND=yes
43302
43303    fi
43304
43305  fi
43306
43307    fi
43308    if test "x$CUPS_FOUND" = xno; then
43309      # Are the cups headers installed in the default /usr/include location?
43310      for ac_header in cups/cups.h cups/ppd.h
43311do :
43312  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43313ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43314if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43315  cat >>confdefs.h <<_ACEOF
43316#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43317_ACEOF
43318
43319            CUPS_FOUND=yes
43320            CUPS_CFLAGS=
43321            DEFAULT_CUPS=yes
43322
43323
43324fi
43325
43326done
43327
43328    fi
43329    if test "x$CUPS_FOUND" = xno; then
43330      # Getting nervous now? Lets poke around for standard Solaris third-party
43331      # package installation locations.
43332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43333$as_echo_n "checking for cups headers... " >&6; }
43334      if test -s /opt/sfw/cups/include/cups/cups.h; then
43335        # An SFW package seems to be installed!
43336        CUPS_FOUND=yes
43337        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43338      elif test -s /opt/csw/include/cups/cups.h; then
43339        # A CSW package seems to be installed!
43340        CUPS_FOUND=yes
43341        CUPS_CFLAGS="-I/opt/csw/include"
43342      fi
43343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43344$as_echo "$CUPS_FOUND" >&6; }
43345    fi
43346    if test "x$CUPS_FOUND" = xno; then
43347
43348  # Print a helpful message on how to acquire the necessary build dependency.
43349  # cups is the help tag: freetype, cups, pulse, alsa etc
43350  MISSING_DEPENDENCY=cups
43351
43352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43353    cygwin_help $MISSING_DEPENDENCY
43354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43355    msys_help $MISSING_DEPENDENCY
43356  else
43357    PKGHANDLER_COMMAND=
43358
43359    case $PKGHANDLER in
43360      apt-get)
43361        apt_help     $MISSING_DEPENDENCY ;;
43362      yum)
43363        yum_help     $MISSING_DEPENDENCY ;;
43364      port)
43365        port_help    $MISSING_DEPENDENCY ;;
43366      pkgutil)
43367        pkgutil_help $MISSING_DEPENDENCY ;;
43368      pkgadd)
43369        pkgadd_help  $MISSING_DEPENDENCY ;;
43370    esac
43371
43372    if test "x$PKGHANDLER_COMMAND" != x; then
43373      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43374    fi
43375  fi
43376
43377      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43378    fi
43379  fi
43380
43381
43382
43383
43384
43385
43386  ###############################################################################
43387  #
43388  # The ubiquitous freetype library is used to render fonts.
43389  #
43390
43391# Check whether --with-freetype was given.
43392if test "${with_freetype+set}" = set; then :
43393  withval=$with_freetype;
43394fi
43395
43396
43397# Check whether --with-freetype-include was given.
43398if test "${with_freetype_include+set}" = set; then :
43399  withval=$with_freetype_include;
43400fi
43401
43402
43403# Check whether --with-freetype-lib was given.
43404if test "${with_freetype_lib+set}" = set; then :
43405  withval=$with_freetype_lib;
43406fi
43407
43408  # Check whether --enable-freetype-bundling was given.
43409if test "${enable_freetype_bundling+set}" = set; then :
43410  enableval=$enable_freetype_bundling;
43411fi
43412
43413
43414  FREETYPE_CFLAGS=
43415  FREETYPE_LIBS=
43416  FREETYPE_BUNDLE_LIB_PATH=
43417
43418  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43419    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43420      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43421$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43422    fi
43423    if test "x$enable_freetype_bundling" != x; then
43424      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43425$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43426    fi
43427  else
43428    # freetype is needed to build; go get it!
43429
43430    BUNDLE_FREETYPE="$enable_freetype_bundling"
43431
43432    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43433      # User has specified settings
43434
43435      if test "x$BUNDLE_FREETYPE" = x; then
43436        # If not specified, default is to bundle freetype
43437        BUNDLE_FREETYPE=yes
43438      fi
43439
43440      if test "x$with_freetype" != x; then
43441        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43442        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43443      fi
43444
43445      # Allow --with-freetype-lib and --with-freetype-include to override
43446      if test "x$with_freetype_include" != x; then
43447        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43448      fi
43449      if test "x$with_freetype_lib" != x; then
43450        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43451      fi
43452
43453      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43454        # Okay, we got it. Check that it works.
43455
43456  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43457  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43458  METHOD="--with-freetype"
43459
43460  # First check if the files exists.
43461  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43462    # We found an arbitrary include file. That's a good sign.
43463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43464$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43465    FOUND_FREETYPE=yes
43466
43467    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43468    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43469      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43470$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43471      FOUND_FREETYPE=no
43472    else
43473      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43474        # On Windows, we will need both .lib and .dll file.
43475        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43476          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43478          FOUND_FREETYPE=no
43479        fi
43480      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
43481        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43482        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43483      fi
43484    fi
43485  fi
43486
43487  if test "x$FOUND_FREETYPE" = xyes; then
43488
43489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43490
43491  # Input might be given as Windows format, start by converting to
43492  # unix format.
43493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43494  new_path=`$CYGPATH -u "$path"`
43495
43496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43499  # "foo.exe" is OK but "foo" is an error.
43500  #
43501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43502  # It is also a way to make sure we got the proper file name for the real test later on.
43503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43504  if test "x$test_shortpath" = x; then
43505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43508  fi
43509
43510  # Call helper function which possibly converts this using DOS-style short mode.
43511  # If so, the updated path is stored in $new_path.
43512
43513  input_path="$new_path"
43514  # Check if we need to convert this using DOS-style short mode. If the path
43515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43516  # take no chances and rewrite it.
43517  # Note: m4 eats our [], so we need to use [ and ] instead.
43518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43519  if test "x$has_forbidden_chars" != x; then
43520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43524      # Going to short mode and back again did indeed matter. Since short mode is
43525      # case insensitive, let's make it lowercase to improve readability.
43526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43527      # Now convert it back to Unix-stile (cygpath)
43528      input_path=`$CYGPATH -u "$shortmode_path"`
43529      new_path="$input_path"
43530    fi
43531  fi
43532
43533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43534  if test "x$test_cygdrive_prefix" = x; then
43535    # As a simple fix, exclude /usr/bin since it's not a real path.
43536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43538      # a path prefixed by /cygdrive for fixpath to work.
43539      new_path="$CYGWIN_ROOT_PATH$input_path"
43540    fi
43541  fi
43542
43543
43544  if test "x$path" != "x$new_path"; then
43545    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43548  fi
43549
43550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43551
43552  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43553  has_colon=`$ECHO $path | $GREP ^.:`
43554  new_path="$path"
43555  if test "x$has_colon" = x; then
43556    # Not in mixed or Windows style, start by that.
43557    new_path=`cmd //c echo $path`
43558  fi
43559
43560
43561  input_path="$new_path"
43562  # Check if we need to convert this using DOS-style short mode. If the path
43563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43564  # take no chances and rewrite it.
43565  # Note: m4 eats our [], so we need to use [ and ] instead.
43566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43567  if test "x$has_forbidden_chars" != x; then
43568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43570  fi
43571
43572
43573  windows_path="$new_path"
43574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43575    unix_path=`$CYGPATH -u "$windows_path"`
43576    new_path="$unix_path"
43577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43579    new_path="$unix_path"
43580  fi
43581
43582  if test "x$path" != "x$new_path"; then
43583    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43586  fi
43587
43588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43590
43591  else
43592    # We're on a posix platform. Hooray! :)
43593    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43594    has_space=`$ECHO "$path" | $GREP " "`
43595    if test "x$has_space" != x; then
43596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43599    fi
43600
43601    # Use eval to expand a potential ~
43602    eval path="$path"
43603    if test ! -f "$path" && test ! -d "$path"; then
43604      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43605    fi
43606
43607    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43608  fi
43609
43610
43611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43612
43613  # Input might be given as Windows format, start by converting to
43614  # unix format.
43615  path="$POTENTIAL_FREETYPE_LIB_PATH"
43616  new_path=`$CYGPATH -u "$path"`
43617
43618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43621  # "foo.exe" is OK but "foo" is an error.
43622  #
43623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43624  # It is also a way to make sure we got the proper file name for the real test later on.
43625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43626  if test "x$test_shortpath" = x; then
43627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43628$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43629    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43630  fi
43631
43632  # Call helper function which possibly converts this using DOS-style short mode.
43633  # If so, the updated path is stored in $new_path.
43634
43635  input_path="$new_path"
43636  # Check if we need to convert this using DOS-style short mode. If the path
43637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43638  # take no chances and rewrite it.
43639  # Note: m4 eats our [], so we need to use [ and ] instead.
43640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43641  if test "x$has_forbidden_chars" != x; then
43642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43646      # Going to short mode and back again did indeed matter. Since short mode is
43647      # case insensitive, let's make it lowercase to improve readability.
43648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43649      # Now convert it back to Unix-stile (cygpath)
43650      input_path=`$CYGPATH -u "$shortmode_path"`
43651      new_path="$input_path"
43652    fi
43653  fi
43654
43655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43656  if test "x$test_cygdrive_prefix" = x; then
43657    # As a simple fix, exclude /usr/bin since it's not a real path.
43658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43660      # a path prefixed by /cygdrive for fixpath to work.
43661      new_path="$CYGWIN_ROOT_PATH$input_path"
43662    fi
43663  fi
43664
43665
43666  if test "x$path" != "x$new_path"; then
43667    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43669$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43670  fi
43671
43672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43673
43674  path="$POTENTIAL_FREETYPE_LIB_PATH"
43675  has_colon=`$ECHO $path | $GREP ^.:`
43676  new_path="$path"
43677  if test "x$has_colon" = x; then
43678    # Not in mixed or Windows style, start by that.
43679    new_path=`cmd //c echo $path`
43680  fi
43681
43682
43683  input_path="$new_path"
43684  # Check if we need to convert this using DOS-style short mode. If the path
43685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43686  # take no chances and rewrite it.
43687  # Note: m4 eats our [], so we need to use [ and ] instead.
43688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43689  if test "x$has_forbidden_chars" != x; then
43690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43692  fi
43693
43694
43695  windows_path="$new_path"
43696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43697    unix_path=`$CYGPATH -u "$windows_path"`
43698    new_path="$unix_path"
43699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43701    new_path="$unix_path"
43702  fi
43703
43704  if test "x$path" != "x$new_path"; then
43705    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43708  fi
43709
43710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43712
43713  else
43714    # We're on a posix platform. Hooray! :)
43715    path="$POTENTIAL_FREETYPE_LIB_PATH"
43716    has_space=`$ECHO "$path" | $GREP " "`
43717    if test "x$has_space" != x; then
43718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43720      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43721    fi
43722
43723    # Use eval to expand a potential ~
43724    eval path="$path"
43725    if test ! -f "$path" && test ! -d "$path"; then
43726      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43727    fi
43728
43729    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43730  fi
43731
43732
43733    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43735$as_echo_n "checking for freetype includes... " >&6; }
43736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43737$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43738    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43740$as_echo_n "checking for freetype libraries... " >&6; }
43741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43742$as_echo "$FREETYPE_LIB_PATH" >&6; }
43743  fi
43744
43745        if test "x$FOUND_FREETYPE" != xyes; then
43746          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43747        fi
43748      else
43749        # User specified only one of lib or include. This is an error.
43750        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43751          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43752$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43753          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43754        else
43755          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43756$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43757          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43758        fi
43759      fi
43760    else
43761      # User did not specify settings, but we need freetype. Try to locate it.
43762
43763      if test "x$BUNDLE_FREETYPE" = x; then
43764        # If not specified, default is to bundle freetype only on windows
43765        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43766          BUNDLE_FREETYPE=yes
43767        else
43768          BUNDLE_FREETYPE=no
43769        fi
43770      fi
43771
43772      if test "x$FOUND_FREETYPE" != xyes; then
43773        # Check builddeps
43774
43775
43776  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43777    # Source the builddeps file again, to make sure it uses the latest variables!
43778    . $builddepsfile
43779    # Look for a target and build machine specific resource!
43780    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43781    if test "x$resource" = x; then
43782      # Ok, lets instead look for a target specific resource
43783      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43784    fi
43785    if test "x$resource" = x; then
43786      # Ok, lets instead look for a build specific resource
43787      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43788    fi
43789    if test "x$resource" = x; then
43790      # Ok, lets instead look for a generic resource
43791      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43792      resource=${builddep_freetype2}
43793    fi
43794    if test "x$resource" != x; then
43795      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43796$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43797      # If the resource in the builddeps.conf file is an existing directory,
43798      # for example /java/linux/cups
43799      if test -d ${resource}; then
43800        depdir=${resource}
43801      else
43802
43803  # freetype2 is for example mymodule
43804  # $resource is for example libs/general/libmymod_1_2_3.zip
43805  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43806  # $with_builddeps_dir is for example /localhome/builddeps
43807  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43808  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43809  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43810  filename=`basename $resource`
43811  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43812  filebase=${filename%%.*}
43813  extension=${filename#*.}
43814  installdir=$with_builddeps_dir/$filebase
43815  if test ! -f $installdir/$filename.unpacked; then
43816    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43817$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43818    if test ! -d $installdir; then
43819      mkdir -p $installdir
43820    fi
43821    if test ! -d $installdir; then
43822      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43823    fi
43824    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43825    touch $tmpfile
43826    if test ! -f $tmpfile; then
43827      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43828    fi
43829
43830  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43831  # $tmpfile is the local file name for the downloaded file.
43832  VALID_TOOL=no
43833  if test "x$BDEPS_FTP" = xwget; then
43834    VALID_TOOL=yes
43835    wget -O $tmpfile $with_builddeps_server/$resource
43836  fi
43837  if test "x$BDEPS_FTP" = xlftp; then
43838    VALID_TOOL=yes
43839    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43840  fi
43841  if test "x$BDEPS_FTP" = xftp; then
43842    VALID_TOOL=yes
43843    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43844    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43845    FTPUSERPWD=${FTPSERVER%%@*}
43846    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43847      FTPUSER=${userpwd%%:*}
43848      FTPPWD=${userpwd#*@}
43849      FTPSERVER=${FTPSERVER#*@}
43850    else
43851      FTPUSER=ftp
43852      FTPPWD=ftp
43853    fi
43854    # the "pass" command does not work on some
43855    # ftp clients (read ftp.exe) but if it works,
43856    # passive mode is better!
43857    ( \
43858        echo "user $FTPUSER $FTPPWD"        ; \
43859        echo "pass"                         ; \
43860        echo "bin"                          ; \
43861        echo "get $FTPPATH $tmpfile"              ; \
43862    ) | ftp -in $FTPSERVER
43863  fi
43864  if test "x$VALID_TOOL" != xyes; then
43865    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43866  fi
43867
43868    mv $tmpfile $installdir/$filename
43869    if test ! -s $installdir/$filename; then
43870      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43871    fi
43872    case "$extension" in
43873      zip)  echo "Unzipping $installdir/$filename..."
43874        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43875        ;;
43876      tar.gz) echo "Untaring $installdir/$filename..."
43877        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43878        ;;
43879      tgz) echo "Untaring $installdir/$filename..."
43880        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43881        ;;
43882      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43883        ;;
43884    esac
43885  fi
43886  if test -f $installdir/$filename.unpacked; then
43887    depdir=$installdir
43888  fi
43889
43890      fi
43891      # Source the builddeps file again, because in the previous command, the depdir
43892      # was updated to point at the current build dependency install directory.
43893      . $builddepsfile
43894      # Now extract variables from the builddeps.conf files.
43895      theroot=${builddep_freetype2_ROOT}
43896      thecflags=${builddep_freetype2_CFLAGS}
43897      thelibs=${builddep_freetype2_LIBS}
43898      if test "x$depdir" = x; then
43899        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43900      fi
43901      FREETYPE=$depdir
43902      if test "x$theroot" != x; then
43903        FREETYPE="$theroot"
43904      fi
43905      if test "x$thecflags" != x; then
43906        FREETYPE_CFLAGS="$thecflags"
43907      fi
43908      if test "x$thelibs" != x; then
43909        FREETYPE_LIBS="$thelibs"
43910      fi
43911      FOUND_FREETYPE=yes
43912      else FOUND_FREETYPE=no
43913
43914    fi
43915    else FOUND_FREETYPE=no
43916
43917  fi
43918
43919        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43920        if test "x$FOUND_FREETYPE" = xyes; then
43921          if test "x$BUNDLE_FREETYPE" = xyes; then
43922            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43923$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43924            FOUND_FREETYPE=no
43925          else
43926            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43927$as_echo_n "checking for freetype... " >&6; }
43928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43929$as_echo "yes (using builddeps)" >&6; }
43930          fi
43931        fi
43932      fi
43933
43934      if test "x$FOUND_FREETYPE" != xyes; then
43935        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43936        if test "x$PKG_CONFIG" != x; then
43937
43938pkg_failed=no
43939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43940$as_echo_n "checking for FREETYPE... " >&6; }
43941
43942if test -n "$FREETYPE_CFLAGS"; then
43943    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43944 elif test -n "$PKG_CONFIG"; then
43945    if test -n "$PKG_CONFIG" && \
43946    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43947  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43948  ac_status=$?
43949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43950  test $ac_status = 0; }; then
43951  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43952else
43953  pkg_failed=yes
43954fi
43955 else
43956    pkg_failed=untried
43957fi
43958if test -n "$FREETYPE_LIBS"; then
43959    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43960 elif test -n "$PKG_CONFIG"; then
43961    if test -n "$PKG_CONFIG" && \
43962    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43963  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43964  ac_status=$?
43965  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43966  test $ac_status = 0; }; then
43967  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43968else
43969  pkg_failed=yes
43970fi
43971 else
43972    pkg_failed=untried
43973fi
43974
43975
43976
43977if test $pkg_failed = yes; then
43978
43979if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43980        _pkg_short_errors_supported=yes
43981else
43982        _pkg_short_errors_supported=no
43983fi
43984        if test $_pkg_short_errors_supported = yes; then
43985	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43986        else
43987	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43988        fi
43989	# Put the nasty error message in config.log where it belongs
43990	echo "$FREETYPE_PKG_ERRORS" >&5
43991
43992	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43993$as_echo "no" >&6; }
43994                FOUND_FREETYPE=no
43995elif test $pkg_failed = untried; then
43996	FOUND_FREETYPE=no
43997else
43998	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43999	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44001$as_echo "yes" >&6; }
44002	FOUND_FREETYPE=yes
44003fi
44004          if test "x$FOUND_FREETYPE" = xyes; then
44005            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44006            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44007            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44008            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44009              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44010            fi
44011            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44012            if test "x$BUNDLE_FREETYPE" = xyes; then
44013              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44014$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44015              FOUND_FREETYPE=no
44016            else
44017              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44018$as_echo_n "checking for freetype... " >&6; }
44019              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44020$as_echo "yes (using pkg-config)" >&6; }
44021            fi
44022          fi
44023        fi
44024      fi
44025
44026      if test "x$FOUND_FREETYPE" != xyes; then
44027        # Check in well-known locations
44028        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44029          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44030
44031  windows_path="$FREETYPE_BASE_DIR"
44032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44033    unix_path=`$CYGPATH -u "$windows_path"`
44034    FREETYPE_BASE_DIR="$unix_path"
44035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44037    FREETYPE_BASE_DIR="$unix_path"
44038  fi
44039
44040
44041  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44042  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44043  METHOD="well-known location"
44044
44045  # First check if the files exists.
44046  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44047    # We found an arbitrary include file. That's a good sign.
44048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44049$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44050    FOUND_FREETYPE=yes
44051
44052    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44053    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44054      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44055$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44056      FOUND_FREETYPE=no
44057    else
44058      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44059        # On Windows, we will need both .lib and .dll file.
44060        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44061          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44062$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44063          FOUND_FREETYPE=no
44064        fi
44065      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44066        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44067        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44068      fi
44069    fi
44070  fi
44071
44072  if test "x$FOUND_FREETYPE" = xyes; then
44073
44074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44075
44076  # Input might be given as Windows format, start by converting to
44077  # unix format.
44078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44079  new_path=`$CYGPATH -u "$path"`
44080
44081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44084  # "foo.exe" is OK but "foo" is an error.
44085  #
44086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44087  # It is also a way to make sure we got the proper file name for the real test later on.
44088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44089  if test "x$test_shortpath" = x; then
44090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44093  fi
44094
44095  # Call helper function which possibly converts this using DOS-style short mode.
44096  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44109      # Going to short mode and back again did indeed matter. Since short mode is
44110      # case insensitive, let's make it lowercase to improve readability.
44111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44112      # Now convert it back to Unix-stile (cygpath)
44113      input_path=`$CYGPATH -u "$shortmode_path"`
44114      new_path="$input_path"
44115    fi
44116  fi
44117
44118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44119  if test "x$test_cygdrive_prefix" = x; then
44120    # As a simple fix, exclude /usr/bin since it's not a real path.
44121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44123      # a path prefixed by /cygdrive for fixpath to work.
44124      new_path="$CYGWIN_ROOT_PATH$input_path"
44125    fi
44126  fi
44127
44128
44129  if test "x$path" != "x$new_path"; then
44130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44133  fi
44134
44135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44136
44137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44138  has_colon=`$ECHO $path | $GREP ^.:`
44139  new_path="$path"
44140  if test "x$has_colon" = x; then
44141    # Not in mixed or Windows style, start by that.
44142    new_path=`cmd //c echo $path`
44143  fi
44144
44145
44146  input_path="$new_path"
44147  # Check if we need to convert this using DOS-style short mode. If the path
44148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44149  # take no chances and rewrite it.
44150  # Note: m4 eats our [], so we need to use [ and ] instead.
44151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44152  if test "x$has_forbidden_chars" != x; then
44153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44155  fi
44156
44157
44158  windows_path="$new_path"
44159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44160    unix_path=`$CYGPATH -u "$windows_path"`
44161    new_path="$unix_path"
44162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44164    new_path="$unix_path"
44165  fi
44166
44167  if test "x$path" != "x$new_path"; then
44168    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44171  fi
44172
44173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44175
44176  else
44177    # We're on a posix platform. Hooray! :)
44178    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44179    has_space=`$ECHO "$path" | $GREP " "`
44180    if test "x$has_space" != x; then
44181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44183      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44184    fi
44185
44186    # Use eval to expand a potential ~
44187    eval path="$path"
44188    if test ! -f "$path" && test ! -d "$path"; then
44189      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44190    fi
44191
44192    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44193  fi
44194
44195
44196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44197
44198  # Input might be given as Windows format, start by converting to
44199  # unix format.
44200  path="$POTENTIAL_FREETYPE_LIB_PATH"
44201  new_path=`$CYGPATH -u "$path"`
44202
44203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44206  # "foo.exe" is OK but "foo" is an error.
44207  #
44208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44209  # It is also a way to make sure we got the proper file name for the real test later on.
44210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44211  if test "x$test_shortpath" = x; then
44212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44215  fi
44216
44217  # Call helper function which possibly converts this using DOS-style short mode.
44218  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44231      # Going to short mode and back again did indeed matter. Since short mode is
44232      # case insensitive, let's make it lowercase to improve readability.
44233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44234      # Now convert it back to Unix-stile (cygpath)
44235      input_path=`$CYGPATH -u "$shortmode_path"`
44236      new_path="$input_path"
44237    fi
44238  fi
44239
44240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44241  if test "x$test_cygdrive_prefix" = x; then
44242    # As a simple fix, exclude /usr/bin since it's not a real path.
44243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44245      # a path prefixed by /cygdrive for fixpath to work.
44246      new_path="$CYGWIN_ROOT_PATH$input_path"
44247    fi
44248  fi
44249
44250
44251  if test "x$path" != "x$new_path"; then
44252    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44255  fi
44256
44257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44258
44259  path="$POTENTIAL_FREETYPE_LIB_PATH"
44260  has_colon=`$ECHO $path | $GREP ^.:`
44261  new_path="$path"
44262  if test "x$has_colon" = x; then
44263    # Not in mixed or Windows style, start by that.
44264    new_path=`cmd //c echo $path`
44265  fi
44266
44267
44268  input_path="$new_path"
44269  # Check if we need to convert this using DOS-style short mode. If the path
44270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44271  # take no chances and rewrite it.
44272  # Note: m4 eats our [], so we need to use [ and ] instead.
44273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44274  if test "x$has_forbidden_chars" != x; then
44275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44277  fi
44278
44279
44280  windows_path="$new_path"
44281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44282    unix_path=`$CYGPATH -u "$windows_path"`
44283    new_path="$unix_path"
44284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44286    new_path="$unix_path"
44287  fi
44288
44289  if test "x$path" != "x$new_path"; then
44290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44293  fi
44294
44295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44297
44298  else
44299    # We're on a posix platform. Hooray! :)
44300    path="$POTENTIAL_FREETYPE_LIB_PATH"
44301    has_space=`$ECHO "$path" | $GREP " "`
44302    if test "x$has_space" != x; then
44303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44305      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44306    fi
44307
44308    # Use eval to expand a potential ~
44309    eval path="$path"
44310    if test ! -f "$path" && test ! -d "$path"; then
44311      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44312    fi
44313
44314    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44315  fi
44316
44317
44318    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44320$as_echo_n "checking for freetype includes... " >&6; }
44321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44322$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44323    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44325$as_echo_n "checking for freetype libraries... " >&6; }
44326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44327$as_echo "$FREETYPE_LIB_PATH" >&6; }
44328  fi
44329
44330          if test "x$FOUND_FREETYPE" != xyes; then
44331            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44332
44333  windows_path="$FREETYPE_BASE_DIR"
44334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44335    unix_path=`$CYGPATH -u "$windows_path"`
44336    FREETYPE_BASE_DIR="$unix_path"
44337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44339    FREETYPE_BASE_DIR="$unix_path"
44340  fi
44341
44342
44343  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44344  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44345  METHOD="well-known location"
44346
44347  # First check if the files exists.
44348  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44349    # We found an arbitrary include file. That's a good sign.
44350    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44351$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44352    FOUND_FREETYPE=yes
44353
44354    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44355    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44356      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44357$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44358      FOUND_FREETYPE=no
44359    else
44360      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44361        # On Windows, we will need both .lib and .dll file.
44362        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44363          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44364$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44365          FOUND_FREETYPE=no
44366        fi
44367      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44368        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44369        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44370      fi
44371    fi
44372  fi
44373
44374  if test "x$FOUND_FREETYPE" = xyes; then
44375
44376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44377
44378  # Input might be given as Windows format, start by converting to
44379  # unix format.
44380  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44381  new_path=`$CYGPATH -u "$path"`
44382
44383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44386  # "foo.exe" is OK but "foo" is an error.
44387  #
44388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44389  # It is also a way to make sure we got the proper file name for the real test later on.
44390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44391  if test "x$test_shortpath" = x; then
44392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44394    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44395  fi
44396
44397  # Call helper function which possibly converts this using DOS-style short mode.
44398  # If so, the updated path is stored in $new_path.
44399
44400  input_path="$new_path"
44401  # Check if we need to convert this using DOS-style short mode. If the path
44402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44403  # take no chances and rewrite it.
44404  # Note: m4 eats our [], so we need to use [ and ] instead.
44405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44406  if test "x$has_forbidden_chars" != x; then
44407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44411      # Going to short mode and back again did indeed matter. Since short mode is
44412      # case insensitive, let's make it lowercase to improve readability.
44413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44414      # Now convert it back to Unix-stile (cygpath)
44415      input_path=`$CYGPATH -u "$shortmode_path"`
44416      new_path="$input_path"
44417    fi
44418  fi
44419
44420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44421  if test "x$test_cygdrive_prefix" = x; then
44422    # As a simple fix, exclude /usr/bin since it's not a real path.
44423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44425      # a path prefixed by /cygdrive for fixpath to work.
44426      new_path="$CYGWIN_ROOT_PATH$input_path"
44427    fi
44428  fi
44429
44430
44431  if test "x$path" != "x$new_path"; then
44432    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44435  fi
44436
44437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438
44439  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44440  has_colon=`$ECHO $path | $GREP ^.:`
44441  new_path="$path"
44442  if test "x$has_colon" = x; then
44443    # Not in mixed or Windows style, start by that.
44444    new_path=`cmd //c echo $path`
44445  fi
44446
44447
44448  input_path="$new_path"
44449  # Check if we need to convert this using DOS-style short mode. If the path
44450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44451  # take no chances and rewrite it.
44452  # Note: m4 eats our [], so we need to use [ and ] instead.
44453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44454  if test "x$has_forbidden_chars" != x; then
44455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44457  fi
44458
44459
44460  windows_path="$new_path"
44461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44462    unix_path=`$CYGPATH -u "$windows_path"`
44463    new_path="$unix_path"
44464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44466    new_path="$unix_path"
44467  fi
44468
44469  if test "x$path" != "x$new_path"; then
44470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44473  fi
44474
44475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44477
44478  else
44479    # We're on a posix platform. Hooray! :)
44480    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44481    has_space=`$ECHO "$path" | $GREP " "`
44482    if test "x$has_space" != x; then
44483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44485      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44486    fi
44487
44488    # Use eval to expand a potential ~
44489    eval path="$path"
44490    if test ! -f "$path" && test ! -d "$path"; then
44491      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44492    fi
44493
44494    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44495  fi
44496
44497
44498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44499
44500  # Input might be given as Windows format, start by converting to
44501  # unix format.
44502  path="$POTENTIAL_FREETYPE_LIB_PATH"
44503  new_path=`$CYGPATH -u "$path"`
44504
44505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44508  # "foo.exe" is OK but "foo" is an error.
44509  #
44510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44511  # It is also a way to make sure we got the proper file name for the real test later on.
44512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44513  if test "x$test_shortpath" = x; then
44514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44516    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44517  fi
44518
44519  # Call helper function which possibly converts this using DOS-style short mode.
44520  # If so, the updated path is stored in $new_path.
44521
44522  input_path="$new_path"
44523  # Check if we need to convert this using DOS-style short mode. If the path
44524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44525  # take no chances and rewrite it.
44526  # Note: m4 eats our [], so we need to use [ and ] instead.
44527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44528  if test "x$has_forbidden_chars" != x; then
44529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44533      # Going to short mode and back again did indeed matter. Since short mode is
44534      # case insensitive, let's make it lowercase to improve readability.
44535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44536      # Now convert it back to Unix-stile (cygpath)
44537      input_path=`$CYGPATH -u "$shortmode_path"`
44538      new_path="$input_path"
44539    fi
44540  fi
44541
44542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44543  if test "x$test_cygdrive_prefix" = x; then
44544    # As a simple fix, exclude /usr/bin since it's not a real path.
44545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44547      # a path prefixed by /cygdrive for fixpath to work.
44548      new_path="$CYGWIN_ROOT_PATH$input_path"
44549    fi
44550  fi
44551
44552
44553  if test "x$path" != "x$new_path"; then
44554    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44556$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44557  fi
44558
44559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44560
44561  path="$POTENTIAL_FREETYPE_LIB_PATH"
44562  has_colon=`$ECHO $path | $GREP ^.:`
44563  new_path="$path"
44564  if test "x$has_colon" = x; then
44565    # Not in mixed or Windows style, start by that.
44566    new_path=`cmd //c echo $path`
44567  fi
44568
44569
44570  input_path="$new_path"
44571  # Check if we need to convert this using DOS-style short mode. If the path
44572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44573  # take no chances and rewrite it.
44574  # Note: m4 eats our [], so we need to use [ and ] instead.
44575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44576  if test "x$has_forbidden_chars" != x; then
44577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44579  fi
44580
44581
44582  windows_path="$new_path"
44583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44584    unix_path=`$CYGPATH -u "$windows_path"`
44585    new_path="$unix_path"
44586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44588    new_path="$unix_path"
44589  fi
44590
44591  if test "x$path" != "x$new_path"; then
44592    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44595  fi
44596
44597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44599
44600  else
44601    # We're on a posix platform. Hooray! :)
44602    path="$POTENTIAL_FREETYPE_LIB_PATH"
44603    has_space=`$ECHO "$path" | $GREP " "`
44604    if test "x$has_space" != x; then
44605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44607      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44608    fi
44609
44610    # Use eval to expand a potential ~
44611    eval path="$path"
44612    if test ! -f "$path" && test ! -d "$path"; then
44613      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44614    fi
44615
44616    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44617  fi
44618
44619
44620    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44622$as_echo_n "checking for freetype includes... " >&6; }
44623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44624$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44625    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44627$as_echo_n "checking for freetype libraries... " >&6; }
44628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44629$as_echo "$FREETYPE_LIB_PATH" >&6; }
44630  fi
44631
44632          fi
44633        else
44634          if test "x$SYS_ROOT" = "x/"; then
44635            FREETYPE_ROOT=
44636          else
44637            FREETYPE_ROOT="$SYS_ROOT"
44638          fi
44639          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44640
44641  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44642  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44643  METHOD="well-known location"
44644
44645  # First check if the files exists.
44646  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44647    # We found an arbitrary include file. That's a good sign.
44648    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44649$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44650    FOUND_FREETYPE=yes
44651
44652    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44653    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44654      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44655$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44656      FOUND_FREETYPE=no
44657    else
44658      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44659        # On Windows, we will need both .lib and .dll file.
44660        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44661          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44662$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44663          FOUND_FREETYPE=no
44664        fi
44665      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44666        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44667        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44668      fi
44669    fi
44670  fi
44671
44672  if test "x$FOUND_FREETYPE" = xyes; then
44673
44674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44675
44676  # Input might be given as Windows format, start by converting to
44677  # unix format.
44678  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44679  new_path=`$CYGPATH -u "$path"`
44680
44681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44684  # "foo.exe" is OK but "foo" is an error.
44685  #
44686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44687  # It is also a way to make sure we got the proper file name for the real test later on.
44688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44689  if test "x$test_shortpath" = x; then
44690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44691$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44692    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44693  fi
44694
44695  # Call helper function which possibly converts this using DOS-style short mode.
44696  # If so, the updated path is stored in $new_path.
44697
44698  input_path="$new_path"
44699  # Check if we need to convert this using DOS-style short mode. If the path
44700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44701  # take no chances and rewrite it.
44702  # Note: m4 eats our [], so we need to use [ and ] instead.
44703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44704  if test "x$has_forbidden_chars" != x; then
44705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44709      # Going to short mode and back again did indeed matter. Since short mode is
44710      # case insensitive, let's make it lowercase to improve readability.
44711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44712      # Now convert it back to Unix-stile (cygpath)
44713      input_path=`$CYGPATH -u "$shortmode_path"`
44714      new_path="$input_path"
44715    fi
44716  fi
44717
44718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44719  if test "x$test_cygdrive_prefix" = x; then
44720    # As a simple fix, exclude /usr/bin since it's not a real path.
44721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44723      # a path prefixed by /cygdrive for fixpath to work.
44724      new_path="$CYGWIN_ROOT_PATH$input_path"
44725    fi
44726  fi
44727
44728
44729  if test "x$path" != "x$new_path"; then
44730    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44732$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44733  fi
44734
44735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44736
44737  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44738  has_colon=`$ECHO $path | $GREP ^.:`
44739  new_path="$path"
44740  if test "x$has_colon" = x; then
44741    # Not in mixed or Windows style, start by that.
44742    new_path=`cmd //c echo $path`
44743  fi
44744
44745
44746  input_path="$new_path"
44747  # Check if we need to convert this using DOS-style short mode. If the path
44748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44749  # take no chances and rewrite it.
44750  # Note: m4 eats our [], so we need to use [ and ] instead.
44751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44752  if test "x$has_forbidden_chars" != x; then
44753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44755  fi
44756
44757
44758  windows_path="$new_path"
44759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44760    unix_path=`$CYGPATH -u "$windows_path"`
44761    new_path="$unix_path"
44762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44764    new_path="$unix_path"
44765  fi
44766
44767  if test "x$path" != "x$new_path"; then
44768    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44771  fi
44772
44773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44775
44776  else
44777    # We're on a posix platform. Hooray! :)
44778    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44779    has_space=`$ECHO "$path" | $GREP " "`
44780    if test "x$has_space" != x; then
44781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44782$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44783      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44784    fi
44785
44786    # Use eval to expand a potential ~
44787    eval path="$path"
44788    if test ! -f "$path" && test ! -d "$path"; then
44789      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44790    fi
44791
44792    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44793  fi
44794
44795
44796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44797
44798  # Input might be given as Windows format, start by converting to
44799  # unix format.
44800  path="$POTENTIAL_FREETYPE_LIB_PATH"
44801  new_path=`$CYGPATH -u "$path"`
44802
44803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44806  # "foo.exe" is OK but "foo" is an error.
44807  #
44808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44809  # It is also a way to make sure we got the proper file name for the real test later on.
44810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44811  if test "x$test_shortpath" = x; then
44812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44813$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44814    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44815  fi
44816
44817  # Call helper function which possibly converts this using DOS-style short mode.
44818  # If so, the updated path is stored in $new_path.
44819
44820  input_path="$new_path"
44821  # Check if we need to convert this using DOS-style short mode. If the path
44822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44823  # take no chances and rewrite it.
44824  # Note: m4 eats our [], so we need to use [ and ] instead.
44825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44826  if test "x$has_forbidden_chars" != x; then
44827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44831      # Going to short mode and back again did indeed matter. Since short mode is
44832      # case insensitive, let's make it lowercase to improve readability.
44833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44834      # Now convert it back to Unix-stile (cygpath)
44835      input_path=`$CYGPATH -u "$shortmode_path"`
44836      new_path="$input_path"
44837    fi
44838  fi
44839
44840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44841  if test "x$test_cygdrive_prefix" = x; then
44842    # As a simple fix, exclude /usr/bin since it's not a real path.
44843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44845      # a path prefixed by /cygdrive for fixpath to work.
44846      new_path="$CYGWIN_ROOT_PATH$input_path"
44847    fi
44848  fi
44849
44850
44851  if test "x$path" != "x$new_path"; then
44852    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44854$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44855  fi
44856
44857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44858
44859  path="$POTENTIAL_FREETYPE_LIB_PATH"
44860  has_colon=`$ECHO $path | $GREP ^.:`
44861  new_path="$path"
44862  if test "x$has_colon" = x; then
44863    # Not in mixed or Windows style, start by that.
44864    new_path=`cmd //c echo $path`
44865  fi
44866
44867
44868  input_path="$new_path"
44869  # Check if we need to convert this using DOS-style short mode. If the path
44870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44871  # take no chances and rewrite it.
44872  # Note: m4 eats our [], so we need to use [ and ] instead.
44873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44874  if test "x$has_forbidden_chars" != x; then
44875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44877  fi
44878
44879
44880  windows_path="$new_path"
44881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44882    unix_path=`$CYGPATH -u "$windows_path"`
44883    new_path="$unix_path"
44884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44886    new_path="$unix_path"
44887  fi
44888
44889  if test "x$path" != "x$new_path"; then
44890    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44893  fi
44894
44895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44897
44898  else
44899    # We're on a posix platform. Hooray! :)
44900    path="$POTENTIAL_FREETYPE_LIB_PATH"
44901    has_space=`$ECHO "$path" | $GREP " "`
44902    if test "x$has_space" != x; then
44903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44904$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44905      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44906    fi
44907
44908    # Use eval to expand a potential ~
44909    eval path="$path"
44910    if test ! -f "$path" && test ! -d "$path"; then
44911      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44912    fi
44913
44914    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44915  fi
44916
44917
44918    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44920$as_echo_n "checking for freetype includes... " >&6; }
44921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44922$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44923    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44925$as_echo_n "checking for freetype libraries... " >&6; }
44926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44927$as_echo "$FREETYPE_LIB_PATH" >&6; }
44928  fi
44929
44930
44931          if test "x$FOUND_FREETYPE" != xyes; then
44932            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44933
44934  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44935  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44936  METHOD="well-known location"
44937
44938  # First check if the files exists.
44939  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44940    # We found an arbitrary include file. That's a good sign.
44941    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44942$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44943    FOUND_FREETYPE=yes
44944
44945    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44946    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44947      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44948$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44949      FOUND_FREETYPE=no
44950    else
44951      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44952        # On Windows, we will need both .lib and .dll file.
44953        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44954          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44955$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44956          FOUND_FREETYPE=no
44957        fi
44958      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44959        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44960        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44961      fi
44962    fi
44963  fi
44964
44965  if test "x$FOUND_FREETYPE" = xyes; then
44966
44967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44968
44969  # Input might be given as Windows format, start by converting to
44970  # unix format.
44971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44972  new_path=`$CYGPATH -u "$path"`
44973
44974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44977  # "foo.exe" is OK but "foo" is an error.
44978  #
44979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44980  # It is also a way to make sure we got the proper file name for the real test later on.
44981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44982  if test "x$test_shortpath" = x; then
44983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44985    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44986  fi
44987
44988  # Call helper function which possibly converts this using DOS-style short mode.
44989  # If so, the updated path is stored in $new_path.
44990
44991  input_path="$new_path"
44992  # Check if we need to convert this using DOS-style short mode. If the path
44993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44994  # take no chances and rewrite it.
44995  # Note: m4 eats our [], so we need to use [ and ] instead.
44996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44997  if test "x$has_forbidden_chars" != x; then
44998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45002      # Going to short mode and back again did indeed matter. Since short mode is
45003      # case insensitive, let's make it lowercase to improve readability.
45004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45005      # Now convert it back to Unix-stile (cygpath)
45006      input_path=`$CYGPATH -u "$shortmode_path"`
45007      new_path="$input_path"
45008    fi
45009  fi
45010
45011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45012  if test "x$test_cygdrive_prefix" = x; then
45013    # As a simple fix, exclude /usr/bin since it's not a real path.
45014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45016      # a path prefixed by /cygdrive for fixpath to work.
45017      new_path="$CYGWIN_ROOT_PATH$input_path"
45018    fi
45019  fi
45020
45021
45022  if test "x$path" != "x$new_path"; then
45023    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45025$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45026  fi
45027
45028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45029
45030  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45031  has_colon=`$ECHO $path | $GREP ^.:`
45032  new_path="$path"
45033  if test "x$has_colon" = x; then
45034    # Not in mixed or Windows style, start by that.
45035    new_path=`cmd //c echo $path`
45036  fi
45037
45038
45039  input_path="$new_path"
45040  # Check if we need to convert this using DOS-style short mode. If the path
45041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45042  # take no chances and rewrite it.
45043  # Note: m4 eats our [], so we need to use [ and ] instead.
45044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45045  if test "x$has_forbidden_chars" != x; then
45046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45048  fi
45049
45050
45051  windows_path="$new_path"
45052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45053    unix_path=`$CYGPATH -u "$windows_path"`
45054    new_path="$unix_path"
45055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45057    new_path="$unix_path"
45058  fi
45059
45060  if test "x$path" != "x$new_path"; then
45061    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45064  fi
45065
45066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45068
45069  else
45070    # We're on a posix platform. Hooray! :)
45071    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45072    has_space=`$ECHO "$path" | $GREP " "`
45073    if test "x$has_space" != x; then
45074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45076      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45077    fi
45078
45079    # Use eval to expand a potential ~
45080    eval path="$path"
45081    if test ! -f "$path" && test ! -d "$path"; then
45082      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45083    fi
45084
45085    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45086  fi
45087
45088
45089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45090
45091  # Input might be given as Windows format, start by converting to
45092  # unix format.
45093  path="$POTENTIAL_FREETYPE_LIB_PATH"
45094  new_path=`$CYGPATH -u "$path"`
45095
45096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45099  # "foo.exe" is OK but "foo" is an error.
45100  #
45101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45102  # It is also a way to make sure we got the proper file name for the real test later on.
45103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45104  if test "x$test_shortpath" = x; then
45105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45107    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45108  fi
45109
45110  # Call helper function which possibly converts this using DOS-style short mode.
45111  # If so, the updated path is stored in $new_path.
45112
45113  input_path="$new_path"
45114  # Check if we need to convert this using DOS-style short mode. If the path
45115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45116  # take no chances and rewrite it.
45117  # Note: m4 eats our [], so we need to use [ and ] instead.
45118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45119  if test "x$has_forbidden_chars" != x; then
45120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45124      # Going to short mode and back again did indeed matter. Since short mode is
45125      # case insensitive, let's make it lowercase to improve readability.
45126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45127      # Now convert it back to Unix-stile (cygpath)
45128      input_path=`$CYGPATH -u "$shortmode_path"`
45129      new_path="$input_path"
45130    fi
45131  fi
45132
45133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45134  if test "x$test_cygdrive_prefix" = x; then
45135    # As a simple fix, exclude /usr/bin since it's not a real path.
45136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45138      # a path prefixed by /cygdrive for fixpath to work.
45139      new_path="$CYGWIN_ROOT_PATH$input_path"
45140    fi
45141  fi
45142
45143
45144  if test "x$path" != "x$new_path"; then
45145    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45148  fi
45149
45150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45151
45152  path="$POTENTIAL_FREETYPE_LIB_PATH"
45153  has_colon=`$ECHO $path | $GREP ^.:`
45154  new_path="$path"
45155  if test "x$has_colon" = x; then
45156    # Not in mixed or Windows style, start by that.
45157    new_path=`cmd //c echo $path`
45158  fi
45159
45160
45161  input_path="$new_path"
45162  # Check if we need to convert this using DOS-style short mode. If the path
45163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45164  # take no chances and rewrite it.
45165  # Note: m4 eats our [], so we need to use [ and ] instead.
45166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45167  if test "x$has_forbidden_chars" != x; then
45168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45170  fi
45171
45172
45173  windows_path="$new_path"
45174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45175    unix_path=`$CYGPATH -u "$windows_path"`
45176    new_path="$unix_path"
45177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45179    new_path="$unix_path"
45180  fi
45181
45182  if test "x$path" != "x$new_path"; then
45183    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45185$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45186  fi
45187
45188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45190
45191  else
45192    # We're on a posix platform. Hooray! :)
45193    path="$POTENTIAL_FREETYPE_LIB_PATH"
45194    has_space=`$ECHO "$path" | $GREP " "`
45195    if test "x$has_space" != x; then
45196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45199    fi
45200
45201    # Use eval to expand a potential ~
45202    eval path="$path"
45203    if test ! -f "$path" && test ! -d "$path"; then
45204      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45205    fi
45206
45207    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45208  fi
45209
45210
45211    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45213$as_echo_n "checking for freetype includes... " >&6; }
45214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45215$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45216    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45218$as_echo_n "checking for freetype libraries... " >&6; }
45219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45220$as_echo "$FREETYPE_LIB_PATH" >&6; }
45221  fi
45222
45223          fi
45224
45225          if test "x$FOUND_FREETYPE" != xyes; then
45226            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45227            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45228
45229  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45230  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45231  METHOD="well-known location"
45232
45233  # First check if the files exists.
45234  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45235    # We found an arbitrary include file. That's a good sign.
45236    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45237$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45238    FOUND_FREETYPE=yes
45239
45240    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45241    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45242      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45243$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45244      FOUND_FREETYPE=no
45245    else
45246      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45247        # On Windows, we will need both .lib and .dll file.
45248        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45249          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45250$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45251          FOUND_FREETYPE=no
45252        fi
45253      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45254        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45255        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45256      fi
45257    fi
45258  fi
45259
45260  if test "x$FOUND_FREETYPE" = xyes; then
45261
45262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45263
45264  # Input might be given as Windows format, start by converting to
45265  # unix format.
45266  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45267  new_path=`$CYGPATH -u "$path"`
45268
45269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45272  # "foo.exe" is OK but "foo" is an error.
45273  #
45274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45275  # It is also a way to make sure we got the proper file name for the real test later on.
45276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45277  if test "x$test_shortpath" = x; then
45278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45279$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45280    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45281  fi
45282
45283  # Call helper function which possibly converts this using DOS-style short mode.
45284  # If so, the updated path is stored in $new_path.
45285
45286  input_path="$new_path"
45287  # Check if we need to convert this using DOS-style short mode. If the path
45288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45289  # take no chances and rewrite it.
45290  # Note: m4 eats our [], so we need to use [ and ] instead.
45291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45292  if test "x$has_forbidden_chars" != x; then
45293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45297      # Going to short mode and back again did indeed matter. Since short mode is
45298      # case insensitive, let's make it lowercase to improve readability.
45299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45300      # Now convert it back to Unix-stile (cygpath)
45301      input_path=`$CYGPATH -u "$shortmode_path"`
45302      new_path="$input_path"
45303    fi
45304  fi
45305
45306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45307  if test "x$test_cygdrive_prefix" = x; then
45308    # As a simple fix, exclude /usr/bin since it's not a real path.
45309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45311      # a path prefixed by /cygdrive for fixpath to work.
45312      new_path="$CYGWIN_ROOT_PATH$input_path"
45313    fi
45314  fi
45315
45316
45317  if test "x$path" != "x$new_path"; then
45318    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45321  fi
45322
45323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45324
45325  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45326  has_colon=`$ECHO $path | $GREP ^.:`
45327  new_path="$path"
45328  if test "x$has_colon" = x; then
45329    # Not in mixed or Windows style, start by that.
45330    new_path=`cmd //c echo $path`
45331  fi
45332
45333
45334  input_path="$new_path"
45335  # Check if we need to convert this using DOS-style short mode. If the path
45336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45337  # take no chances and rewrite it.
45338  # Note: m4 eats our [], so we need to use [ and ] instead.
45339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45340  if test "x$has_forbidden_chars" != x; then
45341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45343  fi
45344
45345
45346  windows_path="$new_path"
45347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45348    unix_path=`$CYGPATH -u "$windows_path"`
45349    new_path="$unix_path"
45350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45352    new_path="$unix_path"
45353  fi
45354
45355  if test "x$path" != "x$new_path"; then
45356    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45359  fi
45360
45361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45363
45364  else
45365    # We're on a posix platform. Hooray! :)
45366    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45367    has_space=`$ECHO "$path" | $GREP " "`
45368    if test "x$has_space" != x; then
45369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45372    fi
45373
45374    # Use eval to expand a potential ~
45375    eval path="$path"
45376    if test ! -f "$path" && test ! -d "$path"; then
45377      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45378    fi
45379
45380    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45381  fi
45382
45383
45384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45385
45386  # Input might be given as Windows format, start by converting to
45387  # unix format.
45388  path="$POTENTIAL_FREETYPE_LIB_PATH"
45389  new_path=`$CYGPATH -u "$path"`
45390
45391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45394  # "foo.exe" is OK but "foo" is an error.
45395  #
45396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45397  # It is also a way to make sure we got the proper file name for the real test later on.
45398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45399  if test "x$test_shortpath" = x; then
45400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45402    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45403  fi
45404
45405  # Call helper function which possibly converts this using DOS-style short mode.
45406  # If so, the updated path is stored in $new_path.
45407
45408  input_path="$new_path"
45409  # Check if we need to convert this using DOS-style short mode. If the path
45410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45411  # take no chances and rewrite it.
45412  # Note: m4 eats our [], so we need to use [ and ] instead.
45413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45414  if test "x$has_forbidden_chars" != x; then
45415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45419      # Going to short mode and back again did indeed matter. Since short mode is
45420      # case insensitive, let's make it lowercase to improve readability.
45421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45422      # Now convert it back to Unix-stile (cygpath)
45423      input_path=`$CYGPATH -u "$shortmode_path"`
45424      new_path="$input_path"
45425    fi
45426  fi
45427
45428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45429  if test "x$test_cygdrive_prefix" = x; then
45430    # As a simple fix, exclude /usr/bin since it's not a real path.
45431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45433      # a path prefixed by /cygdrive for fixpath to work.
45434      new_path="$CYGWIN_ROOT_PATH$input_path"
45435    fi
45436  fi
45437
45438
45439  if test "x$path" != "x$new_path"; then
45440    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45442$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45443  fi
45444
45445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45446
45447  path="$POTENTIAL_FREETYPE_LIB_PATH"
45448  has_colon=`$ECHO $path | $GREP ^.:`
45449  new_path="$path"
45450  if test "x$has_colon" = x; then
45451    # Not in mixed or Windows style, start by that.
45452    new_path=`cmd //c echo $path`
45453  fi
45454
45455
45456  input_path="$new_path"
45457  # Check if we need to convert this using DOS-style short mode. If the path
45458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45459  # take no chances and rewrite it.
45460  # Note: m4 eats our [], so we need to use [ and ] instead.
45461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45462  if test "x$has_forbidden_chars" != x; then
45463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45465  fi
45466
45467
45468  windows_path="$new_path"
45469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45470    unix_path=`$CYGPATH -u "$windows_path"`
45471    new_path="$unix_path"
45472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45474    new_path="$unix_path"
45475  fi
45476
45477  if test "x$path" != "x$new_path"; then
45478    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45480$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45481  fi
45482
45483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45485
45486  else
45487    # We're on a posix platform. Hooray! :)
45488    path="$POTENTIAL_FREETYPE_LIB_PATH"
45489    has_space=`$ECHO "$path" | $GREP " "`
45490    if test "x$has_space" != x; then
45491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45493      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45494    fi
45495
45496    # Use eval to expand a potential ~
45497    eval path="$path"
45498    if test ! -f "$path" && test ! -d "$path"; then
45499      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45500    fi
45501
45502    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45503  fi
45504
45505
45506    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45508$as_echo_n "checking for freetype includes... " >&6; }
45509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45510$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45511    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45513$as_echo_n "checking for freetype libraries... " >&6; }
45514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45515$as_echo "$FREETYPE_LIB_PATH" >&6; }
45516  fi
45517
45518            else
45519
45520  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45521  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45522  METHOD="well-known location"
45523
45524  # First check if the files exists.
45525  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45526    # We found an arbitrary include file. That's a good sign.
45527    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45528$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45529    FOUND_FREETYPE=yes
45530
45531    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45532    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45533      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45534$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45535      FOUND_FREETYPE=no
45536    else
45537      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45538        # On Windows, we will need both .lib and .dll file.
45539        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45540          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45541$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45542          FOUND_FREETYPE=no
45543        fi
45544      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45545        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45546        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45547      fi
45548    fi
45549  fi
45550
45551  if test "x$FOUND_FREETYPE" = xyes; then
45552
45553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45554
45555  # Input might be given as Windows format, start by converting to
45556  # unix format.
45557  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45558  new_path=`$CYGPATH -u "$path"`
45559
45560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45563  # "foo.exe" is OK but "foo" is an error.
45564  #
45565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45566  # It is also a way to make sure we got the proper file name for the real test later on.
45567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45568  if test "x$test_shortpath" = x; then
45569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45571    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45572  fi
45573
45574  # Call helper function which possibly converts this using DOS-style short mode.
45575  # If so, the updated path is stored in $new_path.
45576
45577  input_path="$new_path"
45578  # Check if we need to convert this using DOS-style short mode. If the path
45579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45580  # take no chances and rewrite it.
45581  # Note: m4 eats our [], so we need to use [ and ] instead.
45582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45583  if test "x$has_forbidden_chars" != x; then
45584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45588      # Going to short mode and back again did indeed matter. Since short mode is
45589      # case insensitive, let's make it lowercase to improve readability.
45590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45591      # Now convert it back to Unix-stile (cygpath)
45592      input_path=`$CYGPATH -u "$shortmode_path"`
45593      new_path="$input_path"
45594    fi
45595  fi
45596
45597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45598  if test "x$test_cygdrive_prefix" = x; then
45599    # As a simple fix, exclude /usr/bin since it's not a real path.
45600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45602      # a path prefixed by /cygdrive for fixpath to work.
45603      new_path="$CYGWIN_ROOT_PATH$input_path"
45604    fi
45605  fi
45606
45607
45608  if test "x$path" != "x$new_path"; then
45609    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45612  fi
45613
45614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45615
45616  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45617  has_colon=`$ECHO $path | $GREP ^.:`
45618  new_path="$path"
45619  if test "x$has_colon" = x; then
45620    # Not in mixed or Windows style, start by that.
45621    new_path=`cmd //c echo $path`
45622  fi
45623
45624
45625  input_path="$new_path"
45626  # Check if we need to convert this using DOS-style short mode. If the path
45627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45628  # take no chances and rewrite it.
45629  # Note: m4 eats our [], so we need to use [ and ] instead.
45630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45631  if test "x$has_forbidden_chars" != x; then
45632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45634  fi
45635
45636
45637  windows_path="$new_path"
45638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45639    unix_path=`$CYGPATH -u "$windows_path"`
45640    new_path="$unix_path"
45641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45643    new_path="$unix_path"
45644  fi
45645
45646  if test "x$path" != "x$new_path"; then
45647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45650  fi
45651
45652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45654
45655  else
45656    # We're on a posix platform. Hooray! :)
45657    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45658    has_space=`$ECHO "$path" | $GREP " "`
45659    if test "x$has_space" != x; then
45660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45662      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45663    fi
45664
45665    # Use eval to expand a potential ~
45666    eval path="$path"
45667    if test ! -f "$path" && test ! -d "$path"; then
45668      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45669    fi
45670
45671    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45672  fi
45673
45674
45675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45676
45677  # Input might be given as Windows format, start by converting to
45678  # unix format.
45679  path="$POTENTIAL_FREETYPE_LIB_PATH"
45680  new_path=`$CYGPATH -u "$path"`
45681
45682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45685  # "foo.exe" is OK but "foo" is an error.
45686  #
45687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45688  # It is also a way to make sure we got the proper file name for the real test later on.
45689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45690  if test "x$test_shortpath" = x; then
45691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45692$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45693    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45694  fi
45695
45696  # Call helper function which possibly converts this using DOS-style short mode.
45697  # If so, the updated path is stored in $new_path.
45698
45699  input_path="$new_path"
45700  # Check if we need to convert this using DOS-style short mode. If the path
45701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45702  # take no chances and rewrite it.
45703  # Note: m4 eats our [], so we need to use [ and ] instead.
45704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45705  if test "x$has_forbidden_chars" != x; then
45706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45710      # Going to short mode and back again did indeed matter. Since short mode is
45711      # case insensitive, let's make it lowercase to improve readability.
45712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45713      # Now convert it back to Unix-stile (cygpath)
45714      input_path=`$CYGPATH -u "$shortmode_path"`
45715      new_path="$input_path"
45716    fi
45717  fi
45718
45719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45720  if test "x$test_cygdrive_prefix" = x; then
45721    # As a simple fix, exclude /usr/bin since it's not a real path.
45722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45724      # a path prefixed by /cygdrive for fixpath to work.
45725      new_path="$CYGWIN_ROOT_PATH$input_path"
45726    fi
45727  fi
45728
45729
45730  if test "x$path" != "x$new_path"; then
45731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45734  fi
45735
45736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45737
45738  path="$POTENTIAL_FREETYPE_LIB_PATH"
45739  has_colon=`$ECHO $path | $GREP ^.:`
45740  new_path="$path"
45741  if test "x$has_colon" = x; then
45742    # Not in mixed or Windows style, start by that.
45743    new_path=`cmd //c echo $path`
45744  fi
45745
45746
45747  input_path="$new_path"
45748  # Check if we need to convert this using DOS-style short mode. If the path
45749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45750  # take no chances and rewrite it.
45751  # Note: m4 eats our [], so we need to use [ and ] instead.
45752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45753  if test "x$has_forbidden_chars" != x; then
45754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45756  fi
45757
45758
45759  windows_path="$new_path"
45760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45761    unix_path=`$CYGPATH -u "$windows_path"`
45762    new_path="$unix_path"
45763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45765    new_path="$unix_path"
45766  fi
45767
45768  if test "x$path" != "x$new_path"; then
45769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45772  fi
45773
45774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45776
45777  else
45778    # We're on a posix platform. Hooray! :)
45779    path="$POTENTIAL_FREETYPE_LIB_PATH"
45780    has_space=`$ECHO "$path" | $GREP " "`
45781    if test "x$has_space" != x; then
45782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45785    fi
45786
45787    # Use eval to expand a potential ~
45788    eval path="$path"
45789    if test ! -f "$path" && test ! -d "$path"; then
45790      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45791    fi
45792
45793    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45794  fi
45795
45796
45797    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45799$as_echo_n "checking for freetype includes... " >&6; }
45800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45801$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45802    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45804$as_echo_n "checking for freetype libraries... " >&6; }
45805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45806$as_echo "$FREETYPE_LIB_PATH" >&6; }
45807  fi
45808
45809              if test "x$FOUND_FREETYPE" != xyes; then
45810
45811  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45812  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45813  METHOD="well-known location"
45814
45815  # First check if the files exists.
45816  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45817    # We found an arbitrary include file. That's a good sign.
45818    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45819$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45820    FOUND_FREETYPE=yes
45821
45822    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45823    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45824      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45825$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45826      FOUND_FREETYPE=no
45827    else
45828      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45829        # On Windows, we will need both .lib and .dll file.
45830        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45831          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45832$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45833          FOUND_FREETYPE=no
45834        fi
45835      elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45836        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45837        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45838      fi
45839    fi
45840  fi
45841
45842  if test "x$FOUND_FREETYPE" = xyes; then
45843
45844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45845
45846  # Input might be given as Windows format, start by converting to
45847  # unix format.
45848  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45849  new_path=`$CYGPATH -u "$path"`
45850
45851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45854  # "foo.exe" is OK but "foo" is an error.
45855  #
45856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45857  # It is also a way to make sure we got the proper file name for the real test later on.
45858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45859  if test "x$test_shortpath" = x; then
45860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45863  fi
45864
45865  # Call helper function which possibly converts this using DOS-style short mode.
45866  # If so, the updated path is stored in $new_path.
45867
45868  input_path="$new_path"
45869  # Check if we need to convert this using DOS-style short mode. If the path
45870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45871  # take no chances and rewrite it.
45872  # Note: m4 eats our [], so we need to use [ and ] instead.
45873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45874  if test "x$has_forbidden_chars" != x; then
45875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45879      # Going to short mode and back again did indeed matter. Since short mode is
45880      # case insensitive, let's make it lowercase to improve readability.
45881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45882      # Now convert it back to Unix-stile (cygpath)
45883      input_path=`$CYGPATH -u "$shortmode_path"`
45884      new_path="$input_path"
45885    fi
45886  fi
45887
45888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45889  if test "x$test_cygdrive_prefix" = x; then
45890    # As a simple fix, exclude /usr/bin since it's not a real path.
45891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45893      # a path prefixed by /cygdrive for fixpath to work.
45894      new_path="$CYGWIN_ROOT_PATH$input_path"
45895    fi
45896  fi
45897
45898
45899  if test "x$path" != "x$new_path"; then
45900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45903  fi
45904
45905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45906
45907  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45908  has_colon=`$ECHO $path | $GREP ^.:`
45909  new_path="$path"
45910  if test "x$has_colon" = x; then
45911    # Not in mixed or Windows style, start by that.
45912    new_path=`cmd //c echo $path`
45913  fi
45914
45915
45916  input_path="$new_path"
45917  # Check if we need to convert this using DOS-style short mode. If the path
45918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45919  # take no chances and rewrite it.
45920  # Note: m4 eats our [], so we need to use [ and ] instead.
45921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45922  if test "x$has_forbidden_chars" != x; then
45923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45925  fi
45926
45927
45928  windows_path="$new_path"
45929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45930    unix_path=`$CYGPATH -u "$windows_path"`
45931    new_path="$unix_path"
45932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45934    new_path="$unix_path"
45935  fi
45936
45937  if test "x$path" != "x$new_path"; then
45938    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45941  fi
45942
45943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45945
45946  else
45947    # We're on a posix platform. Hooray! :)
45948    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45949    has_space=`$ECHO "$path" | $GREP " "`
45950    if test "x$has_space" != x; then
45951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45954    fi
45955
45956    # Use eval to expand a potential ~
45957    eval path="$path"
45958    if test ! -f "$path" && test ! -d "$path"; then
45959      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45960    fi
45961
45962    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45963  fi
45964
45965
45966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45967
45968  # Input might be given as Windows format, start by converting to
45969  # unix format.
45970  path="$POTENTIAL_FREETYPE_LIB_PATH"
45971  new_path=`$CYGPATH -u "$path"`
45972
45973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45976  # "foo.exe" is OK but "foo" is an error.
45977  #
45978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45979  # It is also a way to make sure we got the proper file name for the real test later on.
45980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45981  if test "x$test_shortpath" = x; then
45982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45983$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45984    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45985  fi
45986
45987  # Call helper function which possibly converts this using DOS-style short mode.
45988  # If so, the updated path is stored in $new_path.
45989
45990  input_path="$new_path"
45991  # Check if we need to convert this using DOS-style short mode. If the path
45992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45993  # take no chances and rewrite it.
45994  # Note: m4 eats our [], so we need to use [ and ] instead.
45995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45996  if test "x$has_forbidden_chars" != x; then
45997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46001      # Going to short mode and back again did indeed matter. Since short mode is
46002      # case insensitive, let's make it lowercase to improve readability.
46003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46004      # Now convert it back to Unix-stile (cygpath)
46005      input_path=`$CYGPATH -u "$shortmode_path"`
46006      new_path="$input_path"
46007    fi
46008  fi
46009
46010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46011  if test "x$test_cygdrive_prefix" = x; then
46012    # As a simple fix, exclude /usr/bin since it's not a real path.
46013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46015      # a path prefixed by /cygdrive for fixpath to work.
46016      new_path="$CYGWIN_ROOT_PATH$input_path"
46017    fi
46018  fi
46019
46020
46021  if test "x$path" != "x$new_path"; then
46022    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46024$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46025  fi
46026
46027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46028
46029  path="$POTENTIAL_FREETYPE_LIB_PATH"
46030  has_colon=`$ECHO $path | $GREP ^.:`
46031  new_path="$path"
46032  if test "x$has_colon" = x; then
46033    # Not in mixed or Windows style, start by that.
46034    new_path=`cmd //c echo $path`
46035  fi
46036
46037
46038  input_path="$new_path"
46039  # Check if we need to convert this using DOS-style short mode. If the path
46040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46041  # take no chances and rewrite it.
46042  # Note: m4 eats our [], so we need to use [ and ] instead.
46043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46044  if test "x$has_forbidden_chars" != x; then
46045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46047  fi
46048
46049
46050  windows_path="$new_path"
46051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46052    unix_path=`$CYGPATH -u "$windows_path"`
46053    new_path="$unix_path"
46054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46056    new_path="$unix_path"
46057  fi
46058
46059  if test "x$path" != "x$new_path"; then
46060    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46062$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46063  fi
46064
46065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46067
46068  else
46069    # We're on a posix platform. Hooray! :)
46070    path="$POTENTIAL_FREETYPE_LIB_PATH"
46071    has_space=`$ECHO "$path" | $GREP " "`
46072    if test "x$has_space" != x; then
46073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46074$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46075      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46076    fi
46077
46078    # Use eval to expand a potential ~
46079    eval path="$path"
46080    if test ! -f "$path" && test ! -d "$path"; then
46081      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46082    fi
46083
46084    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46085  fi
46086
46087
46088    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46090$as_echo_n "checking for freetype includes... " >&6; }
46091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46092$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46093    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46095$as_echo_n "checking for freetype libraries... " >&6; }
46096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46097$as_echo "$FREETYPE_LIB_PATH" >&6; }
46098  fi
46099
46100              fi
46101            fi
46102          fi
46103        fi
46104      fi # end check in well-known locations
46105
46106      if test "x$FOUND_FREETYPE" != xyes; then
46107
46108  # Print a helpful message on how to acquire the necessary build dependency.
46109  # freetype is the help tag: freetype, cups, pulse, alsa etc
46110  MISSING_DEPENDENCY=freetype
46111
46112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46113    cygwin_help $MISSING_DEPENDENCY
46114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46115    msys_help $MISSING_DEPENDENCY
46116  else
46117    PKGHANDLER_COMMAND=
46118
46119    case $PKGHANDLER in
46120      apt-get)
46121        apt_help     $MISSING_DEPENDENCY ;;
46122      yum)
46123        yum_help     $MISSING_DEPENDENCY ;;
46124      port)
46125        port_help    $MISSING_DEPENDENCY ;;
46126      pkgutil)
46127        pkgutil_help $MISSING_DEPENDENCY ;;
46128      pkgadd)
46129        pkgadd_help  $MISSING_DEPENDENCY ;;
46130    esac
46131
46132    if test "x$PKGHANDLER_COMMAND" != x; then
46133      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46134    fi
46135  fi
46136
46137        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46138      fi
46139    fi # end user specified settings
46140
46141    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46142    if test "x$FREETYPE_CFLAGS" = x; then
46143
46144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46145
46146  # Input might be given as Windows format, start by converting to
46147  # unix format.
46148  path="$FREETYPE_INCLUDE_PATH"
46149  new_path=`$CYGPATH -u "$path"`
46150
46151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46154  # "foo.exe" is OK but "foo" is an error.
46155  #
46156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46157  # It is also a way to make sure we got the proper file name for the real test later on.
46158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46159  if test "x$test_shortpath" = x; then
46160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46161$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46162    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46163  fi
46164
46165  # Call helper function which possibly converts this using DOS-style short mode.
46166  # If so, the updated path is stored in $new_path.
46167
46168  input_path="$new_path"
46169  # Check if we need to convert this using DOS-style short mode. If the path
46170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46171  # take no chances and rewrite it.
46172  # Note: m4 eats our [], so we need to use [ and ] instead.
46173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46174  if test "x$has_forbidden_chars" != x; then
46175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46179      # Going to short mode and back again did indeed matter. Since short mode is
46180      # case insensitive, let's make it lowercase to improve readability.
46181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46182      # Now convert it back to Unix-stile (cygpath)
46183      input_path=`$CYGPATH -u "$shortmode_path"`
46184      new_path="$input_path"
46185    fi
46186  fi
46187
46188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46189  if test "x$test_cygdrive_prefix" = x; then
46190    # As a simple fix, exclude /usr/bin since it's not a real path.
46191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46193      # a path prefixed by /cygdrive for fixpath to work.
46194      new_path="$CYGWIN_ROOT_PATH$input_path"
46195    fi
46196  fi
46197
46198
46199  if test "x$path" != "x$new_path"; then
46200    FREETYPE_INCLUDE_PATH="$new_path"
46201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46202$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46203  fi
46204
46205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46206
46207  path="$FREETYPE_INCLUDE_PATH"
46208  has_colon=`$ECHO $path | $GREP ^.:`
46209  new_path="$path"
46210  if test "x$has_colon" = x; then
46211    # Not in mixed or Windows style, start by that.
46212    new_path=`cmd //c echo $path`
46213  fi
46214
46215
46216  input_path="$new_path"
46217  # Check if we need to convert this using DOS-style short mode. If the path
46218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46219  # take no chances and rewrite it.
46220  # Note: m4 eats our [], so we need to use [ and ] instead.
46221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46222  if test "x$has_forbidden_chars" != x; then
46223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46225  fi
46226
46227
46228  windows_path="$new_path"
46229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46230    unix_path=`$CYGPATH -u "$windows_path"`
46231    new_path="$unix_path"
46232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46234    new_path="$unix_path"
46235  fi
46236
46237  if test "x$path" != "x$new_path"; then
46238    FREETYPE_INCLUDE_PATH="$new_path"
46239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46240$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46241  fi
46242
46243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46245
46246  else
46247    # We're on a posix platform. Hooray! :)
46248    path="$FREETYPE_INCLUDE_PATH"
46249    has_space=`$ECHO "$path" | $GREP " "`
46250    if test "x$has_space" != x; then
46251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46252$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46254    fi
46255
46256    # Use eval to expand a potential ~
46257    eval path="$path"
46258    if test ! -f "$path" && test ! -d "$path"; then
46259      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46260    fi
46261
46262    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46263  fi
46264
46265      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46266        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46267      else
46268        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46269      fi
46270    fi
46271
46272    if test "x$FREETYPE_LIBS" = x; then
46273
46274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46275
46276  # Input might be given as Windows format, start by converting to
46277  # unix format.
46278  path="$FREETYPE_LIB_PATH"
46279  new_path=`$CYGPATH -u "$path"`
46280
46281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46284  # "foo.exe" is OK but "foo" is an error.
46285  #
46286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46287  # It is also a way to make sure we got the proper file name for the real test later on.
46288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46289  if test "x$test_shortpath" = x; then
46290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46291$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46292    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46293  fi
46294
46295  # Call helper function which possibly converts this using DOS-style short mode.
46296  # If so, the updated path is stored in $new_path.
46297
46298  input_path="$new_path"
46299  # Check if we need to convert this using DOS-style short mode. If the path
46300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46301  # take no chances and rewrite it.
46302  # Note: m4 eats our [], so we need to use [ and ] instead.
46303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46304  if test "x$has_forbidden_chars" != x; then
46305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46309      # Going to short mode and back again did indeed matter. Since short mode is
46310      # case insensitive, let's make it lowercase to improve readability.
46311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46312      # Now convert it back to Unix-stile (cygpath)
46313      input_path=`$CYGPATH -u "$shortmode_path"`
46314      new_path="$input_path"
46315    fi
46316  fi
46317
46318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46319  if test "x$test_cygdrive_prefix" = x; then
46320    # As a simple fix, exclude /usr/bin since it's not a real path.
46321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46323      # a path prefixed by /cygdrive for fixpath to work.
46324      new_path="$CYGWIN_ROOT_PATH$input_path"
46325    fi
46326  fi
46327
46328
46329  if test "x$path" != "x$new_path"; then
46330    FREETYPE_LIB_PATH="$new_path"
46331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46332$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46333  fi
46334
46335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46336
46337  path="$FREETYPE_LIB_PATH"
46338  has_colon=`$ECHO $path | $GREP ^.:`
46339  new_path="$path"
46340  if test "x$has_colon" = x; then
46341    # Not in mixed or Windows style, start by that.
46342    new_path=`cmd //c echo $path`
46343  fi
46344
46345
46346  input_path="$new_path"
46347  # Check if we need to convert this using DOS-style short mode. If the path
46348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46349  # take no chances and rewrite it.
46350  # Note: m4 eats our [], so we need to use [ and ] instead.
46351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46352  if test "x$has_forbidden_chars" != x; then
46353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46355  fi
46356
46357
46358  windows_path="$new_path"
46359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46360    unix_path=`$CYGPATH -u "$windows_path"`
46361    new_path="$unix_path"
46362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46364    new_path="$unix_path"
46365  fi
46366
46367  if test "x$path" != "x$new_path"; then
46368    FREETYPE_LIB_PATH="$new_path"
46369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46370$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46371  fi
46372
46373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46375
46376  else
46377    # We're on a posix platform. Hooray! :)
46378    path="$FREETYPE_LIB_PATH"
46379    has_space=`$ECHO "$path" | $GREP " "`
46380    if test "x$has_space" != x; then
46381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46382$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46383      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46384    fi
46385
46386    # Use eval to expand a potential ~
46387    eval path="$path"
46388    if test ! -f "$path" && test ! -d "$path"; then
46389      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46390    fi
46391
46392    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46393  fi
46394
46395      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46396        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46397      else
46398        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46399      fi
46400    fi
46401
46402    # Try to compile it
46403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46404$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46405    ac_ext=cpp
46406ac_cpp='$CXXCPP $CPPFLAGS'
46407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46410
46411    PREV_CXXCFLAGS="$CXXFLAGS"
46412    PREV_LIBS="$LIBS"
46413    PREV_CXX="$CXX"
46414    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46415    LIBS="$LIBS $FREETYPE_LIBS"
46416    CXX="$FIXPATH $CXX"
46417    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46418/* end confdefs.h.  */
46419
46420          #include<ft2build.h>
46421          #include FT_FREETYPE_H
46422          int main () {
46423            FT_Init_FreeType(NULL);
46424            return 0;
46425          }
46426
46427_ACEOF
46428if ac_fn_cxx_try_link "$LINENO"; then :
46429
46430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46431$as_echo "yes" >&6; }
46432
46433else
46434
46435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46436$as_echo "no" >&6; }
46437          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46438$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46439          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46440$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46441
46442
46443  # Print a helpful message on how to acquire the necessary build dependency.
46444  # freetype is the help tag: freetype, cups, pulse, alsa etc
46445  MISSING_DEPENDENCY=freetype
46446
46447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46448    cygwin_help $MISSING_DEPENDENCY
46449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46450    msys_help $MISSING_DEPENDENCY
46451  else
46452    PKGHANDLER_COMMAND=
46453
46454    case $PKGHANDLER in
46455      apt-get)
46456        apt_help     $MISSING_DEPENDENCY ;;
46457      yum)
46458        yum_help     $MISSING_DEPENDENCY ;;
46459      port)
46460        port_help    $MISSING_DEPENDENCY ;;
46461      pkgutil)
46462        pkgutil_help $MISSING_DEPENDENCY ;;
46463      pkgadd)
46464        pkgadd_help  $MISSING_DEPENDENCY ;;
46465    esac
46466
46467    if test "x$PKGHANDLER_COMMAND" != x; then
46468      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46469    fi
46470  fi
46471
46472
46473          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46474
46475
46476fi
46477rm -f core conftest.err conftest.$ac_objext \
46478    conftest$ac_exeext conftest.$ac_ext
46479    CXXCFLAGS="$PREV_CXXFLAGS"
46480    LIBS="$PREV_LIBS"
46481    CXX="$PREV_CXX"
46482    ac_ext=cpp
46483ac_cpp='$CXXCPP $CPPFLAGS'
46484ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46485ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46486ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46487
46488
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46490$as_echo_n "checking if we should bundle freetype... " >&6; }
46491    if test "x$BUNDLE_FREETYPE" = xyes; then
46492      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46493    fi
46494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46495$as_echo "$BUNDLE_FREETYPE" >&6; }
46496
46497  fi # end freetype needed
46498
46499
46500
46501
46502
46503
46504
46505  ###############################################################################
46506  #
46507  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46508  #
46509
46510# Check whether --with-alsa was given.
46511if test "${with_alsa+set}" = set; then :
46512  withval=$with_alsa;
46513fi
46514
46515
46516# Check whether --with-alsa-include was given.
46517if test "${with_alsa_include+set}" = set; then :
46518  withval=$with_alsa_include;
46519fi
46520
46521
46522# Check whether --with-alsa-lib was given.
46523if test "${with_alsa_lib+set}" = set; then :
46524  withval=$with_alsa_lib;
46525fi
46526
46527
46528  if test "x$ALSA_NOT_NEEDED" = xyes; then
46529    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46530      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46531$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46532    fi
46533    ALSA_CFLAGS=
46534    ALSA_LIBS=
46535  else
46536    ALSA_FOUND=no
46537
46538    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46539      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46540    fi
46541
46542    if test "x${with_alsa}" != x; then
46543      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46544      ALSA_CFLAGS="-I${with_alsa}/include"
46545      ALSA_FOUND=yes
46546    fi
46547    if test "x${with_alsa_include}" != x; then
46548      ALSA_CFLAGS="-I${with_alsa_include}"
46549      ALSA_FOUND=yes
46550    fi
46551    if test "x${with_alsa_lib}" != x; then
46552      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46553      ALSA_FOUND=yes
46554    fi
46555    if test "x$ALSA_FOUND" = xno; then
46556
46557
46558  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46559    # Source the builddeps file again, to make sure it uses the latest variables!
46560    . $builddepsfile
46561    # Look for a target and build machine specific resource!
46562    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46563    if test "x$resource" = x; then
46564      # Ok, lets instead look for a target specific resource
46565      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46566    fi
46567    if test "x$resource" = x; then
46568      # Ok, lets instead look for a build specific resource
46569      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46570    fi
46571    if test "x$resource" = x; then
46572      # Ok, lets instead look for a generic resource
46573      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46574      resource=${builddep_alsa}
46575    fi
46576    if test "x$resource" != x; then
46577      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46578$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46579      # If the resource in the builddeps.conf file is an existing directory,
46580      # for example /java/linux/cups
46581      if test -d ${resource}; then
46582        depdir=${resource}
46583      else
46584
46585  # alsa is for example mymodule
46586  # $resource is for example libs/general/libmymod_1_2_3.zip
46587  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46588  # $with_builddeps_dir is for example /localhome/builddeps
46589  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46590  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46591  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46592  filename=`basename $resource`
46593  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46594  filebase=${filename%%.*}
46595  extension=${filename#*.}
46596  installdir=$with_builddeps_dir/$filebase
46597  if test ! -f $installdir/$filename.unpacked; then
46598    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46599$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46600    if test ! -d $installdir; then
46601      mkdir -p $installdir
46602    fi
46603    if test ! -d $installdir; then
46604      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46605    fi
46606    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46607    touch $tmpfile
46608    if test ! -f $tmpfile; then
46609      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46610    fi
46611
46612  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46613  # $tmpfile is the local file name for the downloaded file.
46614  VALID_TOOL=no
46615  if test "x$BDEPS_FTP" = xwget; then
46616    VALID_TOOL=yes
46617    wget -O $tmpfile $with_builddeps_server/$resource
46618  fi
46619  if test "x$BDEPS_FTP" = xlftp; then
46620    VALID_TOOL=yes
46621    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46622  fi
46623  if test "x$BDEPS_FTP" = xftp; then
46624    VALID_TOOL=yes
46625    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46626    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46627    FTPUSERPWD=${FTPSERVER%%@*}
46628    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46629      FTPUSER=${userpwd%%:*}
46630      FTPPWD=${userpwd#*@}
46631      FTPSERVER=${FTPSERVER#*@}
46632    else
46633      FTPUSER=ftp
46634      FTPPWD=ftp
46635    fi
46636    # the "pass" command does not work on some
46637    # ftp clients (read ftp.exe) but if it works,
46638    # passive mode is better!
46639    ( \
46640        echo "user $FTPUSER $FTPPWD"        ; \
46641        echo "pass"                         ; \
46642        echo "bin"                          ; \
46643        echo "get $FTPPATH $tmpfile"              ; \
46644    ) | ftp -in $FTPSERVER
46645  fi
46646  if test "x$VALID_TOOL" != xyes; then
46647    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46648  fi
46649
46650    mv $tmpfile $installdir/$filename
46651    if test ! -s $installdir/$filename; then
46652      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46653    fi
46654    case "$extension" in
46655      zip)  echo "Unzipping $installdir/$filename..."
46656        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46657        ;;
46658      tar.gz) echo "Untaring $installdir/$filename..."
46659        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46660        ;;
46661      tgz) echo "Untaring $installdir/$filename..."
46662        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46663        ;;
46664      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46665        ;;
46666    esac
46667  fi
46668  if test -f $installdir/$filename.unpacked; then
46669    depdir=$installdir
46670  fi
46671
46672      fi
46673      # Source the builddeps file again, because in the previous command, the depdir
46674      # was updated to point at the current build dependency install directory.
46675      . $builddepsfile
46676      # Now extract variables from the builddeps.conf files.
46677      theroot=${builddep_alsa_ROOT}
46678      thecflags=${builddep_alsa_CFLAGS}
46679      thelibs=${builddep_alsa_LIBS}
46680      if test "x$depdir" = x; then
46681        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46682      fi
46683      ALSA=$depdir
46684      if test "x$theroot" != x; then
46685        ALSA="$theroot"
46686      fi
46687      if test "x$thecflags" != x; then
46688        ALSA_CFLAGS="$thecflags"
46689      fi
46690      if test "x$thelibs" != x; then
46691        ALSA_LIBS="$thelibs"
46692      fi
46693      ALSA_FOUND=yes
46694      else ALSA_FOUND=no
46695
46696    fi
46697    else ALSA_FOUND=no
46698
46699  fi
46700
46701    fi
46702    if test "x$ALSA_FOUND" = xno; then
46703
46704pkg_failed=no
46705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46706$as_echo_n "checking for ALSA... " >&6; }
46707
46708if test -n "$ALSA_CFLAGS"; then
46709    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46710 elif test -n "$PKG_CONFIG"; then
46711    if test -n "$PKG_CONFIG" && \
46712    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46713  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46714  ac_status=$?
46715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46716  test $ac_status = 0; }; then
46717  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46718else
46719  pkg_failed=yes
46720fi
46721 else
46722    pkg_failed=untried
46723fi
46724if test -n "$ALSA_LIBS"; then
46725    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46726 elif test -n "$PKG_CONFIG"; then
46727    if test -n "$PKG_CONFIG" && \
46728    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46729  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46730  ac_status=$?
46731  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46732  test $ac_status = 0; }; then
46733  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46734else
46735  pkg_failed=yes
46736fi
46737 else
46738    pkg_failed=untried
46739fi
46740
46741
46742
46743if test $pkg_failed = yes; then
46744
46745if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46746        _pkg_short_errors_supported=yes
46747else
46748        _pkg_short_errors_supported=no
46749fi
46750        if test $_pkg_short_errors_supported = yes; then
46751	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46752        else
46753	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46754        fi
46755	# Put the nasty error message in config.log where it belongs
46756	echo "$ALSA_PKG_ERRORS" >&5
46757
46758	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46759$as_echo "no" >&6; }
46760                ALSA_FOUND=no
46761elif test $pkg_failed = untried; then
46762	ALSA_FOUND=no
46763else
46764	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46765	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46767$as_echo "yes" >&6; }
46768	ALSA_FOUND=yes
46769fi
46770    fi
46771    if test "x$ALSA_FOUND" = xno; then
46772      for ac_header in alsa/asoundlib.h
46773do :
46774  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46775if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46776  cat >>confdefs.h <<_ACEOF
46777#define HAVE_ALSA_ASOUNDLIB_H 1
46778_ACEOF
46779
46780            ALSA_FOUND=yes
46781            ALSA_CFLAGS=-Iignoreme
46782            ALSA_LIBS=-lasound
46783            DEFAULT_ALSA=yes
46784
46785else
46786  ALSA_FOUND=no
46787fi
46788
46789done
46790
46791    fi
46792    if test "x$ALSA_FOUND" = xno; then
46793
46794  # Print a helpful message on how to acquire the necessary build dependency.
46795  # alsa is the help tag: freetype, cups, pulse, alsa etc
46796  MISSING_DEPENDENCY=alsa
46797
46798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46799    cygwin_help $MISSING_DEPENDENCY
46800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46801    msys_help $MISSING_DEPENDENCY
46802  else
46803    PKGHANDLER_COMMAND=
46804
46805    case $PKGHANDLER in
46806      apt-get)
46807        apt_help     $MISSING_DEPENDENCY ;;
46808      yum)
46809        yum_help     $MISSING_DEPENDENCY ;;
46810      port)
46811        port_help    $MISSING_DEPENDENCY ;;
46812      pkgutil)
46813        pkgutil_help $MISSING_DEPENDENCY ;;
46814      pkgadd)
46815        pkgadd_help  $MISSING_DEPENDENCY ;;
46816    esac
46817
46818    if test "x$PKGHANDLER_COMMAND" != x; then
46819      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46820    fi
46821  fi
46822
46823      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46824    fi
46825  fi
46826
46827
46828
46829
46830
46831
46832  ###############################################################################
46833  #
46834  # Check for the jpeg library
46835  #
46836
46837  USE_EXTERNAL_LIBJPEG=true
46838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46839$as_echo_n "checking for main in -ljpeg... " >&6; }
46840if ${ac_cv_lib_jpeg_main+:} false; then :
46841  $as_echo_n "(cached) " >&6
46842else
46843  ac_check_lib_save_LIBS=$LIBS
46844LIBS="-ljpeg  $LIBS"
46845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46846/* end confdefs.h.  */
46847
46848
46849int
46850main ()
46851{
46852return main ();
46853  ;
46854  return 0;
46855}
46856_ACEOF
46857if ac_fn_cxx_try_link "$LINENO"; then :
46858  ac_cv_lib_jpeg_main=yes
46859else
46860  ac_cv_lib_jpeg_main=no
46861fi
46862rm -f core conftest.err conftest.$ac_objext \
46863    conftest$ac_exeext conftest.$ac_ext
46864LIBS=$ac_check_lib_save_LIBS
46865fi
46866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46867$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46868if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46869  cat >>confdefs.h <<_ACEOF
46870#define HAVE_LIBJPEG 1
46871_ACEOF
46872
46873  LIBS="-ljpeg $LIBS"
46874
46875else
46876   USE_EXTERNAL_LIBJPEG=false
46877      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46878$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46879
46880fi
46881
46882
46883
46884  ###############################################################################
46885  #
46886  # Check for the gif library
46887  #
46888
46889
46890# Check whether --with-giflib was given.
46891if test "${with_giflib+set}" = set; then :
46892  withval=$with_giflib;
46893fi
46894
46895
46896
46897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46898$as_echo_n "checking for which giflib to use... " >&6; }
46899
46900  # default is bundled
46901  DEFAULT_GIFLIB=bundled
46902
46903  #
46904  # if user didn't specify, use DEFAULT_GIFLIB
46905  #
46906  if test "x${with_giflib}" = "x"; then
46907    with_giflib=${DEFAULT_GIFLIB}
46908  fi
46909
46910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46911$as_echo "${with_giflib}" >&6; }
46912
46913  if test "x${with_giflib}" = "xbundled"; then
46914    USE_EXTERNAL_LIBGIF=false
46915  elif test "x${with_giflib}" = "xsystem"; then
46916    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46917if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46918
46919else
46920   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46921fi
46922
46923
46924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46925$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46926if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46927  $as_echo_n "(cached) " >&6
46928else
46929  ac_check_lib_save_LIBS=$LIBS
46930LIBS="-lgif  $LIBS"
46931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46932/* end confdefs.h.  */
46933
46934/* Override any GCC internal prototype to avoid an error.
46935   Use char because int might match the return type of a GCC
46936   builtin and then its argument prototype would still apply.  */
46937#ifdef __cplusplus
46938extern "C"
46939#endif
46940char DGifGetCode ();
46941int
46942main ()
46943{
46944return DGifGetCode ();
46945  ;
46946  return 0;
46947}
46948_ACEOF
46949if ac_fn_cxx_try_link "$LINENO"; then :
46950  ac_cv_lib_gif_DGifGetCode=yes
46951else
46952  ac_cv_lib_gif_DGifGetCode=no
46953fi
46954rm -f core conftest.err conftest.$ac_objext \
46955    conftest$ac_exeext conftest.$ac_ext
46956LIBS=$ac_check_lib_save_LIBS
46957fi
46958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46959$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46960if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46961  cat >>confdefs.h <<_ACEOF
46962#define HAVE_LIBGIF 1
46963_ACEOF
46964
46965  LIBS="-lgif $LIBS"
46966
46967else
46968   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46969fi
46970
46971
46972    USE_EXTERNAL_LIBGIF=true
46973  else
46974    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46975  fi
46976
46977
46978  ###############################################################################
46979  #
46980  # Check for the png library
46981  #
46982
46983
46984# Check whether --with-libpng was given.
46985if test "${with_libpng+set}" = set; then :
46986  withval=$with_libpng;
46987fi
46988
46989
46990
46991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
46992$as_echo_n "checking for which libpng to use... " >&6; }
46993
46994  # default is bundled
46995  DEFAULT_LIBPNG=bundled
46996
46997  #
46998  # if user didn't specify, use DEFAULT_LIBPNG
46999  #
47000  if test "x${with_libpng}" = "x"; then
47001      with_libpng=${DEFAULT_LIBPNG}
47002  fi
47003
47004  if test "x${with_libpng}" = "xbundled"; then
47005      USE_EXTERNAL_LIBPNG=false
47006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47007$as_echo "bundled" >&6; }
47008  elif test "x${with_libpng}" = "xsystem"; then
47009
47010pkg_failed=no
47011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47012$as_echo_n "checking for PNG... " >&6; }
47013
47014if test -n "$PNG_CFLAGS"; then
47015    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47016 elif test -n "$PKG_CONFIG"; then
47017    if test -n "$PKG_CONFIG" && \
47018    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47019  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47020  ac_status=$?
47021  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47022  test $ac_status = 0; }; then
47023  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47024else
47025  pkg_failed=yes
47026fi
47027 else
47028    pkg_failed=untried
47029fi
47030if test -n "$PNG_LIBS"; then
47031    pkg_cv_PNG_LIBS="$PNG_LIBS"
47032 elif test -n "$PKG_CONFIG"; then
47033    if test -n "$PKG_CONFIG" && \
47034    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47035  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47036  ac_status=$?
47037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47038  test $ac_status = 0; }; then
47039  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47040else
47041  pkg_failed=yes
47042fi
47043 else
47044    pkg_failed=untried
47045fi
47046
47047
47048
47049if test $pkg_failed = yes; then
47050
47051if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47052        _pkg_short_errors_supported=yes
47053else
47054        _pkg_short_errors_supported=no
47055fi
47056        if test $_pkg_short_errors_supported = yes; then
47057	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47058        else
47059	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47060        fi
47061	# Put the nasty error message in config.log where it belongs
47062	echo "$PNG_PKG_ERRORS" >&5
47063
47064	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47065$as_echo "no" >&6; }
47066                 LIBPNG_FOUND=no
47067elif test $pkg_failed = untried; then
47068	 LIBPNG_FOUND=no
47069else
47070	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47071	PNG_LIBS=$pkg_cv_PNG_LIBS
47072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47073$as_echo "yes" >&6; }
47074	 LIBPNG_FOUND=yes
47075fi
47076      if test "x${LIBPNG_FOUND}" = "xyes"; then
47077          USE_EXTERNAL_LIBPNG=true
47078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47079$as_echo "system" >&6; }
47080      else
47081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47082$as_echo "system not found" >&6; }
47083          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47084      fi
47085  else
47086      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47087  fi
47088
47089
47090  ###############################################################################
47091  #
47092  # Check for the zlib library
47093  #
47094
47095
47096# Check whether --with-zlib was given.
47097if test "${with_zlib+set}" = set; then :
47098  withval=$with_zlib;
47099fi
47100
47101
47102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47103$as_echo_n "checking for compress in -lz... " >&6; }
47104if ${ac_cv_lib_z_compress+:} false; then :
47105  $as_echo_n "(cached) " >&6
47106else
47107  ac_check_lib_save_LIBS=$LIBS
47108LIBS="-lz  $LIBS"
47109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47110/* end confdefs.h.  */
47111
47112/* Override any GCC internal prototype to avoid an error.
47113   Use char because int might match the return type of a GCC
47114   builtin and then its argument prototype would still apply.  */
47115#ifdef __cplusplus
47116extern "C"
47117#endif
47118char compress ();
47119int
47120main ()
47121{
47122return compress ();
47123  ;
47124  return 0;
47125}
47126_ACEOF
47127if ac_fn_cxx_try_link "$LINENO"; then :
47128  ac_cv_lib_z_compress=yes
47129else
47130  ac_cv_lib_z_compress=no
47131fi
47132rm -f core conftest.err conftest.$ac_objext \
47133    conftest$ac_exeext conftest.$ac_ext
47134LIBS=$ac_check_lib_save_LIBS
47135fi
47136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47137$as_echo "$ac_cv_lib_z_compress" >&6; }
47138if test "x$ac_cv_lib_z_compress" = xyes; then :
47139   ZLIB_FOUND=yes
47140else
47141   ZLIB_FOUND=no
47142fi
47143
47144
47145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47146$as_echo_n "checking for which zlib to use... " >&6; }
47147
47148  DEFAULT_ZLIB=bundled
47149  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47150    #
47151    # On macosx default is system...on others default is
47152    #
47153    DEFAULT_ZLIB=system
47154  fi
47155
47156  if test "x${ZLIB_FOUND}" != "xyes"; then
47157    #
47158    # If we don't find any system...set default to bundled
47159    #
47160    DEFAULT_ZLIB=bundled
47161  fi
47162
47163  #
47164  # If user didn't specify, use DEFAULT_ZLIB
47165  #
47166  if test "x${with_zlib}" = "x"; then
47167    with_zlib=${DEFAULT_ZLIB}
47168  fi
47169
47170  if test "x${with_zlib}" = "xbundled"; then
47171    USE_EXTERNAL_LIBZ=false
47172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47173$as_echo "bundled" >&6; }
47174  elif test "x${with_zlib}" = "xsystem"; then
47175    if test "x${ZLIB_FOUND}" = "xyes"; then
47176      USE_EXTERNAL_LIBZ=true
47177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47178$as_echo "system" >&6; }
47179    else
47180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47181$as_echo "system not found" >&6; }
47182      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47183    fi
47184  else
47185    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47186  fi
47187
47188
47189
47190  ###############################################################################
47191  LIBZIP_CAN_USE_MMAP=true
47192
47193
47194
47195  ###############################################################################
47196  #
47197  # Check if altzone exists in time.h
47198  #
47199
47200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47201/* end confdefs.h.  */
47202#include <time.h>
47203int
47204main ()
47205{
47206return (int)altzone;
47207  ;
47208  return 0;
47209}
47210_ACEOF
47211if ac_fn_cxx_try_link "$LINENO"; then :
47212  has_altzone=yes
47213else
47214  has_altzone=no
47215fi
47216rm -f core conftest.err conftest.$ac_objext \
47217    conftest$ac_exeext conftest.$ac_ext
47218  if test "x$has_altzone" = xyes; then
47219
47220$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47221
47222  fi
47223
47224  ###############################################################################
47225  #
47226  # Check the maths library
47227  #
47228
47229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47230$as_echo_n "checking for cos in -lm... " >&6; }
47231if ${ac_cv_lib_m_cos+:} false; then :
47232  $as_echo_n "(cached) " >&6
47233else
47234  ac_check_lib_save_LIBS=$LIBS
47235LIBS="-lm  $LIBS"
47236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47237/* end confdefs.h.  */
47238
47239/* Override any GCC internal prototype to avoid an error.
47240   Use char because int might match the return type of a GCC
47241   builtin and then its argument prototype would still apply.  */
47242#ifdef __cplusplus
47243extern "C"
47244#endif
47245char cos ();
47246int
47247main ()
47248{
47249return cos ();
47250  ;
47251  return 0;
47252}
47253_ACEOF
47254if ac_fn_cxx_try_link "$LINENO"; then :
47255  ac_cv_lib_m_cos=yes
47256else
47257  ac_cv_lib_m_cos=no
47258fi
47259rm -f core conftest.err conftest.$ac_objext \
47260    conftest$ac_exeext conftest.$ac_ext
47261LIBS=$ac_check_lib_save_LIBS
47262fi
47263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47264$as_echo "$ac_cv_lib_m_cos" >&6; }
47265if test "x$ac_cv_lib_m_cos" = xyes; then :
47266  cat >>confdefs.h <<_ACEOF
47267#define HAVE_LIBM 1
47268_ACEOF
47269
47270  LIBS="-lm $LIBS"
47271
47272else
47273
47274        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47275$as_echo "$as_me: Maths library was not found" >&6;}
47276
47277
47278fi
47279
47280
47281
47282  ###############################################################################
47283  #
47284  # Check for libdl.so
47285
47286  save_LIBS="$LIBS"
47287  LIBS=""
47288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47289$as_echo_n "checking for dlopen in -ldl... " >&6; }
47290if ${ac_cv_lib_dl_dlopen+:} false; then :
47291  $as_echo_n "(cached) " >&6
47292else
47293  ac_check_lib_save_LIBS=$LIBS
47294LIBS="-ldl  $LIBS"
47295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47296/* end confdefs.h.  */
47297
47298/* Override any GCC internal prototype to avoid an error.
47299   Use char because int might match the return type of a GCC
47300   builtin and then its argument prototype would still apply.  */
47301#ifdef __cplusplus
47302extern "C"
47303#endif
47304char dlopen ();
47305int
47306main ()
47307{
47308return dlopen ();
47309  ;
47310  return 0;
47311}
47312_ACEOF
47313if ac_fn_cxx_try_link "$LINENO"; then :
47314  ac_cv_lib_dl_dlopen=yes
47315else
47316  ac_cv_lib_dl_dlopen=no
47317fi
47318rm -f core conftest.err conftest.$ac_objext \
47319    conftest$ac_exeext conftest.$ac_ext
47320LIBS=$ac_check_lib_save_LIBS
47321fi
47322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47323$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47324if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47325  cat >>confdefs.h <<_ACEOF
47326#define HAVE_LIBDL 1
47327_ACEOF
47328
47329  LIBS="-ldl $LIBS"
47330
47331fi
47332
47333  LIBDL="$LIBS"
47334
47335  LIBS="$save_LIBS"
47336
47337
47338  ###############################################################################
47339  #
47340  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47341  # dynamic build is configured on command line.
47342  #
47343
47344# Check whether --with-stdc++lib was given.
47345if test "${with_stdc__lib+set}" = set; then :
47346  withval=$with_stdc__lib;
47347        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47348                && test "x$with_stdc__lib" != xdefault; then
47349          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47350        fi
47351
47352else
47353  with_stdc__lib=default
47354
47355fi
47356
47357
47358  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47359    # Test if -lstdc++ works.
47360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47361$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47362    ac_ext=cpp
47363ac_cpp='$CXXCPP $CPPFLAGS'
47364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47367
47368    OLD_CXXFLAGS="$CXXFLAGS"
47369    CXXFLAGS="$CXXFLAGS -lstdc++"
47370    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47371/* end confdefs.h.  */
47372
47373int
47374main ()
47375{
47376return 0;
47377  ;
47378  return 0;
47379}
47380_ACEOF
47381if ac_fn_cxx_try_link "$LINENO"; then :
47382  has_dynamic_libstdcxx=yes
47383else
47384  has_dynamic_libstdcxx=no
47385fi
47386rm -f core conftest.err conftest.$ac_objext \
47387    conftest$ac_exeext conftest.$ac_ext
47388    CXXFLAGS="$OLD_CXXFLAGS"
47389    ac_ext=cpp
47390ac_cpp='$CXXCPP $CPPFLAGS'
47391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47394
47395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47396$as_echo "$has_dynamic_libstdcxx" >&6; }
47397
47398    # Test if stdc++ can be linked statically.
47399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47400$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47401    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47402    ac_ext=cpp
47403ac_cpp='$CXXCPP $CPPFLAGS'
47404ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47405ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47406ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47407
47408    OLD_LIBS="$LIBS"
47409    OLD_CXX="$CXX"
47410    LIBS="$STATIC_STDCXX_FLAGS"
47411    CXX="$CC"
47412    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47413/* end confdefs.h.  */
47414
47415int
47416main ()
47417{
47418return 0;
47419  ;
47420  return 0;
47421}
47422_ACEOF
47423if ac_fn_cxx_try_link "$LINENO"; then :
47424  has_static_libstdcxx=yes
47425else
47426  has_static_libstdcxx=no
47427fi
47428rm -f core conftest.err conftest.$ac_objext \
47429    conftest$ac_exeext conftest.$ac_ext
47430    LIBS="$OLD_LIBS"
47431    CXX="$OLD_CXX"
47432    ac_ext=cpp
47433ac_cpp='$CXXCPP $CPPFLAGS'
47434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47437
47438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47439$as_echo "$has_static_libstdcxx" >&6; }
47440
47441    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47442      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47443    fi
47444
47445    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47446      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47447    fi
47448
47449    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47450      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47451    fi
47452
47453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47454$as_echo_n "checking how to link with libstdc++... " >&6; }
47455    # If dynamic was requested, it's available since it would fail above otherwise.
47456    # If dynamic wasn't requested, go with static unless it isn't available.
47457    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47458      LIBCXX="$LIBCXX -lstdc++"
47459      LDCXX="$CXX"
47460      STATIC_CXX_SETTING="STATIC_CXX=false"
47461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47462$as_echo "dynamic" >&6; }
47463    else
47464      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47465      LDCXX="$CC"
47466      STATIC_CXX_SETTING="STATIC_CXX=true"
47467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47468$as_echo "static" >&6; }
47469    fi
47470  fi
47471
47472
47473  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47474    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47475
47476pkg_failed=no
47477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47478$as_echo_n "checking for LIBFFI... " >&6; }
47479
47480if test -n "$LIBFFI_CFLAGS"; then
47481    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47482 elif test -n "$PKG_CONFIG"; then
47483    if test -n "$PKG_CONFIG" && \
47484    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47485  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47486  ac_status=$?
47487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47488  test $ac_status = 0; }; then
47489  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47490else
47491  pkg_failed=yes
47492fi
47493 else
47494    pkg_failed=untried
47495fi
47496if test -n "$LIBFFI_LIBS"; then
47497    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47498 elif test -n "$PKG_CONFIG"; then
47499    if test -n "$PKG_CONFIG" && \
47500    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47501  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47502  ac_status=$?
47503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47504  test $ac_status = 0; }; then
47505  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47506else
47507  pkg_failed=yes
47508fi
47509 else
47510    pkg_failed=untried
47511fi
47512
47513
47514
47515if test $pkg_failed = yes; then
47516
47517if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47518        _pkg_short_errors_supported=yes
47519else
47520        _pkg_short_errors_supported=no
47521fi
47522        if test $_pkg_short_errors_supported = yes; then
47523	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47524        else
47525	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47526        fi
47527	# Put the nasty error message in config.log where it belongs
47528	echo "$LIBFFI_PKG_ERRORS" >&5
47529
47530	as_fn_error $? "Package requirements (libffi) were not met:
47531
47532$LIBFFI_PKG_ERRORS
47533
47534Consider adjusting the PKG_CONFIG_PATH environment variable if you
47535installed software in a non-standard prefix.
47536
47537Alternatively, you may set the environment variables LIBFFI_CFLAGS
47538and LIBFFI_LIBS to avoid the need to call pkg-config.
47539See the pkg-config man page for more details.
47540" "$LINENO" 5
47541elif test $pkg_failed = untried; then
47542	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47544as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47545is in your PATH or set the PKG_CONFIG environment variable to the full
47546path to pkg-config.
47547
47548Alternatively, you may set the environment variables LIBFFI_CFLAGS
47549and LIBFFI_LIBS to avoid the need to call pkg-config.
47550See the pkg-config man page for more details.
47551
47552To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47553See \`config.log' for more details" "$LINENO" 5; }
47554else
47555	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47556	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47558$as_echo "yes" >&6; }
47559	:
47560fi
47561
47562  fi
47563
47564  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47565    # Extract the first word of "llvm-config", so it can be a program name with args.
47566set dummy llvm-config; ac_word=$2
47567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47568$as_echo_n "checking for $ac_word... " >&6; }
47569if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47570  $as_echo_n "(cached) " >&6
47571else
47572  if test -n "$LLVM_CONFIG"; then
47573  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47574else
47575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47576for as_dir in $PATH
47577do
47578  IFS=$as_save_IFS
47579  test -z "$as_dir" && as_dir=.
47580    for ac_exec_ext in '' $ac_executable_extensions; do
47581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47582    ac_cv_prog_LLVM_CONFIG="llvm-config"
47583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47584    break 2
47585  fi
47586done
47587  done
47588IFS=$as_save_IFS
47589
47590fi
47591fi
47592LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47593if test -n "$LLVM_CONFIG"; then
47594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47595$as_echo "$LLVM_CONFIG" >&6; }
47596else
47597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47598$as_echo "no" >&6; }
47599fi
47600
47601
47602
47603    if test "x$LLVM_CONFIG" != xllvm-config; then
47604      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47605    fi
47606
47607    llvm_components="jit mcjit engine nativecodegen native"
47608    unset LLVM_CFLAGS
47609    for flag in $("$LLVM_CONFIG" --cxxflags); do
47610      if echo "${flag}" | grep -q '^-[ID]'; then
47611        if test "${flag}" != "-D_DEBUG" ; then
47612          if test "${LLVM_CFLAGS}" != "" ; then
47613            LLVM_CFLAGS="${LLVM_CFLAGS} "
47614          fi
47615          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47616        fi
47617      fi
47618    done
47619    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47620    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47621
47622    unset LLVM_LDFLAGS
47623    for flag in $("${LLVM_CONFIG}" --ldflags); do
47624      if echo "${flag}" | grep -q '^-L'; then
47625        if test "${LLVM_LDFLAGS}" != ""; then
47626          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47627        fi
47628        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47629      fi
47630    done
47631
47632    unset LLVM_LIBS
47633    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47634      if echo "${flag}" | grep -q '^-l'; then
47635        if test "${LLVM_LIBS}" != ""; then
47636          LLVM_LIBS="${LLVM_LIBS} "
47637        fi
47638        LLVM_LIBS="${LLVM_LIBS}${flag}"
47639      fi
47640    done
47641
47642
47643
47644
47645  fi
47646
47647  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47648  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47649    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47650  fi
47651
47652  # TODO better (platform agnostic) test
47653  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47654    LIBCXX="-lstdc++"
47655  fi
47656
47657
47658
47659
47660  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47661
47662
47663# Check whether --with-msvcr-dll was given.
47664if test "${with_msvcr_dll+set}" = set; then :
47665  withval=$with_msvcr_dll;
47666fi
47667
47668
47669  if test "x$with_msvcr_dll" != x; then
47670    # If given explicitely by user, do not probe. If not present, fail directly.
47671
47672  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47673  METHOD="--with-msvcr-dll"
47674  if test -e "$POSSIBLE_MSVCR_DLL"; then
47675    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47676$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47677
47678    # Need to check if the found msvcr is correct architecture
47679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47680$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47681    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47682    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47683      CORRECT_MSVCR_ARCH=386
47684    else
47685      CORRECT_MSVCR_ARCH=x86-64
47686    fi
47687    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47689$as_echo "ok" >&6; }
47690      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47692$as_echo_n "checking for msvcr100.dll... " >&6; }
47693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47694$as_echo "$MSVCR_DLL" >&6; }
47695    else
47696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47697$as_echo "incorrect, ignoring" >&6; }
47698      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47699$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47700    fi
47701  fi
47702
47703    if test "x$MSVCR_DLL" = x; then
47704      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47705    fi
47706  fi
47707
47708  if test "x$MSVCR_DLL" = x; then
47709    # Probe: Using well-known location from Visual Studio 10.0
47710    if test "x$VCINSTALLDIR" != x; then
47711      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47712
47713  windows_path="$CYGWIN_VC_INSTALL_DIR"
47714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47715    unix_path=`$CYGPATH -u "$windows_path"`
47716    CYGWIN_VC_INSTALL_DIR="$unix_path"
47717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47719    CYGWIN_VC_INSTALL_DIR="$unix_path"
47720  fi
47721
47722      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47723        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47724      else
47725        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47726      fi
47727
47728  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47729  METHOD="well-known location in VCINSTALLDIR"
47730  if test -e "$POSSIBLE_MSVCR_DLL"; then
47731    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47732$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47733
47734    # Need to check if the found msvcr is correct architecture
47735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47736$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47737    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47738    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47739      CORRECT_MSVCR_ARCH=386
47740    else
47741      CORRECT_MSVCR_ARCH=x86-64
47742    fi
47743    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47745$as_echo "ok" >&6; }
47746      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47748$as_echo_n "checking for msvcr100.dll... " >&6; }
47749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47750$as_echo "$MSVCR_DLL" >&6; }
47751    else
47752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47753$as_echo "incorrect, ignoring" >&6; }
47754      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47755$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47756    fi
47757  fi
47758
47759    fi
47760  fi
47761
47762  if test "x$MSVCR_DLL" = x; then
47763    # Probe: Check in the Boot JDK directory.
47764    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47765
47766  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47767  METHOD="well-known location in Boot JDK"
47768  if test -e "$POSSIBLE_MSVCR_DLL"; then
47769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47770$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47771
47772    # Need to check if the found msvcr is correct architecture
47773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47774$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47775    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47776    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47777      CORRECT_MSVCR_ARCH=386
47778    else
47779      CORRECT_MSVCR_ARCH=x86-64
47780    fi
47781    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47783$as_echo "ok" >&6; }
47784      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47786$as_echo_n "checking for msvcr100.dll... " >&6; }
47787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47788$as_echo "$MSVCR_DLL" >&6; }
47789    else
47790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47791$as_echo "incorrect, ignoring" >&6; }
47792      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47793$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47794    fi
47795  fi
47796
47797  fi
47798
47799  if test "x$MSVCR_DLL" = x; then
47800    # Probe: Look in the Windows system32 directory
47801    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47802
47803  windows_path="$CYGWIN_SYSTEMROOT"
47804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47805    unix_path=`$CYGPATH -u "$windows_path"`
47806    CYGWIN_SYSTEMROOT="$unix_path"
47807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47809    CYGWIN_SYSTEMROOT="$unix_path"
47810  fi
47811
47812    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47813
47814  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47815  METHOD="well-known location in SYSTEMROOT"
47816  if test -e "$POSSIBLE_MSVCR_DLL"; then
47817    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47818$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47819
47820    # Need to check if the found msvcr is correct architecture
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47822$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47823    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47824    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47825      CORRECT_MSVCR_ARCH=386
47826    else
47827      CORRECT_MSVCR_ARCH=x86-64
47828    fi
47829    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47831$as_echo "ok" >&6; }
47832      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47834$as_echo_n "checking for msvcr100.dll... " >&6; }
47835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47836$as_echo "$MSVCR_DLL" >&6; }
47837    else
47838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47839$as_echo "incorrect, ignoring" >&6; }
47840      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47841$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47842    fi
47843  fi
47844
47845  fi
47846
47847  if test "x$MSVCR_DLL" = x; then
47848    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47849    if test "x$VS100COMNTOOLS" != x; then
47850      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47851
47852  windows_path="$CYGWIN_VS_TOOLS_DIR"
47853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47854    unix_path=`$CYGPATH -u "$windows_path"`
47855    CYGWIN_VS_TOOLS_DIR="$unix_path"
47856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47858    CYGWIN_VS_TOOLS_DIR="$unix_path"
47859  fi
47860
47861      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47862        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47863      else
47864        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47865      fi
47866
47867  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47868  METHOD="search of VS100COMNTOOLS"
47869  if test -e "$POSSIBLE_MSVCR_DLL"; then
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47871$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47872
47873    # Need to check if the found msvcr is correct architecture
47874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47875$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47876    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47877    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47878      CORRECT_MSVCR_ARCH=386
47879    else
47880      CORRECT_MSVCR_ARCH=x86-64
47881    fi
47882    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47884$as_echo "ok" >&6; }
47885      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47887$as_echo_n "checking for msvcr100.dll... " >&6; }
47888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47889$as_echo "$MSVCR_DLL" >&6; }
47890    else
47891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47892$as_echo "incorrect, ignoring" >&6; }
47893      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47894$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47895    fi
47896  fi
47897
47898    fi
47899  fi
47900
47901  if test "x$MSVCR_DLL" = x; then
47902    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47903    # (This was the original behaviour; kept since it might turn up something)
47904    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47905      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47906        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47907      else
47908        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47909        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47910          # We're grasping at straws now...
47911          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47912        fi
47913      fi
47914
47915
47916  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47917  METHOD="search of VCINSTALLDIR"
47918  if test -e "$POSSIBLE_MSVCR_DLL"; then
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47920$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47921
47922    # Need to check if the found msvcr is correct architecture
47923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47924$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47925    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47926    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47927      CORRECT_MSVCR_ARCH=386
47928    else
47929      CORRECT_MSVCR_ARCH=x86-64
47930    fi
47931    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47933$as_echo "ok" >&6; }
47934      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47936$as_echo_n "checking for msvcr100.dll... " >&6; }
47937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47938$as_echo "$MSVCR_DLL" >&6; }
47939    else
47940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47941$as_echo "incorrect, ignoring" >&6; }
47942      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47943$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47944    fi
47945  fi
47946
47947    fi
47948  fi
47949
47950  if test "x$MSVCR_DLL" = x; then
47951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47952$as_echo_n "checking for msvcr100.dll... " >&6; }
47953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47954$as_echo "no" >&6; }
47955    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47956  fi
47957
47958
47959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47960
47961  # Input might be given as Windows format, start by converting to
47962  # unix format.
47963  path="$MSVCR_DLL"
47964  new_path=`$CYGPATH -u "$path"`
47965
47966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47969  # "foo.exe" is OK but "foo" is an error.
47970  #
47971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47972  # It is also a way to make sure we got the proper file name for the real test later on.
47973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47974  if test "x$test_shortpath" = x; then
47975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47976$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47977    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47978  fi
47979
47980  # Call helper function which possibly converts this using DOS-style short mode.
47981  # If so, the updated path is stored in $new_path.
47982
47983  input_path="$new_path"
47984  # Check if we need to convert this using DOS-style short mode. If the path
47985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47986  # take no chances and rewrite it.
47987  # Note: m4 eats our [], so we need to use [ and ] instead.
47988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47989  if test "x$has_forbidden_chars" != x; then
47990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47994      # Going to short mode and back again did indeed matter. Since short mode is
47995      # case insensitive, let's make it lowercase to improve readability.
47996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47997      # Now convert it back to Unix-stile (cygpath)
47998      input_path=`$CYGPATH -u "$shortmode_path"`
47999      new_path="$input_path"
48000    fi
48001  fi
48002
48003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48004  if test "x$test_cygdrive_prefix" = x; then
48005    # As a simple fix, exclude /usr/bin since it's not a real path.
48006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48008      # a path prefixed by /cygdrive for fixpath to work.
48009      new_path="$CYGWIN_ROOT_PATH$input_path"
48010    fi
48011  fi
48012
48013
48014  if test "x$path" != "x$new_path"; then
48015    MSVCR_DLL="$new_path"
48016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48017$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48018  fi
48019
48020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48021
48022  path="$MSVCR_DLL"
48023  has_colon=`$ECHO $path | $GREP ^.:`
48024  new_path="$path"
48025  if test "x$has_colon" = x; then
48026    # Not in mixed or Windows style, start by that.
48027    new_path=`cmd //c echo $path`
48028  fi
48029
48030
48031  input_path="$new_path"
48032  # Check if we need to convert this using DOS-style short mode. If the path
48033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48034  # take no chances and rewrite it.
48035  # Note: m4 eats our [], so we need to use [ and ] instead.
48036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48037  if test "x$has_forbidden_chars" != x; then
48038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48040  fi
48041
48042
48043  windows_path="$new_path"
48044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48045    unix_path=`$CYGPATH -u "$windows_path"`
48046    new_path="$unix_path"
48047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48049    new_path="$unix_path"
48050  fi
48051
48052  if test "x$path" != "x$new_path"; then
48053    MSVCR_DLL="$new_path"
48054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48055$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48056  fi
48057
48058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48060
48061  else
48062    # We're on a posix platform. Hooray! :)
48063    path="$MSVCR_DLL"
48064    has_space=`$ECHO "$path" | $GREP " "`
48065    if test "x$has_space" != x; then
48066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48067$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48068      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48069    fi
48070
48071    # Use eval to expand a potential ~
48072    eval path="$path"
48073    if test ! -f "$path" && test ! -d "$path"; then
48074      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48075    fi
48076
48077    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48078  fi
48079
48080
48081
48082
48083# Check whether --with-dxsdk was given.
48084if test "${with_dxsdk+set}" = set; then :
48085  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48086$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48087fi
48088
48089
48090
48091
48092# Check whether --with-dxsdk-lib was given.
48093if test "${with_dxsdk_lib+set}" = set; then :
48094  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48095$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48096fi
48097
48098
48099
48100
48101# Check whether --with-dxsdk-include was given.
48102if test "${with_dxsdk_include+set}" = set; then :
48103  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48104$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48105fi
48106
48107
48108  fi
48109
48110
48111
48112###############################################################################
48113#
48114# We need to do some final tweaking, when everything else is done.
48115#
48116###############################################################################
48117
48118
48119  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48120
48121
48122  # The name of the Service Agent jar.
48123  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48124  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48125    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48126  fi
48127
48128
48129
48130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48131$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48132
48133    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48134      ENABLE_INTREE_EC=yes
48135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48136$as_echo "yes" >&6; }
48137    else
48138      ENABLE_INTREE_EC=no
48139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48140$as_echo "no" >&6; }
48141    fi
48142
48143
48144
48145
48146###############################################################################
48147#
48148# Configure parts of the build that only affect the build performance,
48149# not the result.
48150#
48151###############################################################################
48152
48153
48154  # How many cores do we have on this build system?
48155
48156# Check whether --with-num-cores was given.
48157if test "${with_num_cores+set}" = set; then :
48158  withval=$with_num_cores;
48159fi
48160
48161  if test "x$with_num_cores" = x; then
48162    # The number of cores were not specified, try to probe them.
48163
48164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48165$as_echo_n "checking for number of cores... " >&6; }
48166  NUM_CORES=1
48167  FOUND_CORES=no
48168
48169  if test -f /proc/cpuinfo; then
48170    # Looks like a Linux (or cygwin) system
48171    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48172    FOUND_CORES=yes
48173  elif test -x /usr/sbin/psrinfo; then
48174    # Looks like a Solaris system
48175    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48176    FOUND_CORES=yes
48177  elif test -x /usr/sbin/system_profiler; then
48178    # Looks like a MacOSX system
48179    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48180    FOUND_CORES=yes
48181  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48182    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48183    FOUND_CORES=yes
48184  elif test -n "$NUMBER_OF_PROCESSORS"; then
48185    # On windows, look in the env
48186    NUM_CORES=$NUMBER_OF_PROCESSORS
48187    FOUND_CORES=yes
48188  fi
48189
48190  if test "x$FOUND_CORES" = xyes; then
48191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48192$as_echo "$NUM_CORES" >&6; }
48193  else
48194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48195$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48197$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48198  fi
48199
48200  else
48201    NUM_CORES=$with_num_cores
48202  fi
48203
48204
48205
48206  # How much memory do we have on this build system?
48207
48208# Check whether --with-memory-size was given.
48209if test "${with_memory_size+set}" = set; then :
48210  withval=$with_memory_size;
48211fi
48212
48213  if test "x$with_memory_size" = x; then
48214    # The memory size was not specified, try to probe it.
48215
48216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48217$as_echo_n "checking for memory size... " >&6; }
48218  # Default to 1024 MB
48219  MEMORY_SIZE=1024
48220  FOUND_MEM=no
48221
48222  if test -f /proc/meminfo; then
48223    # Looks like a Linux (or cygwin) system
48224    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48225    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48226    FOUND_MEM=yes
48227  elif test -x /usr/sbin/prtconf; then
48228    # Looks like a Solaris or AIX system
48229    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48230    FOUND_MEM=yes
48231  elif test -x /usr/sbin/system_profiler; then
48232    # Looks like a MacOSX system
48233    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48234    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48235    FOUND_MEM=yes
48236  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48237    # Windows, but without cygwin
48238    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48239    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48240    FOUND_MEM=yes
48241  fi
48242
48243  if test "x$FOUND_MEM" = xyes; then
48244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48245$as_echo "$MEMORY_SIZE MB" >&6; }
48246  else
48247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48248$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48250$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48251  fi
48252
48253  else
48254    MEMORY_SIZE=$with_memory_size
48255  fi
48256
48257
48258
48259  # Provide a decent default number of parallel jobs for make depending on
48260  # number of cores, amount of memory and machine architecture.
48261
48262# Check whether --with-jobs was given.
48263if test "${with_jobs+set}" = set; then :
48264  withval=$with_jobs;
48265fi
48266
48267  if test "x$with_jobs" = x; then
48268    # Number of jobs was not specified, calculate.
48269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48270$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48271    # Approximate memory in GB, rounding up a bit.
48272    memory_gb=`expr $MEMORY_SIZE / 1100`
48273    # Pick the lowest of memory in gb and number of cores.
48274    if test "$memory_gb" -lt "$NUM_CORES"; then
48275      JOBS="$memory_gb"
48276    else
48277      JOBS="$NUM_CORES"
48278      # On bigger machines, leave some room for other processes to run
48279      if test "$JOBS" -gt "4"; then
48280        JOBS=`expr $JOBS '*' 90 / 100`
48281      fi
48282    fi
48283    # Cap number of jobs to 16
48284    if test "$JOBS" -gt "16"; then
48285      JOBS=16
48286    fi
48287    if test "$JOBS" -eq "0"; then
48288      JOBS=1
48289    fi
48290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48291$as_echo "$JOBS" >&6; }
48292  else
48293    JOBS=$with_jobs
48294  fi
48295
48296
48297
48298# Setup smart javac (after cores and memory have been setup)
48299
48300
48301# Check whether --with-sjavac-server-java was given.
48302if test "${with_sjavac_server_java+set}" = set; then :
48303  withval=$with_sjavac_server_java;
48304fi
48305
48306
48307  if test "x$with_sjavac_server_java" != x; then
48308    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48309    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48310    if test "x$FOUND_VERSION" = x; then
48311      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48312    fi
48313  else
48314    SJAVAC_SERVER_JAVA=""
48315    # Hotspot specific options.
48316
48317  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48318  $ECHO "Command: $JAVA -verbosegc -version" >&5
48319  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48320  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48321  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48322  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48323    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48324    JVM_ARG_OK=true
48325  else
48326    $ECHO "Arg failed:" >&5
48327    $ECHO "$OUTPUT" >&5
48328    JVM_ARG_OK=false
48329  fi
48330
48331    # JRockit specific options.
48332
48333  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48334  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48335  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48336  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48337  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48338  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48339    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48340    JVM_ARG_OK=true
48341  else
48342    $ECHO "Arg failed:" >&5
48343    $ECHO "$OUTPUT" >&5
48344    JVM_ARG_OK=false
48345  fi
48346
48347    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48348  fi
48349
48350
48351  if test "$MEMORY_SIZE" -gt "2500"; then
48352
48353  $ECHO "Check if jvm arg is ok: -d64" >&5
48354  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48355  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48356  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48357  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48358  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48359    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48360    JVM_ARG_OK=true
48361  else
48362    $ECHO "Arg failed:" >&5
48363    $ECHO "$OUTPUT" >&5
48364    JVM_ARG_OK=false
48365  fi
48366
48367    if test "$JVM_ARG_OK" = true; then
48368      JVM_64BIT=true
48369      JVM_ARG_OK=false
48370    fi
48371  fi
48372
48373  if test "$JVM_64BIT" = true; then
48374    if test "$MEMORY_SIZE" -gt "17000"; then
48375
48376  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48377  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48378  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48379  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48380  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48381  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48382    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48383    JVM_ARG_OK=true
48384  else
48385    $ECHO "Arg failed:" >&5
48386    $ECHO "$OUTPUT" >&5
48387    JVM_ARG_OK=false
48388  fi
48389
48390    fi
48391    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48392
48393  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48394  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48395  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48396  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48397  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48398  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48399    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48400    JVM_ARG_OK=true
48401  else
48402    $ECHO "Arg failed:" >&5
48403    $ECHO "$OUTPUT" >&5
48404    JVM_ARG_OK=false
48405  fi
48406
48407    fi
48408    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48409
48410  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48411  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48412  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48413  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48414  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48415  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48416    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48417    JVM_ARG_OK=true
48418  else
48419    $ECHO "Arg failed:" >&5
48420    $ECHO "$OUTPUT" >&5
48421    JVM_ARG_OK=false
48422  fi
48423
48424    fi
48425    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48426
48427  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48428  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48429  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48430  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48431  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48432  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48433    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48434    JVM_ARG_OK=true
48435  else
48436    $ECHO "Arg failed:" >&5
48437    $ECHO "$OUTPUT" >&5
48438    JVM_ARG_OK=false
48439  fi
48440
48441    fi
48442  fi
48443  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48444
48445  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48446  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48447  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48448  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48449  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48450  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48451    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48452    JVM_ARG_OK=true
48453  else
48454    $ECHO "Arg failed:" >&5
48455    $ECHO "$OUTPUT" >&5
48456    JVM_ARG_OK=false
48457  fi
48458
48459  fi
48460  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48461
48462  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48463  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48464  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48465  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48466  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48467  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48468    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48469    JVM_ARG_OK=true
48470  else
48471    $ECHO "Arg failed:" >&5
48472    $ECHO "$OUTPUT" >&5
48473    JVM_ARG_OK=false
48474  fi
48475
48476  fi
48477  if test "$JVM_ARG_OK" = false; then
48478
48479  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48480  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48481  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48482  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48483  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48484  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48485    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48486    JVM_ARG_OK=true
48487  else
48488    $ECHO "Arg failed:" >&5
48489    $ECHO "$OUTPUT" >&5
48490    JVM_ARG_OK=false
48491  fi
48492
48493  fi
48494
48495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48496$as_echo_n "checking whether to use sjavac... " >&6; }
48497  # Check whether --enable-sjavac was given.
48498if test "${enable_sjavac+set}" = set; then :
48499  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48500else
48501  ENABLE_SJAVAC='no'
48502fi
48503
48504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48505$as_echo "$ENABLE_SJAVAC" >&6; }
48506
48507
48508  if test "x$ENABLE_SJAVAC" = xyes; then
48509    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48510  else
48511    SJAVAC_SERVER_DIR=
48512  fi
48513
48514
48515
48516# Can the C/C++ compiler use precompiled headers?
48517
48518
48519  ###############################################################################
48520  #
48521  # Can the C/C++ compiler use precompiled headers?
48522  #
48523  # Check whether --enable-precompiled-headers was given.
48524if test "${enable_precompiled_headers+set}" = set; then :
48525  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48526else
48527  ENABLE_PRECOMPH=yes
48528fi
48529
48530
48531  USE_PRECOMPILED_HEADER=1
48532  if test "x$ENABLE_PRECOMPH" = xno; then
48533    USE_PRECOMPILED_HEADER=0
48534  fi
48535
48536  if test "x$ENABLE_PRECOMPH" = xyes; then
48537    # Check that the compiler actually supports precomp headers.
48538    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48540$as_echo_n "checking that precompiled headers work... " >&6; }
48541      echo "int alfa();" > conftest.h
48542      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48543      if test ! -f conftest.hpp.gch; then
48544        USE_PRECOMPILED_HEADER=0
48545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48546$as_echo "no" >&6; }
48547      else
48548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48549$as_echo "yes" >&6; }
48550      fi
48551      rm -f conftest.h conftest.hpp.gch
48552    fi
48553  fi
48554
48555
48556
48557
48558# Setup use of ccache, if available
48559
48560  # Check whether --enable-ccache was given.
48561if test "${enable_ccache+set}" = set; then :
48562  enableval=$enable_ccache;
48563fi
48564
48565
48566  CCACHE=
48567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48568$as_echo_n "checking is ccache enabled... " >&6; }
48569  ENABLE_CCACHE=$enable_ccache
48570  if test "x$enable_ccache" = xyes; then
48571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48572$as_echo "yes" >&6; }
48573    OLD_PATH="$PATH"
48574    if test "x$TOOLS_DIR" != x; then
48575      PATH=$TOOLS_DIR:$PATH
48576    fi
48577
48578
48579
48580  # Publish this variable in the help.
48581
48582
48583  if test "x$CCACHE" = x; then
48584    # The variable is not set by user, try to locate tool using the code snippet
48585    for ac_prog in ccache
48586do
48587  # Extract the first word of "$ac_prog", so it can be a program name with args.
48588set dummy $ac_prog; ac_word=$2
48589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48590$as_echo_n "checking for $ac_word... " >&6; }
48591if ${ac_cv_path_CCACHE+:} false; then :
48592  $as_echo_n "(cached) " >&6
48593else
48594  case $CCACHE in
48595  [\\/]* | ?:[\\/]*)
48596  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48597  ;;
48598  *)
48599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48600for as_dir in $PATH
48601do
48602  IFS=$as_save_IFS
48603  test -z "$as_dir" && as_dir=.
48604    for ac_exec_ext in '' $ac_executable_extensions; do
48605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48606    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48608    break 2
48609  fi
48610done
48611  done
48612IFS=$as_save_IFS
48613
48614  ;;
48615esac
48616fi
48617CCACHE=$ac_cv_path_CCACHE
48618if test -n "$CCACHE"; then
48619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48620$as_echo "$CCACHE" >&6; }
48621else
48622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48623$as_echo "no" >&6; }
48624fi
48625
48626
48627  test -n "$CCACHE" && break
48628done
48629
48630  else
48631    # The variable is set, but is it from the command line or the environment?
48632
48633    # Try to remove the string !CCACHE! from our list.
48634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48636      # If it failed, the variable was not from the command line. Ignore it,
48637      # but warn the user (except for BASH, which is always set by the calling BASH).
48638      if test "xCCACHE" != xBASH; then
48639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48640$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48641      fi
48642      # Try to locate tool using the code snippet
48643      for ac_prog in ccache
48644do
48645  # Extract the first word of "$ac_prog", so it can be a program name with args.
48646set dummy $ac_prog; ac_word=$2
48647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48648$as_echo_n "checking for $ac_word... " >&6; }
48649if ${ac_cv_path_CCACHE+:} false; then :
48650  $as_echo_n "(cached) " >&6
48651else
48652  case $CCACHE in
48653  [\\/]* | ?:[\\/]*)
48654  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48655  ;;
48656  *)
48657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48658for as_dir in $PATH
48659do
48660  IFS=$as_save_IFS
48661  test -z "$as_dir" && as_dir=.
48662    for ac_exec_ext in '' $ac_executable_extensions; do
48663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48664    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48666    break 2
48667  fi
48668done
48669  done
48670IFS=$as_save_IFS
48671
48672  ;;
48673esac
48674fi
48675CCACHE=$ac_cv_path_CCACHE
48676if test -n "$CCACHE"; then
48677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48678$as_echo "$CCACHE" >&6; }
48679else
48680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48681$as_echo "no" >&6; }
48682fi
48683
48684
48685  test -n "$CCACHE" && break
48686done
48687
48688    else
48689      # If it succeeded, then it was overridden by the user. We will use it
48690      # for the tool.
48691
48692      # First remove it from the list of overridden variables, so we can test
48693      # for unknown variables in the end.
48694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48695
48696      # Check if the provided tool contains a complete path.
48697      tool_specified="$CCACHE"
48698      tool_basename="${tool_specified##*/}"
48699      if test "x$tool_basename" = "x$tool_specified"; then
48700        # A command without a complete path is provided, search $PATH.
48701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48702$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48703        # Extract the first word of "$tool_basename", so it can be a program name with args.
48704set dummy $tool_basename; ac_word=$2
48705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48706$as_echo_n "checking for $ac_word... " >&6; }
48707if ${ac_cv_path_CCACHE+:} false; then :
48708  $as_echo_n "(cached) " >&6
48709else
48710  case $CCACHE in
48711  [\\/]* | ?:[\\/]*)
48712  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48713  ;;
48714  *)
48715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48716for as_dir in $PATH
48717do
48718  IFS=$as_save_IFS
48719  test -z "$as_dir" && as_dir=.
48720    for ac_exec_ext in '' $ac_executable_extensions; do
48721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48722    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48724    break 2
48725  fi
48726done
48727  done
48728IFS=$as_save_IFS
48729
48730  ;;
48731esac
48732fi
48733CCACHE=$ac_cv_path_CCACHE
48734if test -n "$CCACHE"; then
48735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48736$as_echo "$CCACHE" >&6; }
48737else
48738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48739$as_echo "no" >&6; }
48740fi
48741
48742
48743        if test "x$CCACHE" = x; then
48744          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48745        fi
48746      else
48747        # Otherwise we believe it is a complete path. Use it as it is.
48748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48749$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48751$as_echo_n "checking for CCACHE... " >&6; }
48752        if test ! -x "$tool_specified"; then
48753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48754$as_echo "not found" >&6; }
48755          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48756        fi
48757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48758$as_echo "$tool_specified" >&6; }
48759      fi
48760    fi
48761  fi
48762
48763
48764
48765  if test "x$CCACHE" = x; then
48766    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48767  fi
48768
48769
48770    CCACHE_STATUS="enabled"
48771    PATH="$OLD_PATH"
48772  elif test "x$enable_ccache" = xno; then
48773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48774$as_echo "no, explicitly disabled" >&6; }
48775  elif test "x$enable_ccache" = x; then
48776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48777$as_echo "no" >&6; }
48778  else
48779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48780$as_echo "unknown" >&6; }
48781    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48782  fi
48783
48784
48785
48786# Check whether --with-ccache-dir was given.
48787if test "${with_ccache_dir+set}" = set; then :
48788  withval=$with_ccache_dir;
48789fi
48790
48791
48792  if test "x$with_ccache_dir" != x; then
48793    # When using a non home ccache directory, assume the use is to share ccache files
48794    # with other users. Thus change the umask.
48795    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48796    if test "x$CCACHE" = x; then
48797      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48798$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48799    fi
48800  fi
48801
48802  if test "x$CCACHE" != x; then
48803
48804  if test "x$CCACHE" != x; then
48805    # Only use ccache if it is 3.1.4 or later, which supports
48806    # precompiled headers.
48807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48808$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48809    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48810    if test "x$HAS_GOOD_CCACHE" = x; then
48811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48812$as_echo "no, disabling ccache" >&6; }
48813      CCACHE=
48814      CCACHE_STATUS="disabled"
48815    else
48816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48817$as_echo "yes" >&6; }
48818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48819$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48820      PUSHED_FLAGS="$CXXFLAGS"
48821      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48823/* end confdefs.h.  */
48824
48825int
48826main ()
48827{
48828
48829  ;
48830  return 0;
48831}
48832_ACEOF
48833if ac_fn_cxx_try_compile "$LINENO"; then :
48834  CC_KNOWS_CCACHE_TRICK=yes
48835else
48836  CC_KNOWS_CCACHE_TRICK=no
48837fi
48838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48839      CXXFLAGS="$PUSHED_FLAGS"
48840      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48842$as_echo "yes" >&6; }
48843      else
48844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48845$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48846        CCACHE=
48847        CCACHE_STATUS="disabled"
48848      fi
48849    fi
48850  fi
48851
48852  if test "x$CCACHE" != x; then
48853    CCACHE_SLOPPINESS=time_macros
48854    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48855    CCACHE_FLAGS=-fpch-preprocess
48856
48857    if test "x$SET_CCACHE_DIR" != x; then
48858      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48859      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48860    fi
48861  fi
48862
48863  fi
48864
48865
48866###############################################################################
48867#
48868# And now the finish...
48869#
48870###############################################################################
48871
48872# Check for some common pitfalls
48873
48874  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48875    file_to_test="$SRC_ROOT/LICENSE"
48876    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48877      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
48878    fi
48879  fi
48880
48881
48882  # Did user specify any unknown variables?
48883
48884  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48885    # Replace the separating ! with spaces before presenting for end user.
48886    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48887    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48888$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48889  fi
48890
48891
48892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48893$as_echo_n "checking if build directory is on local disk... " >&6; }
48894
48895  # df -l lists only local disks; if the given directory is not found then
48896  # a non-zero exit code is given
48897  if test "x$DF" = x; then
48898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48899      # msys does not have df; use Windows "net use" instead.
48900      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48901      if test "x$IS_NETWORK_DISK" = x; then
48902        OUTPUT_DIR_IS_LOCAL="yes"
48903      else
48904        OUTPUT_DIR_IS_LOCAL="no"
48905      fi
48906    else
48907      # No df here, say it's local
48908      OUTPUT_DIR_IS_LOCAL="yes"
48909    fi
48910  else
48911    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48912      OUTPUT_DIR_IS_LOCAL="yes"
48913    else
48914      OUTPUT_DIR_IS_LOCAL="no"
48915    fi
48916  fi
48917
48918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48919$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48920
48921
48922
48923  # Check if the user has any old-style ALT_ variables set.
48924  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48925
48926  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48927  # Since we can't properly handle the dependencies for this, warn the user about the situation
48928  if test -e $OUTPUT_ROOT/spec.gmk; then
48929    IS_RECONFIGURE=yes
48930  else
48931    IS_RECONFIGURE=no
48932  fi
48933
48934
48935# At the end, call the custom hook. (Dummy macro if no custom sources available)
48936
48937
48938# We're messing a bit with internal autoconf variables to put the config.status
48939# in the output directory instead of the current directory.
48940CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48941
48942# Create the actual output files. Now the main work of configure is done.
48943cat >confcache <<\_ACEOF
48944# This file is a shell script that caches the results of configure
48945# tests run on this system so they can be shared between configure
48946# scripts and configure runs, see configure's option --config-cache.
48947# It is not useful on other systems.  If it contains results you don't
48948# want to keep, you may remove or edit it.
48949#
48950# config.status only pays attention to the cache file if you give it
48951# the --recheck option to rerun configure.
48952#
48953# `ac_cv_env_foo' variables (set or unset) will be overridden when
48954# loading this file, other *unset* `ac_cv_foo' will be assigned the
48955# following values.
48956
48957_ACEOF
48958
48959# The following way of writing the cache mishandles newlines in values,
48960# but we know of no workaround that is simple, portable, and efficient.
48961# So, we kill variables containing newlines.
48962# Ultrix sh set writes to stderr and can't be redirected directly,
48963# and sets the high bit in the cache file unless we assign to the vars.
48964(
48965  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48966    eval ac_val=\$$ac_var
48967    case $ac_val in #(
48968    *${as_nl}*)
48969      case $ac_var in #(
48970      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48971$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48972      esac
48973      case $ac_var in #(
48974      _ | IFS | as_nl) ;; #(
48975      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48976      *) { eval $ac_var=; unset $ac_var;} ;;
48977      esac ;;
48978    esac
48979  done
48980
48981  (set) 2>&1 |
48982    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48983    *${as_nl}ac_space=\ *)
48984      # `set' does not quote correctly, so add quotes: double-quote
48985      # substitution turns \\\\ into \\, and sed turns \\ into \.
48986      sed -n \
48987	"s/'/'\\\\''/g;
48988	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48989      ;; #(
48990    *)
48991      # `set' quotes correctly as required by POSIX, so do not add quotes.
48992      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48993      ;;
48994    esac |
48995    sort
48996) |
48997  sed '
48998     /^ac_cv_env_/b end
48999     t clear
49000     :clear
49001     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49002     t end
49003     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49004     :end' >>confcache
49005if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49006  if test -w "$cache_file"; then
49007    if test "x$cache_file" != "x/dev/null"; then
49008      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49009$as_echo "$as_me: updating cache $cache_file" >&6;}
49010      if test ! -f "$cache_file" || test -h "$cache_file"; then
49011	cat confcache >"$cache_file"
49012      else
49013        case $cache_file in #(
49014        */* | ?:*)
49015	  mv -f confcache "$cache_file"$$ &&
49016	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49017        *)
49018	  mv -f confcache "$cache_file" ;;
49019	esac
49020      fi
49021    fi
49022  else
49023    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49024$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49025  fi
49026fi
49027rm -f confcache
49028
49029test "x$prefix" = xNONE && prefix=$ac_default_prefix
49030# Let make expand exec_prefix.
49031test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49032
49033DEFS=-DHAVE_CONFIG_H
49034
49035ac_libobjs=
49036ac_ltlibobjs=
49037U=
49038for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49039  # 1. Remove the extension, and $U if already installed.
49040  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49041  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49042  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49043  #    will be set to the directory where LIBOBJS objects are built.
49044  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49045  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49046done
49047LIBOBJS=$ac_libobjs
49048
49049LTLIBOBJS=$ac_ltlibobjs
49050
49051
49052
49053: "${CONFIG_STATUS=./config.status}"
49054ac_write_fail=0
49055ac_clean_files_save=$ac_clean_files
49056ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49057{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49058$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49059as_write_fail=0
49060cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49061#! $SHELL
49062# Generated by $as_me.
49063# Run this file to recreate the current configuration.
49064# Compiler output produced by configure, useful for debugging
49065# configure, is in config.log if it exists.
49066
49067debug=false
49068ac_cs_recheck=false
49069ac_cs_silent=false
49070
49071SHELL=\${CONFIG_SHELL-$SHELL}
49072export SHELL
49073_ASEOF
49074cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49075## -------------------- ##
49076## M4sh Initialization. ##
49077## -------------------- ##
49078
49079# Be more Bourne compatible
49080DUALCASE=1; export DUALCASE # for MKS sh
49081if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49082  emulate sh
49083  NULLCMD=:
49084  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49085  # is contrary to our usage.  Disable this feature.
49086  alias -g '${1+"$@"}'='"$@"'
49087  setopt NO_GLOB_SUBST
49088else
49089  case `(set -o) 2>/dev/null` in #(
49090  *posix*) :
49091    set -o posix ;; #(
49092  *) :
49093     ;;
49094esac
49095fi
49096
49097
49098as_nl='
49099'
49100export as_nl
49101# Printing a long string crashes Solaris 7 /usr/bin/printf.
49102as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49103as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49104as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49105# Prefer a ksh shell builtin over an external printf program on Solaris,
49106# but without wasting forks for bash or zsh.
49107if test -z "$BASH_VERSION$ZSH_VERSION" \
49108    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49109  as_echo='print -r --'
49110  as_echo_n='print -rn --'
49111elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49112  as_echo='printf %s\n'
49113  as_echo_n='printf %s'
49114else
49115  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49116    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49117    as_echo_n='/usr/ucb/echo -n'
49118  else
49119    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49120    as_echo_n_body='eval
49121      arg=$1;
49122      case $arg in #(
49123      *"$as_nl"*)
49124	expr "X$arg" : "X\\(.*\\)$as_nl";
49125	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49126      esac;
49127      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49128    '
49129    export as_echo_n_body
49130    as_echo_n='sh -c $as_echo_n_body as_echo'
49131  fi
49132  export as_echo_body
49133  as_echo='sh -c $as_echo_body as_echo'
49134fi
49135
49136# The user is always right.
49137if test "${PATH_SEPARATOR+set}" != set; then
49138  PATH_SEPARATOR=:
49139  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49140    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49141      PATH_SEPARATOR=';'
49142  }
49143fi
49144
49145
49146# IFS
49147# We need space, tab and new line, in precisely that order.  Quoting is
49148# there to prevent editors from complaining about space-tab.
49149# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49150# splitting by setting IFS to empty value.)
49151IFS=" ""	$as_nl"
49152
49153# Find who we are.  Look in the path if we contain no directory separator.
49154as_myself=
49155case $0 in #((
49156  *[\\/]* ) as_myself=$0 ;;
49157  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49158for as_dir in $PATH
49159do
49160  IFS=$as_save_IFS
49161  test -z "$as_dir" && as_dir=.
49162    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49163  done
49164IFS=$as_save_IFS
49165
49166     ;;
49167esac
49168# We did not find ourselves, most probably we were run as `sh COMMAND'
49169# in which case we are not to be found in the path.
49170if test "x$as_myself" = x; then
49171  as_myself=$0
49172fi
49173if test ! -f "$as_myself"; then
49174  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49175  exit 1
49176fi
49177
49178# Unset variables that we do not need and which cause bugs (e.g. in
49179# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49180# suppresses any "Segmentation fault" message there.  '((' could
49181# trigger a bug in pdksh 5.2.14.
49182for as_var in BASH_ENV ENV MAIL MAILPATH
49183do eval test x\${$as_var+set} = xset \
49184  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49185done
49186PS1='$ '
49187PS2='> '
49188PS4='+ '
49189
49190# NLS nuisances.
49191LC_ALL=C
49192export LC_ALL
49193LANGUAGE=C
49194export LANGUAGE
49195
49196# CDPATH.
49197(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49198
49199
49200# as_fn_error STATUS ERROR [LINENO LOG_FD]
49201# ----------------------------------------
49202# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49203# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49204# script with STATUS, using 1 if that was 0.
49205as_fn_error ()
49206{
49207  as_status=$1; test $as_status -eq 0 && as_status=1
49208  if test "$4"; then
49209    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49210    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49211  fi
49212  $as_echo "$as_me: error: $2" >&2
49213  as_fn_exit $as_status
49214} # as_fn_error
49215
49216
49217# as_fn_set_status STATUS
49218# -----------------------
49219# Set $? to STATUS, without forking.
49220as_fn_set_status ()
49221{
49222  return $1
49223} # as_fn_set_status
49224
49225# as_fn_exit STATUS
49226# -----------------
49227# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49228as_fn_exit ()
49229{
49230  set +e
49231  as_fn_set_status $1
49232  exit $1
49233} # as_fn_exit
49234
49235# as_fn_unset VAR
49236# ---------------
49237# Portably unset VAR.
49238as_fn_unset ()
49239{
49240  { eval $1=; unset $1;}
49241}
49242as_unset=as_fn_unset
49243# as_fn_append VAR VALUE
49244# ----------------------
49245# Append the text in VALUE to the end of the definition contained in VAR. Take
49246# advantage of any shell optimizations that allow amortized linear growth over
49247# repeated appends, instead of the typical quadratic growth present in naive
49248# implementations.
49249if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49250  eval 'as_fn_append ()
49251  {
49252    eval $1+=\$2
49253  }'
49254else
49255  as_fn_append ()
49256  {
49257    eval $1=\$$1\$2
49258  }
49259fi # as_fn_append
49260
49261# as_fn_arith ARG...
49262# ------------------
49263# Perform arithmetic evaluation on the ARGs, and store the result in the
49264# global $as_val. Take advantage of shells that can avoid forks. The arguments
49265# must be portable across $(()) and expr.
49266if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49267  eval 'as_fn_arith ()
49268  {
49269    as_val=$(( $* ))
49270  }'
49271else
49272  as_fn_arith ()
49273  {
49274    as_val=`expr "$@" || test $? -eq 1`
49275  }
49276fi # as_fn_arith
49277
49278
49279if expr a : '\(a\)' >/dev/null 2>&1 &&
49280   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49281  as_expr=expr
49282else
49283  as_expr=false
49284fi
49285
49286if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49287  as_basename=basename
49288else
49289  as_basename=false
49290fi
49291
49292if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49293  as_dirname=dirname
49294else
49295  as_dirname=false
49296fi
49297
49298as_me=`$as_basename -- "$0" ||
49299$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49300	 X"$0" : 'X\(//\)$' \| \
49301	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49302$as_echo X/"$0" |
49303    sed '/^.*\/\([^/][^/]*\)\/*$/{
49304	    s//\1/
49305	    q
49306	  }
49307	  /^X\/\(\/\/\)$/{
49308	    s//\1/
49309	    q
49310	  }
49311	  /^X\/\(\/\).*/{
49312	    s//\1/
49313	    q
49314	  }
49315	  s/.*/./; q'`
49316
49317# Avoid depending upon Character Ranges.
49318as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49319as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49320as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49321as_cr_digits='0123456789'
49322as_cr_alnum=$as_cr_Letters$as_cr_digits
49323
49324ECHO_C= ECHO_N= ECHO_T=
49325case `echo -n x` in #(((((
49326-n*)
49327  case `echo 'xy\c'` in
49328  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49329  xy)  ECHO_C='\c';;
49330  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49331       ECHO_T='	';;
49332  esac;;
49333*)
49334  ECHO_N='-n';;
49335esac
49336
49337rm -f conf$$ conf$$.exe conf$$.file
49338if test -d conf$$.dir; then
49339  rm -f conf$$.dir/conf$$.file
49340else
49341  rm -f conf$$.dir
49342  mkdir conf$$.dir 2>/dev/null
49343fi
49344if (echo >conf$$.file) 2>/dev/null; then
49345  if ln -s conf$$.file conf$$ 2>/dev/null; then
49346    as_ln_s='ln -s'
49347    # ... but there are two gotchas:
49348    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49349    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49350    # In both cases, we have to default to `cp -pR'.
49351    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49352      as_ln_s='cp -pR'
49353  elif ln conf$$.file conf$$ 2>/dev/null; then
49354    as_ln_s=ln
49355  else
49356    as_ln_s='cp -pR'
49357  fi
49358else
49359  as_ln_s='cp -pR'
49360fi
49361rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49362rmdir conf$$.dir 2>/dev/null
49363
49364
49365# as_fn_mkdir_p
49366# -------------
49367# Create "$as_dir" as a directory, including parents if necessary.
49368as_fn_mkdir_p ()
49369{
49370
49371  case $as_dir in #(
49372  -*) as_dir=./$as_dir;;
49373  esac
49374  test -d "$as_dir" || eval $as_mkdir_p || {
49375    as_dirs=
49376    while :; do
49377      case $as_dir in #(
49378      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49379      *) as_qdir=$as_dir;;
49380      esac
49381      as_dirs="'$as_qdir' $as_dirs"
49382      as_dir=`$as_dirname -- "$as_dir" ||
49383$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49384	 X"$as_dir" : 'X\(//\)[^/]' \| \
49385	 X"$as_dir" : 'X\(//\)$' \| \
49386	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49387$as_echo X"$as_dir" |
49388    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49389	    s//\1/
49390	    q
49391	  }
49392	  /^X\(\/\/\)[^/].*/{
49393	    s//\1/
49394	    q
49395	  }
49396	  /^X\(\/\/\)$/{
49397	    s//\1/
49398	    q
49399	  }
49400	  /^X\(\/\).*/{
49401	    s//\1/
49402	    q
49403	  }
49404	  s/.*/./; q'`
49405      test -d "$as_dir" && break
49406    done
49407    test -z "$as_dirs" || eval "mkdir $as_dirs"
49408  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49409
49410
49411} # as_fn_mkdir_p
49412if mkdir -p . 2>/dev/null; then
49413  as_mkdir_p='mkdir -p "$as_dir"'
49414else
49415  test -d ./-p && rmdir ./-p
49416  as_mkdir_p=false
49417fi
49418
49419
49420# as_fn_executable_p FILE
49421# -----------------------
49422# Test if FILE is an executable regular file.
49423as_fn_executable_p ()
49424{
49425  test -f "$1" && test -x "$1"
49426} # as_fn_executable_p
49427as_test_x='test -x'
49428as_executable_p=as_fn_executable_p
49429
49430# Sed expression to map a string onto a valid CPP name.
49431as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49432
49433# Sed expression to map a string onto a valid variable name.
49434as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49435
49436
49437exec 6>&1
49438## ----------------------------------- ##
49439## Main body of $CONFIG_STATUS script. ##
49440## ----------------------------------- ##
49441_ASEOF
49442test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49443
49444cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49445# Save the log message, to keep $0 and so on meaningful, and to
49446# report actual input values of CONFIG_FILES etc. instead of their
49447# values after options handling.
49448ac_log="
49449This file was extended by OpenJDK $as_me jdk9, which was
49450generated by GNU Autoconf 2.69.  Invocation command line was
49451
49452  CONFIG_FILES    = $CONFIG_FILES
49453  CONFIG_HEADERS  = $CONFIG_HEADERS
49454  CONFIG_LINKS    = $CONFIG_LINKS
49455  CONFIG_COMMANDS = $CONFIG_COMMANDS
49456  $ $0 $@
49457
49458on `(hostname || uname -n) 2>/dev/null | sed 1q`
49459"
49460
49461_ACEOF
49462
49463case $ac_config_files in *"
49464"*) set x $ac_config_files; shift; ac_config_files=$*;;
49465esac
49466
49467case $ac_config_headers in *"
49468"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49469esac
49470
49471
49472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49473# Files that config.status was made for.
49474config_files="$ac_config_files"
49475config_headers="$ac_config_headers"
49476
49477_ACEOF
49478
49479cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49480ac_cs_usage="\
49481\`$as_me' instantiates files and other configuration actions
49482from templates according to the current configuration.  Unless the files
49483and actions are specified as TAGs, all are instantiated by default.
49484
49485Usage: $0 [OPTION]... [TAG]...
49486
49487  -h, --help       print this help, then exit
49488  -V, --version    print version number and configuration settings, then exit
49489      --config     print configuration, then exit
49490  -q, --quiet, --silent
49491                   do not print progress messages
49492  -d, --debug      don't remove temporary files
49493      --recheck    update $as_me by reconfiguring in the same conditions
49494      --file=FILE[:TEMPLATE]
49495                   instantiate the configuration file FILE
49496      --header=FILE[:TEMPLATE]
49497                   instantiate the configuration header FILE
49498
49499Configuration files:
49500$config_files
49501
49502Configuration headers:
49503$config_headers
49504
49505Report bugs to <build-dev@openjdk.java.net>.
49506OpenJDK home page: <http://openjdk.java.net>."
49507
49508_ACEOF
49509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49510ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49511ac_cs_version="\\
49512OpenJDK config.status jdk9
49513configured by $0, generated by GNU Autoconf 2.69,
49514  with options \\"\$ac_cs_config\\"
49515
49516Copyright (C) 2012 Free Software Foundation, Inc.
49517This config.status script is free software; the Free Software Foundation
49518gives unlimited permission to copy, distribute and modify it."
49519
49520ac_pwd='$ac_pwd'
49521srcdir='$srcdir'
49522AWK='$AWK'
49523test -n "\$AWK" || AWK=awk
49524_ACEOF
49525
49526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49527# The default lists apply if the user does not specify any file.
49528ac_need_defaults=:
49529while test $# != 0
49530do
49531  case $1 in
49532  --*=?*)
49533    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49534    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49535    ac_shift=:
49536    ;;
49537  --*=)
49538    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49539    ac_optarg=
49540    ac_shift=:
49541    ;;
49542  *)
49543    ac_option=$1
49544    ac_optarg=$2
49545    ac_shift=shift
49546    ;;
49547  esac
49548
49549  case $ac_option in
49550  # Handling of the options.
49551  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49552    ac_cs_recheck=: ;;
49553  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49554    $as_echo "$ac_cs_version"; exit ;;
49555  --config | --confi | --conf | --con | --co | --c )
49556    $as_echo "$ac_cs_config"; exit ;;
49557  --debug | --debu | --deb | --de | --d | -d )
49558    debug=: ;;
49559  --file | --fil | --fi | --f )
49560    $ac_shift
49561    case $ac_optarg in
49562    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49563    '') as_fn_error $? "missing file argument" ;;
49564    esac
49565    as_fn_append CONFIG_FILES " '$ac_optarg'"
49566    ac_need_defaults=false;;
49567  --header | --heade | --head | --hea )
49568    $ac_shift
49569    case $ac_optarg in
49570    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49571    esac
49572    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49573    ac_need_defaults=false;;
49574  --he | --h)
49575    # Conflict between --help and --header
49576    as_fn_error $? "ambiguous option: \`$1'
49577Try \`$0 --help' for more information.";;
49578  --help | --hel | -h )
49579    $as_echo "$ac_cs_usage"; exit ;;
49580  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49581  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49582    ac_cs_silent=: ;;
49583
49584  # This is an error.
49585  -*) as_fn_error $? "unrecognized option: \`$1'
49586Try \`$0 --help' for more information." ;;
49587
49588  *) as_fn_append ac_config_targets " $1"
49589     ac_need_defaults=false ;;
49590
49591  esac
49592  shift
49593done
49594
49595ac_configure_extra_args=
49596
49597if $ac_cs_silent; then
49598  exec 6>/dev/null
49599  ac_configure_extra_args="$ac_configure_extra_args --silent"
49600fi
49601
49602_ACEOF
49603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49604if \$ac_cs_recheck; then
49605  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49606  shift
49607  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49608  CONFIG_SHELL='$SHELL'
49609  export CONFIG_SHELL
49610  exec "\$@"
49611fi
49612
49613_ACEOF
49614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49615exec 5>>config.log
49616{
49617  echo
49618  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49619## Running $as_me. ##
49620_ASBOX
49621  $as_echo "$ac_log"
49622} >&5
49623
49624_ACEOF
49625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49626_ACEOF
49627
49628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49629
49630# Handling of arguments.
49631for ac_config_target in $ac_config_targets
49632do
49633  case $ac_config_target in
49634    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49635    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49636    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49637    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49638    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49639    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49640    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49641
49642  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49643  esac
49644done
49645
49646
49647# If the user did not use the arguments to specify the items to instantiate,
49648# then the envvar interface is used.  Set only those that are not.
49649# We use the long form for the default assignment because of an extremely
49650# bizarre bug on SunOS 4.1.3.
49651if $ac_need_defaults; then
49652  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49653  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49654fi
49655
49656# Have a temporary directory for convenience.  Make it in the build tree
49657# simply because there is no reason against having it here, and in addition,
49658# creating and moving files from /tmp can sometimes cause problems.
49659# Hook for its removal unless debugging.
49660# Note that there is a small window in which the directory will not be cleaned:
49661# after its creation but before its name has been assigned to `$tmp'.
49662$debug ||
49663{
49664  tmp= ac_tmp=
49665  trap 'exit_status=$?
49666  : "${ac_tmp:=$tmp}"
49667  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49668' 0
49669  trap 'as_fn_exit 1' 1 2 13 15
49670}
49671# Create a (secure) tmp directory for tmp files.
49672
49673{
49674  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49675  test -d "$tmp"
49676}  ||
49677{
49678  tmp=./conf$$-$RANDOM
49679  (umask 077 && mkdir "$tmp")
49680} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49681ac_tmp=$tmp
49682
49683# Set up the scripts for CONFIG_FILES section.
49684# No need to generate them if there are no CONFIG_FILES.
49685# This happens for instance with `./config.status config.h'.
49686if test -n "$CONFIG_FILES"; then
49687
49688
49689ac_cr=`echo X | tr X '\015'`
49690# On cygwin, bash can eat \r inside `` if the user requested igncr.
49691# But we know of no other shell where ac_cr would be empty at this
49692# point, so we can use a bashism as a fallback.
49693if test "x$ac_cr" = x; then
49694  eval ac_cr=\$\'\\r\'
49695fi
49696ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49697if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49698  ac_cs_awk_cr='\\r'
49699else
49700  ac_cs_awk_cr=$ac_cr
49701fi
49702
49703echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49704_ACEOF
49705
49706
49707{
49708  echo "cat >conf$$subs.awk <<_ACEOF" &&
49709  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49710  echo "_ACEOF"
49711} >conf$$subs.sh ||
49712  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49713ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49714ac_delim='%!_!# '
49715for ac_last_try in false false false false false :; do
49716  . ./conf$$subs.sh ||
49717    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49718
49719  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49720  if test $ac_delim_n = $ac_delim_num; then
49721    break
49722  elif $ac_last_try; then
49723    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49724  else
49725    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49726  fi
49727done
49728rm -f conf$$subs.sh
49729
49730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49731cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49732_ACEOF
49733sed -n '
49734h
49735s/^/S["/; s/!.*/"]=/
49736p
49737g
49738s/^[^!]*!//
49739:repl
49740t repl
49741s/'"$ac_delim"'$//
49742t delim
49743:nl
49744h
49745s/\(.\{148\}\)..*/\1/
49746t more1
49747s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49748p
49749n
49750b repl
49751:more1
49752s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49753p
49754g
49755s/.\{148\}//
49756t nl
49757:delim
49758h
49759s/\(.\{148\}\)..*/\1/
49760t more2
49761s/["\\]/\\&/g; s/^/"/; s/$/"/
49762p
49763b
49764:more2
49765s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49766p
49767g
49768s/.\{148\}//
49769t delim
49770' <conf$$subs.awk | sed '
49771/^[^""]/{
49772  N
49773  s/\n//
49774}
49775' >>$CONFIG_STATUS || ac_write_fail=1
49776rm -f conf$$subs.awk
49777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49778_ACAWK
49779cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49780  for (key in S) S_is_set[key] = 1
49781  FS = ""
49782
49783}
49784{
49785  line = $ 0
49786  nfields = split(line, field, "@")
49787  substed = 0
49788  len = length(field[1])
49789  for (i = 2; i < nfields; i++) {
49790    key = field[i]
49791    keylen = length(key)
49792    if (S_is_set[key]) {
49793      value = S[key]
49794      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49795      len += length(value) + length(field[++i])
49796      substed = 1
49797    } else
49798      len += 1 + keylen
49799  }
49800
49801  print line
49802}
49803
49804_ACAWK
49805_ACEOF
49806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49807if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49808  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49809else
49810  cat
49811fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49812  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49813_ACEOF
49814
49815# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49816# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49817# trailing colons and then remove the whole line if VPATH becomes empty
49818# (actually we leave an empty line to preserve line numbers).
49819if test "x$srcdir" = x.; then
49820  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49821h
49822s///
49823s/^/:/
49824s/[	 ]*$/:/
49825s/:\$(srcdir):/:/g
49826s/:\${srcdir}:/:/g
49827s/:@srcdir@:/:/g
49828s/^:*//
49829s/:*$//
49830x
49831s/\(=[	 ]*\).*/\1/
49832G
49833s/\n//
49834s/^[^=]*=[	 ]*$//
49835}'
49836fi
49837
49838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49839fi # test -n "$CONFIG_FILES"
49840
49841# Set up the scripts for CONFIG_HEADERS section.
49842# No need to generate them if there are no CONFIG_HEADERS.
49843# This happens for instance with `./config.status Makefile'.
49844if test -n "$CONFIG_HEADERS"; then
49845cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49846BEGIN {
49847_ACEOF
49848
49849# Transform confdefs.h into an awk script `defines.awk', embedded as
49850# here-document in config.status, that substitutes the proper values into
49851# config.h.in to produce config.h.
49852
49853# Create a delimiter string that does not exist in confdefs.h, to ease
49854# handling of long lines.
49855ac_delim='%!_!# '
49856for ac_last_try in false false :; do
49857  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49858  if test -z "$ac_tt"; then
49859    break
49860  elif $ac_last_try; then
49861    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49862  else
49863    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49864  fi
49865done
49866
49867# For the awk script, D is an array of macro values keyed by name,
49868# likewise P contains macro parameters if any.  Preserve backslash
49869# newline sequences.
49870
49871ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49872sed -n '
49873s/.\{148\}/&'"$ac_delim"'/g
49874t rset
49875:rset
49876s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49877t def
49878d
49879:def
49880s/\\$//
49881t bsnl
49882s/["\\]/\\&/g
49883s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49884D["\1"]=" \3"/p
49885s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49886d
49887:bsnl
49888s/["\\]/\\&/g
49889s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49890D["\1"]=" \3\\\\\\n"\\/p
49891t cont
49892s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49893t cont
49894d
49895:cont
49896n
49897s/.\{148\}/&'"$ac_delim"'/g
49898t clear
49899:clear
49900s/\\$//
49901t bsnlc
49902s/["\\]/\\&/g; s/^/"/; s/$/"/p
49903d
49904:bsnlc
49905s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49906b cont
49907' <confdefs.h | sed '
49908s/'"$ac_delim"'/"\\\
49909"/g' >>$CONFIG_STATUS || ac_write_fail=1
49910
49911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49912  for (key in D) D_is_set[key] = 1
49913  FS = ""
49914}
49915/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49916  line = \$ 0
49917  split(line, arg, " ")
49918  if (arg[1] == "#") {
49919    defundef = arg[2]
49920    mac1 = arg[3]
49921  } else {
49922    defundef = substr(arg[1], 2)
49923    mac1 = arg[2]
49924  }
49925  split(mac1, mac2, "(") #)
49926  macro = mac2[1]
49927  prefix = substr(line, 1, index(line, defundef) - 1)
49928  if (D_is_set[macro]) {
49929    # Preserve the white space surrounding the "#".
49930    print prefix "define", macro P[macro] D[macro]
49931    next
49932  } else {
49933    # Replace #undef with comments.  This is necessary, for example,
49934    # in the case of _POSIX_SOURCE, which is predefined and required
49935    # on some systems where configure will not decide to define it.
49936    if (defundef == "undef") {
49937      print "/*", prefix defundef, macro, "*/"
49938      next
49939    }
49940  }
49941}
49942{ print }
49943_ACAWK
49944_ACEOF
49945cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49946  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49947fi # test -n "$CONFIG_HEADERS"
49948
49949
49950eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49951shift
49952for ac_tag
49953do
49954  case $ac_tag in
49955  :[FHLC]) ac_mode=$ac_tag; continue;;
49956  esac
49957  case $ac_mode$ac_tag in
49958  :[FHL]*:*);;
49959  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49960  :[FH]-) ac_tag=-:-;;
49961  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49962  esac
49963  ac_save_IFS=$IFS
49964  IFS=:
49965  set x $ac_tag
49966  IFS=$ac_save_IFS
49967  shift
49968  ac_file=$1
49969  shift
49970
49971  case $ac_mode in
49972  :L) ac_source=$1;;
49973  :[FH])
49974    ac_file_inputs=
49975    for ac_f
49976    do
49977      case $ac_f in
49978      -) ac_f="$ac_tmp/stdin";;
49979      *) # Look for the file first in the build tree, then in the source tree
49980	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49981	 # because $ac_f cannot contain `:'.
49982	 test -f "$ac_f" ||
49983	   case $ac_f in
49984	   [\\/$]*) false;;
49985	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49986	   esac ||
49987	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49988      esac
49989      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49990      as_fn_append ac_file_inputs " '$ac_f'"
49991    done
49992
49993    # Let's still pretend it is `configure' which instantiates (i.e., don't
49994    # use $as_me), people would be surprised to read:
49995    #    /* config.h.  Generated by config.status.  */
49996    configure_input='Generated from '`
49997	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49998	`' by configure.'
49999    if test x"$ac_file" != x-; then
50000      configure_input="$ac_file.  $configure_input"
50001      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50002$as_echo "$as_me: creating $ac_file" >&6;}
50003    fi
50004    # Neutralize special characters interpreted by sed in replacement strings.
50005    case $configure_input in #(
50006    *\&* | *\|* | *\\* )
50007       ac_sed_conf_input=`$as_echo "$configure_input" |
50008       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50009    *) ac_sed_conf_input=$configure_input;;
50010    esac
50011
50012    case $ac_tag in
50013    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50014      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50015    esac
50016    ;;
50017  esac
50018
50019  ac_dir=`$as_dirname -- "$ac_file" ||
50020$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50021	 X"$ac_file" : 'X\(//\)[^/]' \| \
50022	 X"$ac_file" : 'X\(//\)$' \| \
50023	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50024$as_echo X"$ac_file" |
50025    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50026	    s//\1/
50027	    q
50028	  }
50029	  /^X\(\/\/\)[^/].*/{
50030	    s//\1/
50031	    q
50032	  }
50033	  /^X\(\/\/\)$/{
50034	    s//\1/
50035	    q
50036	  }
50037	  /^X\(\/\).*/{
50038	    s//\1/
50039	    q
50040	  }
50041	  s/.*/./; q'`
50042  as_dir="$ac_dir"; as_fn_mkdir_p
50043  ac_builddir=.
50044
50045case "$ac_dir" in
50046.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50047*)
50048  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50049  # A ".." for each directory in $ac_dir_suffix.
50050  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50051  case $ac_top_builddir_sub in
50052  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50053  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50054  esac ;;
50055esac
50056ac_abs_top_builddir=$ac_pwd
50057ac_abs_builddir=$ac_pwd$ac_dir_suffix
50058# for backward compatibility:
50059ac_top_builddir=$ac_top_build_prefix
50060
50061case $srcdir in
50062  .)  # We are building in place.
50063    ac_srcdir=.
50064    ac_top_srcdir=$ac_top_builddir_sub
50065    ac_abs_top_srcdir=$ac_pwd ;;
50066  [\\/]* | ?:[\\/]* )  # Absolute name.
50067    ac_srcdir=$srcdir$ac_dir_suffix;
50068    ac_top_srcdir=$srcdir
50069    ac_abs_top_srcdir=$srcdir ;;
50070  *) # Relative name.
50071    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50072    ac_top_srcdir=$ac_top_build_prefix$srcdir
50073    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50074esac
50075ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50076
50077
50078  case $ac_mode in
50079  :F)
50080  #
50081  # CONFIG_FILE
50082  #
50083
50084_ACEOF
50085
50086cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50087# If the template does not know about datarootdir, expand it.
50088# FIXME: This hack should be removed a few years after 2.60.
50089ac_datarootdir_hack=; ac_datarootdir_seen=
50090ac_sed_dataroot='
50091/datarootdir/ {
50092  p
50093  q
50094}
50095/@datadir@/p
50096/@docdir@/p
50097/@infodir@/p
50098/@localedir@/p
50099/@mandir@/p'
50100case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50101*datarootdir*) ac_datarootdir_seen=yes;;
50102*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50103  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50104$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50105_ACEOF
50106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50107  ac_datarootdir_hack='
50108  s&@datadir@&$datadir&g
50109  s&@docdir@&$docdir&g
50110  s&@infodir@&$infodir&g
50111  s&@localedir@&$localedir&g
50112  s&@mandir@&$mandir&g
50113  s&\\\${datarootdir}&$datarootdir&g' ;;
50114esac
50115_ACEOF
50116
50117# Neutralize VPATH when `$srcdir' = `.'.
50118# Shell code in configure.ac might set extrasub.
50119# FIXME: do we really want to maintain this feature?
50120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50121ac_sed_extra="$ac_vpsub
50122$extrasub
50123_ACEOF
50124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50125:t
50126/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50127s|@configure_input@|$ac_sed_conf_input|;t t
50128s&@top_builddir@&$ac_top_builddir_sub&;t t
50129s&@top_build_prefix@&$ac_top_build_prefix&;t t
50130s&@srcdir@&$ac_srcdir&;t t
50131s&@abs_srcdir@&$ac_abs_srcdir&;t t
50132s&@top_srcdir@&$ac_top_srcdir&;t t
50133s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50134s&@builddir@&$ac_builddir&;t t
50135s&@abs_builddir@&$ac_abs_builddir&;t t
50136s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50137$ac_datarootdir_hack
50138"
50139eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50140  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50141
50142test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50143  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50144  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50145      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50146  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50147which seems to be undefined.  Please make sure it is defined" >&5
50148$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50149which seems to be undefined.  Please make sure it is defined" >&2;}
50150
50151  rm -f "$ac_tmp/stdin"
50152  case $ac_file in
50153  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50154  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50155  esac \
50156  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50157 ;;
50158  :H)
50159  #
50160  # CONFIG_HEADER
50161  #
50162  if test x"$ac_file" != x-; then
50163    {
50164      $as_echo "/* $configure_input  */" \
50165      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50166    } >"$ac_tmp/config.h" \
50167      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50168    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50169      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50170$as_echo "$as_me: $ac_file is unchanged" >&6;}
50171    else
50172      rm -f "$ac_file"
50173      mv "$ac_tmp/config.h" "$ac_file" \
50174	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50175    fi
50176  else
50177    $as_echo "/* $configure_input  */" \
50178      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50179      || as_fn_error $? "could not create -" "$LINENO" 5
50180  fi
50181 ;;
50182
50183
50184  esac
50185
50186done # for ac_tag
50187
50188
50189as_fn_exit 0
50190_ACEOF
50191ac_clean_files=$ac_clean_files_save
50192
50193test $ac_write_fail = 0 ||
50194  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50195
50196
50197# configure is writing to config.log, and then calls config.status.
50198# config.status does its own redirection, appending to config.log.
50199# Unfortunately, on DOS this fails, as config.log is still kept open
50200# by configure, so config.status won't be able to write to it; its
50201# output is simply discarded.  So we exec the FD to /dev/null,
50202# effectively closing config.log, so it can be properly (re)opened and
50203# appended to by config.status.  When coming back to configure, we
50204# need to make the FD available again.
50205if test "$no_create" != yes; then
50206  ac_cs_success=:
50207  ac_config_status_args=
50208  test "$silent" = yes &&
50209    ac_config_status_args="$ac_config_status_args --quiet"
50210  exec 5>/dev/null
50211  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50212  exec 5>>config.log
50213  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50214  # would make configure fail if this is the last instruction.
50215  $ac_cs_success || as_fn_exit 1
50216fi
50217if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50218  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50219$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50220fi
50221
50222
50223# Try to move the config.log file to the output directory.
50224if test -e ./config.log; then
50225  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50226fi
50227
50228# Make the compare script executable
50229$CHMOD +x $OUTPUT_ROOT/compare.sh
50230
50231# Finally output some useful information to the user
50232
50233  # Finally output some useful information to the user
50234
50235  printf "\n"
50236  printf "====================================================\n"
50237  if test "x$no_create" != "xyes"; then
50238    if test "x$IS_RECONFIGURE" != "xyes"; then
50239      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50240    else
50241      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50242    fi
50243  else
50244    if test "x$IS_RECONFIGURE" != "xyes"; then
50245      printf "A configuration has been successfully checked but not created\n"
50246    else
50247      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50248    fi
50249  fi
50250  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50251    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50252  else
50253    printf "using default settings.\n"
50254  fi
50255
50256  printf "\n"
50257  printf "Configuration summary:\n"
50258  printf "* Debug level:    $DEBUG_LEVEL\n"
50259  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50260  printf "* JDK variant:    $JDK_VARIANT\n"
50261  printf "* JVM variants:   $with_jvm_variants\n"
50262  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50263
50264  printf "\n"
50265  printf "Tools summary:\n"
50266  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50267    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50268  fi
50269  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50270  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50271  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50272  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50273
50274  printf "\n"
50275  printf "Build performance summary:\n"
50276  printf "* Cores to use:   $JOBS\n"
50277  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50278  if test "x$CCACHE_STATUS" != "x"; then
50279    printf "* ccache status:  $CCACHE_STATUS\n"
50280  fi
50281  printf "\n"
50282
50283  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50284    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50285    printf "will result in longer build times.\n"
50286    printf "\n"
50287  fi
50288
50289  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50290    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50291    printf "These are not respected, and will be ignored. It is recommended\n"
50292    printf "that you clean your environment. The following variables are set:\n"
50293    printf "$FOUND_ALT_VARIABLES\n"
50294    printf "\n"
50295  fi
50296
50297  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50298    printf "WARNING: Your build output directory is not on a local disk.\n"
50299    printf "This will severely degrade build performance!\n"
50300    printf "It is recommended that you create an output directory on a local disk,\n"
50301    printf "and run the configure script again from that directory.\n"
50302    printf "\n"
50303  fi
50304
50305  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50306    printf "WARNING: The result of this configuration has overridden an older\n"
50307    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50308    printf "proper build. Failure to do so might result in strange build problems.\n"
50309    printf "\n"
50310  fi
50311
50312  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50313    printf "WARNING: The result of this configuration was not saved.\n"
50314    printf "You should run without '--no-create | -n' to create the configuration.\n"
50315    printf "\n"
50316  fi
50317
50318