generated-configure.sh revision 998:7ef8160e45bd
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
676COMPILER_SUPPORTS_TARGET_BITS_FLAG
677ZERO_ARCHFLAG
678LDFLAGS_CXX_JDK
679LDFLAGS_JDKEXE_SUFFIX
680LDFLAGS_JDKLIB_SUFFIX
681LDFLAGS_JDKEXE
682LDFLAGS_JDKLIB
683CXXFLAGS_JDKEXE
684CXXFLAGS_JDKLIB
685CFLAGS_JDKEXE
686CFLAGS_JDKLIB
687MACOSX_VERSION_MIN
688LEGACY_EXTRA_LDFLAGS
689LEGACY_EXTRA_CXXFLAGS
690LEGACY_EXTRA_CFLAGS
691CXX_O_FLAG_NONE
692CXX_O_FLAG_NORM
693CXX_O_FLAG_HI
694CXX_O_FLAG_HIGHEST
695C_O_FLAG_NONE
696C_O_FLAG_NORM
697C_O_FLAG_HI
698C_O_FLAG_HIGHEST
699CXXFLAGS_DEBUG_SYMBOLS
700CFLAGS_DEBUG_SYMBOLS
701CXX_FLAG_DEPS
702C_FLAG_DEPS
703SET_SHARED_LIBRARY_MAPFILE
704SET_SHARED_LIBRARY_NAME
705SET_SHARED_LIBRARY_ORIGIN
706SET_EXECUTABLE_ORIGIN
707SHARED_LIBRARY_FLAGS
708CXX_FLAG_REORDER
709C_FLAG_REORDER
710RC_FLAGS
711AR_OUT_OPTION
712LD_OUT_OPTION
713EXE_OUT_OPTION
714CC_OUT_OPTION
715POST_MCS_CMD
716POST_STRIP_CMD
717ARFLAGS
718COMPILER_TARGET_BITS_FLAG
719JT_HOME
720JTREGEXE
721USING_BROKEN_SUSE_LD
722PACKAGE_PATH
723LDEXECXX
724LDEXE
725USE_CLANG
726HOTSPOT_LD
727HOTSPOT_CXX
728HOTSPOT_RC
729HOTSPOT_MT
730BUILD_LD
731BUILD_CXX
732BUILD_CC
733ac_ct_OBJDUMP
734OBJDUMP
735ac_ct_OBJCOPY
736OBJCOPY
737ac_ct_NM
738ac_ct_STRIP
739MCS
740GNM
741NM
742STRIP
743DUMPBIN
744RC
745MT
746LIPO
747ac_ct_OBJC
748OBJCFLAGS
749OBJC
750ac_ct_AR
751AR
752AS
753LDCXX
754LD
755CXXCPP
756CPP
757ac_ct_CXX
758CXXFLAGS
759CXX
760ac_ct_PROPER_COMPILER_CXX
761PROPER_COMPILER_CXX
762TOOLS_DIR_CXX
763POTENTIAL_CXX
764OBJEXT
765EXEEXT
766ac_ct_CC
767CPPFLAGS
768LDFLAGS
769CFLAGS
770CC
771ac_ct_PROPER_COMPILER_CC
772PROPER_COMPILER_CC
773TOOLS_DIR_CC
774POTENTIAL_CC
775VS_PATH
776VS_LIB
777VS_INCLUDE
778CYGWIN_LINK
779EXE_SUFFIX
780OBJ_SUFFIX
781STATIC_LIBRARY
782SHARED_LIBRARY
783STATIC_LIBRARY_SUFFIX
784SHARED_LIBRARY_SUFFIX
785LIBRARY_PREFIX
786TOOLCHAIN_TYPE
787BUILD_HOTSPOT
788HOTSPOT_DIST
789BUILD_OUTPUT
790OVERRIDE_SRC_ROOT
791ADD_SRC_ROOT
792JDK_TOPDIR
793NASHORN_TOPDIR
794HOTSPOT_TOPDIR
795JAXWS_TOPDIR
796JAXP_TOPDIR
797CORBA_TOPDIR
798LANGTOOLS_TOPDIR
799JAVA_FLAGS_SMALL
800JAVA_FLAGS_BIG
801JAVA_FLAGS
802JAVAC_FLAGS
803BOOT_JDK_SOURCETARGET
804JARSIGNER
805NATIVE2ASCII
806JAR
807JAVAH
808JAVAC
809JAVA
810BOOT_JDK
811BOOT_TOOLSJAR
812BOOT_RTJAR
813JAVA_CHECK
814JAVAC_CHECK
815COOKED_BUILD_NUMBER
816JDK_VERSION
817COPYRIGHT_YEAR
818MACOSX_BUNDLE_ID_BASE
819MACOSX_BUNDLE_NAME_BASE
820COMPANY_NAME
821JDK_RC_PLATFORM_NAME
822PRODUCT_SUFFIX
823PRODUCT_NAME
824LAUNCHER_NAME
825MILESTONE
826JDK_BUILD_NUMBER
827JDK_UPDATE_VERSION
828JDK_MICRO_VERSION
829JDK_MINOR_VERSION
830JDK_MAJOR_VERSION
831USER_RELEASE_SUFFIX
832COMPRESS_JARS
833RMICONNECTOR_IIOP
834UNLIMITED_CRYPTO
835CACERTS_FILE
836TEST_IN_BUILD
837BUILD_HEADLESS
838SUPPORT_HEADFUL
839SUPPORT_HEADLESS
840BDEPS_FTP
841BDEPS_UNZIP
842OS_VERSION_MICRO
843OS_VERSION_MINOR
844OS_VERSION_MAJOR
845PKG_CONFIG
846CODESIGN
847XATTR
848DSYMUTIL
849IS_GNU_TIME
850TIME
851STAT
852HG
853READELF
854OTOOL
855LDD
856ZIP
857UNZIP
858FIND_DELETE
859MAKE
860CHECK_TOOLSDIR_MAKE
861CHECK_TOOLSDIR_GMAKE
862CHECK_MAKE
863CHECK_GMAKE
864PKGHANDLER
865OUTPUT_ROOT
866CONF_NAME
867SPEC
868BUILD_VARIANT_RELEASE
869DEBUG_CLASSFILES
870FASTDEBUG
871VARIANT
872DEBUG_LEVEL
873MACOSX_UNIVERSAL
874INCLUDE_SA
875JVM_VARIANT_CORE
876JVM_VARIANT_ZEROSHARK
877JVM_VARIANT_ZERO
878JVM_VARIANT_KERNEL
879JVM_VARIANT_MINIMAL1
880JVM_VARIANT_CLIENT
881JVM_VARIANT_SERVER
882JVM_VARIANTS
883JVM_INTERPRETER
884JDK_VARIANT
885SET_OPENJDK
886BUILD_LOG_WRAPPER
887BUILD_LOG_PREVIOUS
888BUILD_LOG
889SYS_ROOT
890TOPDIR
891PATH_SEP
892ZERO_ARCHDEF
893DEFINE_CROSS_COMPILE_ARCH
894LP64
895OPENJDK_TARGET_OS_EXPORT_DIR
896OPENJDK_TARGET_OS_API_DIR
897OPENJDK_TARGET_CPU_JLI_CFLAGS
898OPENJDK_TARGET_CPU_OSARCH
899OPENJDK_TARGET_CPU_ISADIR
900OPENJDK_TARGET_CPU_LIBDIR
901OPENJDK_TARGET_CPU_LEGACY_LIB
902OPENJDK_TARGET_CPU_LEGACY
903REQUIRED_OS_VERSION
904REQUIRED_OS_NAME
905COMPILE_TYPE
906OPENJDK_TARGET_CPU_ENDIAN
907OPENJDK_TARGET_CPU_BITS
908OPENJDK_TARGET_CPU_ARCH
909OPENJDK_TARGET_CPU
910OPENJDK_TARGET_OS_API
911OPENJDK_TARGET_OS
912OPENJDK_BUILD_CPU_ENDIAN
913OPENJDK_BUILD_CPU_BITS
914OPENJDK_BUILD_CPU_ARCH
915OPENJDK_BUILD_CPU
916OPENJDK_BUILD_OS_API
917OPENJDK_BUILD_OS
918OPENJDK_BUILD_AUTOCONF_NAME
919OPENJDK_TARGET_AUTOCONF_NAME
920target_os
921target_vendor
922target_cpu
923target
924host_os
925host_vendor
926host_cpu
927host
928build_os
929build_vendor
930build_cpu
931build
932SETFILE
933DF
934READLINK
935CYGPATH
936SED
937FGREP
938EGREP
939GREP
940AWK
941XARGS
942WHICH
943WC
944UNIQ
945UNAME
946TR
947TOUCH
948TEE
949TAR
950TAIL
951SORT
952SH
953RM
954PRINTF
955NAWK
956MV
957MKTEMP
958MKDIR
959LS
960LN
961HEAD
962FIND
963FILE
964EXPR
965ECHO
966DIRNAME
967DIFF
968DATE
969CUT
970CPIO
971CP
972COMM
973CMP
974CHMOD
975CAT
976BASH
977BASENAME
978DATE_WHEN_CONFIGURED
979CONFIGURE_COMMAND_LINE
980target_alias
981host_alias
982build_alias
983LIBS
984ECHO_T
985ECHO_N
986ECHO_C
987DEFS
988mandir
989localedir
990libdir
991psdir
992pdfdir
993dvidir
994htmldir
995infodir
996docdir
997oldincludedir
998includedir
999localstatedir
1000sharedstatedir
1001sysconfdir
1002datadir
1003datarootdir
1004libexecdir
1005sbindir
1006bindir
1007program_transform_name
1008prefix
1009exec_prefix
1010PACKAGE_URL
1011PACKAGE_BUGREPORT
1012PACKAGE_STRING
1013PACKAGE_VERSION
1014PACKAGE_TARNAME
1015PACKAGE_NAME
1016PATH_SEPARATOR
1017SHELL'
1018ac_subst_files=''
1019ac_user_opts='
1020enable_option_checking
1021with_target_bits
1022with_sys_root
1023with_tools_dir
1024with_devkit
1025enable_openjdk_only
1026with_custom_make_dir
1027with_jdk_variant
1028with_jvm_interpreter
1029with_jvm_variants
1030enable_debug
1031with_debug_level
1032with_conf_name
1033with_builddeps_conf
1034with_builddeps_server
1035with_builddeps_dir
1036with_builddeps_group
1037enable_headful
1038enable_hotspot_test_in_build
1039with_cacerts_file
1040enable_unlimited_crypto
1041enable_rmiconnector_iiop
1042with_milestone
1043with_update_version
1044with_user_release_suffix
1045with_build_number
1046with_boot_jdk
1047with_boot_jdk_jvmargs
1048with_add_source_root
1049with_override_source_root
1050with_adds_and_overrides
1051with_override_langtools
1052with_override_corba
1053with_override_jaxp
1054with_override_jaxws
1055with_override_hotspot
1056with_override_nashorn
1057with_override_jdk
1058with_import_hotspot
1059with_toolchain_type
1060with_jtreg
1061with_extra_cflags
1062with_extra_cxxflags
1063with_extra_ldflags
1064enable_debug_symbols
1065enable_zip_debug_info
1066enable_macosx_runtime_support
1067with_x
1068with_cups
1069with_cups_include
1070with_freetype
1071with_freetype_include
1072with_freetype_lib
1073enable_freetype_bundling
1074with_alsa
1075with_alsa_include
1076with_alsa_lib
1077with_giflib
1078with_libpng
1079with_zlib
1080with_stdc__lib
1081with_msvcr_dll
1082with_dxsdk
1083with_dxsdk_lib
1084with_dxsdk_include
1085with_num_cores
1086with_memory_size
1087with_jobs
1088with_sjavac_server_java
1089enable_sjavac
1090enable_precompiled_headers
1091enable_ccache
1092with_ccache_dir
1093'
1094      ac_precious_vars='build_alias
1095host_alias
1096target_alias
1097BASENAME
1098BASH
1099CAT
1100CHMOD
1101CMP
1102COMM
1103CP
1104CPIO
1105CUT
1106DATE
1107DIFF
1108DIRNAME
1109ECHO
1110EXPR
1111FILE
1112FIND
1113HEAD
1114LN
1115LS
1116MKDIR
1117MKTEMP
1118MV
1119NAWK
1120PRINTF
1121RM
1122SH
1123SORT
1124TAIL
1125TAR
1126TEE
1127TOUCH
1128TR
1129UNAME
1130UNIQ
1131WC
1132WHICH
1133XARGS
1134AWK
1135GREP
1136EGREP
1137FGREP
1138SED
1139CYGPATH
1140READLINK
1141DF
1142SETFILE
1143UNZIP
1144ZIP
1145LDD
1146OTOOL
1147READELF
1148HG
1149STAT
1150TIME
1151DSYMUTIL
1152XATTR
1153CODESIGN
1154PKG_CONFIG
1155JAVA
1156JAVAC
1157JAVAH
1158JAR
1159NATIVE2ASCII
1160JARSIGNER
1161CC
1162CFLAGS
1163LDFLAGS
1164LIBS
1165CPPFLAGS
1166CXX
1167CXXFLAGS
1168CCC
1169CPP
1170CXXCPP
1171AS
1172AR
1173OBJC
1174OBJCFLAGS
1175LIPO
1176STRIP
1177NM
1178GNM
1179MCS
1180OBJCOPY
1181OBJDUMP
1182BUILD_CC
1183BUILD_CXX
1184BUILD_LD
1185JTREGEXE
1186XMKMF
1187FREETYPE_CFLAGS
1188FREETYPE_LIBS
1189ALSA_CFLAGS
1190ALSA_LIBS
1191PNG_CFLAGS
1192PNG_LIBS
1193LIBFFI_CFLAGS
1194LIBFFI_LIBS
1195CCACHE'
1196
1197
1198# Initialize some variables set by options.
1199ac_init_help=
1200ac_init_version=false
1201ac_unrecognized_opts=
1202ac_unrecognized_sep=
1203# The variables have the same names as the options, with
1204# dashes changed to underlines.
1205cache_file=/dev/null
1206exec_prefix=NONE
1207no_create=
1208no_recursion=
1209prefix=NONE
1210program_prefix=NONE
1211program_suffix=NONE
1212program_transform_name=s,x,x,
1213silent=
1214site=
1215srcdir=
1216verbose=
1217x_includes=NONE
1218x_libraries=NONE
1219
1220# Installation directory options.
1221# These are left unexpanded so users can "make install exec_prefix=/foo"
1222# and all the variables that are supposed to be based on exec_prefix
1223# by default will actually change.
1224# Use braces instead of parens because sh, perl, etc. also accept them.
1225# (The list follows the same order as the GNU Coding Standards.)
1226bindir='${exec_prefix}/bin'
1227sbindir='${exec_prefix}/sbin'
1228libexecdir='${exec_prefix}/libexec'
1229datarootdir='${prefix}/share'
1230datadir='${datarootdir}'
1231sysconfdir='${prefix}/etc'
1232sharedstatedir='${prefix}/com'
1233localstatedir='${prefix}/var'
1234includedir='${prefix}/include'
1235oldincludedir='/usr/include'
1236docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1237infodir='${datarootdir}/info'
1238htmldir='${docdir}'
1239dvidir='${docdir}'
1240pdfdir='${docdir}'
1241psdir='${docdir}'
1242libdir='${exec_prefix}/lib'
1243localedir='${datarootdir}/locale'
1244mandir='${datarootdir}/man'
1245
1246ac_prev=
1247ac_dashdash=
1248for ac_option
1249do
1250  # If the previous option needs an argument, assign it.
1251  if test -n "$ac_prev"; then
1252    eval $ac_prev=\$ac_option
1253    ac_prev=
1254    continue
1255  fi
1256
1257  case $ac_option in
1258  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1259  *=)   ac_optarg= ;;
1260  *)    ac_optarg=yes ;;
1261  esac
1262
1263  # Accept the important Cygnus configure options, so we can diagnose typos.
1264
1265  case $ac_dashdash$ac_option in
1266  --)
1267    ac_dashdash=yes ;;
1268
1269  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1270    ac_prev=bindir ;;
1271  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1272    bindir=$ac_optarg ;;
1273
1274  -build | --build | --buil | --bui | --bu)
1275    ac_prev=build_alias ;;
1276  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1277    build_alias=$ac_optarg ;;
1278
1279  -cache-file | --cache-file | --cache-fil | --cache-fi \
1280  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1281    ac_prev=cache_file ;;
1282  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1283  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1284    cache_file=$ac_optarg ;;
1285
1286  --config-cache | -C)
1287    cache_file=config.cache ;;
1288
1289  -datadir | --datadir | --datadi | --datad)
1290    ac_prev=datadir ;;
1291  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1292    datadir=$ac_optarg ;;
1293
1294  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1295  | --dataroo | --dataro | --datar)
1296    ac_prev=datarootdir ;;
1297  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1298  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1299    datarootdir=$ac_optarg ;;
1300
1301  -disable-* | --disable-*)
1302    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1303    # Reject names that are not valid shell variable names.
1304    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1305      as_fn_error $? "invalid feature name: $ac_useropt"
1306    ac_useropt_orig=$ac_useropt
1307    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1308    case $ac_user_opts in
1309      *"
1310"enable_$ac_useropt"
1311"*) ;;
1312      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1313	 ac_unrecognized_sep=', ';;
1314    esac
1315    eval enable_$ac_useropt=no ;;
1316
1317  -docdir | --docdir | --docdi | --doc | --do)
1318    ac_prev=docdir ;;
1319  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1320    docdir=$ac_optarg ;;
1321
1322  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1323    ac_prev=dvidir ;;
1324  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1325    dvidir=$ac_optarg ;;
1326
1327  -enable-* | --enable-*)
1328    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1329    # Reject names that are not valid shell variable names.
1330    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1331      as_fn_error $? "invalid feature name: $ac_useropt"
1332    ac_useropt_orig=$ac_useropt
1333    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1334    case $ac_user_opts in
1335      *"
1336"enable_$ac_useropt"
1337"*) ;;
1338      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1339	 ac_unrecognized_sep=', ';;
1340    esac
1341    eval enable_$ac_useropt=\$ac_optarg ;;
1342
1343  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1344  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1345  | --exec | --exe | --ex)
1346    ac_prev=exec_prefix ;;
1347  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1348  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1349  | --exec=* | --exe=* | --ex=*)
1350    exec_prefix=$ac_optarg ;;
1351
1352  -gas | --gas | --ga | --g)
1353    # Obsolete; use --with-gas.
1354    with_gas=yes ;;
1355
1356  -help | --help | --hel | --he | -h)
1357    ac_init_help=long ;;
1358  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1359    ac_init_help=recursive ;;
1360  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1361    ac_init_help=short ;;
1362
1363  -host | --host | --hos | --ho)
1364    ac_prev=host_alias ;;
1365  -host=* | --host=* | --hos=* | --ho=*)
1366    host_alias=$ac_optarg ;;
1367
1368  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1369    ac_prev=htmldir ;;
1370  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1371  | --ht=*)
1372    htmldir=$ac_optarg ;;
1373
1374  -includedir | --includedir | --includedi | --included | --include \
1375  | --includ | --inclu | --incl | --inc)
1376    ac_prev=includedir ;;
1377  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1378  | --includ=* | --inclu=* | --incl=* | --inc=*)
1379    includedir=$ac_optarg ;;
1380
1381  -infodir | --infodir | --infodi | --infod | --info | --inf)
1382    ac_prev=infodir ;;
1383  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1384    infodir=$ac_optarg ;;
1385
1386  -libdir | --libdir | --libdi | --libd)
1387    ac_prev=libdir ;;
1388  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1389    libdir=$ac_optarg ;;
1390
1391  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1392  | --libexe | --libex | --libe)
1393    ac_prev=libexecdir ;;
1394  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1395  | --libexe=* | --libex=* | --libe=*)
1396    libexecdir=$ac_optarg ;;
1397
1398  -localedir | --localedir | --localedi | --localed | --locale)
1399    ac_prev=localedir ;;
1400  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1401    localedir=$ac_optarg ;;
1402
1403  -localstatedir | --localstatedir | --localstatedi | --localstated \
1404  | --localstate | --localstat | --localsta | --localst | --locals)
1405    ac_prev=localstatedir ;;
1406  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1407  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1408    localstatedir=$ac_optarg ;;
1409
1410  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1411    ac_prev=mandir ;;
1412  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1413    mandir=$ac_optarg ;;
1414
1415  -nfp | --nfp | --nf)
1416    # Obsolete; use --without-fp.
1417    with_fp=no ;;
1418
1419  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1420  | --no-cr | --no-c | -n)
1421    no_create=yes ;;
1422
1423  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1424  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1425    no_recursion=yes ;;
1426
1427  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1428  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1429  | --oldin | --oldi | --old | --ol | --o)
1430    ac_prev=oldincludedir ;;
1431  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1432  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1433  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1434    oldincludedir=$ac_optarg ;;
1435
1436  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1437    ac_prev=prefix ;;
1438  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1439    prefix=$ac_optarg ;;
1440
1441  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1442  | --program-pre | --program-pr | --program-p)
1443    ac_prev=program_prefix ;;
1444  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1445  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1446    program_prefix=$ac_optarg ;;
1447
1448  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1449  | --program-suf | --program-su | --program-s)
1450    ac_prev=program_suffix ;;
1451  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1452  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1453    program_suffix=$ac_optarg ;;
1454
1455  -program-transform-name | --program-transform-name \
1456  | --program-transform-nam | --program-transform-na \
1457  | --program-transform-n | --program-transform- \
1458  | --program-transform | --program-transfor \
1459  | --program-transfo | --program-transf \
1460  | --program-trans | --program-tran \
1461  | --progr-tra | --program-tr | --program-t)
1462    ac_prev=program_transform_name ;;
1463  -program-transform-name=* | --program-transform-name=* \
1464  | --program-transform-nam=* | --program-transform-na=* \
1465  | --program-transform-n=* | --program-transform-=* \
1466  | --program-transform=* | --program-transfor=* \
1467  | --program-transfo=* | --program-transf=* \
1468  | --program-trans=* | --program-tran=* \
1469  | --progr-tra=* | --program-tr=* | --program-t=*)
1470    program_transform_name=$ac_optarg ;;
1471
1472  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1473    ac_prev=pdfdir ;;
1474  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1475    pdfdir=$ac_optarg ;;
1476
1477  -psdir | --psdir | --psdi | --psd | --ps)
1478    ac_prev=psdir ;;
1479  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1480    psdir=$ac_optarg ;;
1481
1482  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1483  | -silent | --silent | --silen | --sile | --sil)
1484    silent=yes ;;
1485
1486  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1487    ac_prev=sbindir ;;
1488  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1489  | --sbi=* | --sb=*)
1490    sbindir=$ac_optarg ;;
1491
1492  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1493  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1494  | --sharedst | --shareds | --shared | --share | --shar \
1495  | --sha | --sh)
1496    ac_prev=sharedstatedir ;;
1497  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1498  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1499  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1500  | --sha=* | --sh=*)
1501    sharedstatedir=$ac_optarg ;;
1502
1503  -site | --site | --sit)
1504    ac_prev=site ;;
1505  -site=* | --site=* | --sit=*)
1506    site=$ac_optarg ;;
1507
1508  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1509    ac_prev=srcdir ;;
1510  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1511    srcdir=$ac_optarg ;;
1512
1513  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1514  | --syscon | --sysco | --sysc | --sys | --sy)
1515    ac_prev=sysconfdir ;;
1516  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1517  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1518    sysconfdir=$ac_optarg ;;
1519
1520  -target | --target | --targe | --targ | --tar | --ta | --t)
1521    ac_prev=target_alias ;;
1522  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1523    target_alias=$ac_optarg ;;
1524
1525  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1526    verbose=yes ;;
1527
1528  -version | --version | --versio | --versi | --vers | -V)
1529    ac_init_version=: ;;
1530
1531  -with-* | --with-*)
1532    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1533    # Reject names that are not valid shell variable names.
1534    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1535      as_fn_error $? "invalid package name: $ac_useropt"
1536    ac_useropt_orig=$ac_useropt
1537    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1538    case $ac_user_opts in
1539      *"
1540"with_$ac_useropt"
1541"*) ;;
1542      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1543	 ac_unrecognized_sep=', ';;
1544    esac
1545    eval with_$ac_useropt=\$ac_optarg ;;
1546
1547  -without-* | --without-*)
1548    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1549    # Reject names that are not valid shell variable names.
1550    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1551      as_fn_error $? "invalid package name: $ac_useropt"
1552    ac_useropt_orig=$ac_useropt
1553    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1554    case $ac_user_opts in
1555      *"
1556"with_$ac_useropt"
1557"*) ;;
1558      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1559	 ac_unrecognized_sep=', ';;
1560    esac
1561    eval with_$ac_useropt=no ;;
1562
1563  --x)
1564    # Obsolete; use --with-x.
1565    with_x=yes ;;
1566
1567  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1568  | --x-incl | --x-inc | --x-in | --x-i)
1569    ac_prev=x_includes ;;
1570  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1571  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1572    x_includes=$ac_optarg ;;
1573
1574  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1575  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1576    ac_prev=x_libraries ;;
1577  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1578  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1579    x_libraries=$ac_optarg ;;
1580
1581  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1582Try \`$0 --help' for more information"
1583    ;;
1584
1585  *=*)
1586    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1587    # Reject names that are not valid shell variable names.
1588    case $ac_envvar in #(
1589      '' | [0-9]* | *[!_$as_cr_alnum]* )
1590      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1591    esac
1592    eval $ac_envvar=\$ac_optarg
1593    export $ac_envvar ;;
1594
1595  *)
1596    # FIXME: should be removed in autoconf 3.0.
1597    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1598    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1599      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1600    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1601    ;;
1602
1603  esac
1604done
1605
1606if test -n "$ac_prev"; then
1607  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1608  as_fn_error $? "missing argument to $ac_option"
1609fi
1610
1611if test -n "$ac_unrecognized_opts"; then
1612  case $enable_option_checking in
1613    no) ;;
1614    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1615    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1616  esac
1617fi
1618
1619# Check all directory arguments for consistency.
1620for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1621		datadir sysconfdir sharedstatedir localstatedir includedir \
1622		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1623		libdir localedir mandir
1624do
1625  eval ac_val=\$$ac_var
1626  # Remove trailing slashes.
1627  case $ac_val in
1628    */ )
1629      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1630      eval $ac_var=\$ac_val;;
1631  esac
1632  # Be sure to have absolute directory names.
1633  case $ac_val in
1634    [\\/$]* | ?:[\\/]* )  continue;;
1635    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1636  esac
1637  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1638done
1639
1640# There might be people who depend on the old broken behavior: `$host'
1641# used to hold the argument of --host etc.
1642# FIXME: To remove some day.
1643build=$build_alias
1644host=$host_alias
1645target=$target_alias
1646
1647# FIXME: To remove some day.
1648if test "x$host_alias" != x; then
1649  if test "x$build_alias" = x; then
1650    cross_compiling=maybe
1651  elif test "x$build_alias" != "x$host_alias"; then
1652    cross_compiling=yes
1653  fi
1654fi
1655
1656ac_tool_prefix=
1657test -n "$host_alias" && ac_tool_prefix=$host_alias-
1658
1659test "$silent" = yes && exec 6>/dev/null
1660
1661
1662ac_pwd=`pwd` && test -n "$ac_pwd" &&
1663ac_ls_di=`ls -di .` &&
1664ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1665  as_fn_error $? "working directory cannot be determined"
1666test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1667  as_fn_error $? "pwd does not report name of working directory"
1668
1669
1670# Find the source files, if location was not specified.
1671if test -z "$srcdir"; then
1672  ac_srcdir_defaulted=yes
1673  # Try the directory containing this script, then the parent directory.
1674  ac_confdir=`$as_dirname -- "$as_myself" ||
1675$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1676	 X"$as_myself" : 'X\(//\)[^/]' \| \
1677	 X"$as_myself" : 'X\(//\)$' \| \
1678	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1679$as_echo X"$as_myself" |
1680    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1681	    s//\1/
1682	    q
1683	  }
1684	  /^X\(\/\/\)[^/].*/{
1685	    s//\1/
1686	    q
1687	  }
1688	  /^X\(\/\/\)$/{
1689	    s//\1/
1690	    q
1691	  }
1692	  /^X\(\/\).*/{
1693	    s//\1/
1694	    q
1695	  }
1696	  s/.*/./; q'`
1697  srcdir=$ac_confdir
1698  if test ! -r "$srcdir/$ac_unique_file"; then
1699    srcdir=..
1700  fi
1701else
1702  ac_srcdir_defaulted=no
1703fi
1704if test ! -r "$srcdir/$ac_unique_file"; then
1705  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1706  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1707fi
1708ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1709ac_abs_confdir=`(
1710	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1711	pwd)`
1712# When building in place, set srcdir=.
1713if test "$ac_abs_confdir" = "$ac_pwd"; then
1714  srcdir=.
1715fi
1716# Remove unnecessary trailing slashes from srcdir.
1717# Double slashes in file names in object file debugging info
1718# mess up M-x gdb in Emacs.
1719case $srcdir in
1720*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1721esac
1722for ac_var in $ac_precious_vars; do
1723  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1724  eval ac_env_${ac_var}_value=\$${ac_var}
1725  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1726  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1727done
1728
1729#
1730# Report the --help message.
1731#
1732if test "$ac_init_help" = "long"; then
1733  # Omit some internal or obsolete options to make the list less imposing.
1734  # This message is too long to be a string in the A/UX 3.1 sh.
1735  cat <<_ACEOF
1736\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1737
1738Usage: $0 [OPTION]... [VAR=VALUE]...
1739
1740To assign environment variables (e.g., CC, CFLAGS...), specify them as
1741VAR=VALUE.  See below for descriptions of some of the useful variables.
1742
1743Defaults for the options are specified in brackets.
1744
1745Configuration:
1746  -h, --help              display this help and exit
1747      --help=short        display options specific to this package
1748      --help=recursive    display the short help of all the included packages
1749  -V, --version           display version information and exit
1750  -q, --quiet, --silent   do not print \`checking ...' messages
1751      --cache-file=FILE   cache test results in FILE [disabled]
1752  -C, --config-cache      alias for \`--cache-file=config.cache'
1753  -n, --no-create         do not create output files
1754      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1755
1756Installation directories:
1757  --prefix=PREFIX         install architecture-independent files in PREFIX
1758                          [$ac_default_prefix]
1759  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1760                          [PREFIX]
1761
1762By default, \`make install' will install all the files in
1763\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1764an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1765for instance \`--prefix=\$HOME'.
1766
1767For better control, use the options below.
1768
1769Fine tuning of the installation directories:
1770  --bindir=DIR            user executables [EPREFIX/bin]
1771  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1772  --libexecdir=DIR        program executables [EPREFIX/libexec]
1773  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1774  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1775  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1776  --libdir=DIR            object code libraries [EPREFIX/lib]
1777  --includedir=DIR        C header files [PREFIX/include]
1778  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1779  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1780  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1781  --infodir=DIR           info documentation [DATAROOTDIR/info]
1782  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1783  --mandir=DIR            man documentation [DATAROOTDIR/man]
1784  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1785  --htmldir=DIR           html documentation [DOCDIR]
1786  --dvidir=DIR            dvi documentation [DOCDIR]
1787  --pdfdir=DIR            pdf documentation [DOCDIR]
1788  --psdir=DIR             ps documentation [DOCDIR]
1789_ACEOF
1790
1791  cat <<\_ACEOF
1792
1793X features:
1794  --x-includes=DIR    X include files are in DIR
1795  --x-libraries=DIR   X library files are in DIR
1796
1797System types:
1798  --build=BUILD     configure for building on BUILD [guessed]
1799  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1800  --target=TARGET   configure for building compilers for TARGET [HOST]
1801_ACEOF
1802fi
1803
1804if test -n "$ac_init_help"; then
1805  case $ac_init_help in
1806     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1807   esac
1808  cat <<\_ACEOF
1809
1810Optional Features:
1811  --disable-option-checking  ignore unrecognized --enable/--with options
1812  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1813  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1814  --enable-openjdk-only   suppress building custom source even if present
1815                          [disabled]
1816  --enable-debug          set the debug level to fastdebug (shorthand for
1817                          --with-debug-level=fastdebug) [disabled]
1818  --disable-headful       disable building headful support (graphical UI
1819                          support) [enabled]
1820  --enable-hotspot-test-in-build
1821                          run the Queens test after Hotspot build [disabled]
1822  --enable-unlimited-crypto
1823                          Enable unlimited crypto policy [disabled]
1824  --enable-rmiconnector-iiop
1825                          enable the JMX RMIConnector iiop transport
1826                          [disabled]
1827  --disable-debug-symbols disable generation of debug symbols [enabled]
1828  --disable-zip-debug-info
1829                          disable zipping of debug-info files [enabled]
1830  --enable-macosx-runtime-support
1831                          Deprecated. Option is kept for backwards
1832                          compatibility and is ignored
1833  --disable-freetype-bundling
1834                          disable bundling of the freetype library with the
1835                          build result [enabled on Windows or when using
1836                          --with-freetype, disabled otherwise]
1837  --enable-sjavac         use sjavac to do fast incremental compiles
1838                          [disabled]
1839  --disable-precompiled-headers
1840                          disable using precompiled headers when compiling C++
1841                          [enabled]
1842  --enable-ccache         enable using ccache to speed up recompilations
1843                          [disabled]
1844
1845Optional Packages:
1846  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1847  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1848  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1849                          support it), e.g. --with-target-bits=32 [guessed]
1850  --with-sys-root         pass this sys-root to the compilers and tools (for
1851                          cross-compiling)
1852  --with-tools-dir        search this directory for compilers and tools (for
1853                          cross-compiling)
1854  --with-devkit           use this directory as base for tools-dir and
1855                          sys-root (for cross-compiling)
1856  --with-custom-make-dir  Deprecated. Option is kept for backwards
1857                          compatibility and is ignored
1858  --with-jdk-variant      JDK variant to build (normal) [normal]
1859  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1860  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1861                          client, minimal1, kernel, zero, zeroshark, core)
1862                          [server]
1863  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1864                          [release]
1865  --with-conf-name        use this as the name of the configuration [generated
1866                          from important configuration options]
1867  --with-builddeps-conf   use this configuration file for the builddeps
1868  --with-builddeps-server download and use build dependencies from this server
1869                          url
1870  --with-builddeps-dir    store downloaded build dependencies here
1871                          [/localhome/builddeps]
1872  --with-builddeps-group  chgrp the downloaded build dependencies to this
1873                          group
1874  --with-cacerts-file     specify alternative cacerts file
1875  --with-milestone        Set milestone value for build [internal]
1876  --with-update-version   Set update version value for build [b00]
1877  --with-user-release-suffix
1878                          Add a custom string to the version string if build
1879                          number is not set.[username_builddateb00]
1880  --with-build-number     Set build number value for build [b00]
1881  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1882  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1883                          invocations of boot JDK, overriding the default
1884                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1885                          -enableassertions"
1886  --with-add-source-root  for each and every source directory, look in this
1887                          additional source root for the same directory; if it
1888                          exists and have files in it, include it in the build
1889  --with-override-source-root
1890                          for each and every source directory, look in this
1891                          override source root for the same directory; if it
1892                          exists, use that directory instead and ignore the
1893                          directory in the original source root
1894  --with-adds-and-overrides
1895                          use the subdirs 'adds' and 'overrides' in the
1896                          specified directory as add-source-root and
1897                          override-source-root
1898  --with-override-langtools
1899                          use this langtools dir for the build
1900  --with-override-corba   use this corba dir for the build
1901  --with-override-jaxp    use this jaxp dir for the build
1902  --with-override-jaxws   use this jaxws dir for the build
1903  --with-override-hotspot use this hotspot dir for the build
1904  --with-override-nashorn use this nashorn dir for the build
1905  --with-override-jdk     use this jdk dir for the build
1906  --with-import-hotspot   import hotspot binaries from this jdk image or
1907                          hotspot build dist dir instead of building from
1908                          source
1909  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1910                          to show possible values [platform dependent]
1911  --with-jtreg            Regression Test Harness [probed]
1912  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1913  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1914  --with-extra-ldflags    extra flags to be used when linking jdk
1915  --with-x                use the X Window System
1916  --with-cups             specify prefix directory for the cups package
1917                          (expecting the headers under PATH/include)
1918  --with-cups-include     specify directory for the cups include files
1919  --with-freetype         specify prefix directory for the freetype package
1920                          (expecting the libraries under PATH/lib and the
1921                          headers under PATH/include)
1922  --with-freetype-include specify directory for the freetype include files
1923  --with-freetype-lib     specify directory for the freetype library
1924  --with-alsa             specify prefix directory for the alsa package
1925                          (expecting the libraries under PATH/lib and the
1926                          headers under PATH/include)
1927  --with-alsa-include     specify directory for the alsa include files
1928  --with-alsa-lib         specify directory for the alsa library
1929  --with-giflib           use giflib from build system or OpenJDK source
1930                          (system, bundled) [bundled]
1931  --with-libpng           use libpng from build system or OpenJDK source
1932                          (system, bundled) [bundled]
1933  --with-zlib             use zlib from build system or OpenJDK source
1934                          (system, bundled) [bundled]
1935  --with-stdc++lib=<static>,<dynamic>,<default>
1936                          force linking of the C++ runtime on Linux to either
1937                          static or dynamic, default is static with dynamic as
1938                          fallback
1939  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1940                          only) [probed]
1941  --with-dxsdk            Deprecated. Option is kept for backwards
1942                          compatibility and is ignored
1943  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1944                          compatibility and is ignored
1945  --with-dxsdk-include    Deprecated. Option is kept for backwards
1946                          compatibility and is ignored
1947  --with-num-cores        number of cores in the build system, e.g.
1948                          --with-num-cores=8 [probed]
1949  --with-memory-size      memory (in MB) available in the build system, e.g.
1950                          --with-memory-size=1024 [probed]
1951  --with-jobs             number of parallel jobs to let make run [calculated
1952                          based on cores and memory]
1953  --with-sjavac-server-java
1954                          use this java binary for running the sjavac
1955                          background server [Boot JDK java]
1956  --with-ccache-dir       where to store ccache files [~/.ccache]
1957
1958Some influential environment variables:
1959  BASENAME    Override default value for BASENAME
1960  BASH        Override default value for BASH
1961  CAT         Override default value for CAT
1962  CHMOD       Override default value for CHMOD
1963  CMP         Override default value for CMP
1964  COMM        Override default value for COMM
1965  CP          Override default value for CP
1966  CPIO        Override default value for CPIO
1967  CUT         Override default value for CUT
1968  DATE        Override default value for DATE
1969  DIFF        Override default value for DIFF
1970  DIRNAME     Override default value for DIRNAME
1971  ECHO        Override default value for ECHO
1972  EXPR        Override default value for EXPR
1973  FILE        Override default value for FILE
1974  FIND        Override default value for FIND
1975  HEAD        Override default value for HEAD
1976  LN          Override default value for LN
1977  LS          Override default value for LS
1978  MKDIR       Override default value for MKDIR
1979  MKTEMP      Override default value for MKTEMP
1980  MV          Override default value for MV
1981  NAWK        Override default value for NAWK
1982  PRINTF      Override default value for PRINTF
1983  RM          Override default value for RM
1984  SH          Override default value for SH
1985  SORT        Override default value for SORT
1986  TAIL        Override default value for TAIL
1987  TAR         Override default value for TAR
1988  TEE         Override default value for TEE
1989  TOUCH       Override default value for TOUCH
1990  TR          Override default value for TR
1991  UNAME       Override default value for UNAME
1992  UNIQ        Override default value for UNIQ
1993  WC          Override default value for WC
1994  WHICH       Override default value for WHICH
1995  XARGS       Override default value for XARGS
1996  AWK         Override default value for AWK
1997  GREP        Override default value for GREP
1998  EGREP       Override default value for EGREP
1999  FGREP       Override default value for FGREP
2000  SED         Override default value for SED
2001  CYGPATH     Override default value for CYGPATH
2002  READLINK    Override default value for READLINK
2003  DF          Override default value for DF
2004  SETFILE     Override default value for SETFILE
2005  UNZIP       Override default value for UNZIP
2006  ZIP         Override default value for ZIP
2007  LDD         Override default value for LDD
2008  OTOOL       Override default value for OTOOL
2009  READELF     Override default value for READELF
2010  HG          Override default value for HG
2011  STAT        Override default value for STAT
2012  TIME        Override default value for TIME
2013  DSYMUTIL    Override default value for DSYMUTIL
2014  XATTR       Override default value for XATTR
2015  CODESIGN    Override default value for CODESIGN
2016  PKG_CONFIG  path to pkg-config utility
2017  JAVA        Override default value for JAVA
2018  JAVAC       Override default value for JAVAC
2019  JAVAH       Override default value for JAVAH
2020  JAR         Override default value for JAR
2021  NATIVE2ASCII
2022              Override default value for NATIVE2ASCII
2023  JARSIGNER   Override default value for JARSIGNER
2024  CC          C compiler command
2025  CFLAGS      C compiler flags
2026  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2027              nonstandard directory <lib dir>
2028  LIBS        libraries to pass to the linker, e.g. -l<library>
2029  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2030              you have headers in a nonstandard directory <include dir>
2031  CXX         C++ compiler command
2032  CXXFLAGS    C++ compiler flags
2033  CPP         C preprocessor
2034  CXXCPP      C++ preprocessor
2035  AS          Override default value for AS
2036  AR          Override default value for AR
2037  OBJC        Objective C compiler command
2038  OBJCFLAGS   Objective C compiler flags
2039  LIPO        Override default value for LIPO
2040  STRIP       Override default value for STRIP
2041  NM          Override default value for NM
2042  GNM         Override default value for GNM
2043  MCS         Override default value for MCS
2044  OBJCOPY     Override default value for OBJCOPY
2045  OBJDUMP     Override default value for OBJDUMP
2046  BUILD_CC    Override default value for BUILD_CC
2047  BUILD_CXX   Override default value for BUILD_CXX
2048  BUILD_LD    Override default value for BUILD_LD
2049  JTREGEXE    Override default value for JTREGEXE
2050  XMKMF       Path to xmkmf, Makefile generator for X Window System
2051  FREETYPE_CFLAGS
2052              C compiler flags for FREETYPE, overriding pkg-config
2053  FREETYPE_LIBS
2054              linker flags for FREETYPE, overriding pkg-config
2055  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2056  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2057  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2058  PNG_LIBS    linker flags for PNG, overriding pkg-config
2059  LIBFFI_CFLAGS
2060              C compiler flags for LIBFFI, overriding pkg-config
2061  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2062  CCACHE      Override default value for CCACHE
2063
2064Use these variables to override the choices made by `configure' or to help
2065it to find libraries and programs with nonstandard names/locations.
2066
2067Report bugs to <build-dev@openjdk.java.net>.
2068OpenJDK home page: <http://openjdk.java.net>.
2069_ACEOF
2070ac_status=$?
2071fi
2072
2073if test "$ac_init_help" = "recursive"; then
2074  # If there are subdirs, report their specific --help.
2075  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2076    test -d "$ac_dir" ||
2077      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2078      continue
2079    ac_builddir=.
2080
2081case "$ac_dir" in
2082.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2083*)
2084  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2085  # A ".." for each directory in $ac_dir_suffix.
2086  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2087  case $ac_top_builddir_sub in
2088  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2089  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2090  esac ;;
2091esac
2092ac_abs_top_builddir=$ac_pwd
2093ac_abs_builddir=$ac_pwd$ac_dir_suffix
2094# for backward compatibility:
2095ac_top_builddir=$ac_top_build_prefix
2096
2097case $srcdir in
2098  .)  # We are building in place.
2099    ac_srcdir=.
2100    ac_top_srcdir=$ac_top_builddir_sub
2101    ac_abs_top_srcdir=$ac_pwd ;;
2102  [\\/]* | ?:[\\/]* )  # Absolute name.
2103    ac_srcdir=$srcdir$ac_dir_suffix;
2104    ac_top_srcdir=$srcdir
2105    ac_abs_top_srcdir=$srcdir ;;
2106  *) # Relative name.
2107    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2108    ac_top_srcdir=$ac_top_build_prefix$srcdir
2109    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2110esac
2111ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2112
2113    cd "$ac_dir" || { ac_status=$?; continue; }
2114    # Check for guested configure.
2115    if test -f "$ac_srcdir/configure.gnu"; then
2116      echo &&
2117      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2118    elif test -f "$ac_srcdir/configure"; then
2119      echo &&
2120      $SHELL "$ac_srcdir/configure" --help=recursive
2121    else
2122      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2123    fi || ac_status=$?
2124    cd "$ac_pwd" || { ac_status=$?; break; }
2125  done
2126fi
2127
2128test -n "$ac_init_help" && exit $ac_status
2129if $ac_init_version; then
2130  cat <<\_ACEOF
2131OpenJDK configure jdk9
2132generated by GNU Autoconf 2.69
2133
2134Copyright (C) 2012 Free Software Foundation, Inc.
2135This configure script is free software; the Free Software Foundation
2136gives unlimited permission to copy, distribute and modify it.
2137_ACEOF
2138  exit
2139fi
2140
2141## ------------------------ ##
2142## Autoconf initialization. ##
2143## ------------------------ ##
2144
2145# ac_fn_c_try_compile LINENO
2146# --------------------------
2147# Try to compile conftest.$ac_ext, and return whether this succeeded.
2148ac_fn_c_try_compile ()
2149{
2150  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2151  rm -f conftest.$ac_objext
2152  if { { ac_try="$ac_compile"
2153case "(($ac_try" in
2154  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2155  *) ac_try_echo=$ac_try;;
2156esac
2157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2158$as_echo "$ac_try_echo"; } >&5
2159  (eval "$ac_compile") 2>conftest.err
2160  ac_status=$?
2161  if test -s conftest.err; then
2162    grep -v '^ *+' conftest.err >conftest.er1
2163    cat conftest.er1 >&5
2164    mv -f conftest.er1 conftest.err
2165  fi
2166  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2167  test $ac_status = 0; } && {
2168	 test -z "$ac_c_werror_flag" ||
2169	 test ! -s conftest.err
2170       } && test -s conftest.$ac_objext; then :
2171  ac_retval=0
2172else
2173  $as_echo "$as_me: failed program was:" >&5
2174sed 's/^/| /' conftest.$ac_ext >&5
2175
2176	ac_retval=1
2177fi
2178  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2179  as_fn_set_status $ac_retval
2180
2181} # ac_fn_c_try_compile
2182
2183# ac_fn_cxx_try_compile LINENO
2184# ----------------------------
2185# Try to compile conftest.$ac_ext, and return whether this succeeded.
2186ac_fn_cxx_try_compile ()
2187{
2188  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2189  rm -f conftest.$ac_objext
2190  if { { ac_try="$ac_compile"
2191case "(($ac_try" in
2192  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2193  *) ac_try_echo=$ac_try;;
2194esac
2195eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2196$as_echo "$ac_try_echo"; } >&5
2197  (eval "$ac_compile") 2>conftest.err
2198  ac_status=$?
2199  if test -s conftest.err; then
2200    grep -v '^ *+' conftest.err >conftest.er1
2201    cat conftest.er1 >&5
2202    mv -f conftest.er1 conftest.err
2203  fi
2204  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2205  test $ac_status = 0; } && {
2206	 test -z "$ac_cxx_werror_flag" ||
2207	 test ! -s conftest.err
2208       } && test -s conftest.$ac_objext; then :
2209  ac_retval=0
2210else
2211  $as_echo "$as_me: failed program was:" >&5
2212sed 's/^/| /' conftest.$ac_ext >&5
2213
2214	ac_retval=1
2215fi
2216  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2217  as_fn_set_status $ac_retval
2218
2219} # ac_fn_cxx_try_compile
2220
2221# ac_fn_c_try_cpp LINENO
2222# ----------------------
2223# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2224ac_fn_c_try_cpp ()
2225{
2226  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227  if { { ac_try="$ac_cpp conftest.$ac_ext"
2228case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2235  ac_status=$?
2236  if test -s conftest.err; then
2237    grep -v '^ *+' conftest.err >conftest.er1
2238    cat conftest.er1 >&5
2239    mv -f conftest.er1 conftest.err
2240  fi
2241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242  test $ac_status = 0; } > conftest.i && {
2243	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2244	 test ! -s conftest.err
2245       }; then :
2246  ac_retval=0
2247else
2248  $as_echo "$as_me: failed program was:" >&5
2249sed 's/^/| /' conftest.$ac_ext >&5
2250
2251    ac_retval=1
2252fi
2253  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2254  as_fn_set_status $ac_retval
2255
2256} # ac_fn_c_try_cpp
2257
2258# ac_fn_cxx_try_cpp LINENO
2259# ------------------------
2260# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2261ac_fn_cxx_try_cpp ()
2262{
2263  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264  if { { ac_try="$ac_cpp conftest.$ac_ext"
2265case "(($ac_try" in
2266  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2267  *) ac_try_echo=$ac_try;;
2268esac
2269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2270$as_echo "$ac_try_echo"; } >&5
2271  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2272  ac_status=$?
2273  if test -s conftest.err; then
2274    grep -v '^ *+' conftest.err >conftest.er1
2275    cat conftest.er1 >&5
2276    mv -f conftest.er1 conftest.err
2277  fi
2278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2279  test $ac_status = 0; } > conftest.i && {
2280	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2281	 test ! -s conftest.err
2282       }; then :
2283  ac_retval=0
2284else
2285  $as_echo "$as_me: failed program was:" >&5
2286sed 's/^/| /' conftest.$ac_ext >&5
2287
2288    ac_retval=1
2289fi
2290  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291  as_fn_set_status $ac_retval
2292
2293} # ac_fn_cxx_try_cpp
2294
2295# ac_fn_objc_try_compile LINENO
2296# -----------------------------
2297# Try to compile conftest.$ac_ext, and return whether this succeeded.
2298ac_fn_objc_try_compile ()
2299{
2300  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301  rm -f conftest.$ac_objext
2302  if { { ac_try="$ac_compile"
2303case "(($ac_try" in
2304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2305  *) ac_try_echo=$ac_try;;
2306esac
2307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2308$as_echo "$ac_try_echo"; } >&5
2309  (eval "$ac_compile") 2>conftest.err
2310  ac_status=$?
2311  if test -s conftest.err; then
2312    grep -v '^ *+' conftest.err >conftest.er1
2313    cat conftest.er1 >&5
2314    mv -f conftest.er1 conftest.err
2315  fi
2316  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2317  test $ac_status = 0; } && {
2318	 test -z "$ac_objc_werror_flag" ||
2319	 test ! -s conftest.err
2320       } && test -s conftest.$ac_objext; then :
2321  ac_retval=0
2322else
2323  $as_echo "$as_me: failed program was:" >&5
2324sed 's/^/| /' conftest.$ac_ext >&5
2325
2326	ac_retval=1
2327fi
2328  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2329  as_fn_set_status $ac_retval
2330
2331} # ac_fn_objc_try_compile
2332
2333# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2334# ---------------------------------------------------------
2335# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2336# the include files in INCLUDES and setting the cache variable VAR
2337# accordingly.
2338ac_fn_cxx_check_header_mongrel ()
2339{
2340  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2341  if eval \${$3+:} false; then :
2342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2343$as_echo_n "checking for $2... " >&6; }
2344if eval \${$3+:} false; then :
2345  $as_echo_n "(cached) " >&6
2346fi
2347eval ac_res=\$$3
2348	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
2350else
2351  # Is the header compilable?
2352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2353$as_echo_n "checking $2 usability... " >&6; }
2354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h.  */
2356$4
2357#include <$2>
2358_ACEOF
2359if ac_fn_cxx_try_compile "$LINENO"; then :
2360  ac_header_compiler=yes
2361else
2362  ac_header_compiler=no
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2366$as_echo "$ac_header_compiler" >&6; }
2367
2368# Is the header present?
2369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2370$as_echo_n "checking $2 presence... " >&6; }
2371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h.  */
2373#include <$2>
2374_ACEOF
2375if ac_fn_cxx_try_cpp "$LINENO"; then :
2376  ac_header_preproc=yes
2377else
2378  ac_header_preproc=no
2379fi
2380rm -f conftest.err conftest.i conftest.$ac_ext
2381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2382$as_echo "$ac_header_preproc" >&6; }
2383
2384# So?  What about this header?
2385case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2386  yes:no: )
2387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2388$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2389    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2390$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2391    ;;
2392  no:yes:* )
2393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2394$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2395    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2396$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2397    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2398$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2399    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2400$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2402$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2403( $as_echo "## ----------------------------------------- ##
2404## Report this to build-dev@openjdk.java.net ##
2405## ----------------------------------------- ##"
2406     ) | sed "s/^/$as_me: WARNING:     /" >&2
2407    ;;
2408esac
2409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2410$as_echo_n "checking for $2... " >&6; }
2411if eval \${$3+:} false; then :
2412  $as_echo_n "(cached) " >&6
2413else
2414  eval "$3=\$ac_header_compiler"
2415fi
2416eval ac_res=\$$3
2417	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418$as_echo "$ac_res" >&6; }
2419fi
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421
2422} # ac_fn_cxx_check_header_mongrel
2423
2424# ac_fn_cxx_try_run LINENO
2425# ------------------------
2426# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2427# that executables *can* be run.
2428ac_fn_cxx_try_run ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  if { { ac_try="$ac_link"
2432case "(($ac_try" in
2433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434  *) ac_try_echo=$ac_try;;
2435esac
2436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437$as_echo "$ac_try_echo"; } >&5
2438  (eval "$ac_link") 2>&5
2439  ac_status=$?
2440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2441  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2442  { { case "(($ac_try" in
2443  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2444  *) ac_try_echo=$ac_try;;
2445esac
2446eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2447$as_echo "$ac_try_echo"; } >&5
2448  (eval "$ac_try") 2>&5
2449  ac_status=$?
2450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451  test $ac_status = 0; }; }; then :
2452  ac_retval=0
2453else
2454  $as_echo "$as_me: program exited with status $ac_status" >&5
2455       $as_echo "$as_me: failed program was:" >&5
2456sed 's/^/| /' conftest.$ac_ext >&5
2457
2458       ac_retval=$ac_status
2459fi
2460  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2461  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2462  as_fn_set_status $ac_retval
2463
2464} # ac_fn_cxx_try_run
2465
2466# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2467# ---------------------------------------------------------
2468# Tests whether HEADER exists and can be compiled using the include files in
2469# INCLUDES, setting the cache variable VAR accordingly.
2470ac_fn_cxx_check_header_compile ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2474$as_echo_n "checking for $2... " >&6; }
2475if eval \${$3+:} false; then :
2476  $as_echo_n "(cached) " >&6
2477else
2478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2479/* end confdefs.h.  */
2480$4
2481#include <$2>
2482_ACEOF
2483if ac_fn_cxx_try_compile "$LINENO"; then :
2484  eval "$3=yes"
2485else
2486  eval "$3=no"
2487fi
2488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2489fi
2490eval ac_res=\$$3
2491	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2492$as_echo "$ac_res" >&6; }
2493  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2494
2495} # ac_fn_cxx_check_header_compile
2496
2497# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2498# ----------------------------------------------
2499# Tries to find the compile-time value of EXPR in a program that includes
2500# INCLUDES, setting VAR accordingly. Returns whether the value could be
2501# computed
2502ac_fn_cxx_compute_int ()
2503{
2504  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2505  if test "$cross_compiling" = yes; then
2506    # Depending upon the size, compute the lo and hi bounds.
2507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2508/* end confdefs.h.  */
2509$4
2510int
2511main ()
2512{
2513static int test_array [1 - 2 * !(($2) >= 0)];
2514test_array [0] = 0;
2515return test_array [0];
2516
2517  ;
2518  return 0;
2519}
2520_ACEOF
2521if ac_fn_cxx_try_compile "$LINENO"; then :
2522  ac_lo=0 ac_mid=0
2523  while :; do
2524    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2525/* end confdefs.h.  */
2526$4
2527int
2528main ()
2529{
2530static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2531test_array [0] = 0;
2532return test_array [0];
2533
2534  ;
2535  return 0;
2536}
2537_ACEOF
2538if ac_fn_cxx_try_compile "$LINENO"; then :
2539  ac_hi=$ac_mid; break
2540else
2541  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2542			if test $ac_lo -le $ac_mid; then
2543			  ac_lo= ac_hi=
2544			  break
2545			fi
2546			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2547fi
2548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2549  done
2550else
2551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2552/* end confdefs.h.  */
2553$4
2554int
2555main ()
2556{
2557static int test_array [1 - 2 * !(($2) < 0)];
2558test_array [0] = 0;
2559return test_array [0];
2560
2561  ;
2562  return 0;
2563}
2564_ACEOF
2565if ac_fn_cxx_try_compile "$LINENO"; then :
2566  ac_hi=-1 ac_mid=-1
2567  while :; do
2568    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2569/* end confdefs.h.  */
2570$4
2571int
2572main ()
2573{
2574static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2575test_array [0] = 0;
2576return test_array [0];
2577
2578  ;
2579  return 0;
2580}
2581_ACEOF
2582if ac_fn_cxx_try_compile "$LINENO"; then :
2583  ac_lo=$ac_mid; break
2584else
2585  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2586			if test $ac_mid -le $ac_hi; then
2587			  ac_lo= ac_hi=
2588			  break
2589			fi
2590			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2591fi
2592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2593  done
2594else
2595  ac_lo= ac_hi=
2596fi
2597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2598fi
2599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2600# Binary search between lo and hi bounds.
2601while test "x$ac_lo" != "x$ac_hi"; do
2602  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606int
2607main ()
2608{
2609static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2610test_array [0] = 0;
2611return test_array [0];
2612
2613  ;
2614  return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_hi=$ac_mid
2619else
2620  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2621fi
2622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2623done
2624case $ac_lo in #((
2625?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2626'') ac_retval=1 ;;
2627esac
2628  else
2629    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631$4
2632static long int longval () { return $2; }
2633static unsigned long int ulongval () { return $2; }
2634#include <stdio.h>
2635#include <stdlib.h>
2636int
2637main ()
2638{
2639
2640  FILE *f = fopen ("conftest.val", "w");
2641  if (! f)
2642    return 1;
2643  if (($2) < 0)
2644    {
2645      long int i = longval ();
2646      if (i != ($2))
2647	return 1;
2648      fprintf (f, "%ld", i);
2649    }
2650  else
2651    {
2652      unsigned long int i = ulongval ();
2653      if (i != ($2))
2654	return 1;
2655      fprintf (f, "%lu", i);
2656    }
2657  /* Do not output a trailing newline, as this causes \r\n confusion
2658     on some platforms.  */
2659  return ferror (f) || fclose (f) != 0;
2660
2661  ;
2662  return 0;
2663}
2664_ACEOF
2665if ac_fn_cxx_try_run "$LINENO"; then :
2666  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2667else
2668  ac_retval=1
2669fi
2670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2671  conftest.$ac_objext conftest.beam conftest.$ac_ext
2672rm -f conftest.val
2673
2674  fi
2675  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2676  as_fn_set_status $ac_retval
2677
2678} # ac_fn_cxx_compute_int
2679
2680# ac_fn_cxx_try_link LINENO
2681# -------------------------
2682# Try to link conftest.$ac_ext, and return whether this succeeded.
2683ac_fn_cxx_try_link ()
2684{
2685  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2686  rm -f conftest.$ac_objext conftest$ac_exeext
2687  if { { ac_try="$ac_link"
2688case "(($ac_try" in
2689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690  *) ac_try_echo=$ac_try;;
2691esac
2692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693$as_echo "$ac_try_echo"; } >&5
2694  (eval "$ac_link") 2>conftest.err
2695  ac_status=$?
2696  if test -s conftest.err; then
2697    grep -v '^ *+' conftest.err >conftest.er1
2698    cat conftest.er1 >&5
2699    mv -f conftest.er1 conftest.err
2700  fi
2701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2702  test $ac_status = 0; } && {
2703	 test -z "$ac_cxx_werror_flag" ||
2704	 test ! -s conftest.err
2705       } && test -s conftest$ac_exeext && {
2706	 test "$cross_compiling" = yes ||
2707	 test -x conftest$ac_exeext
2708       }; then :
2709  ac_retval=0
2710else
2711  $as_echo "$as_me: failed program was:" >&5
2712sed 's/^/| /' conftest.$ac_ext >&5
2713
2714	ac_retval=1
2715fi
2716  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2717  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2718  # interfere with the next link command; also delete a directory that is
2719  # left behind by Apple's compiler.  We do this before executing the actions.
2720  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2721  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2722  as_fn_set_status $ac_retval
2723
2724} # ac_fn_cxx_try_link
2725
2726# ac_fn_cxx_check_func LINENO FUNC VAR
2727# ------------------------------------
2728# Tests whether FUNC exists, setting the cache variable VAR accordingly
2729ac_fn_cxx_check_func ()
2730{
2731  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2733$as_echo_n "checking for $2... " >&6; }
2734if eval \${$3+:} false; then :
2735  $as_echo_n "(cached) " >&6
2736else
2737  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2738/* end confdefs.h.  */
2739/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2740   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2741#define $2 innocuous_$2
2742
2743/* System header to define __stub macros and hopefully few prototypes,
2744    which can conflict with char $2 (); below.
2745    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2746    <limits.h> exists even on freestanding compilers.  */
2747
2748#ifdef __STDC__
2749# include <limits.h>
2750#else
2751# include <assert.h>
2752#endif
2753
2754#undef $2
2755
2756/* Override any GCC internal prototype to avoid an error.
2757   Use char because int might match the return type of a GCC
2758   builtin and then its argument prototype would still apply.  */
2759#ifdef __cplusplus
2760extern "C"
2761#endif
2762char $2 ();
2763/* The GNU C library defines this for functions which it implements
2764    to always fail with ENOSYS.  Some functions are actually named
2765    something starting with __ and the normal name is an alias.  */
2766#if defined __stub_$2 || defined __stub___$2
2767choke me
2768#endif
2769
2770int
2771main ()
2772{
2773return $2 ();
2774  ;
2775  return 0;
2776}
2777_ACEOF
2778if ac_fn_cxx_try_link "$LINENO"; then :
2779  eval "$3=yes"
2780else
2781  eval "$3=no"
2782fi
2783rm -f core conftest.err conftest.$ac_objext \
2784    conftest$ac_exeext conftest.$ac_ext
2785fi
2786eval ac_res=\$$3
2787	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2788$as_echo "$ac_res" >&6; }
2789  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2790
2791} # ac_fn_cxx_check_func
2792
2793# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2794# -------------------------------------------------------
2795# Tests whether HEADER exists and can be compiled using the include files in
2796# INCLUDES, setting the cache variable VAR accordingly.
2797ac_fn_c_check_header_compile ()
2798{
2799  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2801$as_echo_n "checking for $2... " >&6; }
2802if eval \${$3+:} false; then :
2803  $as_echo_n "(cached) " >&6
2804else
2805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807$4
2808#include <$2>
2809_ACEOF
2810if ac_fn_c_try_compile "$LINENO"; then :
2811  eval "$3=yes"
2812else
2813  eval "$3=no"
2814fi
2815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2816fi
2817eval ac_res=\$$3
2818	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2819$as_echo "$ac_res" >&6; }
2820  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2821
2822} # ac_fn_c_check_header_compile
2823cat >config.log <<_ACEOF
2824This file contains any messages produced by compilers while
2825running configure, to aid debugging if configure makes a mistake.
2826
2827It was created by OpenJDK $as_me jdk9, which was
2828generated by GNU Autoconf 2.69.  Invocation command line was
2829
2830  $ $0 $@
2831
2832_ACEOF
2833exec 5>>config.log
2834{
2835cat <<_ASUNAME
2836## --------- ##
2837## Platform. ##
2838## --------- ##
2839
2840hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2841uname -m = `(uname -m) 2>/dev/null || echo unknown`
2842uname -r = `(uname -r) 2>/dev/null || echo unknown`
2843uname -s = `(uname -s) 2>/dev/null || echo unknown`
2844uname -v = `(uname -v) 2>/dev/null || echo unknown`
2845
2846/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2847/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2848
2849/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2850/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2851/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2852/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2853/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2854/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2855/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2856
2857_ASUNAME
2858
2859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2860for as_dir in $PATH
2861do
2862  IFS=$as_save_IFS
2863  test -z "$as_dir" && as_dir=.
2864    $as_echo "PATH: $as_dir"
2865  done
2866IFS=$as_save_IFS
2867
2868} >&5
2869
2870cat >&5 <<_ACEOF
2871
2872
2873## ----------- ##
2874## Core tests. ##
2875## ----------- ##
2876
2877_ACEOF
2878
2879
2880# Keep a trace of the command line.
2881# Strip out --no-create and --no-recursion so they do not pile up.
2882# Strip out --silent because we don't want to record it for future runs.
2883# Also quote any args containing shell meta-characters.
2884# Make two passes to allow for proper duplicate-argument suppression.
2885ac_configure_args=
2886ac_configure_args0=
2887ac_configure_args1=
2888ac_must_keep_next=false
2889for ac_pass in 1 2
2890do
2891  for ac_arg
2892  do
2893    case $ac_arg in
2894    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2895    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2896    | -silent | --silent | --silen | --sile | --sil)
2897      continue ;;
2898    *\'*)
2899      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2900    esac
2901    case $ac_pass in
2902    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2903    2)
2904      as_fn_append ac_configure_args1 " '$ac_arg'"
2905      if test $ac_must_keep_next = true; then
2906	ac_must_keep_next=false # Got value, back to normal.
2907      else
2908	case $ac_arg in
2909	  *=* | --config-cache | -C | -disable-* | --disable-* \
2910	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2911	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2912	  | -with-* | --with-* | -without-* | --without-* | --x)
2913	    case "$ac_configure_args0 " in
2914	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2915	    esac
2916	    ;;
2917	  -* ) ac_must_keep_next=true ;;
2918	esac
2919      fi
2920      as_fn_append ac_configure_args " '$ac_arg'"
2921      ;;
2922    esac
2923  done
2924done
2925{ ac_configure_args0=; unset ac_configure_args0;}
2926{ ac_configure_args1=; unset ac_configure_args1;}
2927
2928# When interrupted or exit'd, cleanup temporary files, and complete
2929# config.log.  We remove comments because anyway the quotes in there
2930# would cause problems or look ugly.
2931# WARNING: Use '\'' to represent an apostrophe within the trap.
2932# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2933trap 'exit_status=$?
2934  # Save into config.log some information that might help in debugging.
2935  {
2936    echo
2937
2938    $as_echo "## ---------------- ##
2939## Cache variables. ##
2940## ---------------- ##"
2941    echo
2942    # The following way of writing the cache mishandles newlines in values,
2943(
2944  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2945    eval ac_val=\$$ac_var
2946    case $ac_val in #(
2947    *${as_nl}*)
2948      case $ac_var in #(
2949      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2950$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2951      esac
2952      case $ac_var in #(
2953      _ | IFS | as_nl) ;; #(
2954      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2955      *) { eval $ac_var=; unset $ac_var;} ;;
2956      esac ;;
2957    esac
2958  done
2959  (set) 2>&1 |
2960    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2961    *${as_nl}ac_space=\ *)
2962      sed -n \
2963	"s/'\''/'\''\\\\'\'''\''/g;
2964	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2965      ;; #(
2966    *)
2967      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2968      ;;
2969    esac |
2970    sort
2971)
2972    echo
2973
2974    $as_echo "## ----------------- ##
2975## Output variables. ##
2976## ----------------- ##"
2977    echo
2978    for ac_var in $ac_subst_vars
2979    do
2980      eval ac_val=\$$ac_var
2981      case $ac_val in
2982      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2983      esac
2984      $as_echo "$ac_var='\''$ac_val'\''"
2985    done | sort
2986    echo
2987
2988    if test -n "$ac_subst_files"; then
2989      $as_echo "## ------------------- ##
2990## File substitutions. ##
2991## ------------------- ##"
2992      echo
2993      for ac_var in $ac_subst_files
2994      do
2995	eval ac_val=\$$ac_var
2996	case $ac_val in
2997	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2998	esac
2999	$as_echo "$ac_var='\''$ac_val'\''"
3000      done | sort
3001      echo
3002    fi
3003
3004    if test -s confdefs.h; then
3005      $as_echo "## ----------- ##
3006## confdefs.h. ##
3007## ----------- ##"
3008      echo
3009      cat confdefs.h
3010      echo
3011    fi
3012    test "$ac_signal" != 0 &&
3013      $as_echo "$as_me: caught signal $ac_signal"
3014    $as_echo "$as_me: exit $exit_status"
3015  } >&5
3016  rm -f core *.core core.conftest.* &&
3017    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3018    exit $exit_status
3019' 0
3020for ac_signal in 1 2 13 15; do
3021  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3022done
3023ac_signal=0
3024
3025# confdefs.h avoids OS command line length limits that DEFS can exceed.
3026rm -f -r conftest* confdefs.h
3027
3028$as_echo "/* confdefs.h */" > confdefs.h
3029
3030# Predefined preprocessor variables.
3031
3032cat >>confdefs.h <<_ACEOF
3033#define PACKAGE_NAME "$PACKAGE_NAME"
3034_ACEOF
3035
3036cat >>confdefs.h <<_ACEOF
3037#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3038_ACEOF
3039
3040cat >>confdefs.h <<_ACEOF
3041#define PACKAGE_VERSION "$PACKAGE_VERSION"
3042_ACEOF
3043
3044cat >>confdefs.h <<_ACEOF
3045#define PACKAGE_STRING "$PACKAGE_STRING"
3046_ACEOF
3047
3048cat >>confdefs.h <<_ACEOF
3049#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3050_ACEOF
3051
3052cat >>confdefs.h <<_ACEOF
3053#define PACKAGE_URL "$PACKAGE_URL"
3054_ACEOF
3055
3056
3057# Let the site file select an alternate cache file if it wants to.
3058# Prefer an explicitly selected file to automatically selected ones.
3059ac_site_file1=NONE
3060ac_site_file2=NONE
3061if test -n "$CONFIG_SITE"; then
3062  # We do not want a PATH search for config.site.
3063  case $CONFIG_SITE in #((
3064    -*)  ac_site_file1=./$CONFIG_SITE;;
3065    */*) ac_site_file1=$CONFIG_SITE;;
3066    *)   ac_site_file1=./$CONFIG_SITE;;
3067  esac
3068elif test "x$prefix" != xNONE; then
3069  ac_site_file1=$prefix/share/config.site
3070  ac_site_file2=$prefix/etc/config.site
3071else
3072  ac_site_file1=$ac_default_prefix/share/config.site
3073  ac_site_file2=$ac_default_prefix/etc/config.site
3074fi
3075for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3076do
3077  test "x$ac_site_file" = xNONE && continue
3078  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3079    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3080$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3081    sed 's/^/| /' "$ac_site_file" >&5
3082    . "$ac_site_file" \
3083      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3085as_fn_error $? "failed to load site script $ac_site_file
3086See \`config.log' for more details" "$LINENO" 5; }
3087  fi
3088done
3089
3090if test -r "$cache_file"; then
3091  # Some versions of bash will fail to source /dev/null (special files
3092  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3093  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3094    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3095$as_echo "$as_me: loading cache $cache_file" >&6;}
3096    case $cache_file in
3097      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3098      *)                      . "./$cache_file";;
3099    esac
3100  fi
3101else
3102  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3103$as_echo "$as_me: creating cache $cache_file" >&6;}
3104  >$cache_file
3105fi
3106
3107# Check that the precious variables saved in the cache have kept the same
3108# value.
3109ac_cache_corrupted=false
3110for ac_var in $ac_precious_vars; do
3111  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3112  eval ac_new_set=\$ac_env_${ac_var}_set
3113  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3114  eval ac_new_val=\$ac_env_${ac_var}_value
3115  case $ac_old_set,$ac_new_set in
3116    set,)
3117      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3118$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3119      ac_cache_corrupted=: ;;
3120    ,set)
3121      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3122$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3123      ac_cache_corrupted=: ;;
3124    ,);;
3125    *)
3126      if test "x$ac_old_val" != "x$ac_new_val"; then
3127	# differences in whitespace do not lead to failure.
3128	ac_old_val_w=`echo x $ac_old_val`
3129	ac_new_val_w=`echo x $ac_new_val`
3130	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3131	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3132$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3133	  ac_cache_corrupted=:
3134	else
3135	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3136$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3137	  eval $ac_var=\$ac_old_val
3138	fi
3139	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3140$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3141	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3142$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3143      fi;;
3144  esac
3145  # Pass precious variables to config.status.
3146  if test "$ac_new_set" = set; then
3147    case $ac_new_val in
3148    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3149    *) ac_arg=$ac_var=$ac_new_val ;;
3150    esac
3151    case " $ac_configure_args " in
3152      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3153      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3154    esac
3155  fi
3156done
3157if $ac_cache_corrupted; then
3158  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3160  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3161$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3162  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3163fi
3164## -------------------- ##
3165## Main body of script. ##
3166## -------------------- ##
3167
3168ac_ext=c
3169ac_cpp='$CPP $CPPFLAGS'
3170ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3171ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3172ac_compiler_gnu=$ac_cv_c_compiler_gnu
3173
3174
3175
3176ac_aux_dir=
3177for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3178  if test -f "$ac_dir/install-sh"; then
3179    ac_aux_dir=$ac_dir
3180    ac_install_sh="$ac_aux_dir/install-sh -c"
3181    break
3182  elif test -f "$ac_dir/install.sh"; then
3183    ac_aux_dir=$ac_dir
3184    ac_install_sh="$ac_aux_dir/install.sh -c"
3185    break
3186  elif test -f "$ac_dir/shtool"; then
3187    ac_aux_dir=$ac_dir
3188    ac_install_sh="$ac_aux_dir/shtool install -c"
3189    break
3190  fi
3191done
3192if test -z "$ac_aux_dir"; then
3193  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
3194fi
3195
3196# These three variables are undocumented and unsupported,
3197# and are intended to be withdrawn in a future Autoconf release.
3198# They can cause serious problems if a builder's source tree is in a directory
3199# whose full name contains unusual characters.
3200ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3201ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3202ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3203
3204
3205# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3206
3207#
3208# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3209# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3210#
3211# This code is free software; you can redistribute it and/or modify it
3212# under the terms of the GNU General Public License version 2 only, as
3213# published by the Free Software Foundation.  Oracle designates this
3214# particular file as subject to the "Classpath" exception as provided
3215# by Oracle in the LICENSE file that accompanied this code.
3216#
3217# This code is distributed in the hope that it will be useful, but WITHOUT
3218# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3219# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3220# version 2 for more details (a copy is included in the LICENSE file that
3221# accompanied this code).
3222#
3223# You should have received a copy of the GNU General Public License version
3224# 2 along with this work; if not, write to the Free Software Foundation,
3225# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3226#
3227# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3228# or visit www.oracle.com if you need additional information or have any
3229# questions.
3230#
3231
3232#
3233# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3234#
3235# This program is free software; you can redistribute it and/or modify
3236# it under the terms of the GNU General Public License as published by
3237# the Free Software Foundation; either version 2 of the License, or
3238# (at your option) any later version.
3239#
3240# This program is distributed in the hope that it will be useful, but
3241# WITHOUT ANY WARRANTY; without even the implied warranty of
3242# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3243# General Public License for more details.
3244#
3245# You should have received a copy of the GNU General Public License
3246# along with this program; if not, write to the Free Software
3247# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3248#
3249# As a special exception to the GNU General Public License, if you
3250# distribute this file as part of a program that contains a
3251# configuration script generated by Autoconf, you may include it under
3252# the same distribution terms that you use for the rest of that program.
3253
3254# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3255# ----------------------------------
3256# PKG_PROG_PKG_CONFIG
3257
3258# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3259#
3260# Check to see whether a particular set of modules exists.  Similar
3261# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3262#
3263#
3264# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3265# this or PKG_CHECK_MODULES is called, or make sure to call
3266# PKG_CHECK_EXISTS manually
3267# --------------------------------------------------------------
3268
3269
3270
3271# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3272# ---------------------------------------------
3273# _PKG_CONFIG
3274
3275# _PKG_SHORT_ERRORS_SUPPORTED
3276# -----------------------------
3277# _PKG_SHORT_ERRORS_SUPPORTED
3278
3279
3280# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3281# [ACTION-IF-NOT-FOUND])
3282#
3283#
3284# Note that if there is a possibility the first call to
3285# PKG_CHECK_MODULES might not happen, you should be sure to include an
3286# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3287#
3288#
3289# --------------------------------------------------------------
3290# PKG_CHECK_MODULES
3291
3292
3293# Include these first...
3294#
3295# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3296# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3297#
3298# This code is free software; you can redistribute it and/or modify it
3299# under the terms of the GNU General Public License version 2 only, as
3300# published by the Free Software Foundation.  Oracle designates this
3301# particular file as subject to the "Classpath" exception as provided
3302# by Oracle in the LICENSE file that accompanied this code.
3303#
3304# This code is distributed in the hope that it will be useful, but WITHOUT
3305# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3306# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3307# version 2 for more details (a copy is included in the LICENSE file that
3308# accompanied this code).
3309#
3310# You should have received a copy of the GNU General Public License version
3311# 2 along with this work; if not, write to the Free Software Foundation,
3312# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3313#
3314# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3315# or visit www.oracle.com if you need additional information or have any
3316# questions.
3317#
3318
3319# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3320# If so, then append $1 to $2 \
3321# Also set JVM_ARG_OK to true/false depending on outcome.
3322
3323
3324# Appends a string to a path variable, only adding the : when needed.
3325
3326
3327# This will make sure the given variable points to a full and proper
3328# path. This means:
3329# 1) There will be no spaces in the path. On posix platforms,
3330#    spaces in the path will result in an error. On Windows,
3331#    the path will be rewritten using short-style to be space-free.
3332# 2) The path will be absolute, and it will be in unix-style (on
3333#     cygwin).
3334# $1: The name of the variable to fix
3335
3336
3337# This will make sure the given variable points to a executable
3338# with a full and proper path. This means:
3339# 1) There will be no spaces in the path. On posix platforms,
3340#    spaces in the path will result in an error. On Windows,
3341#    the path will be rewritten using short-style to be space-free.
3342# 2) The path will be absolute, and it will be in unix-style (on
3343#     cygwin).
3344# Any arguments given to the executable is preserved.
3345# If the input variable does not have a directory specification, then
3346# it need to be in the PATH.
3347# $1: The name of the variable to fix
3348
3349
3350
3351
3352# Register a --with argument but mark it as deprecated
3353# $1: The name of the with argument to deprecate, not including --with-
3354
3355
3356# Register a --enable argument but mark it as deprecated
3357# $1: The name of the with argument to deprecate, not including --enable-
3358# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3359
3360
3361
3362
3363# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3364# $1: variable to check
3365
3366
3367# Check that there are no unprocessed overridden variables left.
3368# If so, they are an incorrect argument and we will exit with an error.
3369
3370
3371# Setup a tool for the given variable. If correctly specified by the user,
3372# use that value, otherwise search for the tool using the supplied code snippet.
3373# $1: variable to set
3374# $2: code snippet to call to look for the tool
3375
3376
3377# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3378# $1: variable to set
3379# $2: executable name (or list of names) to look for
3380
3381
3382# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3383# $1: variable to set
3384# $2: executable name (or list of names) to look for
3385
3386
3387# Like BASIC_PATH_PROGS but fails if no tool was found.
3388# $1: variable to set
3389# $2: executable name (or list of names) to look for
3390
3391
3392# Like BASIC_SETUP_TOOL but fails if no tool was found.
3393# $1: variable to set
3394# $2: autoconf macro to call to look for the special tool
3395
3396
3397# Setup the most fundamental tools that relies on not much else to set up,
3398# but is used by much of the early bootstrap code.
3399
3400
3401# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3402
3403
3404
3405
3406
3407
3408
3409#%%% Simple tools %%%
3410
3411# Check if we have found a usable version of make
3412# $1: the path to a potential make binary (or empty)
3413# $2: the description on how we found this
3414
3415
3416# Goes looking for a usable version of GNU make.
3417
3418
3419
3420
3421
3422
3423# Check if build directory is on local disk. If not possible to determine,
3424# we prefer to claim it's local.
3425# Argument 1: directory to test
3426# Argument 2: what to do if it is on local disk
3427# Argument 3: what to do otherwise (remote disk or failure)
3428
3429
3430# Check that source files have basic read permissions set. This might
3431# not be the case in cygwin in certain conditions.
3432
3433
3434
3435
3436#
3437# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3438# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3439#
3440# This code is free software; you can redistribute it and/or modify it
3441# under the terms of the GNU General Public License version 2 only, as
3442# published by the Free Software Foundation.  Oracle designates this
3443# particular file as subject to the "Classpath" exception as provided
3444# by Oracle in the LICENSE file that accompanied this code.
3445#
3446# This code is distributed in the hope that it will be useful, but WITHOUT
3447# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3448# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3449# version 2 for more details (a copy is included in the LICENSE file that
3450# accompanied this code).
3451#
3452# You should have received a copy of the GNU General Public License version
3453# 2 along with this work; if not, write to the Free Software Foundation,
3454# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3455#
3456# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3457# or visit www.oracle.com if you need additional information or have any
3458# questions.
3459#
3460
3461
3462
3463
3464
3465# Helper function which possibly converts a path using DOS-style short mode.
3466# If so, the updated path is stored in $new_path.
3467# $1: The path to check
3468
3469
3470# Helper function which possibly converts a path using DOS-style short mode.
3471# If so, the updated path is stored in $new_path.
3472# $1: The path to check
3473
3474
3475# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3476# and could probably be heavily simplified. However, all changes in this
3477# area tend to need lot of testing in different scenarios, and in lack of
3478# proper unit testing, cleaning this up has not been deemed worth the effort
3479# at the moment.
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3490
3491
3492
3493
3494#
3495# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3496# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3497#
3498# This code is free software; you can redistribute it and/or modify it
3499# under the terms of the GNU General Public License version 2 only, as
3500# published by the Free Software Foundation.  Oracle designates this
3501# particular file as subject to the "Classpath" exception as provided
3502# by Oracle in the LICENSE file that accompanied this code.
3503#
3504# This code is distributed in the hope that it will be useful, but WITHOUT
3505# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3506# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3507# version 2 for more details (a copy is included in the LICENSE file that
3508# accompanied this code).
3509#
3510# You should have received a copy of the GNU General Public License version
3511# 2 along with this work; if not, write to the Free Software Foundation,
3512# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3513#
3514# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3515# or visit www.oracle.com if you need additional information or have any
3516# questions.
3517#
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529# ... then the rest
3530#
3531# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3532# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3533#
3534# This code is free software; you can redistribute it and/or modify it
3535# under the terms of the GNU General Public License version 2 only, as
3536# published by the Free Software Foundation.  Oracle designates this
3537# particular file as subject to the "Classpath" exception as provided
3538# by Oracle in the LICENSE file that accompanied this code.
3539#
3540# This code is distributed in the hope that it will be useful, but WITHOUT
3541# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3542# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3543# version 2 for more details (a copy is included in the LICENSE file that
3544# accompanied this code).
3545#
3546# You should have received a copy of the GNU General Public License version
3547# 2 along with this work; if not, write to the Free Software Foundation,
3548# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3549#
3550# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3551# or visit www.oracle.com if you need additional information or have any
3552# questions.
3553#
3554
3555########################################################################
3556# This file handles detection of the Boot JDK. The Boot JDK detection
3557# process has been developed as a response to solve a complex real-world
3558# problem. Initially, it was simple, but it has grown as platform after
3559# platform, idiosyncracy after idiosyncracy has been supported.
3560#
3561# The basic idea is this:
3562# 1) You need an acceptable *) JDK to use as a Boot JDK
3563# 2) There are several ways to locate a JDK, that are mostly platform
3564#    dependent **)
3565# 3) You can have multiple JDKs installed
3566# 4) If possible, configure should try to dig out an acceptable JDK
3567#    automatically, without having to resort to command-line options
3568#
3569# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3570#     javac) and not a JRE, etc.
3571#
3572# **) On Windows we typically use a well-known path.
3573#     On MacOSX we typically use the tool java_home.
3574#     On Linux we typically find javac in the $PATH, and then follow a
3575#     chain of symlinks that often ends up in a real JDK.
3576#
3577# This leads to the code where we check in different ways to locate a
3578# JDK, and if one is found, check if it is acceptable. If not, we print
3579# our reasons for rejecting it (useful when debugging non-working
3580# configure situations) and continue checking the next one.
3581########################################################################
3582
3583# Execute the check given as argument, and verify the result
3584# If the Boot JDK was previously found, do nothing
3585# $1 A command line (typically autoconf macro) to execute
3586
3587
3588# Test: Is bootjdk explicitely set by command line arguments?
3589
3590
3591# Test: Is bootjdk available from builddeps?
3592
3593
3594# Test: Is $JAVA_HOME set?
3595
3596
3597# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3598
3599
3600# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3601# $1: Argument to the java_home binary (optional)
3602
3603
3604# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3605
3606
3607# Look for a jdk in the given path. If there are multiple, try to select the newest.
3608# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3609# $1 = Path to directory containing jdk installations.
3610# $2 = String to append to the found JDK directory to get the proper JDK home
3611
3612
3613# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3614# environmental variable as base for where to look.
3615# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3616
3617
3618# Test: Is there a JDK installed in default, well-known locations?
3619
3620
3621# Check that a command-line tool in the Boot JDK is correct
3622# $1 = name of variable to assign
3623# $2 = name of binary
3624
3625
3626###############################################################################
3627#
3628# We need a Boot JDK to bootstrap the build.
3629#
3630
3631
3632
3633
3634
3635#
3636# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3637# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3638#
3639# This code is free software; you can redistribute it and/or modify it
3640# under the terms of the GNU General Public License version 2 only, as
3641# published by the Free Software Foundation.  Oracle designates this
3642# particular file as subject to the "Classpath" exception as provided
3643# by Oracle in the LICENSE file that accompanied this code.
3644#
3645# This code is distributed in the hope that it will be useful, but WITHOUT
3646# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3647# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3648# version 2 for more details (a copy is included in the LICENSE file that
3649# accompanied this code).
3650#
3651# You should have received a copy of the GNU General Public License version
3652# 2 along with this work; if not, write to the Free Software Foundation,
3653# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3654#
3655# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3656# or visit www.oracle.com if you need additional information or have any
3657# questions.
3658#
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679#
3680# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3681# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3682#
3683# This code is free software; you can redistribute it and/or modify it
3684# under the terms of the GNU General Public License version 2 only, as
3685# published by the Free Software Foundation.  Oracle designates this
3686# particular file as subject to the "Classpath" exception as provided
3687# by Oracle in the LICENSE file that accompanied this code.
3688#
3689# This code is distributed in the hope that it will be useful, but WITHOUT
3690# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3691# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3692# version 2 for more details (a copy is included in the LICENSE file that
3693# accompanied this code).
3694#
3695# You should have received a copy of the GNU General Public License version
3696# 2 along with this work; if not, write to the Free Software Foundation,
3697# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3698#
3699# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3700# or visit www.oracle.com if you need additional information or have any
3701# questions.
3702#
3703
3704
3705
3706
3707
3708# Documentation on common flags used for solstudio in HIGHEST.
3709#
3710# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3711#          done with care, there are some assumptions below that need to
3712#          be understood about the use of pointers, and IEEE behavior.
3713#
3714# -fns: Use non-standard floating point mode (not IEEE 754)
3715# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3716# -fsingle: Use single precision floating point with 'float'
3717# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3718#   (Source with excessing pointer casting and data access with mixed
3719#    pointer types are not recommended)
3720# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3721#   (If you expect perfect errno behavior, do not use this)
3722# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3723# -xrestrict: Pointer parameters to functions do not overlap
3724#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3725#    If you pass in multiple pointers to the same data, do not use this)
3726# -xlibmil: Inline some library routines
3727#   (If you expect perfect errno behavior, do not use this)
3728# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3729#   (If you expect perfect errno behavior, do not use this)
3730#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3731
3732    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3733    # Bug?
3734    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3735    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3736    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3737    #fi
3738
3739
3740
3741
3742
3743
3744# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3745#                                   [RUN-IF-FALSE])
3746# ------------------------------------------------------------
3747# Check that the c and c++ compilers support an argument
3748
3749
3750
3751
3752#
3753# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3755#
3756# This code is free software; you can redistribute it and/or modify it
3757# under the terms of the GNU General Public License version 2 only, as
3758# published by the Free Software Foundation.  Oracle designates this
3759# particular file as subject to the "Classpath" exception as provided
3760# by Oracle in the LICENSE file that accompanied this code.
3761#
3762# This code is distributed in the hope that it will be useful, but WITHOUT
3763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3765# version 2 for more details (a copy is included in the LICENSE file that
3766# accompanied this code).
3767#
3768# You should have received a copy of the GNU General Public License version
3769# 2 along with this work; if not, write to the Free Software Foundation,
3770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3771#
3772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3773# or visit www.oracle.com if you need additional information or have any
3774# questions.
3775#
3776
3777
3778
3779
3780
3781cygwin_help() {
3782  case $1 in
3783    unzip)
3784      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3785      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3786      ;;
3787    zip)
3788      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3789      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3790      ;;
3791    make)
3792      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3793      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3794      ;;
3795    freetype)
3796      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3797        HELP_MSG="To install freetype, run:
3798wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3799chmod +x /tmp/freetype-setup.exe
3800/tmp/freetype-setup.exe
3801Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3802After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3803      else
3804        HELP_MSG="You need to build a 64-bit version of freetype.
3805This is not readily available.
3806You can find source code and build instructions on
3807http://www.freetype.org/
3808If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3809      fi
3810      ;;
3811  esac
3812}
3813
3814msys_help() {
3815  PKGHANDLER_COMMAND=""
3816}
3817
3818apt_help() {
3819  case $1 in
3820    devkit)
3821      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3822    openjdk)
3823      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3824    alsa)
3825      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3826    cups)
3827      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3828    freetype)
3829      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3830    pulse)
3831      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3832    x11)
3833      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3834    ccache)
3835      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3836  esac
3837}
3838
3839yum_help() {
3840  case $1 in
3841    devkit)
3842      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3843    openjdk)
3844      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3845    alsa)
3846      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3847    cups)
3848      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3849    freetype)
3850      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3851    pulse)
3852      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3853    x11)
3854      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3855    ccache)
3856      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3857  esac
3858}
3859
3860port_help() {
3861  PKGHANDLER_COMMAND=""
3862}
3863
3864pkgutil_help() {
3865  PKGHANDLER_COMMAND=""
3866}
3867
3868pkgadd_help() {
3869  PKGHANDLER_COMMAND=""
3870}
3871
3872# This function will check if we're called from the "configure" wrapper while
3873# printing --help. If so, we will print out additional information that can
3874# only be extracted within the autoconf script, and then exit. This must be
3875# called at the very beginning in configure.ac.
3876
3877
3878
3879
3880#
3881# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3882# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3883#
3884# This code is free software; you can redistribute it and/or modify it
3885# under the terms of the GNU General Public License version 2 only, as
3886# published by the Free Software Foundation.  Oracle designates this
3887# particular file as subject to the "Classpath" exception as provided
3888# by Oracle in the LICENSE file that accompanied this code.
3889#
3890# This code is distributed in the hope that it will be useful, but WITHOUT
3891# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3892# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3893# version 2 for more details (a copy is included in the LICENSE file that
3894# accompanied this code).
3895#
3896# You should have received a copy of the GNU General Public License version
3897# 2 along with this work; if not, write to the Free Software Foundation,
3898# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3899#
3900# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3901# or visit www.oracle.com if you need additional information or have any
3902# questions.
3903#
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914###############################################################################
3915#
3916# Should we build only OpenJDK even if closed sources are present?
3917#
3918
3919
3920
3921
3922###############################################################################
3923#
3924# Setup version numbers
3925#
3926
3927
3928
3929
3930
3931
3932#
3933# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975#
3976# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3978#
3979# This code is free software; you can redistribute it and/or modify it
3980# under the terms of the GNU General Public License version 2 only, as
3981# published by the Free Software Foundation.  Oracle designates this
3982# particular file as subject to the "Classpath" exception as provided
3983# by Oracle in the LICENSE file that accompanied this code.
3984#
3985# This code is distributed in the hope that it will be useful, but WITHOUT
3986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3988# version 2 for more details (a copy is included in the LICENSE file that
3989# accompanied this code).
3990#
3991# You should have received a copy of the GNU General Public License version
3992# 2 along with this work; if not, write to the Free Software Foundation,
3993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3994#
3995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3996# or visit www.oracle.com if you need additional information or have any
3997# questions.
3998#
3999
4000# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4001# Converts autoconf style CPU name to OpenJDK style, into
4002# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4003
4004
4005# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4006# Converts autoconf style OS name to OpenJDK style, into
4007# VAR_OS and VAR_OS_API.
4008
4009
4010# Expects $host_os $host_cpu $build_os and $build_cpu
4011# and $with_target_bits to have been setup!
4012#
4013# Translate the standard triplet(quadruplet) definition
4014# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4015# OPENJDK_BUILD_OS, etc.
4016
4017
4018# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4019# accordingly. Must be done after setting up build and target system, but before
4020# doing anything else with these values.
4021
4022
4023# Setup the legacy variables, for controlling the old makefiles.
4024#
4025
4026
4027
4028
4029#%%% Build and target systems %%%
4030
4031
4032
4033
4034# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4035# Add -mX to various FLAGS variables.
4036
4037
4038
4039
4040
4041
4042#
4043# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4044# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4045#
4046# This code is free software; you can redistribute it and/or modify it
4047# under the terms of the GNU General Public License version 2 only, as
4048# published by the Free Software Foundation.  Oracle designates this
4049# particular file as subject to the "Classpath" exception as provided
4050# by Oracle in the LICENSE file that accompanied this code.
4051#
4052# This code is distributed in the hope that it will be useful, but WITHOUT
4053# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4054# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4055# version 2 for more details (a copy is included in the LICENSE file that
4056# accompanied this code).
4057#
4058# You should have received a copy of the GNU General Public License version
4059# 2 along with this work; if not, write to the Free Software Foundation,
4060# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4061#
4062# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4063# or visit www.oracle.com if you need additional information or have any
4064# questions.
4065#
4066
4067
4068
4069
4070
4071
4072
4073
4074#
4075# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4076# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4077#
4078# This code is free software; you can redistribute it and/or modify it
4079# under the terms of the GNU General Public License version 2 only, as
4080# published by the Free Software Foundation.  Oracle designates this
4081# particular file as subject to the "Classpath" exception as provided
4082# by Oracle in the LICENSE file that accompanied this code.
4083#
4084# This code is distributed in the hope that it will be useful, but WITHOUT
4085# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4086# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4087# version 2 for more details (a copy is included in the LICENSE file that
4088# accompanied this code).
4089#
4090# You should have received a copy of the GNU General Public License version
4091# 2 along with this work; if not, write to the Free Software Foundation,
4092# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4093#
4094# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4095# or visit www.oracle.com if you need additional information or have any
4096# questions.
4097#
4098
4099########################################################################
4100# This file is responsible for detecting, verifying and setting up the
4101# toolchain, i.e. the compiler, linker and related utilities. It will setup
4102# proper paths to the binaries, but it will not setup any flags.
4103#
4104# The binaries used is determined by the toolchain type, which is the family of
4105# compilers and related tools that are used.
4106########################################################################
4107
4108
4109# All valid toolchains, regardless of platform (used by help.m4)
4110VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4111
4112# These toolchains are valid on different platforms
4113VALID_TOOLCHAINS_linux="gcc clang"
4114VALID_TOOLCHAINS_solaris="solstudio"
4115VALID_TOOLCHAINS_macosx="gcc clang"
4116VALID_TOOLCHAINS_aix="xlc"
4117VALID_TOOLCHAINS_windows="microsoft"
4118
4119# Toolchain descriptions
4120TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4121TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4122TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4123TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4124TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4125
4126# Setup a number of variables describing how native output files are
4127# named on this platform/toolchain.
4128
4129
4130# Determine which toolchain type to use, and make sure it is valid for this
4131# platform. Setup various information about the selected toolchain.
4132
4133
4134# Before we start detecting the toolchain executables, we might need some
4135# special setup, e.g. additional paths etc.
4136
4137
4138# Restore path, etc
4139
4140
4141# Check if a compiler is of the toolchain type we expect, and save the version
4142# information from it. If the compiler does not match the expected type,
4143# this function will abort using AC_MSG_ERROR. If it matches, the version will
4144# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4145# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4146#
4147# $1 = compiler to test (CC or CXX)
4148# $2 = human readable name of compiler (C or C++)
4149
4150
4151# Try to locate the given C or C++ compiler in the path, or otherwise.
4152#
4153# $1 = compiler to test (CC or CXX)
4154# $2 = human readable name of compiler (C or C++)
4155# $3 = list of compiler names to search for
4156
4157
4158# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4159# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4160# archiver (AR). Verify that the compilers are correct according to the
4161# toolchain type.
4162
4163
4164# Setup additional tools that is considered a part of the toolchain, but not the
4165# core part. Many of these are highly platform-specific and do not exist,
4166# and/or are not needed on all platforms.
4167
4168
4169# Setup the build tools (i.e, the compiler and linker used to build programs
4170# that should be run on the build platform, not the target platform, as a build
4171# helper). Since the non-cross-compile case uses the normal, target compilers
4172# for this, we can only do this after these have been setup.
4173
4174
4175# Setup legacy variables that are still needed as alternative ways to refer to
4176# parts of the toolchain.
4177
4178
4179# Do some additional checks on the detected tools.
4180
4181
4182# Setup the JTReg Regression Test Harness.
4183
4184
4185#
4186# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4187# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4188#
4189# This code is free software; you can redistribute it and/or modify it
4190# under the terms of the GNU General Public License version 2 only, as
4191# published by the Free Software Foundation.  Oracle designates this
4192# particular file as subject to the "Classpath" exception as provided
4193# by Oracle in the LICENSE file that accompanied this code.
4194#
4195# This code is distributed in the hope that it will be useful, but WITHOUT
4196# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4197# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4198# version 2 for more details (a copy is included in the LICENSE file that
4199# accompanied this code).
4200#
4201# You should have received a copy of the GNU General Public License version
4202# 2 along with this work; if not, write to the Free Software Foundation,
4203# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4204#
4205# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4206# or visit www.oracle.com if you need additional information or have any
4207# questions.
4208#
4209
4210
4211
4212
4213
4214
4215
4216# Check if the VS env variables were setup prior to running configure.
4217# If not, then find vcvarsall.bat and run it automatically, and integrate
4218# the set env variables into the spec file.
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229# This line needs to be here, verbatim, after all includes and the dummy hook
4230# definitions. It is replaced with custom functionality when building
4231# custom sources.
4232#CUSTOM_AUTOCONF_INCLUDE
4233
4234# Do not change or remove the following line, it is needed for consistency checks:
4235DATE_WHEN_GENERATED=1394794899
4236
4237###############################################################################
4238#
4239# Initialization / Boot-strapping
4240#
4241# The bootstrapping process needs to solve the "chicken or the egg" problem,
4242# thus it jumps back and forth, each time gaining something needed later on.
4243#
4244###############################################################################
4245
4246# If we are requested to print additional help, do that and then exit.
4247# This must be the very first call.
4248
4249  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4250    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4251    $PRINTF "Which are valid to use depends on the build platform.\n"
4252    for toolchain in $VALID_TOOLCHAINS_all; do
4253      # Use indirect variable referencing
4254      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4255      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4256      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4257    done
4258
4259    # And now exit directly
4260    exit 0
4261  fi
4262
4263
4264# Basic initialization that must happen first of all in the normal process.
4265
4266  # Save the original command line. This is passed to us by the wrapper configure script.
4267
4268  DATE_WHEN_CONFIGURED=`LANG=C date`
4269
4270  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4271$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4273$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4274
4275
4276  # Start with tools that do not need have cross compilation support
4277  # and can be expected to be found in the default PATH. These tools are
4278  # used by configure. Nor are these tools expected to be found in the
4279  # devkit from the builddeps server either, since they are
4280  # needed to download the devkit.
4281
4282  # First are all the simple required tools.
4283
4284
4285
4286  # Publish this variable in the help.
4287
4288
4289  if test "x$BASENAME" = x; then
4290    # The variable is not set by user, try to locate tool using the code snippet
4291    for ac_prog in basename
4292do
4293  # Extract the first word of "$ac_prog", so it can be a program name with args.
4294set dummy $ac_prog; ac_word=$2
4295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4296$as_echo_n "checking for $ac_word... " >&6; }
4297if ${ac_cv_path_BASENAME+:} false; then :
4298  $as_echo_n "(cached) " >&6
4299else
4300  case $BASENAME in
4301  [\\/]* | ?:[\\/]*)
4302  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4303  ;;
4304  *)
4305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4306for as_dir in $PATH
4307do
4308  IFS=$as_save_IFS
4309  test -z "$as_dir" && as_dir=.
4310    for ac_exec_ext in '' $ac_executable_extensions; do
4311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4312    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4314    break 2
4315  fi
4316done
4317  done
4318IFS=$as_save_IFS
4319
4320  ;;
4321esac
4322fi
4323BASENAME=$ac_cv_path_BASENAME
4324if test -n "$BASENAME"; then
4325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4326$as_echo "$BASENAME" >&6; }
4327else
4328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4329$as_echo "no" >&6; }
4330fi
4331
4332
4333  test -n "$BASENAME" && break
4334done
4335
4336  else
4337    # The variable is set, but is it from the command line or the environment?
4338
4339    # Try to remove the string !BASENAME! from our list.
4340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4342      # If it failed, the variable was not from the command line. Ignore it,
4343      # but warn the user (except for BASH, which is always set by the calling BASH).
4344      if test "xBASENAME" != xBASH; then
4345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4346$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4347      fi
4348      # Try to locate tool using the code snippet
4349      for ac_prog in basename
4350do
4351  # Extract the first word of "$ac_prog", so it can be a program name with args.
4352set dummy $ac_prog; ac_word=$2
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
4355if ${ac_cv_path_BASENAME+:} false; then :
4356  $as_echo_n "(cached) " >&6
4357else
4358  case $BASENAME in
4359  [\\/]* | ?:[\\/]*)
4360  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4361  ;;
4362  *)
4363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366  IFS=$as_save_IFS
4367  test -z "$as_dir" && as_dir=.
4368    for ac_exec_ext in '' $ac_executable_extensions; do
4369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4370    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372    break 2
4373  fi
4374done
4375  done
4376IFS=$as_save_IFS
4377
4378  ;;
4379esac
4380fi
4381BASENAME=$ac_cv_path_BASENAME
4382if test -n "$BASENAME"; then
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4384$as_echo "$BASENAME" >&6; }
4385else
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
4389
4390
4391  test -n "$BASENAME" && break
4392done
4393
4394    else
4395      # If it succeeded, then it was overridden by the user. We will use it
4396      # for the tool.
4397
4398      # First remove it from the list of overridden variables, so we can test
4399      # for unknown variables in the end.
4400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4401
4402      # Check if the provided tool contains a complete path.
4403      tool_specified="$BASENAME"
4404      tool_basename="${tool_specified##*/}"
4405      if test "x$tool_basename" = "x$tool_specified"; then
4406        # A command without a complete path is provided, search $PATH.
4407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4408$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4409        # Extract the first word of "$tool_basename", so it can be a program name with args.
4410set dummy $tool_basename; ac_word=$2
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412$as_echo_n "checking for $ac_word... " >&6; }
4413if ${ac_cv_path_BASENAME+:} false; then :
4414  $as_echo_n "(cached) " >&6
4415else
4416  case $BASENAME in
4417  [\\/]* | ?:[\\/]*)
4418  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4419  ;;
4420  *)
4421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424  IFS=$as_save_IFS
4425  test -z "$as_dir" && as_dir=.
4426    for ac_exec_ext in '' $ac_executable_extensions; do
4427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4428    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430    break 2
4431  fi
4432done
4433  done
4434IFS=$as_save_IFS
4435
4436  ;;
4437esac
4438fi
4439BASENAME=$ac_cv_path_BASENAME
4440if test -n "$BASENAME"; then
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4442$as_echo "$BASENAME" >&6; }
4443else
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449        if test "x$BASENAME" = x; then
4450          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4451        fi
4452      else
4453        # Otherwise we believe it is a complete path. Use it as it is.
4454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4455$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4457$as_echo_n "checking for BASENAME... " >&6; }
4458        if test ! -x "$tool_specified"; then
4459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4460$as_echo "not found" >&6; }
4461          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4462        fi
4463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4464$as_echo "$tool_specified" >&6; }
4465      fi
4466    fi
4467  fi
4468
4469
4470
4471  if test "x$BASENAME" = x; then
4472    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4473  fi
4474
4475
4476
4477
4478
4479  # Publish this variable in the help.
4480
4481
4482  if test "x$BASH" = x; then
4483    # The variable is not set by user, try to locate tool using the code snippet
4484    for ac_prog in bash
4485do
4486  # Extract the first word of "$ac_prog", so it can be a program name with args.
4487set dummy $ac_prog; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
4490if ${ac_cv_path_BASH+:} false; then :
4491  $as_echo_n "(cached) " >&6
4492else
4493  case $BASH in
4494  [\\/]* | ?:[\\/]*)
4495  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4496  ;;
4497  *)
4498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in $PATH
4500do
4501  IFS=$as_save_IFS
4502  test -z "$as_dir" && as_dir=.
4503    for ac_exec_ext in '' $ac_executable_extensions; do
4504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4505    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507    break 2
4508  fi
4509done
4510  done
4511IFS=$as_save_IFS
4512
4513  ;;
4514esac
4515fi
4516BASH=$ac_cv_path_BASH
4517if test -n "$BASH"; then
4518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4519$as_echo "$BASH" >&6; }
4520else
4521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525
4526  test -n "$BASH" && break
4527done
4528
4529  else
4530    # The variable is set, but is it from the command line or the environment?
4531
4532    # Try to remove the string !BASH! from our list.
4533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4535      # If it failed, the variable was not from the command line. Ignore it,
4536      # but warn the user (except for BASH, which is always set by the calling BASH).
4537      if test "xBASH" != xBASH; then
4538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4539$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4540      fi
4541      # Try to locate tool using the code snippet
4542      for ac_prog in bash
4543do
4544  # Extract the first word of "$ac_prog", so it can be a program name with args.
4545set dummy $ac_prog; ac_word=$2
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4547$as_echo_n "checking for $ac_word... " >&6; }
4548if ${ac_cv_path_BASH+:} false; then :
4549  $as_echo_n "(cached) " >&6
4550else
4551  case $BASH in
4552  [\\/]* | ?:[\\/]*)
4553  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4554  ;;
4555  *)
4556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557for as_dir in $PATH
4558do
4559  IFS=$as_save_IFS
4560  test -z "$as_dir" && as_dir=.
4561    for ac_exec_ext in '' $ac_executable_extensions; do
4562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4563    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4565    break 2
4566  fi
4567done
4568  done
4569IFS=$as_save_IFS
4570
4571  ;;
4572esac
4573fi
4574BASH=$ac_cv_path_BASH
4575if test -n "$BASH"; then
4576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4577$as_echo "$BASH" >&6; }
4578else
4579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583
4584  test -n "$BASH" && break
4585done
4586
4587    else
4588      # If it succeeded, then it was overridden by the user. We will use it
4589      # for the tool.
4590
4591      # First remove it from the list of overridden variables, so we can test
4592      # for unknown variables in the end.
4593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4594
4595      # Check if the provided tool contains a complete path.
4596      tool_specified="$BASH"
4597      tool_basename="${tool_specified##*/}"
4598      if test "x$tool_basename" = "x$tool_specified"; then
4599        # A command without a complete path is provided, search $PATH.
4600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4601$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4602        # Extract the first word of "$tool_basename", so it can be a program name with args.
4603set dummy $tool_basename; ac_word=$2
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4605$as_echo_n "checking for $ac_word... " >&6; }
4606if ${ac_cv_path_BASH+:} false; then :
4607  $as_echo_n "(cached) " >&6
4608else
4609  case $BASH in
4610  [\\/]* | ?:[\\/]*)
4611  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4612  ;;
4613  *)
4614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4615for as_dir in $PATH
4616do
4617  IFS=$as_save_IFS
4618  test -z "$as_dir" && as_dir=.
4619    for ac_exec_ext in '' $ac_executable_extensions; do
4620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4621    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4623    break 2
4624  fi
4625done
4626  done
4627IFS=$as_save_IFS
4628
4629  ;;
4630esac
4631fi
4632BASH=$ac_cv_path_BASH
4633if test -n "$BASH"; then
4634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4635$as_echo "$BASH" >&6; }
4636else
4637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4638$as_echo "no" >&6; }
4639fi
4640
4641
4642        if test "x$BASH" = x; then
4643          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4644        fi
4645      else
4646        # Otherwise we believe it is a complete path. Use it as it is.
4647        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4648$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4650$as_echo_n "checking for BASH... " >&6; }
4651        if test ! -x "$tool_specified"; then
4652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4653$as_echo "not found" >&6; }
4654          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4655        fi
4656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4657$as_echo "$tool_specified" >&6; }
4658      fi
4659    fi
4660  fi
4661
4662
4663
4664  if test "x$BASH" = x; then
4665    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4666  fi
4667
4668
4669
4670
4671
4672  # Publish this variable in the help.
4673
4674
4675  if test "x$CAT" = x; then
4676    # The variable is not set by user, try to locate tool using the code snippet
4677    for ac_prog in cat
4678do
4679  # Extract the first word of "$ac_prog", so it can be a program name with args.
4680set dummy $ac_prog; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_CAT+:} false; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  case $CAT in
4687  [\\/]* | ?:[\\/]*)
4688  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4689  ;;
4690  *)
4691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694  IFS=$as_save_IFS
4695  test -z "$as_dir" && as_dir=.
4696    for ac_exec_ext in '' $ac_executable_extensions; do
4697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4698    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700    break 2
4701  fi
4702done
4703  done
4704IFS=$as_save_IFS
4705
4706  ;;
4707esac
4708fi
4709CAT=$ac_cv_path_CAT
4710if test -n "$CAT"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4712$as_echo "$CAT" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$CAT" && break
4720done
4721
4722  else
4723    # The variable is set, but is it from the command line or the environment?
4724
4725    # Try to remove the string !CAT! from our list.
4726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4728      # If it failed, the variable was not from the command line. Ignore it,
4729      # but warn the user (except for BASH, which is always set by the calling BASH).
4730      if test "xCAT" != xBASH; then
4731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4732$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4733      fi
4734      # Try to locate tool using the code snippet
4735      for ac_prog in cat
4736do
4737  # Extract the first word of "$ac_prog", so it can be a program name with args.
4738set dummy $ac_prog; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if ${ac_cv_path_CAT+:} false; then :
4742  $as_echo_n "(cached) " >&6
4743else
4744  case $CAT in
4745  [\\/]* | ?:[\\/]*)
4746  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4747  ;;
4748  *)
4749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752  IFS=$as_save_IFS
4753  test -z "$as_dir" && as_dir=.
4754    for ac_exec_ext in '' $ac_executable_extensions; do
4755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4756    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758    break 2
4759  fi
4760done
4761  done
4762IFS=$as_save_IFS
4763
4764  ;;
4765esac
4766fi
4767CAT=$ac_cv_path_CAT
4768if test -n "$CAT"; then
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4770$as_echo "$CAT" >&6; }
4771else
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777  test -n "$CAT" && break
4778done
4779
4780    else
4781      # If it succeeded, then it was overridden by the user. We will use it
4782      # for the tool.
4783
4784      # First remove it from the list of overridden variables, so we can test
4785      # for unknown variables in the end.
4786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4787
4788      # Check if the provided tool contains a complete path.
4789      tool_specified="$CAT"
4790      tool_basename="${tool_specified##*/}"
4791      if test "x$tool_basename" = "x$tool_specified"; then
4792        # A command without a complete path is provided, search $PATH.
4793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4794$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4795        # Extract the first word of "$tool_basename", so it can be a program name with args.
4796set dummy $tool_basename; ac_word=$2
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4798$as_echo_n "checking for $ac_word... " >&6; }
4799if ${ac_cv_path_CAT+:} false; then :
4800  $as_echo_n "(cached) " >&6
4801else
4802  case $CAT in
4803  [\\/]* | ?:[\\/]*)
4804  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4805  ;;
4806  *)
4807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4808for as_dir in $PATH
4809do
4810  IFS=$as_save_IFS
4811  test -z "$as_dir" && as_dir=.
4812    for ac_exec_ext in '' $ac_executable_extensions; do
4813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4814    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4816    break 2
4817  fi
4818done
4819  done
4820IFS=$as_save_IFS
4821
4822  ;;
4823esac
4824fi
4825CAT=$ac_cv_path_CAT
4826if test -n "$CAT"; then
4827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4828$as_echo "$CAT" >&6; }
4829else
4830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4831$as_echo "no" >&6; }
4832fi
4833
4834
4835        if test "x$CAT" = x; then
4836          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4837        fi
4838      else
4839        # Otherwise we believe it is a complete path. Use it as it is.
4840        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4841$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4843$as_echo_n "checking for CAT... " >&6; }
4844        if test ! -x "$tool_specified"; then
4845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4846$as_echo "not found" >&6; }
4847          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4848        fi
4849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4850$as_echo "$tool_specified" >&6; }
4851      fi
4852    fi
4853  fi
4854
4855
4856
4857  if test "x$CAT" = x; then
4858    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4859  fi
4860
4861
4862
4863
4864
4865  # Publish this variable in the help.
4866
4867
4868  if test "x$CHMOD" = x; then
4869    # The variable is not set by user, try to locate tool using the code snippet
4870    for ac_prog in chmod
4871do
4872  # Extract the first word of "$ac_prog", so it can be a program name with args.
4873set dummy $ac_prog; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if ${ac_cv_path_CHMOD+:} false; then :
4877  $as_echo_n "(cached) " >&6
4878else
4879  case $CHMOD in
4880  [\\/]* | ?:[\\/]*)
4881  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4882  ;;
4883  *)
4884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887  IFS=$as_save_IFS
4888  test -z "$as_dir" && as_dir=.
4889    for ac_exec_ext in '' $ac_executable_extensions; do
4890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4891    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893    break 2
4894  fi
4895done
4896  done
4897IFS=$as_save_IFS
4898
4899  ;;
4900esac
4901fi
4902CHMOD=$ac_cv_path_CHMOD
4903if test -n "$CHMOD"; then
4904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4905$as_echo "$CHMOD" >&6; }
4906else
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
4911
4912  test -n "$CHMOD" && break
4913done
4914
4915  else
4916    # The variable is set, but is it from the command line or the environment?
4917
4918    # Try to remove the string !CHMOD! from our list.
4919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4921      # If it failed, the variable was not from the command line. Ignore it,
4922      # but warn the user (except for BASH, which is always set by the calling BASH).
4923      if test "xCHMOD" != xBASH; then
4924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4925$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4926      fi
4927      # Try to locate tool using the code snippet
4928      for ac_prog in chmod
4929do
4930  # Extract the first word of "$ac_prog", so it can be a program name with args.
4931set dummy $ac_prog; ac_word=$2
4932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_CHMOD+:} false; then :
4935  $as_echo_n "(cached) " >&6
4936else
4937  case $CHMOD in
4938  [\\/]* | ?:[\\/]*)
4939  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4940  ;;
4941  *)
4942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in $PATH
4944do
4945  IFS=$as_save_IFS
4946  test -z "$as_dir" && as_dir=.
4947    for ac_exec_ext in '' $ac_executable_extensions; do
4948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4949    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951    break 2
4952  fi
4953done
4954  done
4955IFS=$as_save_IFS
4956
4957  ;;
4958esac
4959fi
4960CHMOD=$ac_cv_path_CHMOD
4961if test -n "$CHMOD"; then
4962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4963$as_echo "$CHMOD" >&6; }
4964else
4965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
4969
4970  test -n "$CHMOD" && break
4971done
4972
4973    else
4974      # If it succeeded, then it was overridden by the user. We will use it
4975      # for the tool.
4976
4977      # First remove it from the list of overridden variables, so we can test
4978      # for unknown variables in the end.
4979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4980
4981      # Check if the provided tool contains a complete path.
4982      tool_specified="$CHMOD"
4983      tool_basename="${tool_specified##*/}"
4984      if test "x$tool_basename" = "x$tool_specified"; then
4985        # A command without a complete path is provided, search $PATH.
4986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4987$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4988        # Extract the first word of "$tool_basename", so it can be a program name with args.
4989set dummy $tool_basename; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_CHMOD+:} false; then :
4993  $as_echo_n "(cached) " >&6
4994else
4995  case $CHMOD in
4996  [\\/]* | ?:[\\/]*)
4997  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4998  ;;
4999  *)
5000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in $PATH
5002do
5003  IFS=$as_save_IFS
5004  test -z "$as_dir" && as_dir=.
5005    for ac_exec_ext in '' $ac_executable_extensions; do
5006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009    break 2
5010  fi
5011done
5012  done
5013IFS=$as_save_IFS
5014
5015  ;;
5016esac
5017fi
5018CHMOD=$ac_cv_path_CHMOD
5019if test -n "$CHMOD"; then
5020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5021$as_echo "$CHMOD" >&6; }
5022else
5023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027
5028        if test "x$CHMOD" = x; then
5029          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5030        fi
5031      else
5032        # Otherwise we believe it is a complete path. Use it as it is.
5033        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5034$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5036$as_echo_n "checking for CHMOD... " >&6; }
5037        if test ! -x "$tool_specified"; then
5038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5039$as_echo "not found" >&6; }
5040          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5041        fi
5042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5043$as_echo "$tool_specified" >&6; }
5044      fi
5045    fi
5046  fi
5047
5048
5049
5050  if test "x$CHMOD" = x; then
5051    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5052  fi
5053
5054
5055
5056
5057
5058  # Publish this variable in the help.
5059
5060
5061  if test "x$CMP" = x; then
5062    # The variable is not set by user, try to locate tool using the code snippet
5063    for ac_prog in cmp
5064do
5065  # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
5069if ${ac_cv_path_CMP+:} false; then :
5070  $as_echo_n "(cached) " >&6
5071else
5072  case $CMP in
5073  [\\/]* | ?:[\\/]*)
5074  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5075  ;;
5076  *)
5077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080  IFS=$as_save_IFS
5081  test -z "$as_dir" && as_dir=.
5082    for ac_exec_ext in '' $ac_executable_extensions; do
5083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5084    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086    break 2
5087  fi
5088done
5089  done
5090IFS=$as_save_IFS
5091
5092  ;;
5093esac
5094fi
5095CMP=$ac_cv_path_CMP
5096if test -n "$CMP"; then
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5098$as_echo "$CMP" >&6; }
5099else
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
5102fi
5103
5104
5105  test -n "$CMP" && break
5106done
5107
5108  else
5109    # The variable is set, but is it from the command line or the environment?
5110
5111    # Try to remove the string !CMP! from our list.
5112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5114      # If it failed, the variable was not from the command line. Ignore it,
5115      # but warn the user (except for BASH, which is always set by the calling BASH).
5116      if test "xCMP" != xBASH; then
5117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5118$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5119      fi
5120      # Try to locate tool using the code snippet
5121      for ac_prog in cmp
5122do
5123  # Extract the first word of "$ac_prog", so it can be a program name with args.
5124set dummy $ac_prog; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_path_CMP+:} false; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  case $CMP in
5131  [\\/]* | ?:[\\/]*)
5132  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5133  ;;
5134  *)
5135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138  IFS=$as_save_IFS
5139  test -z "$as_dir" && as_dir=.
5140    for ac_exec_ext in '' $ac_executable_extensions; do
5141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144    break 2
5145  fi
5146done
5147  done
5148IFS=$as_save_IFS
5149
5150  ;;
5151esac
5152fi
5153CMP=$ac_cv_path_CMP
5154if test -n "$CMP"; then
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5156$as_echo "$CMP" >&6; }
5157else
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163  test -n "$CMP" && break
5164done
5165
5166    else
5167      # If it succeeded, then it was overridden by the user. We will use it
5168      # for the tool.
5169
5170      # First remove it from the list of overridden variables, so we can test
5171      # for unknown variables in the end.
5172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5173
5174      # Check if the provided tool contains a complete path.
5175      tool_specified="$CMP"
5176      tool_basename="${tool_specified##*/}"
5177      if test "x$tool_basename" = "x$tool_specified"; then
5178        # A command without a complete path is provided, search $PATH.
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5180$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5181        # Extract the first word of "$tool_basename", so it can be a program name with args.
5182set dummy $tool_basename; ac_word=$2
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184$as_echo_n "checking for $ac_word... " >&6; }
5185if ${ac_cv_path_CMP+:} false; then :
5186  $as_echo_n "(cached) " >&6
5187else
5188  case $CMP in
5189  [\\/]* | ?:[\\/]*)
5190  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5191  ;;
5192  *)
5193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5194for as_dir in $PATH
5195do
5196  IFS=$as_save_IFS
5197  test -z "$as_dir" && as_dir=.
5198    for ac_exec_ext in '' $ac_executable_extensions; do
5199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5200    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5202    break 2
5203  fi
5204done
5205  done
5206IFS=$as_save_IFS
5207
5208  ;;
5209esac
5210fi
5211CMP=$ac_cv_path_CMP
5212if test -n "$CMP"; then
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5214$as_echo "$CMP" >&6; }
5215else
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217$as_echo "no" >&6; }
5218fi
5219
5220
5221        if test "x$CMP" = x; then
5222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5223        fi
5224      else
5225        # Otherwise we believe it is a complete path. Use it as it is.
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5227$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5229$as_echo_n "checking for CMP... " >&6; }
5230        if test ! -x "$tool_specified"; then
5231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5232$as_echo "not found" >&6; }
5233          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5234        fi
5235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5236$as_echo "$tool_specified" >&6; }
5237      fi
5238    fi
5239  fi
5240
5241
5242
5243  if test "x$CMP" = x; then
5244    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5245  fi
5246
5247
5248
5249
5250
5251  # Publish this variable in the help.
5252
5253
5254  if test "x$COMM" = x; then
5255    # The variable is not set by user, try to locate tool using the code snippet
5256    for ac_prog in comm
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
5262if ${ac_cv_path_COMM+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265  case $COMM in
5266  [\\/]* | ?:[\\/]*)
5267  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5268  ;;
5269  *)
5270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273  IFS=$as_save_IFS
5274  test -z "$as_dir" && as_dir=.
5275    for ac_exec_ext in '' $ac_executable_extensions; do
5276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279    break 2
5280  fi
5281done
5282  done
5283IFS=$as_save_IFS
5284
5285  ;;
5286esac
5287fi
5288COMM=$ac_cv_path_COMM
5289if test -n "$COMM"; then
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5291$as_echo "$COMM" >&6; }
5292else
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
5298  test -n "$COMM" && break
5299done
5300
5301  else
5302    # The variable is set, but is it from the command line or the environment?
5303
5304    # Try to remove the string !COMM! from our list.
5305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5307      # If it failed, the variable was not from the command line. Ignore it,
5308      # but warn the user (except for BASH, which is always set by the calling BASH).
5309      if test "xCOMM" != xBASH; then
5310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5311$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5312      fi
5313      # Try to locate tool using the code snippet
5314      for ac_prog in comm
5315do
5316  # Extract the first word of "$ac_prog", so it can be a program name with args.
5317set dummy $ac_prog; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if ${ac_cv_path_COMM+:} false; then :
5321  $as_echo_n "(cached) " >&6
5322else
5323  case $COMM in
5324  [\\/]* | ?:[\\/]*)
5325  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5326  ;;
5327  *)
5328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  test -z "$as_dir" && as_dir=.
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5335    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343  ;;
5344esac
5345fi
5346COMM=$ac_cv_path_COMM
5347if test -n "$COMM"; then
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5349$as_echo "$COMM" >&6; }
5350else
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356  test -n "$COMM" && break
5357done
5358
5359    else
5360      # If it succeeded, then it was overridden by the user. We will use it
5361      # for the tool.
5362
5363      # First remove it from the list of overridden variables, so we can test
5364      # for unknown variables in the end.
5365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5366
5367      # Check if the provided tool contains a complete path.
5368      tool_specified="$COMM"
5369      tool_basename="${tool_specified##*/}"
5370      if test "x$tool_basename" = "x$tool_specified"; then
5371        # A command without a complete path is provided, search $PATH.
5372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5373$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5374        # Extract the first word of "$tool_basename", so it can be a program name with args.
5375set dummy $tool_basename; ac_word=$2
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5377$as_echo_n "checking for $ac_word... " >&6; }
5378if ${ac_cv_path_COMM+:} false; then :
5379  $as_echo_n "(cached) " >&6
5380else
5381  case $COMM in
5382  [\\/]* | ?:[\\/]*)
5383  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5384  ;;
5385  *)
5386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387for as_dir in $PATH
5388do
5389  IFS=$as_save_IFS
5390  test -z "$as_dir" && as_dir=.
5391    for ac_exec_ext in '' $ac_executable_extensions; do
5392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5393    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5395    break 2
5396  fi
5397done
5398  done
5399IFS=$as_save_IFS
5400
5401  ;;
5402esac
5403fi
5404COMM=$ac_cv_path_COMM
5405if test -n "$COMM"; then
5406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5407$as_echo "$COMM" >&6; }
5408else
5409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5410$as_echo "no" >&6; }
5411fi
5412
5413
5414        if test "x$COMM" = x; then
5415          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5416        fi
5417      else
5418        # Otherwise we believe it is a complete path. Use it as it is.
5419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5420$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5422$as_echo_n "checking for COMM... " >&6; }
5423        if test ! -x "$tool_specified"; then
5424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5425$as_echo "not found" >&6; }
5426          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5427        fi
5428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5429$as_echo "$tool_specified" >&6; }
5430      fi
5431    fi
5432  fi
5433
5434
5435
5436  if test "x$COMM" = x; then
5437    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5438  fi
5439
5440
5441
5442
5443
5444  # Publish this variable in the help.
5445
5446
5447  if test "x$CP" = x; then
5448    # The variable is not set by user, try to locate tool using the code snippet
5449    for ac_prog in cp
5450do
5451  # Extract the first word of "$ac_prog", so it can be a program name with args.
5452set dummy $ac_prog; ac_word=$2
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454$as_echo_n "checking for $ac_word... " >&6; }
5455if ${ac_cv_path_CP+:} false; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458  case $CP in
5459  [\\/]* | ?:[\\/]*)
5460  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5461  ;;
5462  *)
5463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464for as_dir in $PATH
5465do
5466  IFS=$as_save_IFS
5467  test -z "$as_dir" && as_dir=.
5468    for ac_exec_ext in '' $ac_executable_extensions; do
5469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472    break 2
5473  fi
5474done
5475  done
5476IFS=$as_save_IFS
5477
5478  ;;
5479esac
5480fi
5481CP=$ac_cv_path_CP
5482if test -n "$CP"; then
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5484$as_echo "$CP" >&6; }
5485else
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
5488fi
5489
5490
5491  test -n "$CP" && break
5492done
5493
5494  else
5495    # The variable is set, but is it from the command line or the environment?
5496
5497    # Try to remove the string !CP! from our list.
5498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5500      # If it failed, the variable was not from the command line. Ignore it,
5501      # but warn the user (except for BASH, which is always set by the calling BASH).
5502      if test "xCP" != xBASH; then
5503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5504$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5505      fi
5506      # Try to locate tool using the code snippet
5507      for ac_prog in cp
5508do
5509  # Extract the first word of "$ac_prog", so it can be a program name with args.
5510set dummy $ac_prog; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_CP+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $CP in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539CP=$ac_cv_path_CP
5540if test -n "$CP"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5542$as_echo "$CP" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549  test -n "$CP" && break
5550done
5551
5552    else
5553      # If it succeeded, then it was overridden by the user. We will use it
5554      # for the tool.
5555
5556      # First remove it from the list of overridden variables, so we can test
5557      # for unknown variables in the end.
5558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5559
5560      # Check if the provided tool contains a complete path.
5561      tool_specified="$CP"
5562      tool_basename="${tool_specified##*/}"
5563      if test "x$tool_basename" = "x$tool_specified"; then
5564        # A command without a complete path is provided, search $PATH.
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5566$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5567        # Extract the first word of "$tool_basename", so it can be a program name with args.
5568set dummy $tool_basename; ac_word=$2
5569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
5571if ${ac_cv_path_CP+:} false; then :
5572  $as_echo_n "(cached) " >&6
5573else
5574  case $CP in
5575  [\\/]* | ?:[\\/]*)
5576  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5577  ;;
5578  *)
5579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582  IFS=$as_save_IFS
5583  test -z "$as_dir" && as_dir=.
5584    for ac_exec_ext in '' $ac_executable_extensions; do
5585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588    break 2
5589  fi
5590done
5591  done
5592IFS=$as_save_IFS
5593
5594  ;;
5595esac
5596fi
5597CP=$ac_cv_path_CP
5598if test -n "$CP"; then
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5600$as_echo "$CP" >&6; }
5601else
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603$as_echo "no" >&6; }
5604fi
5605
5606
5607        if test "x$CP" = x; then
5608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5609        fi
5610      else
5611        # Otherwise we believe it is a complete path. Use it as it is.
5612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5613$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5615$as_echo_n "checking for CP... " >&6; }
5616        if test ! -x "$tool_specified"; then
5617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5618$as_echo "not found" >&6; }
5619          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5620        fi
5621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5622$as_echo "$tool_specified" >&6; }
5623      fi
5624    fi
5625  fi
5626
5627
5628
5629  if test "x$CP" = x; then
5630    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5631  fi
5632
5633
5634
5635
5636
5637  # Publish this variable in the help.
5638
5639
5640  if test "x$CPIO" = x; then
5641    # The variable is not set by user, try to locate tool using the code snippet
5642    for ac_prog in cpio
5643do
5644  # Extract the first word of "$ac_prog", so it can be a program name with args.
5645set dummy $ac_prog; ac_word=$2
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
5648if ${ac_cv_path_CPIO+:} false; then :
5649  $as_echo_n "(cached) " >&6
5650else
5651  case $CPIO in
5652  [\\/]* | ?:[\\/]*)
5653  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5654  ;;
5655  *)
5656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5657for as_dir in $PATH
5658do
5659  IFS=$as_save_IFS
5660  test -z "$as_dir" && as_dir=.
5661    for ac_exec_ext in '' $ac_executable_extensions; do
5662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5663    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5665    break 2
5666  fi
5667done
5668  done
5669IFS=$as_save_IFS
5670
5671  ;;
5672esac
5673fi
5674CPIO=$ac_cv_path_CPIO
5675if test -n "$CPIO"; then
5676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5677$as_echo "$CPIO" >&6; }
5678else
5679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
5681fi
5682
5683
5684  test -n "$CPIO" && break
5685done
5686
5687  else
5688    # The variable is set, but is it from the command line or the environment?
5689
5690    # Try to remove the string !CPIO! from our list.
5691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5693      # If it failed, the variable was not from the command line. Ignore it,
5694      # but warn the user (except for BASH, which is always set by the calling BASH).
5695      if test "xCPIO" != xBASH; then
5696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5697$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5698      fi
5699      # Try to locate tool using the code snippet
5700      for ac_prog in cpio
5701do
5702  # Extract the first word of "$ac_prog", so it can be a program name with args.
5703set dummy $ac_prog; ac_word=$2
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5705$as_echo_n "checking for $ac_word... " >&6; }
5706if ${ac_cv_path_CPIO+:} false; then :
5707  $as_echo_n "(cached) " >&6
5708else
5709  case $CPIO in
5710  [\\/]* | ?:[\\/]*)
5711  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5712  ;;
5713  *)
5714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717  IFS=$as_save_IFS
5718  test -z "$as_dir" && as_dir=.
5719    for ac_exec_ext in '' $ac_executable_extensions; do
5720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5721    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5723    break 2
5724  fi
5725done
5726  done
5727IFS=$as_save_IFS
5728
5729  ;;
5730esac
5731fi
5732CPIO=$ac_cv_path_CPIO
5733if test -n "$CPIO"; then
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5735$as_echo "$CPIO" >&6; }
5736else
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
5739fi
5740
5741
5742  test -n "$CPIO" && break
5743done
5744
5745    else
5746      # If it succeeded, then it was overridden by the user. We will use it
5747      # for the tool.
5748
5749      # First remove it from the list of overridden variables, so we can test
5750      # for unknown variables in the end.
5751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5752
5753      # Check if the provided tool contains a complete path.
5754      tool_specified="$CPIO"
5755      tool_basename="${tool_specified##*/}"
5756      if test "x$tool_basename" = "x$tool_specified"; then
5757        # A command without a complete path is provided, search $PATH.
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5759$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5760        # Extract the first word of "$tool_basename", so it can be a program name with args.
5761set dummy $tool_basename; ac_word=$2
5762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5763$as_echo_n "checking for $ac_word... " >&6; }
5764if ${ac_cv_path_CPIO+:} false; then :
5765  $as_echo_n "(cached) " >&6
5766else
5767  case $CPIO in
5768  [\\/]* | ?:[\\/]*)
5769  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5770  ;;
5771  *)
5772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5773for as_dir in $PATH
5774do
5775  IFS=$as_save_IFS
5776  test -z "$as_dir" && as_dir=.
5777    for ac_exec_ext in '' $ac_executable_extensions; do
5778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5779    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5781    break 2
5782  fi
5783done
5784  done
5785IFS=$as_save_IFS
5786
5787  ;;
5788esac
5789fi
5790CPIO=$ac_cv_path_CPIO
5791if test -n "$CPIO"; then
5792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5793$as_echo "$CPIO" >&6; }
5794else
5795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5796$as_echo "no" >&6; }
5797fi
5798
5799
5800        if test "x$CPIO" = x; then
5801          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5802        fi
5803      else
5804        # Otherwise we believe it is a complete path. Use it as it is.
5805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5806$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5808$as_echo_n "checking for CPIO... " >&6; }
5809        if test ! -x "$tool_specified"; then
5810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5811$as_echo "not found" >&6; }
5812          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5813        fi
5814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5815$as_echo "$tool_specified" >&6; }
5816      fi
5817    fi
5818  fi
5819
5820
5821
5822  if test "x$CPIO" = x; then
5823    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5824  fi
5825
5826
5827
5828
5829
5830  # Publish this variable in the help.
5831
5832
5833  if test "x$CUT" = x; then
5834    # The variable is not set by user, try to locate tool using the code snippet
5835    for ac_prog in cut
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_path_CUT+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $CUT in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867CUT=$ac_cv_path_CUT
5868if test -n "$CUT"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5870$as_echo "$CUT" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$CUT" && break
5878done
5879
5880  else
5881    # The variable is set, but is it from the command line or the environment?
5882
5883    # Try to remove the string !CUT! from our list.
5884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5886      # If it failed, the variable was not from the command line. Ignore it,
5887      # but warn the user (except for BASH, which is always set by the calling BASH).
5888      if test "xCUT" != xBASH; then
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5890$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5891      fi
5892      # Try to locate tool using the code snippet
5893      for ac_prog in cut
5894do
5895  # Extract the first word of "$ac_prog", so it can be a program name with args.
5896set dummy $ac_prog; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_path_CUT+:} false; then :
5900  $as_echo_n "(cached) " >&6
5901else
5902  case $CUT in
5903  [\\/]* | ?:[\\/]*)
5904  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5905  ;;
5906  *)
5907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910  IFS=$as_save_IFS
5911  test -z "$as_dir" && as_dir=.
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5914    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5916    break 2
5917  fi
5918done
5919  done
5920IFS=$as_save_IFS
5921
5922  ;;
5923esac
5924fi
5925CUT=$ac_cv_path_CUT
5926if test -n "$CUT"; then
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5928$as_echo "$CUT" >&6; }
5929else
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935  test -n "$CUT" && break
5936done
5937
5938    else
5939      # If it succeeded, then it was overridden by the user. We will use it
5940      # for the tool.
5941
5942      # First remove it from the list of overridden variables, so we can test
5943      # for unknown variables in the end.
5944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5945
5946      # Check if the provided tool contains a complete path.
5947      tool_specified="$CUT"
5948      tool_basename="${tool_specified##*/}"
5949      if test "x$tool_basename" = "x$tool_specified"; then
5950        # A command without a complete path is provided, search $PATH.
5951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5952$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5953        # Extract the first word of "$tool_basename", so it can be a program name with args.
5954set dummy $tool_basename; ac_word=$2
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
5957if ${ac_cv_path_CUT+:} false; then :
5958  $as_echo_n "(cached) " >&6
5959else
5960  case $CUT in
5961  [\\/]* | ?:[\\/]*)
5962  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5963  ;;
5964  *)
5965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968  IFS=$as_save_IFS
5969  test -z "$as_dir" && as_dir=.
5970    for ac_exec_ext in '' $ac_executable_extensions; do
5971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5972    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974    break 2
5975  fi
5976done
5977  done
5978IFS=$as_save_IFS
5979
5980  ;;
5981esac
5982fi
5983CUT=$ac_cv_path_CUT
5984if test -n "$CUT"; then
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5986$as_echo "$CUT" >&6; }
5987else
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993        if test "x$CUT" = x; then
5994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5995        fi
5996      else
5997        # Otherwise we believe it is a complete path. Use it as it is.
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5999$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6001$as_echo_n "checking for CUT... " >&6; }
6002        if test ! -x "$tool_specified"; then
6003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6004$as_echo "not found" >&6; }
6005          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6006        fi
6007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6008$as_echo "$tool_specified" >&6; }
6009      fi
6010    fi
6011  fi
6012
6013
6014
6015  if test "x$CUT" = x; then
6016    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6017  fi
6018
6019
6020
6021
6022
6023  # Publish this variable in the help.
6024
6025
6026  if test "x$DATE" = x; then
6027    # The variable is not set by user, try to locate tool using the code snippet
6028    for ac_prog in date
6029do
6030  # Extract the first word of "$ac_prog", so it can be a program name with args.
6031set dummy $ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_path_DATE+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  case $DATE in
6038  [\\/]* | ?:[\\/]*)
6039  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6040  ;;
6041  *)
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6049    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051    break 2
6052  fi
6053done
6054  done
6055IFS=$as_save_IFS
6056
6057  ;;
6058esac
6059fi
6060DATE=$ac_cv_path_DATE
6061if test -n "$DATE"; then
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6063$as_echo "$DATE" >&6; }
6064else
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070  test -n "$DATE" && break
6071done
6072
6073  else
6074    # The variable is set, but is it from the command line or the environment?
6075
6076    # Try to remove the string !DATE! from our list.
6077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6079      # If it failed, the variable was not from the command line. Ignore it,
6080      # but warn the user (except for BASH, which is always set by the calling BASH).
6081      if test "xDATE" != xBASH; then
6082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6083$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6084      fi
6085      # Try to locate tool using the code snippet
6086      for ac_prog in date
6087do
6088  # Extract the first word of "$ac_prog", so it can be a program name with args.
6089set dummy $ac_prog; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_path_DATE+:} false; then :
6093  $as_echo_n "(cached) " >&6
6094else
6095  case $DATE in
6096  [\\/]* | ?:[\\/]*)
6097  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6098  ;;
6099  *)
6100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103  IFS=$as_save_IFS
6104  test -z "$as_dir" && as_dir=.
6105    for ac_exec_ext in '' $ac_executable_extensions; do
6106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6107    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109    break 2
6110  fi
6111done
6112  done
6113IFS=$as_save_IFS
6114
6115  ;;
6116esac
6117fi
6118DATE=$ac_cv_path_DATE
6119if test -n "$DATE"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6121$as_echo "$DATE" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128  test -n "$DATE" && break
6129done
6130
6131    else
6132      # If it succeeded, then it was overridden by the user. We will use it
6133      # for the tool.
6134
6135      # First remove it from the list of overridden variables, so we can test
6136      # for unknown variables in the end.
6137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6138
6139      # Check if the provided tool contains a complete path.
6140      tool_specified="$DATE"
6141      tool_basename="${tool_specified##*/}"
6142      if test "x$tool_basename" = "x$tool_specified"; then
6143        # A command without a complete path is provided, search $PATH.
6144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6145$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6146        # Extract the first word of "$tool_basename", so it can be a program name with args.
6147set dummy $tool_basename; ac_word=$2
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6149$as_echo_n "checking for $ac_word... " >&6; }
6150if ${ac_cv_path_DATE+:} false; then :
6151  $as_echo_n "(cached) " >&6
6152else
6153  case $DATE in
6154  [\\/]* | ?:[\\/]*)
6155  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6156  ;;
6157  *)
6158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161  IFS=$as_save_IFS
6162  test -z "$as_dir" && as_dir=.
6163    for ac_exec_ext in '' $ac_executable_extensions; do
6164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6165    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6167    break 2
6168  fi
6169done
6170  done
6171IFS=$as_save_IFS
6172
6173  ;;
6174esac
6175fi
6176DATE=$ac_cv_path_DATE
6177if test -n "$DATE"; then
6178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6179$as_echo "$DATE" >&6; }
6180else
6181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6182$as_echo "no" >&6; }
6183fi
6184
6185
6186        if test "x$DATE" = x; then
6187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6188        fi
6189      else
6190        # Otherwise we believe it is a complete path. Use it as it is.
6191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6192$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6194$as_echo_n "checking for DATE... " >&6; }
6195        if test ! -x "$tool_specified"; then
6196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6197$as_echo "not found" >&6; }
6198          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6199        fi
6200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6201$as_echo "$tool_specified" >&6; }
6202      fi
6203    fi
6204  fi
6205
6206
6207
6208  if test "x$DATE" = x; then
6209    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6210  fi
6211
6212
6213
6214
6215
6216  # Publish this variable in the help.
6217
6218
6219  if test "x$DIFF" = x; then
6220    # The variable is not set by user, try to locate tool using the code snippet
6221    for ac_prog in gdiff diff
6222do
6223  # Extract the first word of "$ac_prog", so it can be a program name with args.
6224set dummy $ac_prog; ac_word=$2
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226$as_echo_n "checking for $ac_word... " >&6; }
6227if ${ac_cv_path_DIFF+:} false; then :
6228  $as_echo_n "(cached) " >&6
6229else
6230  case $DIFF in
6231  [\\/]* | ?:[\\/]*)
6232  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6233  ;;
6234  *)
6235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238  IFS=$as_save_IFS
6239  test -z "$as_dir" && as_dir=.
6240    for ac_exec_ext in '' $ac_executable_extensions; do
6241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6242    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244    break 2
6245  fi
6246done
6247  done
6248IFS=$as_save_IFS
6249
6250  ;;
6251esac
6252fi
6253DIFF=$ac_cv_path_DIFF
6254if test -n "$DIFF"; then
6255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6256$as_echo "$DIFF" >&6; }
6257else
6258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263  test -n "$DIFF" && break
6264done
6265
6266  else
6267    # The variable is set, but is it from the command line or the environment?
6268
6269    # Try to remove the string !DIFF! from our list.
6270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6272      # If it failed, the variable was not from the command line. Ignore it,
6273      # but warn the user (except for BASH, which is always set by the calling BASH).
6274      if test "xDIFF" != xBASH; then
6275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6276$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6277      fi
6278      # Try to locate tool using the code snippet
6279      for ac_prog in gdiff diff
6280do
6281  # Extract the first word of "$ac_prog", so it can be a program name with args.
6282set dummy $ac_prog; ac_word=$2
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284$as_echo_n "checking for $ac_word... " >&6; }
6285if ${ac_cv_path_DIFF+:} false; then :
6286  $as_echo_n "(cached) " >&6
6287else
6288  case $DIFF in
6289  [\\/]* | ?:[\\/]*)
6290  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6291  ;;
6292  *)
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6300    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308  ;;
6309esac
6310fi
6311DIFF=$ac_cv_path_DIFF
6312if test -n "$DIFF"; then
6313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6314$as_echo "$DIFF" >&6; }
6315else
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318fi
6319
6320
6321  test -n "$DIFF" && break
6322done
6323
6324    else
6325      # If it succeeded, then it was overridden by the user. We will use it
6326      # for the tool.
6327
6328      # First remove it from the list of overridden variables, so we can test
6329      # for unknown variables in the end.
6330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6331
6332      # Check if the provided tool contains a complete path.
6333      tool_specified="$DIFF"
6334      tool_basename="${tool_specified##*/}"
6335      if test "x$tool_basename" = "x$tool_specified"; then
6336        # A command without a complete path is provided, search $PATH.
6337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6338$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6339        # Extract the first word of "$tool_basename", so it can be a program name with args.
6340set dummy $tool_basename; ac_word=$2
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6342$as_echo_n "checking for $ac_word... " >&6; }
6343if ${ac_cv_path_DIFF+:} false; then :
6344  $as_echo_n "(cached) " >&6
6345else
6346  case $DIFF in
6347  [\\/]* | ?:[\\/]*)
6348  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6349  ;;
6350  *)
6351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6352for as_dir in $PATH
6353do
6354  IFS=$as_save_IFS
6355  test -z "$as_dir" && as_dir=.
6356    for ac_exec_ext in '' $ac_executable_extensions; do
6357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6358    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6360    break 2
6361  fi
6362done
6363  done
6364IFS=$as_save_IFS
6365
6366  ;;
6367esac
6368fi
6369DIFF=$ac_cv_path_DIFF
6370if test -n "$DIFF"; then
6371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6372$as_echo "$DIFF" >&6; }
6373else
6374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376fi
6377
6378
6379        if test "x$DIFF" = x; then
6380          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6381        fi
6382      else
6383        # Otherwise we believe it is a complete path. Use it as it is.
6384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6385$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6387$as_echo_n "checking for DIFF... " >&6; }
6388        if test ! -x "$tool_specified"; then
6389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6390$as_echo "not found" >&6; }
6391          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6392        fi
6393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6394$as_echo "$tool_specified" >&6; }
6395      fi
6396    fi
6397  fi
6398
6399
6400
6401  if test "x$DIFF" = x; then
6402    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6403  fi
6404
6405
6406
6407
6408
6409  # Publish this variable in the help.
6410
6411
6412  if test "x$DIRNAME" = x; then
6413    # The variable is not set by user, try to locate tool using the code snippet
6414    for ac_prog in dirname
6415do
6416  # Extract the first word of "$ac_prog", so it can be a program name with args.
6417set dummy $ac_prog; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_DIRNAME+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $DIRNAME in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446DIRNAME=$ac_cv_path_DIRNAME
6447if test -n "$DIRNAME"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6449$as_echo "$DIRNAME" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456  test -n "$DIRNAME" && break
6457done
6458
6459  else
6460    # The variable is set, but is it from the command line or the environment?
6461
6462    # Try to remove the string !DIRNAME! from our list.
6463    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6464    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6465      # If it failed, the variable was not from the command line. Ignore it,
6466      # but warn the user (except for BASH, which is always set by the calling BASH).
6467      if test "xDIRNAME" != xBASH; then
6468        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6469$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6470      fi
6471      # Try to locate tool using the code snippet
6472      for ac_prog in dirname
6473do
6474  # Extract the first word of "$ac_prog", so it can be a program name with args.
6475set dummy $ac_prog; ac_word=$2
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6477$as_echo_n "checking for $ac_word... " >&6; }
6478if ${ac_cv_path_DIRNAME+:} false; then :
6479  $as_echo_n "(cached) " >&6
6480else
6481  case $DIRNAME in
6482  [\\/]* | ?:[\\/]*)
6483  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6484  ;;
6485  *)
6486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487for as_dir in $PATH
6488do
6489  IFS=$as_save_IFS
6490  test -z "$as_dir" && as_dir=.
6491    for ac_exec_ext in '' $ac_executable_extensions; do
6492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495    break 2
6496  fi
6497done
6498  done
6499IFS=$as_save_IFS
6500
6501  ;;
6502esac
6503fi
6504DIRNAME=$ac_cv_path_DIRNAME
6505if test -n "$DIRNAME"; then
6506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6507$as_echo "$DIRNAME" >&6; }
6508else
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; }
6511fi
6512
6513
6514  test -n "$DIRNAME" && break
6515done
6516
6517    else
6518      # If it succeeded, then it was overridden by the user. We will use it
6519      # for the tool.
6520
6521      # First remove it from the list of overridden variables, so we can test
6522      # for unknown variables in the end.
6523      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6524
6525      # Check if the provided tool contains a complete path.
6526      tool_specified="$DIRNAME"
6527      tool_basename="${tool_specified##*/}"
6528      if test "x$tool_basename" = "x$tool_specified"; then
6529        # A command without a complete path is provided, search $PATH.
6530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6531$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6532        # Extract the first word of "$tool_basename", so it can be a program name with args.
6533set dummy $tool_basename; ac_word=$2
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6535$as_echo_n "checking for $ac_word... " >&6; }
6536if ${ac_cv_path_DIRNAME+:} false; then :
6537  $as_echo_n "(cached) " >&6
6538else
6539  case $DIRNAME in
6540  [\\/]* | ?:[\\/]*)
6541  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6542  ;;
6543  *)
6544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6545for as_dir in $PATH
6546do
6547  IFS=$as_save_IFS
6548  test -z "$as_dir" && as_dir=.
6549    for ac_exec_ext in '' $ac_executable_extensions; do
6550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6551    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6553    break 2
6554  fi
6555done
6556  done
6557IFS=$as_save_IFS
6558
6559  ;;
6560esac
6561fi
6562DIRNAME=$ac_cv_path_DIRNAME
6563if test -n "$DIRNAME"; then
6564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6565$as_echo "$DIRNAME" >&6; }
6566else
6567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6568$as_echo "no" >&6; }
6569fi
6570
6571
6572        if test "x$DIRNAME" = x; then
6573          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6574        fi
6575      else
6576        # Otherwise we believe it is a complete path. Use it as it is.
6577        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6578$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6580$as_echo_n "checking for DIRNAME... " >&6; }
6581        if test ! -x "$tool_specified"; then
6582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6583$as_echo "not found" >&6; }
6584          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6585        fi
6586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6587$as_echo "$tool_specified" >&6; }
6588      fi
6589    fi
6590  fi
6591
6592
6593
6594  if test "x$DIRNAME" = x; then
6595    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6596  fi
6597
6598
6599
6600
6601
6602  # Publish this variable in the help.
6603
6604
6605  if test "x$ECHO" = x; then
6606    # The variable is not set by user, try to locate tool using the code snippet
6607    for ac_prog in echo
6608do
6609  # Extract the first word of "$ac_prog", so it can be a program name with args.
6610set dummy $ac_prog; ac_word=$2
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6612$as_echo_n "checking for $ac_word... " >&6; }
6613if ${ac_cv_path_ECHO+:} false; then :
6614  $as_echo_n "(cached) " >&6
6615else
6616  case $ECHO in
6617  [\\/]* | ?:[\\/]*)
6618  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6619  ;;
6620  *)
6621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622for as_dir in $PATH
6623do
6624  IFS=$as_save_IFS
6625  test -z "$as_dir" && as_dir=.
6626    for ac_exec_ext in '' $ac_executable_extensions; do
6627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630    break 2
6631  fi
6632done
6633  done
6634IFS=$as_save_IFS
6635
6636  ;;
6637esac
6638fi
6639ECHO=$ac_cv_path_ECHO
6640if test -n "$ECHO"; then
6641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6642$as_echo "$ECHO" >&6; }
6643else
6644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645$as_echo "no" >&6; }
6646fi
6647
6648
6649  test -n "$ECHO" && break
6650done
6651
6652  else
6653    # The variable is set, but is it from the command line or the environment?
6654
6655    # Try to remove the string !ECHO! from our list.
6656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6658      # If it failed, the variable was not from the command line. Ignore it,
6659      # but warn the user (except for BASH, which is always set by the calling BASH).
6660      if test "xECHO" != xBASH; then
6661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6662$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6663      fi
6664      # Try to locate tool using the code snippet
6665      for ac_prog in echo
6666do
6667  # Extract the first word of "$ac_prog", so it can be a program name with args.
6668set dummy $ac_prog; ac_word=$2
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670$as_echo_n "checking for $ac_word... " >&6; }
6671if ${ac_cv_path_ECHO+:} false; then :
6672  $as_echo_n "(cached) " >&6
6673else
6674  case $ECHO in
6675  [\\/]* | ?:[\\/]*)
6676  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6677  ;;
6678  *)
6679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6680for as_dir in $PATH
6681do
6682  IFS=$as_save_IFS
6683  test -z "$as_dir" && as_dir=.
6684    for ac_exec_ext in '' $ac_executable_extensions; do
6685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6686    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6688    break 2
6689  fi
6690done
6691  done
6692IFS=$as_save_IFS
6693
6694  ;;
6695esac
6696fi
6697ECHO=$ac_cv_path_ECHO
6698if test -n "$ECHO"; then
6699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6700$as_echo "$ECHO" >&6; }
6701else
6702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6703$as_echo "no" >&6; }
6704fi
6705
6706
6707  test -n "$ECHO" && break
6708done
6709
6710    else
6711      # If it succeeded, then it was overridden by the user. We will use it
6712      # for the tool.
6713
6714      # First remove it from the list of overridden variables, so we can test
6715      # for unknown variables in the end.
6716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6717
6718      # Check if the provided tool contains a complete path.
6719      tool_specified="$ECHO"
6720      tool_basename="${tool_specified##*/}"
6721      if test "x$tool_basename" = "x$tool_specified"; then
6722        # A command without a complete path is provided, search $PATH.
6723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6724$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6725        # Extract the first word of "$tool_basename", so it can be a program name with args.
6726set dummy $tool_basename; ac_word=$2
6727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6728$as_echo_n "checking for $ac_word... " >&6; }
6729if ${ac_cv_path_ECHO+:} false; then :
6730  $as_echo_n "(cached) " >&6
6731else
6732  case $ECHO in
6733  [\\/]* | ?:[\\/]*)
6734  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6735  ;;
6736  *)
6737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6738for as_dir in $PATH
6739do
6740  IFS=$as_save_IFS
6741  test -z "$as_dir" && as_dir=.
6742    for ac_exec_ext in '' $ac_executable_extensions; do
6743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6744    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6746    break 2
6747  fi
6748done
6749  done
6750IFS=$as_save_IFS
6751
6752  ;;
6753esac
6754fi
6755ECHO=$ac_cv_path_ECHO
6756if test -n "$ECHO"; then
6757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6758$as_echo "$ECHO" >&6; }
6759else
6760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6761$as_echo "no" >&6; }
6762fi
6763
6764
6765        if test "x$ECHO" = x; then
6766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6767        fi
6768      else
6769        # Otherwise we believe it is a complete path. Use it as it is.
6770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6771$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6773$as_echo_n "checking for ECHO... " >&6; }
6774        if test ! -x "$tool_specified"; then
6775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6776$as_echo "not found" >&6; }
6777          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6778        fi
6779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6780$as_echo "$tool_specified" >&6; }
6781      fi
6782    fi
6783  fi
6784
6785
6786
6787  if test "x$ECHO" = x; then
6788    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6789  fi
6790
6791
6792
6793
6794
6795  # Publish this variable in the help.
6796
6797
6798  if test "x$EXPR" = x; then
6799    # The variable is not set by user, try to locate tool using the code snippet
6800    for ac_prog in expr
6801do
6802  # Extract the first word of "$ac_prog", so it can be a program name with args.
6803set dummy $ac_prog; ac_word=$2
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6805$as_echo_n "checking for $ac_word... " >&6; }
6806if ${ac_cv_path_EXPR+:} false; then :
6807  $as_echo_n "(cached) " >&6
6808else
6809  case $EXPR in
6810  [\\/]* | ?:[\\/]*)
6811  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6812  ;;
6813  *)
6814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815for as_dir in $PATH
6816do
6817  IFS=$as_save_IFS
6818  test -z "$as_dir" && as_dir=.
6819    for ac_exec_ext in '' $ac_executable_extensions; do
6820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6821    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6823    break 2
6824  fi
6825done
6826  done
6827IFS=$as_save_IFS
6828
6829  ;;
6830esac
6831fi
6832EXPR=$ac_cv_path_EXPR
6833if test -n "$EXPR"; then
6834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6835$as_echo "$EXPR" >&6; }
6836else
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6838$as_echo "no" >&6; }
6839fi
6840
6841
6842  test -n "$EXPR" && break
6843done
6844
6845  else
6846    # The variable is set, but is it from the command line or the environment?
6847
6848    # Try to remove the string !EXPR! from our list.
6849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6851      # If it failed, the variable was not from the command line. Ignore it,
6852      # but warn the user (except for BASH, which is always set by the calling BASH).
6853      if test "xEXPR" != xBASH; then
6854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6855$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6856      fi
6857      # Try to locate tool using the code snippet
6858      for ac_prog in expr
6859do
6860  # Extract the first word of "$ac_prog", so it can be a program name with args.
6861set dummy $ac_prog; ac_word=$2
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6863$as_echo_n "checking for $ac_word... " >&6; }
6864if ${ac_cv_path_EXPR+:} false; then :
6865  $as_echo_n "(cached) " >&6
6866else
6867  case $EXPR in
6868  [\\/]* | ?:[\\/]*)
6869  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6870  ;;
6871  *)
6872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6873for as_dir in $PATH
6874do
6875  IFS=$as_save_IFS
6876  test -z "$as_dir" && as_dir=.
6877    for ac_exec_ext in '' $ac_executable_extensions; do
6878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6879    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6881    break 2
6882  fi
6883done
6884  done
6885IFS=$as_save_IFS
6886
6887  ;;
6888esac
6889fi
6890EXPR=$ac_cv_path_EXPR
6891if test -n "$EXPR"; then
6892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6893$as_echo "$EXPR" >&6; }
6894else
6895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6896$as_echo "no" >&6; }
6897fi
6898
6899
6900  test -n "$EXPR" && break
6901done
6902
6903    else
6904      # If it succeeded, then it was overridden by the user. We will use it
6905      # for the tool.
6906
6907      # First remove it from the list of overridden variables, so we can test
6908      # for unknown variables in the end.
6909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6910
6911      # Check if the provided tool contains a complete path.
6912      tool_specified="$EXPR"
6913      tool_basename="${tool_specified##*/}"
6914      if test "x$tool_basename" = "x$tool_specified"; then
6915        # A command without a complete path is provided, search $PATH.
6916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6917$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6918        # Extract the first word of "$tool_basename", so it can be a program name with args.
6919set dummy $tool_basename; ac_word=$2
6920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6921$as_echo_n "checking for $ac_word... " >&6; }
6922if ${ac_cv_path_EXPR+:} false; then :
6923  $as_echo_n "(cached) " >&6
6924else
6925  case $EXPR in
6926  [\\/]* | ?:[\\/]*)
6927  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6928  ;;
6929  *)
6930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6931for as_dir in $PATH
6932do
6933  IFS=$as_save_IFS
6934  test -z "$as_dir" && as_dir=.
6935    for ac_exec_ext in '' $ac_executable_extensions; do
6936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6937    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6939    break 2
6940  fi
6941done
6942  done
6943IFS=$as_save_IFS
6944
6945  ;;
6946esac
6947fi
6948EXPR=$ac_cv_path_EXPR
6949if test -n "$EXPR"; then
6950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6951$as_echo "$EXPR" >&6; }
6952else
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6954$as_echo "no" >&6; }
6955fi
6956
6957
6958        if test "x$EXPR" = x; then
6959          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6960        fi
6961      else
6962        # Otherwise we believe it is a complete path. Use it as it is.
6963        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6964$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6966$as_echo_n "checking for EXPR... " >&6; }
6967        if test ! -x "$tool_specified"; then
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6969$as_echo "not found" >&6; }
6970          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6971        fi
6972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6973$as_echo "$tool_specified" >&6; }
6974      fi
6975    fi
6976  fi
6977
6978
6979
6980  if test "x$EXPR" = x; then
6981    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6982  fi
6983
6984
6985
6986
6987
6988  # Publish this variable in the help.
6989
6990
6991  if test "x$FILE" = x; then
6992    # The variable is not set by user, try to locate tool using the code snippet
6993    for ac_prog in file
6994do
6995  # Extract the first word of "$ac_prog", so it can be a program name with args.
6996set dummy $ac_prog; ac_word=$2
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998$as_echo_n "checking for $ac_word... " >&6; }
6999if ${ac_cv_path_FILE+:} false; then :
7000  $as_echo_n "(cached) " >&6
7001else
7002  case $FILE in
7003  [\\/]* | ?:[\\/]*)
7004  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7005  ;;
7006  *)
7007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022  ;;
7023esac
7024fi
7025FILE=$ac_cv_path_FILE
7026if test -n "$FILE"; then
7027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7028$as_echo "$FILE" >&6; }
7029else
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031$as_echo "no" >&6; }
7032fi
7033
7034
7035  test -n "$FILE" && break
7036done
7037
7038  else
7039    # The variable is set, but is it from the command line or the environment?
7040
7041    # Try to remove the string !FILE! from our list.
7042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7044      # If it failed, the variable was not from the command line. Ignore it,
7045      # but warn the user (except for BASH, which is always set by the calling BASH).
7046      if test "xFILE" != xBASH; then
7047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7048$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7049      fi
7050      # Try to locate tool using the code snippet
7051      for ac_prog in file
7052do
7053  # Extract the first word of "$ac_prog", so it can be a program name with args.
7054set dummy $ac_prog; ac_word=$2
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7056$as_echo_n "checking for $ac_word... " >&6; }
7057if ${ac_cv_path_FILE+:} false; then :
7058  $as_echo_n "(cached) " >&6
7059else
7060  case $FILE in
7061  [\\/]* | ?:[\\/]*)
7062  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7063  ;;
7064  *)
7065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7066for as_dir in $PATH
7067do
7068  IFS=$as_save_IFS
7069  test -z "$as_dir" && as_dir=.
7070    for ac_exec_ext in '' $ac_executable_extensions; do
7071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7072    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7074    break 2
7075  fi
7076done
7077  done
7078IFS=$as_save_IFS
7079
7080  ;;
7081esac
7082fi
7083FILE=$ac_cv_path_FILE
7084if test -n "$FILE"; then
7085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7086$as_echo "$FILE" >&6; }
7087else
7088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089$as_echo "no" >&6; }
7090fi
7091
7092
7093  test -n "$FILE" && break
7094done
7095
7096    else
7097      # If it succeeded, then it was overridden by the user. We will use it
7098      # for the tool.
7099
7100      # First remove it from the list of overridden variables, so we can test
7101      # for unknown variables in the end.
7102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7103
7104      # Check if the provided tool contains a complete path.
7105      tool_specified="$FILE"
7106      tool_basename="${tool_specified##*/}"
7107      if test "x$tool_basename" = "x$tool_specified"; then
7108        # A command without a complete path is provided, search $PATH.
7109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7110$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7111        # Extract the first word of "$tool_basename", so it can be a program name with args.
7112set dummy $tool_basename; ac_word=$2
7113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7114$as_echo_n "checking for $ac_word... " >&6; }
7115if ${ac_cv_path_FILE+:} false; then :
7116  $as_echo_n "(cached) " >&6
7117else
7118  case $FILE in
7119  [\\/]* | ?:[\\/]*)
7120  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7121  ;;
7122  *)
7123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7124for as_dir in $PATH
7125do
7126  IFS=$as_save_IFS
7127  test -z "$as_dir" && as_dir=.
7128    for ac_exec_ext in '' $ac_executable_extensions; do
7129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7130    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7132    break 2
7133  fi
7134done
7135  done
7136IFS=$as_save_IFS
7137
7138  ;;
7139esac
7140fi
7141FILE=$ac_cv_path_FILE
7142if test -n "$FILE"; then
7143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7144$as_echo "$FILE" >&6; }
7145else
7146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7147$as_echo "no" >&6; }
7148fi
7149
7150
7151        if test "x$FILE" = x; then
7152          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7153        fi
7154      else
7155        # Otherwise we believe it is a complete path. Use it as it is.
7156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7157$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7159$as_echo_n "checking for FILE... " >&6; }
7160        if test ! -x "$tool_specified"; then
7161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7162$as_echo "not found" >&6; }
7163          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7164        fi
7165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7166$as_echo "$tool_specified" >&6; }
7167      fi
7168    fi
7169  fi
7170
7171
7172
7173  if test "x$FILE" = x; then
7174    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7175  fi
7176
7177
7178
7179
7180
7181  # Publish this variable in the help.
7182
7183
7184  if test "x$FIND" = x; then
7185    # The variable is not set by user, try to locate tool using the code snippet
7186    for ac_prog in find
7187do
7188  # Extract the first word of "$ac_prog", so it can be a program name with args.
7189set dummy $ac_prog; ac_word=$2
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7191$as_echo_n "checking for $ac_word... " >&6; }
7192if ${ac_cv_path_FIND+:} false; then :
7193  $as_echo_n "(cached) " >&6
7194else
7195  case $FIND in
7196  [\\/]* | ?:[\\/]*)
7197  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7198  ;;
7199  *)
7200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7201for as_dir in $PATH
7202do
7203  IFS=$as_save_IFS
7204  test -z "$as_dir" && as_dir=.
7205    for ac_exec_ext in '' $ac_executable_extensions; do
7206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7207    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7209    break 2
7210  fi
7211done
7212  done
7213IFS=$as_save_IFS
7214
7215  ;;
7216esac
7217fi
7218FIND=$ac_cv_path_FIND
7219if test -n "$FIND"; then
7220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7221$as_echo "$FIND" >&6; }
7222else
7223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7224$as_echo "no" >&6; }
7225fi
7226
7227
7228  test -n "$FIND" && break
7229done
7230
7231  else
7232    # The variable is set, but is it from the command line or the environment?
7233
7234    # Try to remove the string !FIND! from our list.
7235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7237      # If it failed, the variable was not from the command line. Ignore it,
7238      # but warn the user (except for BASH, which is always set by the calling BASH).
7239      if test "xFIND" != xBASH; then
7240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7241$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7242      fi
7243      # Try to locate tool using the code snippet
7244      for ac_prog in find
7245do
7246  # Extract the first word of "$ac_prog", so it can be a program name with args.
7247set dummy $ac_prog; ac_word=$2
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7249$as_echo_n "checking for $ac_word... " >&6; }
7250if ${ac_cv_path_FIND+:} false; then :
7251  $as_echo_n "(cached) " >&6
7252else
7253  case $FIND in
7254  [\\/]* | ?:[\\/]*)
7255  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7256  ;;
7257  *)
7258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261  IFS=$as_save_IFS
7262  test -z "$as_dir" && as_dir=.
7263    for ac_exec_ext in '' $ac_executable_extensions; do
7264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267    break 2
7268  fi
7269done
7270  done
7271IFS=$as_save_IFS
7272
7273  ;;
7274esac
7275fi
7276FIND=$ac_cv_path_FIND
7277if test -n "$FIND"; then
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7279$as_echo "$FIND" >&6; }
7280else
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7282$as_echo "no" >&6; }
7283fi
7284
7285
7286  test -n "$FIND" && break
7287done
7288
7289    else
7290      # If it succeeded, then it was overridden by the user. We will use it
7291      # for the tool.
7292
7293      # First remove it from the list of overridden variables, so we can test
7294      # for unknown variables in the end.
7295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7296
7297      # Check if the provided tool contains a complete path.
7298      tool_specified="$FIND"
7299      tool_basename="${tool_specified##*/}"
7300      if test "x$tool_basename" = "x$tool_specified"; then
7301        # A command without a complete path is provided, search $PATH.
7302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7303$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7304        # Extract the first word of "$tool_basename", so it can be a program name with args.
7305set dummy $tool_basename; ac_word=$2
7306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7307$as_echo_n "checking for $ac_word... " >&6; }
7308if ${ac_cv_path_FIND+:} false; then :
7309  $as_echo_n "(cached) " >&6
7310else
7311  case $FIND in
7312  [\\/]* | ?:[\\/]*)
7313  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7314  ;;
7315  *)
7316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7317for as_dir in $PATH
7318do
7319  IFS=$as_save_IFS
7320  test -z "$as_dir" && as_dir=.
7321    for ac_exec_ext in '' $ac_executable_extensions; do
7322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7323    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7325    break 2
7326  fi
7327done
7328  done
7329IFS=$as_save_IFS
7330
7331  ;;
7332esac
7333fi
7334FIND=$ac_cv_path_FIND
7335if test -n "$FIND"; then
7336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7337$as_echo "$FIND" >&6; }
7338else
7339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7340$as_echo "no" >&6; }
7341fi
7342
7343
7344        if test "x$FIND" = x; then
7345          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7346        fi
7347      else
7348        # Otherwise we believe it is a complete path. Use it as it is.
7349        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7350$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7352$as_echo_n "checking for FIND... " >&6; }
7353        if test ! -x "$tool_specified"; then
7354          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7355$as_echo "not found" >&6; }
7356          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7357        fi
7358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7359$as_echo "$tool_specified" >&6; }
7360      fi
7361    fi
7362  fi
7363
7364
7365
7366  if test "x$FIND" = x; then
7367    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7368  fi
7369
7370
7371
7372
7373
7374  # Publish this variable in the help.
7375
7376
7377  if test "x$HEAD" = x; then
7378    # The variable is not set by user, try to locate tool using the code snippet
7379    for ac_prog in head
7380do
7381  # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
7385if ${ac_cv_path_HEAD+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388  case $HEAD in
7389  [\\/]* | ?:[\\/]*)
7390  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7391  ;;
7392  *)
7393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  test -z "$as_dir" && as_dir=.
7398    for ac_exec_ext in '' $ac_executable_extensions; do
7399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402    break 2
7403  fi
7404done
7405  done
7406IFS=$as_save_IFS
7407
7408  ;;
7409esac
7410fi
7411HEAD=$ac_cv_path_HEAD
7412if test -n "$HEAD"; then
7413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7414$as_echo "$HEAD" >&6; }
7415else
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421  test -n "$HEAD" && break
7422done
7423
7424  else
7425    # The variable is set, but is it from the command line or the environment?
7426
7427    # Try to remove the string !HEAD! from our list.
7428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7430      # If it failed, the variable was not from the command line. Ignore it,
7431      # but warn the user (except for BASH, which is always set by the calling BASH).
7432      if test "xHEAD" != xBASH; then
7433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7434$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7435      fi
7436      # Try to locate tool using the code snippet
7437      for ac_prog in head
7438do
7439  # Extract the first word of "$ac_prog", so it can be a program name with args.
7440set dummy $ac_prog; ac_word=$2
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
7443if ${ac_cv_path_HEAD+:} false; then :
7444  $as_echo_n "(cached) " >&6
7445else
7446  case $HEAD in
7447  [\\/]* | ?:[\\/]*)
7448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7449  ;;
7450  *)
7451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454  IFS=$as_save_IFS
7455  test -z "$as_dir" && as_dir=.
7456    for ac_exec_ext in '' $ac_executable_extensions; do
7457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7460    break 2
7461  fi
7462done
7463  done
7464IFS=$as_save_IFS
7465
7466  ;;
7467esac
7468fi
7469HEAD=$ac_cv_path_HEAD
7470if test -n "$HEAD"; then
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7472$as_echo "$HEAD" >&6; }
7473else
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
7476fi
7477
7478
7479  test -n "$HEAD" && break
7480done
7481
7482    else
7483      # If it succeeded, then it was overridden by the user. We will use it
7484      # for the tool.
7485
7486      # First remove it from the list of overridden variables, so we can test
7487      # for unknown variables in the end.
7488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7489
7490      # Check if the provided tool contains a complete path.
7491      tool_specified="$HEAD"
7492      tool_basename="${tool_specified##*/}"
7493      if test "x$tool_basename" = "x$tool_specified"; then
7494        # A command without a complete path is provided, search $PATH.
7495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7496$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7497        # Extract the first word of "$tool_basename", so it can be a program name with args.
7498set dummy $tool_basename; ac_word=$2
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7500$as_echo_n "checking for $ac_word... " >&6; }
7501if ${ac_cv_path_HEAD+:} false; then :
7502  $as_echo_n "(cached) " >&6
7503else
7504  case $HEAD in
7505  [\\/]* | ?:[\\/]*)
7506  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7507  ;;
7508  *)
7509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510for as_dir in $PATH
7511do
7512  IFS=$as_save_IFS
7513  test -z "$as_dir" && as_dir=.
7514    for ac_exec_ext in '' $ac_executable_extensions; do
7515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7516    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7518    break 2
7519  fi
7520done
7521  done
7522IFS=$as_save_IFS
7523
7524  ;;
7525esac
7526fi
7527HEAD=$ac_cv_path_HEAD
7528if test -n "$HEAD"; then
7529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7530$as_echo "$HEAD" >&6; }
7531else
7532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533$as_echo "no" >&6; }
7534fi
7535
7536
7537        if test "x$HEAD" = x; then
7538          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7539        fi
7540      else
7541        # Otherwise we believe it is a complete path. Use it as it is.
7542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7543$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7545$as_echo_n "checking for HEAD... " >&6; }
7546        if test ! -x "$tool_specified"; then
7547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7548$as_echo "not found" >&6; }
7549          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7550        fi
7551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7552$as_echo "$tool_specified" >&6; }
7553      fi
7554    fi
7555  fi
7556
7557
7558
7559  if test "x$HEAD" = x; then
7560    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7561  fi
7562
7563
7564
7565
7566
7567  # Publish this variable in the help.
7568
7569
7570  if test "x$LN" = x; then
7571    # The variable is not set by user, try to locate tool using the code snippet
7572    for ac_prog in ln
7573do
7574  # Extract the first word of "$ac_prog", so it can be a program name with args.
7575set dummy $ac_prog; ac_word=$2
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if ${ac_cv_path_LN+:} false; then :
7579  $as_echo_n "(cached) " >&6
7580else
7581  case $LN in
7582  [\\/]* | ?:[\\/]*)
7583  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7584  ;;
7585  *)
7586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589  IFS=$as_save_IFS
7590  test -z "$as_dir" && as_dir=.
7591    for ac_exec_ext in '' $ac_executable_extensions; do
7592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595    break 2
7596  fi
7597done
7598  done
7599IFS=$as_save_IFS
7600
7601  ;;
7602esac
7603fi
7604LN=$ac_cv_path_LN
7605if test -n "$LN"; then
7606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7607$as_echo "$LN" >&6; }
7608else
7609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610$as_echo "no" >&6; }
7611fi
7612
7613
7614  test -n "$LN" && break
7615done
7616
7617  else
7618    # The variable is set, but is it from the command line or the environment?
7619
7620    # Try to remove the string !LN! from our list.
7621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7623      # If it failed, the variable was not from the command line. Ignore it,
7624      # but warn the user (except for BASH, which is always set by the calling BASH).
7625      if test "xLN" != xBASH; then
7626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7627$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7628      fi
7629      # Try to locate tool using the code snippet
7630      for ac_prog in ln
7631do
7632  # Extract the first word of "$ac_prog", so it can be a program name with args.
7633set dummy $ac_prog; ac_word=$2
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635$as_echo_n "checking for $ac_word... " >&6; }
7636if ${ac_cv_path_LN+:} false; then :
7637  $as_echo_n "(cached) " >&6
7638else
7639  case $LN in
7640  [\\/]* | ?:[\\/]*)
7641  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7642  ;;
7643  *)
7644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7645for as_dir in $PATH
7646do
7647  IFS=$as_save_IFS
7648  test -z "$as_dir" && as_dir=.
7649    for ac_exec_ext in '' $ac_executable_extensions; do
7650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7651    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7653    break 2
7654  fi
7655done
7656  done
7657IFS=$as_save_IFS
7658
7659  ;;
7660esac
7661fi
7662LN=$ac_cv_path_LN
7663if test -n "$LN"; then
7664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7665$as_echo "$LN" >&6; }
7666else
7667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7668$as_echo "no" >&6; }
7669fi
7670
7671
7672  test -n "$LN" && break
7673done
7674
7675    else
7676      # If it succeeded, then it was overridden by the user. We will use it
7677      # for the tool.
7678
7679      # First remove it from the list of overridden variables, so we can test
7680      # for unknown variables in the end.
7681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7682
7683      # Check if the provided tool contains a complete path.
7684      tool_specified="$LN"
7685      tool_basename="${tool_specified##*/}"
7686      if test "x$tool_basename" = "x$tool_specified"; then
7687        # A command without a complete path is provided, search $PATH.
7688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7689$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7690        # Extract the first word of "$tool_basename", so it can be a program name with args.
7691set dummy $tool_basename; ac_word=$2
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7693$as_echo_n "checking for $ac_word... " >&6; }
7694if ${ac_cv_path_LN+:} false; then :
7695  $as_echo_n "(cached) " >&6
7696else
7697  case $LN in
7698  [\\/]* | ?:[\\/]*)
7699  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7700  ;;
7701  *)
7702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7703for as_dir in $PATH
7704do
7705  IFS=$as_save_IFS
7706  test -z "$as_dir" && as_dir=.
7707    for ac_exec_ext in '' $ac_executable_extensions; do
7708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7709    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7711    break 2
7712  fi
7713done
7714  done
7715IFS=$as_save_IFS
7716
7717  ;;
7718esac
7719fi
7720LN=$ac_cv_path_LN
7721if test -n "$LN"; then
7722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7723$as_echo "$LN" >&6; }
7724else
7725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7726$as_echo "no" >&6; }
7727fi
7728
7729
7730        if test "x$LN" = x; then
7731          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7732        fi
7733      else
7734        # Otherwise we believe it is a complete path. Use it as it is.
7735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7736$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7738$as_echo_n "checking for LN... " >&6; }
7739        if test ! -x "$tool_specified"; then
7740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7741$as_echo "not found" >&6; }
7742          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7743        fi
7744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7745$as_echo "$tool_specified" >&6; }
7746      fi
7747    fi
7748  fi
7749
7750
7751
7752  if test "x$LN" = x; then
7753    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7754  fi
7755
7756
7757
7758
7759
7760  # Publish this variable in the help.
7761
7762
7763  if test "x$LS" = x; then
7764    # The variable is not set by user, try to locate tool using the code snippet
7765    for ac_prog in ls
7766do
7767  # Extract the first word of "$ac_prog", so it can be a program name with args.
7768set dummy $ac_prog; ac_word=$2
7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770$as_echo_n "checking for $ac_word... " >&6; }
7771if ${ac_cv_path_LS+:} false; then :
7772  $as_echo_n "(cached) " >&6
7773else
7774  case $LS in
7775  [\\/]* | ?:[\\/]*)
7776  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7777  ;;
7778  *)
7779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782  IFS=$as_save_IFS
7783  test -z "$as_dir" && as_dir=.
7784    for ac_exec_ext in '' $ac_executable_extensions; do
7785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7786    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7788    break 2
7789  fi
7790done
7791  done
7792IFS=$as_save_IFS
7793
7794  ;;
7795esac
7796fi
7797LS=$ac_cv_path_LS
7798if test -n "$LS"; then
7799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7800$as_echo "$LS" >&6; }
7801else
7802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803$as_echo "no" >&6; }
7804fi
7805
7806
7807  test -n "$LS" && break
7808done
7809
7810  else
7811    # The variable is set, but is it from the command line or the environment?
7812
7813    # Try to remove the string !LS! from our list.
7814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7816      # If it failed, the variable was not from the command line. Ignore it,
7817      # but warn the user (except for BASH, which is always set by the calling BASH).
7818      if test "xLS" != xBASH; then
7819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7820$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7821      fi
7822      # Try to locate tool using the code snippet
7823      for ac_prog in ls
7824do
7825  # Extract the first word of "$ac_prog", so it can be a program name with args.
7826set dummy $ac_prog; ac_word=$2
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7828$as_echo_n "checking for $ac_word... " >&6; }
7829if ${ac_cv_path_LS+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  case $LS in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  test -z "$as_dir" && as_dir=.
7842    for ac_exec_ext in '' $ac_executable_extensions; do
7843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7844    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7846    break 2
7847  fi
7848done
7849  done
7850IFS=$as_save_IFS
7851
7852  ;;
7853esac
7854fi
7855LS=$ac_cv_path_LS
7856if test -n "$LS"; then
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7858$as_echo "$LS" >&6; }
7859else
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7861$as_echo "no" >&6; }
7862fi
7863
7864
7865  test -n "$LS" && break
7866done
7867
7868    else
7869      # If it succeeded, then it was overridden by the user. We will use it
7870      # for the tool.
7871
7872      # First remove it from the list of overridden variables, so we can test
7873      # for unknown variables in the end.
7874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7875
7876      # Check if the provided tool contains a complete path.
7877      tool_specified="$LS"
7878      tool_basename="${tool_specified##*/}"
7879      if test "x$tool_basename" = "x$tool_specified"; then
7880        # A command without a complete path is provided, search $PATH.
7881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7882$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7883        # Extract the first word of "$tool_basename", so it can be a program name with args.
7884set dummy $tool_basename; ac_word=$2
7885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7886$as_echo_n "checking for $ac_word... " >&6; }
7887if ${ac_cv_path_LS+:} false; then :
7888  $as_echo_n "(cached) " >&6
7889else
7890  case $LS in
7891  [\\/]* | ?:[\\/]*)
7892  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7893  ;;
7894  *)
7895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7896for as_dir in $PATH
7897do
7898  IFS=$as_save_IFS
7899  test -z "$as_dir" && as_dir=.
7900    for ac_exec_ext in '' $ac_executable_extensions; do
7901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7902    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7904    break 2
7905  fi
7906done
7907  done
7908IFS=$as_save_IFS
7909
7910  ;;
7911esac
7912fi
7913LS=$ac_cv_path_LS
7914if test -n "$LS"; then
7915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7916$as_echo "$LS" >&6; }
7917else
7918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7919$as_echo "no" >&6; }
7920fi
7921
7922
7923        if test "x$LS" = x; then
7924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7925        fi
7926      else
7927        # Otherwise we believe it is a complete path. Use it as it is.
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7929$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7931$as_echo_n "checking for LS... " >&6; }
7932        if test ! -x "$tool_specified"; then
7933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7934$as_echo "not found" >&6; }
7935          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7936        fi
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7938$as_echo "$tool_specified" >&6; }
7939      fi
7940    fi
7941  fi
7942
7943
7944
7945  if test "x$LS" = x; then
7946    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7947  fi
7948
7949
7950
7951
7952
7953  # Publish this variable in the help.
7954
7955
7956  if test "x$MKDIR" = x; then
7957    # The variable is not set by user, try to locate tool using the code snippet
7958    for ac_prog in mkdir
7959do
7960  # Extract the first word of "$ac_prog", so it can be a program name with args.
7961set dummy $ac_prog; ac_word=$2
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7963$as_echo_n "checking for $ac_word... " >&6; }
7964if ${ac_cv_path_MKDIR+:} false; then :
7965  $as_echo_n "(cached) " >&6
7966else
7967  case $MKDIR in
7968  [\\/]* | ?:[\\/]*)
7969  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7970  ;;
7971  *)
7972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7973for as_dir in $PATH
7974do
7975  IFS=$as_save_IFS
7976  test -z "$as_dir" && as_dir=.
7977    for ac_exec_ext in '' $ac_executable_extensions; do
7978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7979    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7981    break 2
7982  fi
7983done
7984  done
7985IFS=$as_save_IFS
7986
7987  ;;
7988esac
7989fi
7990MKDIR=$ac_cv_path_MKDIR
7991if test -n "$MKDIR"; then
7992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7993$as_echo "$MKDIR" >&6; }
7994else
7995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7996$as_echo "no" >&6; }
7997fi
7998
7999
8000  test -n "$MKDIR" && break
8001done
8002
8003  else
8004    # The variable is set, but is it from the command line or the environment?
8005
8006    # Try to remove the string !MKDIR! from our list.
8007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8009      # If it failed, the variable was not from the command line. Ignore it,
8010      # but warn the user (except for BASH, which is always set by the calling BASH).
8011      if test "xMKDIR" != xBASH; then
8012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8013$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8014      fi
8015      # Try to locate tool using the code snippet
8016      for ac_prog in mkdir
8017do
8018  # Extract the first word of "$ac_prog", so it can be a program name with args.
8019set dummy $ac_prog; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_MKDIR+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $MKDIR in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048MKDIR=$ac_cv_path_MKDIR
8049if test -n "$MKDIR"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8051$as_echo "$MKDIR" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058  test -n "$MKDIR" && break
8059done
8060
8061    else
8062      # If it succeeded, then it was overridden by the user. We will use it
8063      # for the tool.
8064
8065      # First remove it from the list of overridden variables, so we can test
8066      # for unknown variables in the end.
8067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8068
8069      # Check if the provided tool contains a complete path.
8070      tool_specified="$MKDIR"
8071      tool_basename="${tool_specified##*/}"
8072      if test "x$tool_basename" = "x$tool_specified"; then
8073        # A command without a complete path is provided, search $PATH.
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8075$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8076        # Extract the first word of "$tool_basename", so it can be a program name with args.
8077set dummy $tool_basename; ac_word=$2
8078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8079$as_echo_n "checking for $ac_word... " >&6; }
8080if ${ac_cv_path_MKDIR+:} false; then :
8081  $as_echo_n "(cached) " >&6
8082else
8083  case $MKDIR in
8084  [\\/]* | ?:[\\/]*)
8085  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8086  ;;
8087  *)
8088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8089for as_dir in $PATH
8090do
8091  IFS=$as_save_IFS
8092  test -z "$as_dir" && as_dir=.
8093    for ac_exec_ext in '' $ac_executable_extensions; do
8094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8095    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8097    break 2
8098  fi
8099done
8100  done
8101IFS=$as_save_IFS
8102
8103  ;;
8104esac
8105fi
8106MKDIR=$ac_cv_path_MKDIR
8107if test -n "$MKDIR"; then
8108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8109$as_echo "$MKDIR" >&6; }
8110else
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8112$as_echo "no" >&6; }
8113fi
8114
8115
8116        if test "x$MKDIR" = x; then
8117          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8118        fi
8119      else
8120        # Otherwise we believe it is a complete path. Use it as it is.
8121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8122$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8123        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8124$as_echo_n "checking for MKDIR... " >&6; }
8125        if test ! -x "$tool_specified"; then
8126          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8127$as_echo "not found" >&6; }
8128          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8129        fi
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8131$as_echo "$tool_specified" >&6; }
8132      fi
8133    fi
8134  fi
8135
8136
8137
8138  if test "x$MKDIR" = x; then
8139    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8140  fi
8141
8142
8143
8144
8145
8146  # Publish this variable in the help.
8147
8148
8149  if test "x$MKTEMP" = x; then
8150    # The variable is not set by user, try to locate tool using the code snippet
8151    for ac_prog in mktemp
8152do
8153  # Extract the first word of "$ac_prog", so it can be a program name with args.
8154set dummy $ac_prog; ac_word=$2
8155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8156$as_echo_n "checking for $ac_word... " >&6; }
8157if ${ac_cv_path_MKTEMP+:} false; then :
8158  $as_echo_n "(cached) " >&6
8159else
8160  case $MKTEMP in
8161  [\\/]* | ?:[\\/]*)
8162  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8163  ;;
8164  *)
8165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8166for as_dir in $PATH
8167do
8168  IFS=$as_save_IFS
8169  test -z "$as_dir" && as_dir=.
8170    for ac_exec_ext in '' $ac_executable_extensions; do
8171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8172    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8174    break 2
8175  fi
8176done
8177  done
8178IFS=$as_save_IFS
8179
8180  ;;
8181esac
8182fi
8183MKTEMP=$ac_cv_path_MKTEMP
8184if test -n "$MKTEMP"; then
8185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8186$as_echo "$MKTEMP" >&6; }
8187else
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189$as_echo "no" >&6; }
8190fi
8191
8192
8193  test -n "$MKTEMP" && break
8194done
8195
8196  else
8197    # The variable is set, but is it from the command line or the environment?
8198
8199    # Try to remove the string !MKTEMP! from our list.
8200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8202      # If it failed, the variable was not from the command line. Ignore it,
8203      # but warn the user (except for BASH, which is always set by the calling BASH).
8204      if test "xMKTEMP" != xBASH; then
8205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8206$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8207      fi
8208      # Try to locate tool using the code snippet
8209      for ac_prog in mktemp
8210do
8211  # Extract the first word of "$ac_prog", so it can be a program name with args.
8212set dummy $ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_path_MKTEMP+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  case $MKTEMP in
8219  [\\/]* | ?:[\\/]*)
8220  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8221  ;;
8222  *)
8223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238  ;;
8239esac
8240fi
8241MKTEMP=$ac_cv_path_MKTEMP
8242if test -n "$MKTEMP"; then
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8244$as_echo "$MKTEMP" >&6; }
8245else
8246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
8248fi
8249
8250
8251  test -n "$MKTEMP" && break
8252done
8253
8254    else
8255      # If it succeeded, then it was overridden by the user. We will use it
8256      # for the tool.
8257
8258      # First remove it from the list of overridden variables, so we can test
8259      # for unknown variables in the end.
8260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8261
8262      # Check if the provided tool contains a complete path.
8263      tool_specified="$MKTEMP"
8264      tool_basename="${tool_specified##*/}"
8265      if test "x$tool_basename" = "x$tool_specified"; then
8266        # A command without a complete path is provided, search $PATH.
8267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8268$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8269        # Extract the first word of "$tool_basename", so it can be a program name with args.
8270set dummy $tool_basename; ac_word=$2
8271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8272$as_echo_n "checking for $ac_word... " >&6; }
8273if ${ac_cv_path_MKTEMP+:} false; then :
8274  $as_echo_n "(cached) " >&6
8275else
8276  case $MKTEMP in
8277  [\\/]* | ?:[\\/]*)
8278  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8279  ;;
8280  *)
8281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8282for as_dir in $PATH
8283do
8284  IFS=$as_save_IFS
8285  test -z "$as_dir" && as_dir=.
8286    for ac_exec_ext in '' $ac_executable_extensions; do
8287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8288    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8290    break 2
8291  fi
8292done
8293  done
8294IFS=$as_save_IFS
8295
8296  ;;
8297esac
8298fi
8299MKTEMP=$ac_cv_path_MKTEMP
8300if test -n "$MKTEMP"; then
8301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8302$as_echo "$MKTEMP" >&6; }
8303else
8304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8305$as_echo "no" >&6; }
8306fi
8307
8308
8309        if test "x$MKTEMP" = x; then
8310          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8311        fi
8312      else
8313        # Otherwise we believe it is a complete path. Use it as it is.
8314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8315$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8317$as_echo_n "checking for MKTEMP... " >&6; }
8318        if test ! -x "$tool_specified"; then
8319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8320$as_echo "not found" >&6; }
8321          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8322        fi
8323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8324$as_echo "$tool_specified" >&6; }
8325      fi
8326    fi
8327  fi
8328
8329
8330
8331  if test "x$MKTEMP" = x; then
8332    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8333  fi
8334
8335
8336
8337
8338
8339  # Publish this variable in the help.
8340
8341
8342  if test "x$MV" = x; then
8343    # The variable is not set by user, try to locate tool using the code snippet
8344    for ac_prog in mv
8345do
8346  # Extract the first word of "$ac_prog", so it can be a program name with args.
8347set dummy $ac_prog; ac_word=$2
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349$as_echo_n "checking for $ac_word... " >&6; }
8350if ${ac_cv_path_MV+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353  case $MV in
8354  [\\/]* | ?:[\\/]*)
8355  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8356  ;;
8357  *)
8358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359for as_dir in $PATH
8360do
8361  IFS=$as_save_IFS
8362  test -z "$as_dir" && as_dir=.
8363    for ac_exec_ext in '' $ac_executable_extensions; do
8364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367    break 2
8368  fi
8369done
8370  done
8371IFS=$as_save_IFS
8372
8373  ;;
8374esac
8375fi
8376MV=$ac_cv_path_MV
8377if test -n "$MV"; then
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8379$as_echo "$MV" >&6; }
8380else
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382$as_echo "no" >&6; }
8383fi
8384
8385
8386  test -n "$MV" && break
8387done
8388
8389  else
8390    # The variable is set, but is it from the command line or the environment?
8391
8392    # Try to remove the string !MV! from our list.
8393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8395      # If it failed, the variable was not from the command line. Ignore it,
8396      # but warn the user (except for BASH, which is always set by the calling BASH).
8397      if test "xMV" != xBASH; then
8398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8399$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8400      fi
8401      # Try to locate tool using the code snippet
8402      for ac_prog in mv
8403do
8404  # Extract the first word of "$ac_prog", so it can be a program name with args.
8405set dummy $ac_prog; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_MV+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $MV in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434MV=$ac_cv_path_MV
8435if test -n "$MV"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8437$as_echo "$MV" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444  test -n "$MV" && break
8445done
8446
8447    else
8448      # If it succeeded, then it was overridden by the user. We will use it
8449      # for the tool.
8450
8451      # First remove it from the list of overridden variables, so we can test
8452      # for unknown variables in the end.
8453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8454
8455      # Check if the provided tool contains a complete path.
8456      tool_specified="$MV"
8457      tool_basename="${tool_specified##*/}"
8458      if test "x$tool_basename" = "x$tool_specified"; then
8459        # A command without a complete path is provided, search $PATH.
8460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8461$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8462        # Extract the first word of "$tool_basename", so it can be a program name with args.
8463set dummy $tool_basename; ac_word=$2
8464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8465$as_echo_n "checking for $ac_word... " >&6; }
8466if ${ac_cv_path_MV+:} false; then :
8467  $as_echo_n "(cached) " >&6
8468else
8469  case $MV in
8470  [\\/]* | ?:[\\/]*)
8471  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8472  ;;
8473  *)
8474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8475for as_dir in $PATH
8476do
8477  IFS=$as_save_IFS
8478  test -z "$as_dir" && as_dir=.
8479    for ac_exec_ext in '' $ac_executable_extensions; do
8480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8481    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8483    break 2
8484  fi
8485done
8486  done
8487IFS=$as_save_IFS
8488
8489  ;;
8490esac
8491fi
8492MV=$ac_cv_path_MV
8493if test -n "$MV"; then
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8495$as_echo "$MV" >&6; }
8496else
8497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
8499fi
8500
8501
8502        if test "x$MV" = x; then
8503          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8504        fi
8505      else
8506        # Otherwise we believe it is a complete path. Use it as it is.
8507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8508$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8510$as_echo_n "checking for MV... " >&6; }
8511        if test ! -x "$tool_specified"; then
8512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8513$as_echo "not found" >&6; }
8514          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8515        fi
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8517$as_echo "$tool_specified" >&6; }
8518      fi
8519    fi
8520  fi
8521
8522
8523
8524  if test "x$MV" = x; then
8525    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8526  fi
8527
8528
8529
8530
8531
8532  # Publish this variable in the help.
8533
8534
8535  if test "x$NAWK" = x; then
8536    # The variable is not set by user, try to locate tool using the code snippet
8537    for ac_prog in nawk gawk awk
8538do
8539  # Extract the first word of "$ac_prog", so it can be a program name with args.
8540set dummy $ac_prog; ac_word=$2
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8542$as_echo_n "checking for $ac_word... " >&6; }
8543if ${ac_cv_path_NAWK+:} false; then :
8544  $as_echo_n "(cached) " >&6
8545else
8546  case $NAWK in
8547  [\\/]* | ?:[\\/]*)
8548  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8549  ;;
8550  *)
8551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8552for as_dir in $PATH
8553do
8554  IFS=$as_save_IFS
8555  test -z "$as_dir" && as_dir=.
8556    for ac_exec_ext in '' $ac_executable_extensions; do
8557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8558    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8560    break 2
8561  fi
8562done
8563  done
8564IFS=$as_save_IFS
8565
8566  ;;
8567esac
8568fi
8569NAWK=$ac_cv_path_NAWK
8570if test -n "$NAWK"; then
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8572$as_echo "$NAWK" >&6; }
8573else
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8575$as_echo "no" >&6; }
8576fi
8577
8578
8579  test -n "$NAWK" && break
8580done
8581
8582  else
8583    # The variable is set, but is it from the command line or the environment?
8584
8585    # Try to remove the string !NAWK! from our list.
8586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8588      # If it failed, the variable was not from the command line. Ignore it,
8589      # but warn the user (except for BASH, which is always set by the calling BASH).
8590      if test "xNAWK" != xBASH; then
8591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8592$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8593      fi
8594      # Try to locate tool using the code snippet
8595      for ac_prog in nawk gawk awk
8596do
8597  # Extract the first word of "$ac_prog", so it can be a program name with args.
8598set dummy $ac_prog; ac_word=$2
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600$as_echo_n "checking for $ac_word... " >&6; }
8601if ${ac_cv_path_NAWK+:} false; then :
8602  $as_echo_n "(cached) " >&6
8603else
8604  case $NAWK in
8605  [\\/]* | ?:[\\/]*)
8606  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8607  ;;
8608  *)
8609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612  IFS=$as_save_IFS
8613  test -z "$as_dir" && as_dir=.
8614    for ac_exec_ext in '' $ac_executable_extensions; do
8615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8616    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618    break 2
8619  fi
8620done
8621  done
8622IFS=$as_save_IFS
8623
8624  ;;
8625esac
8626fi
8627NAWK=$ac_cv_path_NAWK
8628if test -n "$NAWK"; then
8629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8630$as_echo "$NAWK" >&6; }
8631else
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8633$as_echo "no" >&6; }
8634fi
8635
8636
8637  test -n "$NAWK" && break
8638done
8639
8640    else
8641      # If it succeeded, then it was overridden by the user. We will use it
8642      # for the tool.
8643
8644      # First remove it from the list of overridden variables, so we can test
8645      # for unknown variables in the end.
8646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8647
8648      # Check if the provided tool contains a complete path.
8649      tool_specified="$NAWK"
8650      tool_basename="${tool_specified##*/}"
8651      if test "x$tool_basename" = "x$tool_specified"; then
8652        # A command without a complete path is provided, search $PATH.
8653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8654$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8655        # Extract the first word of "$tool_basename", so it can be a program name with args.
8656set dummy $tool_basename; ac_word=$2
8657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8658$as_echo_n "checking for $ac_word... " >&6; }
8659if ${ac_cv_path_NAWK+:} false; then :
8660  $as_echo_n "(cached) " >&6
8661else
8662  case $NAWK in
8663  [\\/]* | ?:[\\/]*)
8664  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8665  ;;
8666  *)
8667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8668for as_dir in $PATH
8669do
8670  IFS=$as_save_IFS
8671  test -z "$as_dir" && as_dir=.
8672    for ac_exec_ext in '' $ac_executable_extensions; do
8673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8674    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8676    break 2
8677  fi
8678done
8679  done
8680IFS=$as_save_IFS
8681
8682  ;;
8683esac
8684fi
8685NAWK=$ac_cv_path_NAWK
8686if test -n "$NAWK"; then
8687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8688$as_echo "$NAWK" >&6; }
8689else
8690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8691$as_echo "no" >&6; }
8692fi
8693
8694
8695        if test "x$NAWK" = x; then
8696          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8697        fi
8698      else
8699        # Otherwise we believe it is a complete path. Use it as it is.
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8701$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8703$as_echo_n "checking for NAWK... " >&6; }
8704        if test ! -x "$tool_specified"; then
8705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8706$as_echo "not found" >&6; }
8707          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8708        fi
8709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8710$as_echo "$tool_specified" >&6; }
8711      fi
8712    fi
8713  fi
8714
8715
8716
8717  if test "x$NAWK" = x; then
8718    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8719  fi
8720
8721
8722
8723
8724
8725  # Publish this variable in the help.
8726
8727
8728  if test "x$PRINTF" = x; then
8729    # The variable is not set by user, try to locate tool using the code snippet
8730    for ac_prog in printf
8731do
8732  # Extract the first word of "$ac_prog", so it can be a program name with args.
8733set dummy $ac_prog; ac_word=$2
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8735$as_echo_n "checking for $ac_word... " >&6; }
8736if ${ac_cv_path_PRINTF+:} false; then :
8737  $as_echo_n "(cached) " >&6
8738else
8739  case $PRINTF in
8740  [\\/]* | ?:[\\/]*)
8741  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8742  ;;
8743  *)
8744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8745for as_dir in $PATH
8746do
8747  IFS=$as_save_IFS
8748  test -z "$as_dir" && as_dir=.
8749    for ac_exec_ext in '' $ac_executable_extensions; do
8750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8751    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8753    break 2
8754  fi
8755done
8756  done
8757IFS=$as_save_IFS
8758
8759  ;;
8760esac
8761fi
8762PRINTF=$ac_cv_path_PRINTF
8763if test -n "$PRINTF"; then
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8765$as_echo "$PRINTF" >&6; }
8766else
8767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768$as_echo "no" >&6; }
8769fi
8770
8771
8772  test -n "$PRINTF" && break
8773done
8774
8775  else
8776    # The variable is set, but is it from the command line or the environment?
8777
8778    # Try to remove the string !PRINTF! from our list.
8779    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8780    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8781      # If it failed, the variable was not from the command line. Ignore it,
8782      # but warn the user (except for BASH, which is always set by the calling BASH).
8783      if test "xPRINTF" != xBASH; then
8784        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8785$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8786      fi
8787      # Try to locate tool using the code snippet
8788      for ac_prog in printf
8789do
8790  # Extract the first word of "$ac_prog", so it can be a program name with args.
8791set dummy $ac_prog; ac_word=$2
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793$as_echo_n "checking for $ac_word... " >&6; }
8794if ${ac_cv_path_PRINTF+:} false; then :
8795  $as_echo_n "(cached) " >&6
8796else
8797  case $PRINTF in
8798  [\\/]* | ?:[\\/]*)
8799  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8800  ;;
8801  *)
8802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803for as_dir in $PATH
8804do
8805  IFS=$as_save_IFS
8806  test -z "$as_dir" && as_dir=.
8807    for ac_exec_ext in '' $ac_executable_extensions; do
8808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8809    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811    break 2
8812  fi
8813done
8814  done
8815IFS=$as_save_IFS
8816
8817  ;;
8818esac
8819fi
8820PRINTF=$ac_cv_path_PRINTF
8821if test -n "$PRINTF"; then
8822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8823$as_echo "$PRINTF" >&6; }
8824else
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
8827fi
8828
8829
8830  test -n "$PRINTF" && break
8831done
8832
8833    else
8834      # If it succeeded, then it was overridden by the user. We will use it
8835      # for the tool.
8836
8837      # First remove it from the list of overridden variables, so we can test
8838      # for unknown variables in the end.
8839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8840
8841      # Check if the provided tool contains a complete path.
8842      tool_specified="$PRINTF"
8843      tool_basename="${tool_specified##*/}"
8844      if test "x$tool_basename" = "x$tool_specified"; then
8845        # A command without a complete path is provided, search $PATH.
8846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8847$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8848        # Extract the first word of "$tool_basename", so it can be a program name with args.
8849set dummy $tool_basename; ac_word=$2
8850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8851$as_echo_n "checking for $ac_word... " >&6; }
8852if ${ac_cv_path_PRINTF+:} false; then :
8853  $as_echo_n "(cached) " >&6
8854else
8855  case $PRINTF in
8856  [\\/]* | ?:[\\/]*)
8857  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8858  ;;
8859  *)
8860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8861for as_dir in $PATH
8862do
8863  IFS=$as_save_IFS
8864  test -z "$as_dir" && as_dir=.
8865    for ac_exec_ext in '' $ac_executable_extensions; do
8866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8867    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8869    break 2
8870  fi
8871done
8872  done
8873IFS=$as_save_IFS
8874
8875  ;;
8876esac
8877fi
8878PRINTF=$ac_cv_path_PRINTF
8879if test -n "$PRINTF"; then
8880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8881$as_echo "$PRINTF" >&6; }
8882else
8883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8884$as_echo "no" >&6; }
8885fi
8886
8887
8888        if test "x$PRINTF" = x; then
8889          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8890        fi
8891      else
8892        # Otherwise we believe it is a complete path. Use it as it is.
8893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8894$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8896$as_echo_n "checking for PRINTF... " >&6; }
8897        if test ! -x "$tool_specified"; then
8898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8899$as_echo "not found" >&6; }
8900          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8901        fi
8902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8903$as_echo "$tool_specified" >&6; }
8904      fi
8905    fi
8906  fi
8907
8908
8909
8910  if test "x$PRINTF" = x; then
8911    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8912  fi
8913
8914
8915
8916
8917
8918  # Publish this variable in the help.
8919
8920
8921  if test "x$RM" = x; then
8922    # The variable is not set by user, try to locate tool using the code snippet
8923    for ac_prog in rm
8924do
8925  # Extract the first word of "$ac_prog", so it can be a program name with args.
8926set dummy $ac_prog; ac_word=$2
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928$as_echo_n "checking for $ac_word... " >&6; }
8929if ${ac_cv_path_RM+:} false; then :
8930  $as_echo_n "(cached) " >&6
8931else
8932  case $RM in
8933  [\\/]* | ?:[\\/]*)
8934  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8935  ;;
8936  *)
8937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8938for as_dir in $PATH
8939do
8940  IFS=$as_save_IFS
8941  test -z "$as_dir" && as_dir=.
8942    for ac_exec_ext in '' $ac_executable_extensions; do
8943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8944    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8946    break 2
8947  fi
8948done
8949  done
8950IFS=$as_save_IFS
8951
8952  ;;
8953esac
8954fi
8955RM=$ac_cv_path_RM
8956if test -n "$RM"; then
8957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8958$as_echo "$RM" >&6; }
8959else
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
8962fi
8963
8964
8965  test -n "$RM" && break
8966done
8967
8968  else
8969    # The variable is set, but is it from the command line or the environment?
8970
8971    # Try to remove the string !RM! from our list.
8972    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8973    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8974      # If it failed, the variable was not from the command line. Ignore it,
8975      # but warn the user (except for BASH, which is always set by the calling BASH).
8976      if test "xRM" != xBASH; then
8977        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8978$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8979      fi
8980      # Try to locate tool using the code snippet
8981      for ac_prog in rm
8982do
8983  # Extract the first word of "$ac_prog", so it can be a program name with args.
8984set dummy $ac_prog; ac_word=$2
8985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8986$as_echo_n "checking for $ac_word... " >&6; }
8987if ${ac_cv_path_RM+:} false; then :
8988  $as_echo_n "(cached) " >&6
8989else
8990  case $RM in
8991  [\\/]* | ?:[\\/]*)
8992  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8993  ;;
8994  *)
8995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8996for as_dir in $PATH
8997do
8998  IFS=$as_save_IFS
8999  test -z "$as_dir" && as_dir=.
9000    for ac_exec_ext in '' $ac_executable_extensions; do
9001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9002    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9004    break 2
9005  fi
9006done
9007  done
9008IFS=$as_save_IFS
9009
9010  ;;
9011esac
9012fi
9013RM=$ac_cv_path_RM
9014if test -n "$RM"; then
9015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9016$as_echo "$RM" >&6; }
9017else
9018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9019$as_echo "no" >&6; }
9020fi
9021
9022
9023  test -n "$RM" && break
9024done
9025
9026    else
9027      # If it succeeded, then it was overridden by the user. We will use it
9028      # for the tool.
9029
9030      # First remove it from the list of overridden variables, so we can test
9031      # for unknown variables in the end.
9032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9033
9034      # Check if the provided tool contains a complete path.
9035      tool_specified="$RM"
9036      tool_basename="${tool_specified##*/}"
9037      if test "x$tool_basename" = "x$tool_specified"; then
9038        # A command without a complete path is provided, search $PATH.
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9040$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9041        # Extract the first word of "$tool_basename", so it can be a program name with args.
9042set dummy $tool_basename; ac_word=$2
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044$as_echo_n "checking for $ac_word... " >&6; }
9045if ${ac_cv_path_RM+:} false; then :
9046  $as_echo_n "(cached) " >&6
9047else
9048  case $RM in
9049  [\\/]* | ?:[\\/]*)
9050  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9051  ;;
9052  *)
9053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9054for as_dir in $PATH
9055do
9056  IFS=$as_save_IFS
9057  test -z "$as_dir" && as_dir=.
9058    for ac_exec_ext in '' $ac_executable_extensions; do
9059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9060    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9062    break 2
9063  fi
9064done
9065  done
9066IFS=$as_save_IFS
9067
9068  ;;
9069esac
9070fi
9071RM=$ac_cv_path_RM
9072if test -n "$RM"; then
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9074$as_echo "$RM" >&6; }
9075else
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
9078fi
9079
9080
9081        if test "x$RM" = x; then
9082          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9083        fi
9084      else
9085        # Otherwise we believe it is a complete path. Use it as it is.
9086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9087$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9089$as_echo_n "checking for RM... " >&6; }
9090        if test ! -x "$tool_specified"; then
9091          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9092$as_echo "not found" >&6; }
9093          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9094        fi
9095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9096$as_echo "$tool_specified" >&6; }
9097      fi
9098    fi
9099  fi
9100
9101
9102
9103  if test "x$RM" = x; then
9104    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9105  fi
9106
9107
9108
9109
9110
9111  # Publish this variable in the help.
9112
9113
9114  if test "x$SH" = x; then
9115    # The variable is not set by user, try to locate tool using the code snippet
9116    for ac_prog in sh
9117do
9118  # Extract the first word of "$ac_prog", so it can be a program name with args.
9119set dummy $ac_prog; ac_word=$2
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9121$as_echo_n "checking for $ac_word... " >&6; }
9122if ${ac_cv_path_SH+:} false; then :
9123  $as_echo_n "(cached) " >&6
9124else
9125  case $SH in
9126  [\\/]* | ?:[\\/]*)
9127  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9128  ;;
9129  *)
9130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9131for as_dir in $PATH
9132do
9133  IFS=$as_save_IFS
9134  test -z "$as_dir" && as_dir=.
9135    for ac_exec_ext in '' $ac_executable_extensions; do
9136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9137    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9139    break 2
9140  fi
9141done
9142  done
9143IFS=$as_save_IFS
9144
9145  ;;
9146esac
9147fi
9148SH=$ac_cv_path_SH
9149if test -n "$SH"; then
9150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9151$as_echo "$SH" >&6; }
9152else
9153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9154$as_echo "no" >&6; }
9155fi
9156
9157
9158  test -n "$SH" && break
9159done
9160
9161  else
9162    # The variable is set, but is it from the command line or the environment?
9163
9164    # Try to remove the string !SH! from our list.
9165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9167      # If it failed, the variable was not from the command line. Ignore it,
9168      # but warn the user (except for BASH, which is always set by the calling BASH).
9169      if test "xSH" != xBASH; then
9170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9171$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9172      fi
9173      # Try to locate tool using the code snippet
9174      for ac_prog in sh
9175do
9176  # Extract the first word of "$ac_prog", so it can be a program name with args.
9177set dummy $ac_prog; ac_word=$2
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9179$as_echo_n "checking for $ac_word... " >&6; }
9180if ${ac_cv_path_SH+:} false; then :
9181  $as_echo_n "(cached) " >&6
9182else
9183  case $SH in
9184  [\\/]* | ?:[\\/]*)
9185  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9186  ;;
9187  *)
9188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9189for as_dir in $PATH
9190do
9191  IFS=$as_save_IFS
9192  test -z "$as_dir" && as_dir=.
9193    for ac_exec_ext in '' $ac_executable_extensions; do
9194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9195    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9197    break 2
9198  fi
9199done
9200  done
9201IFS=$as_save_IFS
9202
9203  ;;
9204esac
9205fi
9206SH=$ac_cv_path_SH
9207if test -n "$SH"; then
9208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9209$as_echo "$SH" >&6; }
9210else
9211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9212$as_echo "no" >&6; }
9213fi
9214
9215
9216  test -n "$SH" && break
9217done
9218
9219    else
9220      # If it succeeded, then it was overridden by the user. We will use it
9221      # for the tool.
9222
9223      # First remove it from the list of overridden variables, so we can test
9224      # for unknown variables in the end.
9225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9226
9227      # Check if the provided tool contains a complete path.
9228      tool_specified="$SH"
9229      tool_basename="${tool_specified##*/}"
9230      if test "x$tool_basename" = "x$tool_specified"; then
9231        # A command without a complete path is provided, search $PATH.
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9233$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9234        # Extract the first word of "$tool_basename", so it can be a program name with args.
9235set dummy $tool_basename; ac_word=$2
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9237$as_echo_n "checking for $ac_word... " >&6; }
9238if ${ac_cv_path_SH+:} false; then :
9239  $as_echo_n "(cached) " >&6
9240else
9241  case $SH in
9242  [\\/]* | ?:[\\/]*)
9243  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9244  ;;
9245  *)
9246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9247for as_dir in $PATH
9248do
9249  IFS=$as_save_IFS
9250  test -z "$as_dir" && as_dir=.
9251    for ac_exec_ext in '' $ac_executable_extensions; do
9252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9253    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9255    break 2
9256  fi
9257done
9258  done
9259IFS=$as_save_IFS
9260
9261  ;;
9262esac
9263fi
9264SH=$ac_cv_path_SH
9265if test -n "$SH"; then
9266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9267$as_echo "$SH" >&6; }
9268else
9269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270$as_echo "no" >&6; }
9271fi
9272
9273
9274        if test "x$SH" = x; then
9275          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9276        fi
9277      else
9278        # Otherwise we believe it is a complete path. Use it as it is.
9279        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9280$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9282$as_echo_n "checking for SH... " >&6; }
9283        if test ! -x "$tool_specified"; then
9284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9285$as_echo "not found" >&6; }
9286          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9287        fi
9288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9289$as_echo "$tool_specified" >&6; }
9290      fi
9291    fi
9292  fi
9293
9294
9295
9296  if test "x$SH" = x; then
9297    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9298  fi
9299
9300
9301
9302
9303
9304  # Publish this variable in the help.
9305
9306
9307  if test "x$SORT" = x; then
9308    # The variable is not set by user, try to locate tool using the code snippet
9309    for ac_prog in sort
9310do
9311  # Extract the first word of "$ac_prog", so it can be a program name with args.
9312set dummy $ac_prog; ac_word=$2
9313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9314$as_echo_n "checking for $ac_word... " >&6; }
9315if ${ac_cv_path_SORT+:} false; then :
9316  $as_echo_n "(cached) " >&6
9317else
9318  case $SORT in
9319  [\\/]* | ?:[\\/]*)
9320  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9321  ;;
9322  *)
9323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9324for as_dir in $PATH
9325do
9326  IFS=$as_save_IFS
9327  test -z "$as_dir" && as_dir=.
9328    for ac_exec_ext in '' $ac_executable_extensions; do
9329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9330    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9332    break 2
9333  fi
9334done
9335  done
9336IFS=$as_save_IFS
9337
9338  ;;
9339esac
9340fi
9341SORT=$ac_cv_path_SORT
9342if test -n "$SORT"; then
9343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9344$as_echo "$SORT" >&6; }
9345else
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
9348fi
9349
9350
9351  test -n "$SORT" && break
9352done
9353
9354  else
9355    # The variable is set, but is it from the command line or the environment?
9356
9357    # Try to remove the string !SORT! from our list.
9358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9360      # If it failed, the variable was not from the command line. Ignore it,
9361      # but warn the user (except for BASH, which is always set by the calling BASH).
9362      if test "xSORT" != xBASH; then
9363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9364$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9365      fi
9366      # Try to locate tool using the code snippet
9367      for ac_prog in sort
9368do
9369  # Extract the first word of "$ac_prog", so it can be a program name with args.
9370set dummy $ac_prog; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_SORT+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $SORT in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399SORT=$ac_cv_path_SORT
9400if test -n "$SORT"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9402$as_echo "$SORT" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409  test -n "$SORT" && break
9410done
9411
9412    else
9413      # If it succeeded, then it was overridden by the user. We will use it
9414      # for the tool.
9415
9416      # First remove it from the list of overridden variables, so we can test
9417      # for unknown variables in the end.
9418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9419
9420      # Check if the provided tool contains a complete path.
9421      tool_specified="$SORT"
9422      tool_basename="${tool_specified##*/}"
9423      if test "x$tool_basename" = "x$tool_specified"; then
9424        # A command without a complete path is provided, search $PATH.
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9426$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9427        # Extract the first word of "$tool_basename", so it can be a program name with args.
9428set dummy $tool_basename; ac_word=$2
9429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430$as_echo_n "checking for $ac_word... " >&6; }
9431if ${ac_cv_path_SORT+:} false; then :
9432  $as_echo_n "(cached) " >&6
9433else
9434  case $SORT in
9435  [\\/]* | ?:[\\/]*)
9436  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9437  ;;
9438  *)
9439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9440for as_dir in $PATH
9441do
9442  IFS=$as_save_IFS
9443  test -z "$as_dir" && as_dir=.
9444    for ac_exec_ext in '' $ac_executable_extensions; do
9445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9446    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9448    break 2
9449  fi
9450done
9451  done
9452IFS=$as_save_IFS
9453
9454  ;;
9455esac
9456fi
9457SORT=$ac_cv_path_SORT
9458if test -n "$SORT"; then
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9460$as_echo "$SORT" >&6; }
9461else
9462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464fi
9465
9466
9467        if test "x$SORT" = x; then
9468          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9469        fi
9470      else
9471        # Otherwise we believe it is a complete path. Use it as it is.
9472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9473$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9475$as_echo_n "checking for SORT... " >&6; }
9476        if test ! -x "$tool_specified"; then
9477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9478$as_echo "not found" >&6; }
9479          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9480        fi
9481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9482$as_echo "$tool_specified" >&6; }
9483      fi
9484    fi
9485  fi
9486
9487
9488
9489  if test "x$SORT" = x; then
9490    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9491  fi
9492
9493
9494
9495
9496
9497  # Publish this variable in the help.
9498
9499
9500  if test "x$TAIL" = x; then
9501    # The variable is not set by user, try to locate tool using the code snippet
9502    for ac_prog in tail
9503do
9504  # Extract the first word of "$ac_prog", so it can be a program name with args.
9505set dummy $ac_prog; ac_word=$2
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507$as_echo_n "checking for $ac_word... " >&6; }
9508if ${ac_cv_path_TAIL+:} false; then :
9509  $as_echo_n "(cached) " >&6
9510else
9511  case $TAIL in
9512  [\\/]* | ?:[\\/]*)
9513  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9514  ;;
9515  *)
9516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517for as_dir in $PATH
9518do
9519  IFS=$as_save_IFS
9520  test -z "$as_dir" && as_dir=.
9521    for ac_exec_ext in '' $ac_executable_extensions; do
9522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525    break 2
9526  fi
9527done
9528  done
9529IFS=$as_save_IFS
9530
9531  ;;
9532esac
9533fi
9534TAIL=$ac_cv_path_TAIL
9535if test -n "$TAIL"; then
9536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9537$as_echo "$TAIL" >&6; }
9538else
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
9541fi
9542
9543
9544  test -n "$TAIL" && break
9545done
9546
9547  else
9548    # The variable is set, but is it from the command line or the environment?
9549
9550    # Try to remove the string !TAIL! from our list.
9551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9553      # If it failed, the variable was not from the command line. Ignore it,
9554      # but warn the user (except for BASH, which is always set by the calling BASH).
9555      if test "xTAIL" != xBASH; then
9556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9557$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9558      fi
9559      # Try to locate tool using the code snippet
9560      for ac_prog in tail
9561do
9562  # Extract the first word of "$ac_prog", so it can be a program name with args.
9563set dummy $ac_prog; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_TAIL+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $TAIL in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592TAIL=$ac_cv_path_TAIL
9593if test -n "$TAIL"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9595$as_echo "$TAIL" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602  test -n "$TAIL" && break
9603done
9604
9605    else
9606      # If it succeeded, then it was overridden by the user. We will use it
9607      # for the tool.
9608
9609      # First remove it from the list of overridden variables, so we can test
9610      # for unknown variables in the end.
9611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9612
9613      # Check if the provided tool contains a complete path.
9614      tool_specified="$TAIL"
9615      tool_basename="${tool_specified##*/}"
9616      if test "x$tool_basename" = "x$tool_specified"; then
9617        # A command without a complete path is provided, search $PATH.
9618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9619$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9620        # Extract the first word of "$tool_basename", so it can be a program name with args.
9621set dummy $tool_basename; ac_word=$2
9622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9623$as_echo_n "checking for $ac_word... " >&6; }
9624if ${ac_cv_path_TAIL+:} false; then :
9625  $as_echo_n "(cached) " >&6
9626else
9627  case $TAIL in
9628  [\\/]* | ?:[\\/]*)
9629  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9630  ;;
9631  *)
9632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9633for as_dir in $PATH
9634do
9635  IFS=$as_save_IFS
9636  test -z "$as_dir" && as_dir=.
9637    for ac_exec_ext in '' $ac_executable_extensions; do
9638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9639    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9641    break 2
9642  fi
9643done
9644  done
9645IFS=$as_save_IFS
9646
9647  ;;
9648esac
9649fi
9650TAIL=$ac_cv_path_TAIL
9651if test -n "$TAIL"; then
9652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9653$as_echo "$TAIL" >&6; }
9654else
9655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
9657fi
9658
9659
9660        if test "x$TAIL" = x; then
9661          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9662        fi
9663      else
9664        # Otherwise we believe it is a complete path. Use it as it is.
9665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9666$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9668$as_echo_n "checking for TAIL... " >&6; }
9669        if test ! -x "$tool_specified"; then
9670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9671$as_echo "not found" >&6; }
9672          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9673        fi
9674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9675$as_echo "$tool_specified" >&6; }
9676      fi
9677    fi
9678  fi
9679
9680
9681
9682  if test "x$TAIL" = x; then
9683    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9684  fi
9685
9686
9687
9688
9689
9690  # Publish this variable in the help.
9691
9692
9693  if test "x$TAR" = x; then
9694    # The variable is not set by user, try to locate tool using the code snippet
9695    for ac_prog in tar
9696do
9697  # Extract the first word of "$ac_prog", so it can be a program name with args.
9698set dummy $ac_prog; ac_word=$2
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9700$as_echo_n "checking for $ac_word... " >&6; }
9701if ${ac_cv_path_TAR+:} false; then :
9702  $as_echo_n "(cached) " >&6
9703else
9704  case $TAR in
9705  [\\/]* | ?:[\\/]*)
9706  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9707  ;;
9708  *)
9709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710for as_dir in $PATH
9711do
9712  IFS=$as_save_IFS
9713  test -z "$as_dir" && as_dir=.
9714    for ac_exec_ext in '' $ac_executable_extensions; do
9715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9716    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9718    break 2
9719  fi
9720done
9721  done
9722IFS=$as_save_IFS
9723
9724  ;;
9725esac
9726fi
9727TAR=$ac_cv_path_TAR
9728if test -n "$TAR"; then
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9730$as_echo "$TAR" >&6; }
9731else
9732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
9734fi
9735
9736
9737  test -n "$TAR" && break
9738done
9739
9740  else
9741    # The variable is set, but is it from the command line or the environment?
9742
9743    # Try to remove the string !TAR! from our list.
9744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9746      # If it failed, the variable was not from the command line. Ignore it,
9747      # but warn the user (except for BASH, which is always set by the calling BASH).
9748      if test "xTAR" != xBASH; then
9749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9750$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9751      fi
9752      # Try to locate tool using the code snippet
9753      for ac_prog in tar
9754do
9755  # Extract the first word of "$ac_prog", so it can be a program name with args.
9756set dummy $ac_prog; ac_word=$2
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9758$as_echo_n "checking for $ac_word... " >&6; }
9759if ${ac_cv_path_TAR+:} false; then :
9760  $as_echo_n "(cached) " >&6
9761else
9762  case $TAR in
9763  [\\/]* | ?:[\\/]*)
9764  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9765  ;;
9766  *)
9767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9768for as_dir in $PATH
9769do
9770  IFS=$as_save_IFS
9771  test -z "$as_dir" && as_dir=.
9772    for ac_exec_ext in '' $ac_executable_extensions; do
9773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9774    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9776    break 2
9777  fi
9778done
9779  done
9780IFS=$as_save_IFS
9781
9782  ;;
9783esac
9784fi
9785TAR=$ac_cv_path_TAR
9786if test -n "$TAR"; then
9787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9788$as_echo "$TAR" >&6; }
9789else
9790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9791$as_echo "no" >&6; }
9792fi
9793
9794
9795  test -n "$TAR" && break
9796done
9797
9798    else
9799      # If it succeeded, then it was overridden by the user. We will use it
9800      # for the tool.
9801
9802      # First remove it from the list of overridden variables, so we can test
9803      # for unknown variables in the end.
9804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9805
9806      # Check if the provided tool contains a complete path.
9807      tool_specified="$TAR"
9808      tool_basename="${tool_specified##*/}"
9809      if test "x$tool_basename" = "x$tool_specified"; then
9810        # A command without a complete path is provided, search $PATH.
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9812$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9813        # Extract the first word of "$tool_basename", so it can be a program name with args.
9814set dummy $tool_basename; ac_word=$2
9815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9816$as_echo_n "checking for $ac_word... " >&6; }
9817if ${ac_cv_path_TAR+:} false; then :
9818  $as_echo_n "(cached) " >&6
9819else
9820  case $TAR in
9821  [\\/]* | ?:[\\/]*)
9822  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9823  ;;
9824  *)
9825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9826for as_dir in $PATH
9827do
9828  IFS=$as_save_IFS
9829  test -z "$as_dir" && as_dir=.
9830    for ac_exec_ext in '' $ac_executable_extensions; do
9831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9832    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9834    break 2
9835  fi
9836done
9837  done
9838IFS=$as_save_IFS
9839
9840  ;;
9841esac
9842fi
9843TAR=$ac_cv_path_TAR
9844if test -n "$TAR"; then
9845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9846$as_echo "$TAR" >&6; }
9847else
9848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
9850fi
9851
9852
9853        if test "x$TAR" = x; then
9854          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9855        fi
9856      else
9857        # Otherwise we believe it is a complete path. Use it as it is.
9858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9859$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9861$as_echo_n "checking for TAR... " >&6; }
9862        if test ! -x "$tool_specified"; then
9863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9864$as_echo "not found" >&6; }
9865          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9866        fi
9867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9868$as_echo "$tool_specified" >&6; }
9869      fi
9870    fi
9871  fi
9872
9873
9874
9875  if test "x$TAR" = x; then
9876    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9877  fi
9878
9879
9880
9881
9882
9883  # Publish this variable in the help.
9884
9885
9886  if test "x$TEE" = x; then
9887    # The variable is not set by user, try to locate tool using the code snippet
9888    for ac_prog in tee
9889do
9890  # Extract the first word of "$ac_prog", so it can be a program name with args.
9891set dummy $ac_prog; ac_word=$2
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9893$as_echo_n "checking for $ac_word... " >&6; }
9894if ${ac_cv_path_TEE+:} false; then :
9895  $as_echo_n "(cached) " >&6
9896else
9897  case $TEE in
9898  [\\/]* | ?:[\\/]*)
9899  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9900  ;;
9901  *)
9902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903for as_dir in $PATH
9904do
9905  IFS=$as_save_IFS
9906  test -z "$as_dir" && as_dir=.
9907    for ac_exec_ext in '' $ac_executable_extensions; do
9908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9909    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911    break 2
9912  fi
9913done
9914  done
9915IFS=$as_save_IFS
9916
9917  ;;
9918esac
9919fi
9920TEE=$ac_cv_path_TEE
9921if test -n "$TEE"; then
9922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9923$as_echo "$TEE" >&6; }
9924else
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927fi
9928
9929
9930  test -n "$TEE" && break
9931done
9932
9933  else
9934    # The variable is set, but is it from the command line or the environment?
9935
9936    # Try to remove the string !TEE! from our list.
9937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9939      # If it failed, the variable was not from the command line. Ignore it,
9940      # but warn the user (except for BASH, which is always set by the calling BASH).
9941      if test "xTEE" != xBASH; then
9942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9943$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9944      fi
9945      # Try to locate tool using the code snippet
9946      for ac_prog in tee
9947do
9948  # Extract the first word of "$ac_prog", so it can be a program name with args.
9949set dummy $ac_prog; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if ${ac_cv_path_TEE+:} false; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $TEE in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9967    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978TEE=$ac_cv_path_TEE
9979if test -n "$TEE"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9981$as_echo "$TEE" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988  test -n "$TEE" && break
9989done
9990
9991    else
9992      # If it succeeded, then it was overridden by the user. We will use it
9993      # for the tool.
9994
9995      # First remove it from the list of overridden variables, so we can test
9996      # for unknown variables in the end.
9997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9998
9999      # Check if the provided tool contains a complete path.
10000      tool_specified="$TEE"
10001      tool_basename="${tool_specified##*/}"
10002      if test "x$tool_basename" = "x$tool_specified"; then
10003        # A command without a complete path is provided, search $PATH.
10004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10005$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10006        # Extract the first word of "$tool_basename", so it can be a program name with args.
10007set dummy $tool_basename; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if ${ac_cv_path_TEE+:} false; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $TEE in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10025    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036TEE=$ac_cv_path_TEE
10037if test -n "$TEE"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10039$as_echo "$TEE" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046        if test "x$TEE" = x; then
10047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10048        fi
10049      else
10050        # Otherwise we believe it is a complete path. Use it as it is.
10051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10052$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10054$as_echo_n "checking for TEE... " >&6; }
10055        if test ! -x "$tool_specified"; then
10056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10057$as_echo "not found" >&6; }
10058          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10059        fi
10060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10061$as_echo "$tool_specified" >&6; }
10062      fi
10063    fi
10064  fi
10065
10066
10067
10068  if test "x$TEE" = x; then
10069    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10070  fi
10071
10072
10073
10074
10075
10076  # Publish this variable in the help.
10077
10078
10079  if test "x$TOUCH" = x; then
10080    # The variable is not set by user, try to locate tool using the code snippet
10081    for ac_prog in touch
10082do
10083  # Extract the first word of "$ac_prog", so it can be a program name with args.
10084set dummy $ac_prog; ac_word=$2
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086$as_echo_n "checking for $ac_word... " >&6; }
10087if ${ac_cv_path_TOUCH+:} false; then :
10088  $as_echo_n "(cached) " >&6
10089else
10090  case $TOUCH in
10091  [\\/]* | ?:[\\/]*)
10092  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10093  ;;
10094  *)
10095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096for as_dir in $PATH
10097do
10098  IFS=$as_save_IFS
10099  test -z "$as_dir" && as_dir=.
10100    for ac_exec_ext in '' $ac_executable_extensions; do
10101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10102    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104    break 2
10105  fi
10106done
10107  done
10108IFS=$as_save_IFS
10109
10110  ;;
10111esac
10112fi
10113TOUCH=$ac_cv_path_TOUCH
10114if test -n "$TOUCH"; then
10115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10116$as_echo "$TOUCH" >&6; }
10117else
10118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
10120fi
10121
10122
10123  test -n "$TOUCH" && break
10124done
10125
10126  else
10127    # The variable is set, but is it from the command line or the environment?
10128
10129    # Try to remove the string !TOUCH! from our list.
10130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10132      # If it failed, the variable was not from the command line. Ignore it,
10133      # but warn the user (except for BASH, which is always set by the calling BASH).
10134      if test "xTOUCH" != xBASH; then
10135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10136$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10137      fi
10138      # Try to locate tool using the code snippet
10139      for ac_prog in touch
10140do
10141  # Extract the first word of "$ac_prog", so it can be a program name with args.
10142set dummy $ac_prog; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if ${ac_cv_path_TOUCH+:} false; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $TOUCH in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171TOUCH=$ac_cv_path_TOUCH
10172if test -n "$TOUCH"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10174$as_echo "$TOUCH" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181  test -n "$TOUCH" && break
10182done
10183
10184    else
10185      # If it succeeded, then it was overridden by the user. We will use it
10186      # for the tool.
10187
10188      # First remove it from the list of overridden variables, so we can test
10189      # for unknown variables in the end.
10190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10191
10192      # Check if the provided tool contains a complete path.
10193      tool_specified="$TOUCH"
10194      tool_basename="${tool_specified##*/}"
10195      if test "x$tool_basename" = "x$tool_specified"; then
10196        # A command without a complete path is provided, search $PATH.
10197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10198$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10199        # Extract the first word of "$tool_basename", so it can be a program name with args.
10200set dummy $tool_basename; ac_word=$2
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10202$as_echo_n "checking for $ac_word... " >&6; }
10203if ${ac_cv_path_TOUCH+:} false; then :
10204  $as_echo_n "(cached) " >&6
10205else
10206  case $TOUCH in
10207  [\\/]* | ?:[\\/]*)
10208  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10209  ;;
10210  *)
10211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10212for as_dir in $PATH
10213do
10214  IFS=$as_save_IFS
10215  test -z "$as_dir" && as_dir=.
10216    for ac_exec_ext in '' $ac_executable_extensions; do
10217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10218    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10220    break 2
10221  fi
10222done
10223  done
10224IFS=$as_save_IFS
10225
10226  ;;
10227esac
10228fi
10229TOUCH=$ac_cv_path_TOUCH
10230if test -n "$TOUCH"; then
10231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10232$as_echo "$TOUCH" >&6; }
10233else
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
10236fi
10237
10238
10239        if test "x$TOUCH" = x; then
10240          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10241        fi
10242      else
10243        # Otherwise we believe it is a complete path. Use it as it is.
10244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10245$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10247$as_echo_n "checking for TOUCH... " >&6; }
10248        if test ! -x "$tool_specified"; then
10249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10250$as_echo "not found" >&6; }
10251          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10252        fi
10253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10254$as_echo "$tool_specified" >&6; }
10255      fi
10256    fi
10257  fi
10258
10259
10260
10261  if test "x$TOUCH" = x; then
10262    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10263  fi
10264
10265
10266
10267
10268
10269  # Publish this variable in the help.
10270
10271
10272  if test "x$TR" = x; then
10273    # The variable is not set by user, try to locate tool using the code snippet
10274    for ac_prog in tr
10275do
10276  # Extract the first word of "$ac_prog", so it can be a program name with args.
10277set dummy $ac_prog; ac_word=$2
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279$as_echo_n "checking for $ac_word... " >&6; }
10280if ${ac_cv_path_TR+:} false; then :
10281  $as_echo_n "(cached) " >&6
10282else
10283  case $TR in
10284  [\\/]* | ?:[\\/]*)
10285  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10286  ;;
10287  *)
10288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303  ;;
10304esac
10305fi
10306TR=$ac_cv_path_TR
10307if test -n "$TR"; then
10308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10309$as_echo "$TR" >&6; }
10310else
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312$as_echo "no" >&6; }
10313fi
10314
10315
10316  test -n "$TR" && break
10317done
10318
10319  else
10320    # The variable is set, but is it from the command line or the environment?
10321
10322    # Try to remove the string !TR! from our list.
10323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10325      # If it failed, the variable was not from the command line. Ignore it,
10326      # but warn the user (except for BASH, which is always set by the calling BASH).
10327      if test "xTR" != xBASH; then
10328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10329$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10330      fi
10331      # Try to locate tool using the code snippet
10332      for ac_prog in tr
10333do
10334  # Extract the first word of "$ac_prog", so it can be a program name with args.
10335set dummy $ac_prog; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path_TR+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $TR in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364TR=$ac_cv_path_TR
10365if test -n "$TR"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10367$as_echo "$TR" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374  test -n "$TR" && break
10375done
10376
10377    else
10378      # If it succeeded, then it was overridden by the user. We will use it
10379      # for the tool.
10380
10381      # First remove it from the list of overridden variables, so we can test
10382      # for unknown variables in the end.
10383      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10384
10385      # Check if the provided tool contains a complete path.
10386      tool_specified="$TR"
10387      tool_basename="${tool_specified##*/}"
10388      if test "x$tool_basename" = "x$tool_specified"; then
10389        # A command without a complete path is provided, search $PATH.
10390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10391$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10392        # Extract the first word of "$tool_basename", so it can be a program name with args.
10393set dummy $tool_basename; ac_word=$2
10394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10395$as_echo_n "checking for $ac_word... " >&6; }
10396if ${ac_cv_path_TR+:} false; then :
10397  $as_echo_n "(cached) " >&6
10398else
10399  case $TR in
10400  [\\/]* | ?:[\\/]*)
10401  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10402  ;;
10403  *)
10404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10405for as_dir in $PATH
10406do
10407  IFS=$as_save_IFS
10408  test -z "$as_dir" && as_dir=.
10409    for ac_exec_ext in '' $ac_executable_extensions; do
10410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10411    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10413    break 2
10414  fi
10415done
10416  done
10417IFS=$as_save_IFS
10418
10419  ;;
10420esac
10421fi
10422TR=$ac_cv_path_TR
10423if test -n "$TR"; then
10424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10425$as_echo "$TR" >&6; }
10426else
10427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428$as_echo "no" >&6; }
10429fi
10430
10431
10432        if test "x$TR" = x; then
10433          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10434        fi
10435      else
10436        # Otherwise we believe it is a complete path. Use it as it is.
10437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10438$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10440$as_echo_n "checking for TR... " >&6; }
10441        if test ! -x "$tool_specified"; then
10442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10443$as_echo "not found" >&6; }
10444          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10445        fi
10446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10447$as_echo "$tool_specified" >&6; }
10448      fi
10449    fi
10450  fi
10451
10452
10453
10454  if test "x$TR" = x; then
10455    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10456  fi
10457
10458
10459
10460
10461
10462  # Publish this variable in the help.
10463
10464
10465  if test "x$UNAME" = x; then
10466    # The variable is not set by user, try to locate tool using the code snippet
10467    for ac_prog in uname
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_UNAME+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $UNAME in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499UNAME=$ac_cv_path_UNAME
10500if test -n "$UNAME"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10502$as_echo "$UNAME" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$UNAME" && break
10510done
10511
10512  else
10513    # The variable is set, but is it from the command line or the environment?
10514
10515    # Try to remove the string !UNAME! from our list.
10516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10518      # If it failed, the variable was not from the command line. Ignore it,
10519      # but warn the user (except for BASH, which is always set by the calling BASH).
10520      if test "xUNAME" != xBASH; then
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10522$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10523      fi
10524      # Try to locate tool using the code snippet
10525      for ac_prog in uname
10526do
10527  # Extract the first word of "$ac_prog", so it can be a program name with args.
10528set dummy $ac_prog; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_UNAME+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $UNAME in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557UNAME=$ac_cv_path_UNAME
10558if test -n "$UNAME"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10560$as_echo "$UNAME" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567  test -n "$UNAME" && break
10568done
10569
10570    else
10571      # If it succeeded, then it was overridden by the user. We will use it
10572      # for the tool.
10573
10574      # First remove it from the list of overridden variables, so we can test
10575      # for unknown variables in the end.
10576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10577
10578      # Check if the provided tool contains a complete path.
10579      tool_specified="$UNAME"
10580      tool_basename="${tool_specified##*/}"
10581      if test "x$tool_basename" = "x$tool_specified"; then
10582        # A command without a complete path is provided, search $PATH.
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10584$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10585        # Extract the first word of "$tool_basename", so it can be a program name with args.
10586set dummy $tool_basename; ac_word=$2
10587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10588$as_echo_n "checking for $ac_word... " >&6; }
10589if ${ac_cv_path_UNAME+:} false; then :
10590  $as_echo_n "(cached) " >&6
10591else
10592  case $UNAME in
10593  [\\/]* | ?:[\\/]*)
10594  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10595  ;;
10596  *)
10597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10598for as_dir in $PATH
10599do
10600  IFS=$as_save_IFS
10601  test -z "$as_dir" && as_dir=.
10602    for ac_exec_ext in '' $ac_executable_extensions; do
10603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10604    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10606    break 2
10607  fi
10608done
10609  done
10610IFS=$as_save_IFS
10611
10612  ;;
10613esac
10614fi
10615UNAME=$ac_cv_path_UNAME
10616if test -n "$UNAME"; then
10617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10618$as_echo "$UNAME" >&6; }
10619else
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
10622fi
10623
10624
10625        if test "x$UNAME" = x; then
10626          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10627        fi
10628      else
10629        # Otherwise we believe it is a complete path. Use it as it is.
10630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10631$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10633$as_echo_n "checking for UNAME... " >&6; }
10634        if test ! -x "$tool_specified"; then
10635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10636$as_echo "not found" >&6; }
10637          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10638        fi
10639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10640$as_echo "$tool_specified" >&6; }
10641      fi
10642    fi
10643  fi
10644
10645
10646
10647  if test "x$UNAME" = x; then
10648    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10649  fi
10650
10651
10652
10653
10654
10655  # Publish this variable in the help.
10656
10657
10658  if test "x$UNIQ" = x; then
10659    # The variable is not set by user, try to locate tool using the code snippet
10660    for ac_prog in uniq
10661do
10662  # Extract the first word of "$ac_prog", so it can be a program name with args.
10663set dummy $ac_prog; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if ${ac_cv_path_UNIQ+:} false; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $UNIQ in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692UNIQ=$ac_cv_path_UNIQ
10693if test -n "$UNIQ"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10695$as_echo "$UNIQ" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702  test -n "$UNIQ" && break
10703done
10704
10705  else
10706    # The variable is set, but is it from the command line or the environment?
10707
10708    # Try to remove the string !UNIQ! from our list.
10709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10711      # If it failed, the variable was not from the command line. Ignore it,
10712      # but warn the user (except for BASH, which is always set by the calling BASH).
10713      if test "xUNIQ" != xBASH; then
10714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10715$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10716      fi
10717      # Try to locate tool using the code snippet
10718      for ac_prog in uniq
10719do
10720  # Extract the first word of "$ac_prog", so it can be a program name with args.
10721set dummy $ac_prog; ac_word=$2
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10723$as_echo_n "checking for $ac_word... " >&6; }
10724if ${ac_cv_path_UNIQ+:} false; then :
10725  $as_echo_n "(cached) " >&6
10726else
10727  case $UNIQ in
10728  [\\/]* | ?:[\\/]*)
10729  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10730  ;;
10731  *)
10732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10733for as_dir in $PATH
10734do
10735  IFS=$as_save_IFS
10736  test -z "$as_dir" && as_dir=.
10737    for ac_exec_ext in '' $ac_executable_extensions; do
10738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10739    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10741    break 2
10742  fi
10743done
10744  done
10745IFS=$as_save_IFS
10746
10747  ;;
10748esac
10749fi
10750UNIQ=$ac_cv_path_UNIQ
10751if test -n "$UNIQ"; then
10752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10753$as_echo "$UNIQ" >&6; }
10754else
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757fi
10758
10759
10760  test -n "$UNIQ" && break
10761done
10762
10763    else
10764      # If it succeeded, then it was overridden by the user. We will use it
10765      # for the tool.
10766
10767      # First remove it from the list of overridden variables, so we can test
10768      # for unknown variables in the end.
10769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10770
10771      # Check if the provided tool contains a complete path.
10772      tool_specified="$UNIQ"
10773      tool_basename="${tool_specified##*/}"
10774      if test "x$tool_basename" = "x$tool_specified"; then
10775        # A command without a complete path is provided, search $PATH.
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10777$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10778        # Extract the first word of "$tool_basename", so it can be a program name with args.
10779set dummy $tool_basename; ac_word=$2
10780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10781$as_echo_n "checking for $ac_word... " >&6; }
10782if ${ac_cv_path_UNIQ+:} false; then :
10783  $as_echo_n "(cached) " >&6
10784else
10785  case $UNIQ in
10786  [\\/]* | ?:[\\/]*)
10787  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10788  ;;
10789  *)
10790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10791for as_dir in $PATH
10792do
10793  IFS=$as_save_IFS
10794  test -z "$as_dir" && as_dir=.
10795    for ac_exec_ext in '' $ac_executable_extensions; do
10796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10797    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10799    break 2
10800  fi
10801done
10802  done
10803IFS=$as_save_IFS
10804
10805  ;;
10806esac
10807fi
10808UNIQ=$ac_cv_path_UNIQ
10809if test -n "$UNIQ"; then
10810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10811$as_echo "$UNIQ" >&6; }
10812else
10813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10814$as_echo "no" >&6; }
10815fi
10816
10817
10818        if test "x$UNIQ" = x; then
10819          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10820        fi
10821      else
10822        # Otherwise we believe it is a complete path. Use it as it is.
10823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10824$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10826$as_echo_n "checking for UNIQ... " >&6; }
10827        if test ! -x "$tool_specified"; then
10828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10829$as_echo "not found" >&6; }
10830          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10831        fi
10832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10833$as_echo "$tool_specified" >&6; }
10834      fi
10835    fi
10836  fi
10837
10838
10839
10840  if test "x$UNIQ" = x; then
10841    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10842  fi
10843
10844
10845
10846
10847
10848  # Publish this variable in the help.
10849
10850
10851  if test "x$WC" = x; then
10852    # The variable is not set by user, try to locate tool using the code snippet
10853    for ac_prog in wc
10854do
10855  # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_WC+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $WC in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885WC=$ac_cv_path_WC
10886if test -n "$WC"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10888$as_echo "$WC" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895  test -n "$WC" && break
10896done
10897
10898  else
10899    # The variable is set, but is it from the command line or the environment?
10900
10901    # Try to remove the string !WC! from our list.
10902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10904      # If it failed, the variable was not from the command line. Ignore it,
10905      # but warn the user (except for BASH, which is always set by the calling BASH).
10906      if test "xWC" != xBASH; then
10907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10908$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10909      fi
10910      # Try to locate tool using the code snippet
10911      for ac_prog in wc
10912do
10913  # Extract the first word of "$ac_prog", so it can be a program name with args.
10914set dummy $ac_prog; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_path_WC+:} false; then :
10918  $as_echo_n "(cached) " >&6
10919else
10920  case $WC in
10921  [\\/]* | ?:[\\/]*)
10922  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10923  ;;
10924  *)
10925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10926for as_dir in $PATH
10927do
10928  IFS=$as_save_IFS
10929  test -z "$as_dir" && as_dir=.
10930    for ac_exec_ext in '' $ac_executable_extensions; do
10931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10932    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10934    break 2
10935  fi
10936done
10937  done
10938IFS=$as_save_IFS
10939
10940  ;;
10941esac
10942fi
10943WC=$ac_cv_path_WC
10944if test -n "$WC"; then
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10946$as_echo "$WC" >&6; }
10947else
10948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
10950fi
10951
10952
10953  test -n "$WC" && break
10954done
10955
10956    else
10957      # If it succeeded, then it was overridden by the user. We will use it
10958      # for the tool.
10959
10960      # First remove it from the list of overridden variables, so we can test
10961      # for unknown variables in the end.
10962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10963
10964      # Check if the provided tool contains a complete path.
10965      tool_specified="$WC"
10966      tool_basename="${tool_specified##*/}"
10967      if test "x$tool_basename" = "x$tool_specified"; then
10968        # A command without a complete path is provided, search $PATH.
10969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10970$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10971        # Extract the first word of "$tool_basename", so it can be a program name with args.
10972set dummy $tool_basename; ac_word=$2
10973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10974$as_echo_n "checking for $ac_word... " >&6; }
10975if ${ac_cv_path_WC+:} false; then :
10976  $as_echo_n "(cached) " >&6
10977else
10978  case $WC in
10979  [\\/]* | ?:[\\/]*)
10980  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10981  ;;
10982  *)
10983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10984for as_dir in $PATH
10985do
10986  IFS=$as_save_IFS
10987  test -z "$as_dir" && as_dir=.
10988    for ac_exec_ext in '' $ac_executable_extensions; do
10989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10990    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10992    break 2
10993  fi
10994done
10995  done
10996IFS=$as_save_IFS
10997
10998  ;;
10999esac
11000fi
11001WC=$ac_cv_path_WC
11002if test -n "$WC"; then
11003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11004$as_echo "$WC" >&6; }
11005else
11006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11007$as_echo "no" >&6; }
11008fi
11009
11010
11011        if test "x$WC" = x; then
11012          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11013        fi
11014      else
11015        # Otherwise we believe it is a complete path. Use it as it is.
11016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11017$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11018        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11019$as_echo_n "checking for WC... " >&6; }
11020        if test ! -x "$tool_specified"; then
11021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11022$as_echo "not found" >&6; }
11023          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11024        fi
11025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11026$as_echo "$tool_specified" >&6; }
11027      fi
11028    fi
11029  fi
11030
11031
11032
11033  if test "x$WC" = x; then
11034    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11035  fi
11036
11037
11038
11039
11040
11041  # Publish this variable in the help.
11042
11043
11044  if test "x$WHICH" = x; then
11045    # The variable is not set by user, try to locate tool using the code snippet
11046    for ac_prog in which
11047do
11048  # Extract the first word of "$ac_prog", so it can be a program name with args.
11049set dummy $ac_prog; ac_word=$2
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11051$as_echo_n "checking for $ac_word... " >&6; }
11052if ${ac_cv_path_WHICH+:} false; then :
11053  $as_echo_n "(cached) " >&6
11054else
11055  case $WHICH in
11056  [\\/]* | ?:[\\/]*)
11057  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11058  ;;
11059  *)
11060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11061for as_dir in $PATH
11062do
11063  IFS=$as_save_IFS
11064  test -z "$as_dir" && as_dir=.
11065    for ac_exec_ext in '' $ac_executable_extensions; do
11066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11067    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11069    break 2
11070  fi
11071done
11072  done
11073IFS=$as_save_IFS
11074
11075  ;;
11076esac
11077fi
11078WHICH=$ac_cv_path_WHICH
11079if test -n "$WHICH"; then
11080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11081$as_echo "$WHICH" >&6; }
11082else
11083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
11085fi
11086
11087
11088  test -n "$WHICH" && break
11089done
11090
11091  else
11092    # The variable is set, but is it from the command line or the environment?
11093
11094    # Try to remove the string !WHICH! from our list.
11095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11097      # If it failed, the variable was not from the command line. Ignore it,
11098      # but warn the user (except for BASH, which is always set by the calling BASH).
11099      if test "xWHICH" != xBASH; then
11100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11101$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11102      fi
11103      # Try to locate tool using the code snippet
11104      for ac_prog in which
11105do
11106  # Extract the first word of "$ac_prog", so it can be a program name with args.
11107set dummy $ac_prog; ac_word=$2
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11109$as_echo_n "checking for $ac_word... " >&6; }
11110if ${ac_cv_path_WHICH+:} false; then :
11111  $as_echo_n "(cached) " >&6
11112else
11113  case $WHICH in
11114  [\\/]* | ?:[\\/]*)
11115  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11116  ;;
11117  *)
11118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11119for as_dir in $PATH
11120do
11121  IFS=$as_save_IFS
11122  test -z "$as_dir" && as_dir=.
11123    for ac_exec_ext in '' $ac_executable_extensions; do
11124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11125    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11127    break 2
11128  fi
11129done
11130  done
11131IFS=$as_save_IFS
11132
11133  ;;
11134esac
11135fi
11136WHICH=$ac_cv_path_WHICH
11137if test -n "$WHICH"; then
11138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11139$as_echo "$WHICH" >&6; }
11140else
11141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11142$as_echo "no" >&6; }
11143fi
11144
11145
11146  test -n "$WHICH" && break
11147done
11148
11149    else
11150      # If it succeeded, then it was overridden by the user. We will use it
11151      # for the tool.
11152
11153      # First remove it from the list of overridden variables, so we can test
11154      # for unknown variables in the end.
11155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11156
11157      # Check if the provided tool contains a complete path.
11158      tool_specified="$WHICH"
11159      tool_basename="${tool_specified##*/}"
11160      if test "x$tool_basename" = "x$tool_specified"; then
11161        # A command without a complete path is provided, search $PATH.
11162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11163$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11164        # Extract the first word of "$tool_basename", so it can be a program name with args.
11165set dummy $tool_basename; ac_word=$2
11166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11167$as_echo_n "checking for $ac_word... " >&6; }
11168if ${ac_cv_path_WHICH+:} false; then :
11169  $as_echo_n "(cached) " >&6
11170else
11171  case $WHICH in
11172  [\\/]* | ?:[\\/]*)
11173  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11174  ;;
11175  *)
11176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11177for as_dir in $PATH
11178do
11179  IFS=$as_save_IFS
11180  test -z "$as_dir" && as_dir=.
11181    for ac_exec_ext in '' $ac_executable_extensions; do
11182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11183    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11185    break 2
11186  fi
11187done
11188  done
11189IFS=$as_save_IFS
11190
11191  ;;
11192esac
11193fi
11194WHICH=$ac_cv_path_WHICH
11195if test -n "$WHICH"; then
11196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11197$as_echo "$WHICH" >&6; }
11198else
11199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11200$as_echo "no" >&6; }
11201fi
11202
11203
11204        if test "x$WHICH" = x; then
11205          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11206        fi
11207      else
11208        # Otherwise we believe it is a complete path. Use it as it is.
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11210$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11212$as_echo_n "checking for WHICH... " >&6; }
11213        if test ! -x "$tool_specified"; then
11214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11215$as_echo "not found" >&6; }
11216          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11217        fi
11218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11219$as_echo "$tool_specified" >&6; }
11220      fi
11221    fi
11222  fi
11223
11224
11225
11226  if test "x$WHICH" = x; then
11227    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11228  fi
11229
11230
11231
11232
11233
11234  # Publish this variable in the help.
11235
11236
11237  if test "x$XARGS" = x; then
11238    # The variable is not set by user, try to locate tool using the code snippet
11239    for ac_prog in xargs
11240do
11241  # Extract the first word of "$ac_prog", so it can be a program name with args.
11242set dummy $ac_prog; ac_word=$2
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11244$as_echo_n "checking for $ac_word... " >&6; }
11245if ${ac_cv_path_XARGS+:} false; then :
11246  $as_echo_n "(cached) " >&6
11247else
11248  case $XARGS in
11249  [\\/]* | ?:[\\/]*)
11250  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11251  ;;
11252  *)
11253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11254for as_dir in $PATH
11255do
11256  IFS=$as_save_IFS
11257  test -z "$as_dir" && as_dir=.
11258    for ac_exec_ext in '' $ac_executable_extensions; do
11259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11260    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11262    break 2
11263  fi
11264done
11265  done
11266IFS=$as_save_IFS
11267
11268  ;;
11269esac
11270fi
11271XARGS=$ac_cv_path_XARGS
11272if test -n "$XARGS"; then
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11274$as_echo "$XARGS" >&6; }
11275else
11276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278fi
11279
11280
11281  test -n "$XARGS" && break
11282done
11283
11284  else
11285    # The variable is set, but is it from the command line or the environment?
11286
11287    # Try to remove the string !XARGS! from our list.
11288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11290      # If it failed, the variable was not from the command line. Ignore it,
11291      # but warn the user (except for BASH, which is always set by the calling BASH).
11292      if test "xXARGS" != xBASH; then
11293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11294$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11295      fi
11296      # Try to locate tool using the code snippet
11297      for ac_prog in xargs
11298do
11299  # Extract the first word of "$ac_prog", so it can be a program name with args.
11300set dummy $ac_prog; ac_word=$2
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302$as_echo_n "checking for $ac_word... " >&6; }
11303if ${ac_cv_path_XARGS+:} false; then :
11304  $as_echo_n "(cached) " >&6
11305else
11306  case $XARGS in
11307  [\\/]* | ?:[\\/]*)
11308  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11309  ;;
11310  *)
11311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312for as_dir in $PATH
11313do
11314  IFS=$as_save_IFS
11315  test -z "$as_dir" && as_dir=.
11316    for ac_exec_ext in '' $ac_executable_extensions; do
11317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320    break 2
11321  fi
11322done
11323  done
11324IFS=$as_save_IFS
11325
11326  ;;
11327esac
11328fi
11329XARGS=$ac_cv_path_XARGS
11330if test -n "$XARGS"; then
11331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11332$as_echo "$XARGS" >&6; }
11333else
11334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336fi
11337
11338
11339  test -n "$XARGS" && break
11340done
11341
11342    else
11343      # If it succeeded, then it was overridden by the user. We will use it
11344      # for the tool.
11345
11346      # First remove it from the list of overridden variables, so we can test
11347      # for unknown variables in the end.
11348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11349
11350      # Check if the provided tool contains a complete path.
11351      tool_specified="$XARGS"
11352      tool_basename="${tool_specified##*/}"
11353      if test "x$tool_basename" = "x$tool_specified"; then
11354        # A command without a complete path is provided, search $PATH.
11355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11356$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11357        # Extract the first word of "$tool_basename", so it can be a program name with args.
11358set dummy $tool_basename; ac_word=$2
11359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11360$as_echo_n "checking for $ac_word... " >&6; }
11361if ${ac_cv_path_XARGS+:} false; then :
11362  $as_echo_n "(cached) " >&6
11363else
11364  case $XARGS in
11365  [\\/]* | ?:[\\/]*)
11366  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11367  ;;
11368  *)
11369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11370for as_dir in $PATH
11371do
11372  IFS=$as_save_IFS
11373  test -z "$as_dir" && as_dir=.
11374    for ac_exec_ext in '' $ac_executable_extensions; do
11375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11376    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11378    break 2
11379  fi
11380done
11381  done
11382IFS=$as_save_IFS
11383
11384  ;;
11385esac
11386fi
11387XARGS=$ac_cv_path_XARGS
11388if test -n "$XARGS"; then
11389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11390$as_echo "$XARGS" >&6; }
11391else
11392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
11394fi
11395
11396
11397        if test "x$XARGS" = x; then
11398          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11399        fi
11400      else
11401        # Otherwise we believe it is a complete path. Use it as it is.
11402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11403$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11405$as_echo_n "checking for XARGS... " >&6; }
11406        if test ! -x "$tool_specified"; then
11407          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11408$as_echo "not found" >&6; }
11409          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11410        fi
11411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11412$as_echo "$tool_specified" >&6; }
11413      fi
11414    fi
11415  fi
11416
11417
11418
11419  if test "x$XARGS" = x; then
11420    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11421  fi
11422
11423
11424
11425  # Then required tools that require some special treatment.
11426
11427
11428  # Publish this variable in the help.
11429
11430
11431  if test "x$AWK" = x; then
11432    # The variable is not set by user, try to locate tool using the code snippet
11433    for ac_prog in gawk mawk nawk awk
11434do
11435  # Extract the first word of "$ac_prog", so it can be a program name with args.
11436set dummy $ac_prog; ac_word=$2
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11438$as_echo_n "checking for $ac_word... " >&6; }
11439if ${ac_cv_prog_AWK+:} false; then :
11440  $as_echo_n "(cached) " >&6
11441else
11442  if test -n "$AWK"; then
11443  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11444else
11445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446for as_dir in $PATH
11447do
11448  IFS=$as_save_IFS
11449  test -z "$as_dir" && as_dir=.
11450    for ac_exec_ext in '' $ac_executable_extensions; do
11451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452    ac_cv_prog_AWK="$ac_prog"
11453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454    break 2
11455  fi
11456done
11457  done
11458IFS=$as_save_IFS
11459
11460fi
11461fi
11462AWK=$ac_cv_prog_AWK
11463if test -n "$AWK"; then
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11465$as_echo "$AWK" >&6; }
11466else
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
11469fi
11470
11471
11472  test -n "$AWK" && break
11473done
11474
11475  else
11476    # The variable is set, but is it from the command line or the environment?
11477
11478    # Try to remove the string !AWK! from our list.
11479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11481      # If it failed, the variable was not from the command line. Ignore it,
11482      # but warn the user (except for BASH, which is always set by the calling BASH).
11483      if test "xAWK" != xBASH; then
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11485$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11486      fi
11487      # Try to locate tool using the code snippet
11488      for ac_prog in gawk mawk nawk awk
11489do
11490  # Extract the first word of "$ac_prog", so it can be a program name with args.
11491set dummy $ac_prog; ac_word=$2
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11493$as_echo_n "checking for $ac_word... " >&6; }
11494if ${ac_cv_prog_AWK+:} false; then :
11495  $as_echo_n "(cached) " >&6
11496else
11497  if test -n "$AWK"; then
11498  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11499else
11500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501for as_dir in $PATH
11502do
11503  IFS=$as_save_IFS
11504  test -z "$as_dir" && as_dir=.
11505    for ac_exec_ext in '' $ac_executable_extensions; do
11506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507    ac_cv_prog_AWK="$ac_prog"
11508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509    break 2
11510  fi
11511done
11512  done
11513IFS=$as_save_IFS
11514
11515fi
11516fi
11517AWK=$ac_cv_prog_AWK
11518if test -n "$AWK"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11520$as_echo "$AWK" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527  test -n "$AWK" && break
11528done
11529
11530    else
11531      # If it succeeded, then it was overridden by the user. We will use it
11532      # for the tool.
11533
11534      # First remove it from the list of overridden variables, so we can test
11535      # for unknown variables in the end.
11536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11537
11538      # Check if the provided tool contains a complete path.
11539      tool_specified="$AWK"
11540      tool_basename="${tool_specified##*/}"
11541      if test "x$tool_basename" = "x$tool_specified"; then
11542        # A command without a complete path is provided, search $PATH.
11543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11544$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11545        # Extract the first word of "$tool_basename", so it can be a program name with args.
11546set dummy $tool_basename; ac_word=$2
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11548$as_echo_n "checking for $ac_word... " >&6; }
11549if ${ac_cv_path_AWK+:} false; then :
11550  $as_echo_n "(cached) " >&6
11551else
11552  case $AWK in
11553  [\\/]* | ?:[\\/]*)
11554  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11555  ;;
11556  *)
11557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11558for as_dir in $PATH
11559do
11560  IFS=$as_save_IFS
11561  test -z "$as_dir" && as_dir=.
11562    for ac_exec_ext in '' $ac_executable_extensions; do
11563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11564    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11566    break 2
11567  fi
11568done
11569  done
11570IFS=$as_save_IFS
11571
11572  ;;
11573esac
11574fi
11575AWK=$ac_cv_path_AWK
11576if test -n "$AWK"; then
11577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11578$as_echo "$AWK" >&6; }
11579else
11580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11581$as_echo "no" >&6; }
11582fi
11583
11584
11585        if test "x$AWK" = x; then
11586          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11587        fi
11588      else
11589        # Otherwise we believe it is a complete path. Use it as it is.
11590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11591$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11593$as_echo_n "checking for AWK... " >&6; }
11594        if test ! -x "$tool_specified"; then
11595          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11596$as_echo "not found" >&6; }
11597          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11598        fi
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11600$as_echo "$tool_specified" >&6; }
11601      fi
11602    fi
11603  fi
11604
11605
11606  if test "x$AWK" = x; then
11607    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11608  fi
11609
11610
11611
11612
11613  # Publish this variable in the help.
11614
11615
11616  if test "x$GREP" = x; then
11617    # The variable is not set by user, try to locate tool using the code snippet
11618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11619$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11620if ${ac_cv_path_GREP+:} false; then :
11621  $as_echo_n "(cached) " >&6
11622else
11623  if test -z "$GREP"; then
11624  ac_path_GREP_found=false
11625  # Loop through the user's path and test for each of PROGNAME-LIST
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_prog in grep ggrep; do
11632    for ac_exec_ext in '' $ac_executable_extensions; do
11633      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11634      as_fn_executable_p "$ac_path_GREP" || continue
11635# Check for GNU ac_path_GREP and select it if it is found.
11636  # Check for GNU $ac_path_GREP
11637case `"$ac_path_GREP" --version 2>&1` in
11638*GNU*)
11639  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11640*)
11641  ac_count=0
11642  $as_echo_n 0123456789 >"conftest.in"
11643  while :
11644  do
11645    cat "conftest.in" "conftest.in" >"conftest.tmp"
11646    mv "conftest.tmp" "conftest.in"
11647    cp "conftest.in" "conftest.nl"
11648    $as_echo 'GREP' >> "conftest.nl"
11649    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11650    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11651    as_fn_arith $ac_count + 1 && ac_count=$as_val
11652    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11653      # Best one so far, save it but keep looking for a better one
11654      ac_cv_path_GREP="$ac_path_GREP"
11655      ac_path_GREP_max=$ac_count
11656    fi
11657    # 10*(2^10) chars as input seems more than enough
11658    test $ac_count -gt 10 && break
11659  done
11660  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11661esac
11662
11663      $ac_path_GREP_found && break 3
11664    done
11665  done
11666  done
11667IFS=$as_save_IFS
11668  if test -z "$ac_cv_path_GREP"; then
11669    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11670  fi
11671else
11672  ac_cv_path_GREP=$GREP
11673fi
11674
11675fi
11676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11677$as_echo "$ac_cv_path_GREP" >&6; }
11678 GREP="$ac_cv_path_GREP"
11679
11680
11681  else
11682    # The variable is set, but is it from the command line or the environment?
11683
11684    # Try to remove the string !GREP! from our list.
11685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11687      # If it failed, the variable was not from the command line. Ignore it,
11688      # but warn the user (except for BASH, which is always set by the calling BASH).
11689      if test "xGREP" != xBASH; then
11690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11691$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11692      fi
11693      # Try to locate tool using the code snippet
11694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11695$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11696if ${ac_cv_path_GREP+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  if test -z "$GREP"; then
11700  ac_path_GREP_found=false
11701  # Loop through the user's path and test for each of PROGNAME-LIST
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_prog in grep ggrep; do
11708    for ac_exec_ext in '' $ac_executable_extensions; do
11709      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11710      as_fn_executable_p "$ac_path_GREP" || continue
11711# Check for GNU ac_path_GREP and select it if it is found.
11712  # Check for GNU $ac_path_GREP
11713case `"$ac_path_GREP" --version 2>&1` in
11714*GNU*)
11715  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11716*)
11717  ac_count=0
11718  $as_echo_n 0123456789 >"conftest.in"
11719  while :
11720  do
11721    cat "conftest.in" "conftest.in" >"conftest.tmp"
11722    mv "conftest.tmp" "conftest.in"
11723    cp "conftest.in" "conftest.nl"
11724    $as_echo 'GREP' >> "conftest.nl"
11725    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11726    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11727    as_fn_arith $ac_count + 1 && ac_count=$as_val
11728    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11729      # Best one so far, save it but keep looking for a better one
11730      ac_cv_path_GREP="$ac_path_GREP"
11731      ac_path_GREP_max=$ac_count
11732    fi
11733    # 10*(2^10) chars as input seems more than enough
11734    test $ac_count -gt 10 && break
11735  done
11736  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11737esac
11738
11739      $ac_path_GREP_found && break 3
11740    done
11741  done
11742  done
11743IFS=$as_save_IFS
11744  if test -z "$ac_cv_path_GREP"; then
11745    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11746  fi
11747else
11748  ac_cv_path_GREP=$GREP
11749fi
11750
11751fi
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11753$as_echo "$ac_cv_path_GREP" >&6; }
11754 GREP="$ac_cv_path_GREP"
11755
11756
11757    else
11758      # If it succeeded, then it was overridden by the user. We will use it
11759      # for the tool.
11760
11761      # First remove it from the list of overridden variables, so we can test
11762      # for unknown variables in the end.
11763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11764
11765      # Check if the provided tool contains a complete path.
11766      tool_specified="$GREP"
11767      tool_basename="${tool_specified##*/}"
11768      if test "x$tool_basename" = "x$tool_specified"; then
11769        # A command without a complete path is provided, search $PATH.
11770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11771$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11772        # Extract the first word of "$tool_basename", so it can be a program name with args.
11773set dummy $tool_basename; ac_word=$2
11774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11775$as_echo_n "checking for $ac_word... " >&6; }
11776if ${ac_cv_path_GREP+:} false; then :
11777  $as_echo_n "(cached) " >&6
11778else
11779  case $GREP in
11780  [\\/]* | ?:[\\/]*)
11781  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11782  ;;
11783  *)
11784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11785for as_dir in $PATH
11786do
11787  IFS=$as_save_IFS
11788  test -z "$as_dir" && as_dir=.
11789    for ac_exec_ext in '' $ac_executable_extensions; do
11790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11791    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11793    break 2
11794  fi
11795done
11796  done
11797IFS=$as_save_IFS
11798
11799  ;;
11800esac
11801fi
11802GREP=$ac_cv_path_GREP
11803if test -n "$GREP"; then
11804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11805$as_echo "$GREP" >&6; }
11806else
11807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11808$as_echo "no" >&6; }
11809fi
11810
11811
11812        if test "x$GREP" = x; then
11813          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11814        fi
11815      else
11816        # Otherwise we believe it is a complete path. Use it as it is.
11817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11818$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11820$as_echo_n "checking for GREP... " >&6; }
11821        if test ! -x "$tool_specified"; then
11822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11823$as_echo "not found" >&6; }
11824          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11825        fi
11826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11827$as_echo "$tool_specified" >&6; }
11828      fi
11829    fi
11830  fi
11831
11832
11833  if test "x$GREP" = x; then
11834    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11835  fi
11836
11837
11838
11839
11840  # Publish this variable in the help.
11841
11842
11843  if test "x$EGREP" = x; then
11844    # The variable is not set by user, try to locate tool using the code snippet
11845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11846$as_echo_n "checking for egrep... " >&6; }
11847if ${ac_cv_path_EGREP+:} false; then :
11848  $as_echo_n "(cached) " >&6
11849else
11850  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11851   then ac_cv_path_EGREP="$GREP -E"
11852   else
11853     if test -z "$EGREP"; then
11854  ac_path_EGREP_found=false
11855  # Loop through the user's path and test for each of PROGNAME-LIST
11856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11858do
11859  IFS=$as_save_IFS
11860  test -z "$as_dir" && as_dir=.
11861    for ac_prog in egrep; do
11862    for ac_exec_ext in '' $ac_executable_extensions; do
11863      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11864      as_fn_executable_p "$ac_path_EGREP" || continue
11865# Check for GNU ac_path_EGREP and select it if it is found.
11866  # Check for GNU $ac_path_EGREP
11867case `"$ac_path_EGREP" --version 2>&1` in
11868*GNU*)
11869  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11870*)
11871  ac_count=0
11872  $as_echo_n 0123456789 >"conftest.in"
11873  while :
11874  do
11875    cat "conftest.in" "conftest.in" >"conftest.tmp"
11876    mv "conftest.tmp" "conftest.in"
11877    cp "conftest.in" "conftest.nl"
11878    $as_echo 'EGREP' >> "conftest.nl"
11879    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11880    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11881    as_fn_arith $ac_count + 1 && ac_count=$as_val
11882    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11883      # Best one so far, save it but keep looking for a better one
11884      ac_cv_path_EGREP="$ac_path_EGREP"
11885      ac_path_EGREP_max=$ac_count
11886    fi
11887    # 10*(2^10) chars as input seems more than enough
11888    test $ac_count -gt 10 && break
11889  done
11890  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11891esac
11892
11893      $ac_path_EGREP_found && break 3
11894    done
11895  done
11896  done
11897IFS=$as_save_IFS
11898  if test -z "$ac_cv_path_EGREP"; then
11899    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11900  fi
11901else
11902  ac_cv_path_EGREP=$EGREP
11903fi
11904
11905   fi
11906fi
11907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11908$as_echo "$ac_cv_path_EGREP" >&6; }
11909 EGREP="$ac_cv_path_EGREP"
11910
11911
11912  else
11913    # The variable is set, but is it from the command line or the environment?
11914
11915    # Try to remove the string !EGREP! from our list.
11916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11918      # If it failed, the variable was not from the command line. Ignore it,
11919      # but warn the user (except for BASH, which is always set by the calling BASH).
11920      if test "xEGREP" != xBASH; then
11921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11922$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11923      fi
11924      # Try to locate tool using the code snippet
11925      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11926$as_echo_n "checking for egrep... " >&6; }
11927if ${ac_cv_path_EGREP+:} false; then :
11928  $as_echo_n "(cached) " >&6
11929else
11930  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11931   then ac_cv_path_EGREP="$GREP -E"
11932   else
11933     if test -z "$EGREP"; then
11934  ac_path_EGREP_found=false
11935  # Loop through the user's path and test for each of PROGNAME-LIST
11936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11937for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11938do
11939  IFS=$as_save_IFS
11940  test -z "$as_dir" && as_dir=.
11941    for ac_prog in egrep; do
11942    for ac_exec_ext in '' $ac_executable_extensions; do
11943      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11944      as_fn_executable_p "$ac_path_EGREP" || continue
11945# Check for GNU ac_path_EGREP and select it if it is found.
11946  # Check for GNU $ac_path_EGREP
11947case `"$ac_path_EGREP" --version 2>&1` in
11948*GNU*)
11949  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11950*)
11951  ac_count=0
11952  $as_echo_n 0123456789 >"conftest.in"
11953  while :
11954  do
11955    cat "conftest.in" "conftest.in" >"conftest.tmp"
11956    mv "conftest.tmp" "conftest.in"
11957    cp "conftest.in" "conftest.nl"
11958    $as_echo 'EGREP' >> "conftest.nl"
11959    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11960    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11961    as_fn_arith $ac_count + 1 && ac_count=$as_val
11962    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11963      # Best one so far, save it but keep looking for a better one
11964      ac_cv_path_EGREP="$ac_path_EGREP"
11965      ac_path_EGREP_max=$ac_count
11966    fi
11967    # 10*(2^10) chars as input seems more than enough
11968    test $ac_count -gt 10 && break
11969  done
11970  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11971esac
11972
11973      $ac_path_EGREP_found && break 3
11974    done
11975  done
11976  done
11977IFS=$as_save_IFS
11978  if test -z "$ac_cv_path_EGREP"; then
11979    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11980  fi
11981else
11982  ac_cv_path_EGREP=$EGREP
11983fi
11984
11985   fi
11986fi
11987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11988$as_echo "$ac_cv_path_EGREP" >&6; }
11989 EGREP="$ac_cv_path_EGREP"
11990
11991
11992    else
11993      # If it succeeded, then it was overridden by the user. We will use it
11994      # for the tool.
11995
11996      # First remove it from the list of overridden variables, so we can test
11997      # for unknown variables in the end.
11998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11999
12000      # Check if the provided tool contains a complete path.
12001      tool_specified="$EGREP"
12002      tool_basename="${tool_specified##*/}"
12003      if test "x$tool_basename" = "x$tool_specified"; then
12004        # A command without a complete path is provided, search $PATH.
12005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12006$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12007        # Extract the first word of "$tool_basename", so it can be a program name with args.
12008set dummy $tool_basename; ac_word=$2
12009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12010$as_echo_n "checking for $ac_word... " >&6; }
12011if ${ac_cv_path_EGREP+:} false; then :
12012  $as_echo_n "(cached) " >&6
12013else
12014  case $EGREP in
12015  [\\/]* | ?:[\\/]*)
12016  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12017  ;;
12018  *)
12019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12020for as_dir in $PATH
12021do
12022  IFS=$as_save_IFS
12023  test -z "$as_dir" && as_dir=.
12024    for ac_exec_ext in '' $ac_executable_extensions; do
12025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12026    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12028    break 2
12029  fi
12030done
12031  done
12032IFS=$as_save_IFS
12033
12034  ;;
12035esac
12036fi
12037EGREP=$ac_cv_path_EGREP
12038if test -n "$EGREP"; then
12039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12040$as_echo "$EGREP" >&6; }
12041else
12042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
12044fi
12045
12046
12047        if test "x$EGREP" = x; then
12048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12049        fi
12050      else
12051        # Otherwise we believe it is a complete path. Use it as it is.
12052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12053$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12055$as_echo_n "checking for EGREP... " >&6; }
12056        if test ! -x "$tool_specified"; then
12057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12058$as_echo "not found" >&6; }
12059          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12060        fi
12061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12062$as_echo "$tool_specified" >&6; }
12063      fi
12064    fi
12065  fi
12066
12067
12068  if test "x$EGREP" = x; then
12069    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12070  fi
12071
12072
12073
12074
12075  # Publish this variable in the help.
12076
12077
12078  if test "x$FGREP" = x; then
12079    # The variable is not set by user, try to locate tool using the code snippet
12080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12081$as_echo_n "checking for fgrep... " >&6; }
12082if ${ac_cv_path_FGREP+:} false; then :
12083  $as_echo_n "(cached) " >&6
12084else
12085  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12086   then ac_cv_path_FGREP="$GREP -F"
12087   else
12088     if test -z "$FGREP"; then
12089  ac_path_FGREP_found=false
12090  # Loop through the user's path and test for each of PROGNAME-LIST
12091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12093do
12094  IFS=$as_save_IFS
12095  test -z "$as_dir" && as_dir=.
12096    for ac_prog in fgrep; do
12097    for ac_exec_ext in '' $ac_executable_extensions; do
12098      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12099      as_fn_executable_p "$ac_path_FGREP" || continue
12100# Check for GNU ac_path_FGREP and select it if it is found.
12101  # Check for GNU $ac_path_FGREP
12102case `"$ac_path_FGREP" --version 2>&1` in
12103*GNU*)
12104  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12105*)
12106  ac_count=0
12107  $as_echo_n 0123456789 >"conftest.in"
12108  while :
12109  do
12110    cat "conftest.in" "conftest.in" >"conftest.tmp"
12111    mv "conftest.tmp" "conftest.in"
12112    cp "conftest.in" "conftest.nl"
12113    $as_echo 'FGREP' >> "conftest.nl"
12114    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12115    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12116    as_fn_arith $ac_count + 1 && ac_count=$as_val
12117    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12118      # Best one so far, save it but keep looking for a better one
12119      ac_cv_path_FGREP="$ac_path_FGREP"
12120      ac_path_FGREP_max=$ac_count
12121    fi
12122    # 10*(2^10) chars as input seems more than enough
12123    test $ac_count -gt 10 && break
12124  done
12125  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12126esac
12127
12128      $ac_path_FGREP_found && break 3
12129    done
12130  done
12131  done
12132IFS=$as_save_IFS
12133  if test -z "$ac_cv_path_FGREP"; then
12134    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12135  fi
12136else
12137  ac_cv_path_FGREP=$FGREP
12138fi
12139
12140   fi
12141fi
12142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12143$as_echo "$ac_cv_path_FGREP" >&6; }
12144 FGREP="$ac_cv_path_FGREP"
12145
12146
12147  else
12148    # The variable is set, but is it from the command line or the environment?
12149
12150    # Try to remove the string !FGREP! from our list.
12151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12153      # If it failed, the variable was not from the command line. Ignore it,
12154      # but warn the user (except for BASH, which is always set by the calling BASH).
12155      if test "xFGREP" != xBASH; then
12156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12157$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12158      fi
12159      # Try to locate tool using the code snippet
12160      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12161$as_echo_n "checking for fgrep... " >&6; }
12162if ${ac_cv_path_FGREP+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12166   then ac_cv_path_FGREP="$GREP -F"
12167   else
12168     if test -z "$FGREP"; then
12169  ac_path_FGREP_found=false
12170  # Loop through the user's path and test for each of PROGNAME-LIST
12171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12173do
12174  IFS=$as_save_IFS
12175  test -z "$as_dir" && as_dir=.
12176    for ac_prog in fgrep; do
12177    for ac_exec_ext in '' $ac_executable_extensions; do
12178      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12179      as_fn_executable_p "$ac_path_FGREP" || continue
12180# Check for GNU ac_path_FGREP and select it if it is found.
12181  # Check for GNU $ac_path_FGREP
12182case `"$ac_path_FGREP" --version 2>&1` in
12183*GNU*)
12184  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12185*)
12186  ac_count=0
12187  $as_echo_n 0123456789 >"conftest.in"
12188  while :
12189  do
12190    cat "conftest.in" "conftest.in" >"conftest.tmp"
12191    mv "conftest.tmp" "conftest.in"
12192    cp "conftest.in" "conftest.nl"
12193    $as_echo 'FGREP' >> "conftest.nl"
12194    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12195    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12196    as_fn_arith $ac_count + 1 && ac_count=$as_val
12197    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12198      # Best one so far, save it but keep looking for a better one
12199      ac_cv_path_FGREP="$ac_path_FGREP"
12200      ac_path_FGREP_max=$ac_count
12201    fi
12202    # 10*(2^10) chars as input seems more than enough
12203    test $ac_count -gt 10 && break
12204  done
12205  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12206esac
12207
12208      $ac_path_FGREP_found && break 3
12209    done
12210  done
12211  done
12212IFS=$as_save_IFS
12213  if test -z "$ac_cv_path_FGREP"; then
12214    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12215  fi
12216else
12217  ac_cv_path_FGREP=$FGREP
12218fi
12219
12220   fi
12221fi
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12223$as_echo "$ac_cv_path_FGREP" >&6; }
12224 FGREP="$ac_cv_path_FGREP"
12225
12226
12227    else
12228      # If it succeeded, then it was overridden by the user. We will use it
12229      # for the tool.
12230
12231      # First remove it from the list of overridden variables, so we can test
12232      # for unknown variables in the end.
12233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12234
12235      # Check if the provided tool contains a complete path.
12236      tool_specified="$FGREP"
12237      tool_basename="${tool_specified##*/}"
12238      if test "x$tool_basename" = "x$tool_specified"; then
12239        # A command without a complete path is provided, search $PATH.
12240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12241$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12242        # Extract the first word of "$tool_basename", so it can be a program name with args.
12243set dummy $tool_basename; ac_word=$2
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12245$as_echo_n "checking for $ac_word... " >&6; }
12246if ${ac_cv_path_FGREP+:} false; then :
12247  $as_echo_n "(cached) " >&6
12248else
12249  case $FGREP in
12250  [\\/]* | ?:[\\/]*)
12251  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12252  ;;
12253  *)
12254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12255for as_dir in $PATH
12256do
12257  IFS=$as_save_IFS
12258  test -z "$as_dir" && as_dir=.
12259    for ac_exec_ext in '' $ac_executable_extensions; do
12260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12261    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12263    break 2
12264  fi
12265done
12266  done
12267IFS=$as_save_IFS
12268
12269  ;;
12270esac
12271fi
12272FGREP=$ac_cv_path_FGREP
12273if test -n "$FGREP"; then
12274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12275$as_echo "$FGREP" >&6; }
12276else
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12278$as_echo "no" >&6; }
12279fi
12280
12281
12282        if test "x$FGREP" = x; then
12283          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12284        fi
12285      else
12286        # Otherwise we believe it is a complete path. Use it as it is.
12287        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12288$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12290$as_echo_n "checking for FGREP... " >&6; }
12291        if test ! -x "$tool_specified"; then
12292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12293$as_echo "not found" >&6; }
12294          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12295        fi
12296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12297$as_echo "$tool_specified" >&6; }
12298      fi
12299    fi
12300  fi
12301
12302
12303  if test "x$FGREP" = x; then
12304    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12305  fi
12306
12307
12308
12309
12310  # Publish this variable in the help.
12311
12312
12313  if test "x$SED" = x; then
12314    # The variable is not set by user, try to locate tool using the code snippet
12315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12316$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12317if ${ac_cv_path_SED+:} false; then :
12318  $as_echo_n "(cached) " >&6
12319else
12320            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12321     for ac_i in 1 2 3 4 5 6 7; do
12322       ac_script="$ac_script$as_nl$ac_script"
12323     done
12324     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12325     { ac_script=; unset ac_script;}
12326     if test -z "$SED"; then
12327  ac_path_SED_found=false
12328  # Loop through the user's path and test for each of PROGNAME-LIST
12329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12330for as_dir in $PATH
12331do
12332  IFS=$as_save_IFS
12333  test -z "$as_dir" && as_dir=.
12334    for ac_prog in sed gsed; do
12335    for ac_exec_ext in '' $ac_executable_extensions; do
12336      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12337      as_fn_executable_p "$ac_path_SED" || continue
12338# Check for GNU ac_path_SED and select it if it is found.
12339  # Check for GNU $ac_path_SED
12340case `"$ac_path_SED" --version 2>&1` in
12341*GNU*)
12342  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12343*)
12344  ac_count=0
12345  $as_echo_n 0123456789 >"conftest.in"
12346  while :
12347  do
12348    cat "conftest.in" "conftest.in" >"conftest.tmp"
12349    mv "conftest.tmp" "conftest.in"
12350    cp "conftest.in" "conftest.nl"
12351    $as_echo '' >> "conftest.nl"
12352    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12353    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12354    as_fn_arith $ac_count + 1 && ac_count=$as_val
12355    if test $ac_count -gt ${ac_path_SED_max-0}; then
12356      # Best one so far, save it but keep looking for a better one
12357      ac_cv_path_SED="$ac_path_SED"
12358      ac_path_SED_max=$ac_count
12359    fi
12360    # 10*(2^10) chars as input seems more than enough
12361    test $ac_count -gt 10 && break
12362  done
12363  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12364esac
12365
12366      $ac_path_SED_found && break 3
12367    done
12368  done
12369  done
12370IFS=$as_save_IFS
12371  if test -z "$ac_cv_path_SED"; then
12372    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12373  fi
12374else
12375  ac_cv_path_SED=$SED
12376fi
12377
12378fi
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12380$as_echo "$ac_cv_path_SED" >&6; }
12381 SED="$ac_cv_path_SED"
12382  rm -f conftest.sed
12383
12384  else
12385    # The variable is set, but is it from the command line or the environment?
12386
12387    # Try to remove the string !SED! from our list.
12388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12390      # If it failed, the variable was not from the command line. Ignore it,
12391      # but warn the user (except for BASH, which is always set by the calling BASH).
12392      if test "xSED" != xBASH; then
12393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12394$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12395      fi
12396      # Try to locate tool using the code snippet
12397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12398$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12399if ${ac_cv_path_SED+:} false; then :
12400  $as_echo_n "(cached) " >&6
12401else
12402            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12403     for ac_i in 1 2 3 4 5 6 7; do
12404       ac_script="$ac_script$as_nl$ac_script"
12405     done
12406     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12407     { ac_script=; unset ac_script;}
12408     if test -z "$SED"; then
12409  ac_path_SED_found=false
12410  # Loop through the user's path and test for each of PROGNAME-LIST
12411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12412for as_dir in $PATH
12413do
12414  IFS=$as_save_IFS
12415  test -z "$as_dir" && as_dir=.
12416    for ac_prog in sed gsed; do
12417    for ac_exec_ext in '' $ac_executable_extensions; do
12418      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12419      as_fn_executable_p "$ac_path_SED" || continue
12420# Check for GNU ac_path_SED and select it if it is found.
12421  # Check for GNU $ac_path_SED
12422case `"$ac_path_SED" --version 2>&1` in
12423*GNU*)
12424  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12425*)
12426  ac_count=0
12427  $as_echo_n 0123456789 >"conftest.in"
12428  while :
12429  do
12430    cat "conftest.in" "conftest.in" >"conftest.tmp"
12431    mv "conftest.tmp" "conftest.in"
12432    cp "conftest.in" "conftest.nl"
12433    $as_echo '' >> "conftest.nl"
12434    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12435    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12436    as_fn_arith $ac_count + 1 && ac_count=$as_val
12437    if test $ac_count -gt ${ac_path_SED_max-0}; then
12438      # Best one so far, save it but keep looking for a better one
12439      ac_cv_path_SED="$ac_path_SED"
12440      ac_path_SED_max=$ac_count
12441    fi
12442    # 10*(2^10) chars as input seems more than enough
12443    test $ac_count -gt 10 && break
12444  done
12445  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12446esac
12447
12448      $ac_path_SED_found && break 3
12449    done
12450  done
12451  done
12452IFS=$as_save_IFS
12453  if test -z "$ac_cv_path_SED"; then
12454    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12455  fi
12456else
12457  ac_cv_path_SED=$SED
12458fi
12459
12460fi
12461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12462$as_echo "$ac_cv_path_SED" >&6; }
12463 SED="$ac_cv_path_SED"
12464  rm -f conftest.sed
12465
12466    else
12467      # If it succeeded, then it was overridden by the user. We will use it
12468      # for the tool.
12469
12470      # First remove it from the list of overridden variables, so we can test
12471      # for unknown variables in the end.
12472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12473
12474      # Check if the provided tool contains a complete path.
12475      tool_specified="$SED"
12476      tool_basename="${tool_specified##*/}"
12477      if test "x$tool_basename" = "x$tool_specified"; then
12478        # A command without a complete path is provided, search $PATH.
12479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12480$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12481        # Extract the first word of "$tool_basename", so it can be a program name with args.
12482set dummy $tool_basename; ac_word=$2
12483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12484$as_echo_n "checking for $ac_word... " >&6; }
12485if ${ac_cv_path_SED+:} false; then :
12486  $as_echo_n "(cached) " >&6
12487else
12488  case $SED in
12489  [\\/]* | ?:[\\/]*)
12490  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12491  ;;
12492  *)
12493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12494for as_dir in $PATH
12495do
12496  IFS=$as_save_IFS
12497  test -z "$as_dir" && as_dir=.
12498    for ac_exec_ext in '' $ac_executable_extensions; do
12499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12500    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12502    break 2
12503  fi
12504done
12505  done
12506IFS=$as_save_IFS
12507
12508  ;;
12509esac
12510fi
12511SED=$ac_cv_path_SED
12512if test -n "$SED"; then
12513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12514$as_echo "$SED" >&6; }
12515else
12516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12517$as_echo "no" >&6; }
12518fi
12519
12520
12521        if test "x$SED" = x; then
12522          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12523        fi
12524      else
12525        # Otherwise we believe it is a complete path. Use it as it is.
12526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12527$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12529$as_echo_n "checking for SED... " >&6; }
12530        if test ! -x "$tool_specified"; then
12531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12532$as_echo "not found" >&6; }
12533          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12534        fi
12535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12536$as_echo "$tool_specified" >&6; }
12537      fi
12538    fi
12539  fi
12540
12541
12542  if test "x$SED" = x; then
12543    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12544  fi
12545
12546
12547
12548  # Always force rm.
12549  RM="$RM -f"
12550
12551  # pwd behaves differently on various platforms and some don't support the -L flag.
12552  # Always use the bash builtin pwd to get uniform behavior.
12553  THEPWDCMD=pwd
12554
12555  # These are not required on all platforms
12556
12557
12558  # Publish this variable in the help.
12559
12560
12561  if test "x$CYGPATH" = x; then
12562    # The variable is not set by user, try to locate tool using the code snippet
12563    for ac_prog in cygpath
12564do
12565  # Extract the first word of "$ac_prog", so it can be a program name with args.
12566set dummy $ac_prog; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_CYGPATH+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $CYGPATH in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595CYGPATH=$ac_cv_path_CYGPATH
12596if test -n "$CYGPATH"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12598$as_echo "$CYGPATH" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605  test -n "$CYGPATH" && break
12606done
12607
12608  else
12609    # The variable is set, but is it from the command line or the environment?
12610
12611    # Try to remove the string !CYGPATH! from our list.
12612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12614      # If it failed, the variable was not from the command line. Ignore it,
12615      # but warn the user (except for BASH, which is always set by the calling BASH).
12616      if test "xCYGPATH" != xBASH; then
12617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12618$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12619      fi
12620      # Try to locate tool using the code snippet
12621      for ac_prog in cygpath
12622do
12623  # Extract the first word of "$ac_prog", so it can be a program name with args.
12624set dummy $ac_prog; ac_word=$2
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12626$as_echo_n "checking for $ac_word... " >&6; }
12627if ${ac_cv_path_CYGPATH+:} false; then :
12628  $as_echo_n "(cached) " >&6
12629else
12630  case $CYGPATH in
12631  [\\/]* | ?:[\\/]*)
12632  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12633  ;;
12634  *)
12635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12636for as_dir in $PATH
12637do
12638  IFS=$as_save_IFS
12639  test -z "$as_dir" && as_dir=.
12640    for ac_exec_ext in '' $ac_executable_extensions; do
12641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12642    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12644    break 2
12645  fi
12646done
12647  done
12648IFS=$as_save_IFS
12649
12650  ;;
12651esac
12652fi
12653CYGPATH=$ac_cv_path_CYGPATH
12654if test -n "$CYGPATH"; then
12655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12656$as_echo "$CYGPATH" >&6; }
12657else
12658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
12660fi
12661
12662
12663  test -n "$CYGPATH" && break
12664done
12665
12666    else
12667      # If it succeeded, then it was overridden by the user. We will use it
12668      # for the tool.
12669
12670      # First remove it from the list of overridden variables, so we can test
12671      # for unknown variables in the end.
12672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12673
12674      # Check if the provided tool contains a complete path.
12675      tool_specified="$CYGPATH"
12676      tool_basename="${tool_specified##*/}"
12677      if test "x$tool_basename" = "x$tool_specified"; then
12678        # A command without a complete path is provided, search $PATH.
12679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12680$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12681        # Extract the first word of "$tool_basename", so it can be a program name with args.
12682set dummy $tool_basename; ac_word=$2
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12684$as_echo_n "checking for $ac_word... " >&6; }
12685if ${ac_cv_path_CYGPATH+:} false; then :
12686  $as_echo_n "(cached) " >&6
12687else
12688  case $CYGPATH in
12689  [\\/]* | ?:[\\/]*)
12690  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12691  ;;
12692  *)
12693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12694for as_dir in $PATH
12695do
12696  IFS=$as_save_IFS
12697  test -z "$as_dir" && as_dir=.
12698    for ac_exec_ext in '' $ac_executable_extensions; do
12699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12700    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12702    break 2
12703  fi
12704done
12705  done
12706IFS=$as_save_IFS
12707
12708  ;;
12709esac
12710fi
12711CYGPATH=$ac_cv_path_CYGPATH
12712if test -n "$CYGPATH"; then
12713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12714$as_echo "$CYGPATH" >&6; }
12715else
12716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12717$as_echo "no" >&6; }
12718fi
12719
12720
12721        if test "x$CYGPATH" = x; then
12722          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12723        fi
12724      else
12725        # Otherwise we believe it is a complete path. Use it as it is.
12726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12727$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12729$as_echo_n "checking for CYGPATH... " >&6; }
12730        if test ! -x "$tool_specified"; then
12731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12732$as_echo "not found" >&6; }
12733          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12734        fi
12735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12736$as_echo "$tool_specified" >&6; }
12737      fi
12738    fi
12739  fi
12740
12741
12742
12743
12744  # Publish this variable in the help.
12745
12746
12747  if test "x$READLINK" = x; then
12748    # The variable is not set by user, try to locate tool using the code snippet
12749    for ac_prog in greadlink readlink
12750do
12751  # Extract the first word of "$ac_prog", so it can be a program name with args.
12752set dummy $ac_prog; ac_word=$2
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12754$as_echo_n "checking for $ac_word... " >&6; }
12755if ${ac_cv_path_READLINK+:} false; then :
12756  $as_echo_n "(cached) " >&6
12757else
12758  case $READLINK in
12759  [\\/]* | ?:[\\/]*)
12760  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12761  ;;
12762  *)
12763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764for as_dir in $PATH
12765do
12766  IFS=$as_save_IFS
12767  test -z "$as_dir" && as_dir=.
12768    for ac_exec_ext in '' $ac_executable_extensions; do
12769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12770    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12772    break 2
12773  fi
12774done
12775  done
12776IFS=$as_save_IFS
12777
12778  ;;
12779esac
12780fi
12781READLINK=$ac_cv_path_READLINK
12782if test -n "$READLINK"; then
12783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12784$as_echo "$READLINK" >&6; }
12785else
12786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12787$as_echo "no" >&6; }
12788fi
12789
12790
12791  test -n "$READLINK" && break
12792done
12793
12794  else
12795    # The variable is set, but is it from the command line or the environment?
12796
12797    # Try to remove the string !READLINK! from our list.
12798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12800      # If it failed, the variable was not from the command line. Ignore it,
12801      # but warn the user (except for BASH, which is always set by the calling BASH).
12802      if test "xREADLINK" != xBASH; then
12803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12804$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12805      fi
12806      # Try to locate tool using the code snippet
12807      for ac_prog in greadlink readlink
12808do
12809  # Extract the first word of "$ac_prog", so it can be a program name with args.
12810set dummy $ac_prog; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_READLINK+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $READLINK in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839READLINK=$ac_cv_path_READLINK
12840if test -n "$READLINK"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12842$as_echo "$READLINK" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849  test -n "$READLINK" && break
12850done
12851
12852    else
12853      # If it succeeded, then it was overridden by the user. We will use it
12854      # for the tool.
12855
12856      # First remove it from the list of overridden variables, so we can test
12857      # for unknown variables in the end.
12858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12859
12860      # Check if the provided tool contains a complete path.
12861      tool_specified="$READLINK"
12862      tool_basename="${tool_specified##*/}"
12863      if test "x$tool_basename" = "x$tool_specified"; then
12864        # A command without a complete path is provided, search $PATH.
12865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12866$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12867        # Extract the first word of "$tool_basename", so it can be a program name with args.
12868set dummy $tool_basename; ac_word=$2
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12870$as_echo_n "checking for $ac_word... " >&6; }
12871if ${ac_cv_path_READLINK+:} false; then :
12872  $as_echo_n "(cached) " >&6
12873else
12874  case $READLINK in
12875  [\\/]* | ?:[\\/]*)
12876  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12877  ;;
12878  *)
12879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12880for as_dir in $PATH
12881do
12882  IFS=$as_save_IFS
12883  test -z "$as_dir" && as_dir=.
12884    for ac_exec_ext in '' $ac_executable_extensions; do
12885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12886    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12888    break 2
12889  fi
12890done
12891  done
12892IFS=$as_save_IFS
12893
12894  ;;
12895esac
12896fi
12897READLINK=$ac_cv_path_READLINK
12898if test -n "$READLINK"; then
12899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12900$as_echo "$READLINK" >&6; }
12901else
12902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12903$as_echo "no" >&6; }
12904fi
12905
12906
12907        if test "x$READLINK" = x; then
12908          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12909        fi
12910      else
12911        # Otherwise we believe it is a complete path. Use it as it is.
12912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12913$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12915$as_echo_n "checking for READLINK... " >&6; }
12916        if test ! -x "$tool_specified"; then
12917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12918$as_echo "not found" >&6; }
12919          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12920        fi
12921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12922$as_echo "$tool_specified" >&6; }
12923      fi
12924    fi
12925  fi
12926
12927
12928
12929
12930  # Publish this variable in the help.
12931
12932
12933  if test "x$DF" = x; then
12934    # The variable is not set by user, try to locate tool using the code snippet
12935    for ac_prog in df
12936do
12937  # Extract the first word of "$ac_prog", so it can be a program name with args.
12938set dummy $ac_prog; ac_word=$2
12939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12940$as_echo_n "checking for $ac_word... " >&6; }
12941if ${ac_cv_path_DF+:} false; then :
12942  $as_echo_n "(cached) " >&6
12943else
12944  case $DF in
12945  [\\/]* | ?:[\\/]*)
12946  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12947  ;;
12948  *)
12949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12950for as_dir in $PATH
12951do
12952  IFS=$as_save_IFS
12953  test -z "$as_dir" && as_dir=.
12954    for ac_exec_ext in '' $ac_executable_extensions; do
12955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12956    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12958    break 2
12959  fi
12960done
12961  done
12962IFS=$as_save_IFS
12963
12964  ;;
12965esac
12966fi
12967DF=$ac_cv_path_DF
12968if test -n "$DF"; then
12969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12970$as_echo "$DF" >&6; }
12971else
12972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12973$as_echo "no" >&6; }
12974fi
12975
12976
12977  test -n "$DF" && break
12978done
12979
12980  else
12981    # The variable is set, but is it from the command line or the environment?
12982
12983    # Try to remove the string !DF! from our list.
12984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12986      # If it failed, the variable was not from the command line. Ignore it,
12987      # but warn the user (except for BASH, which is always set by the calling BASH).
12988      if test "xDF" != xBASH; then
12989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12990$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12991      fi
12992      # Try to locate tool using the code snippet
12993      for ac_prog in df
12994do
12995  # Extract the first word of "$ac_prog", so it can be a program name with args.
12996set dummy $ac_prog; ac_word=$2
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12998$as_echo_n "checking for $ac_word... " >&6; }
12999if ${ac_cv_path_DF+:} false; then :
13000  $as_echo_n "(cached) " >&6
13001else
13002  case $DF in
13003  [\\/]* | ?:[\\/]*)
13004  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13005  ;;
13006  *)
13007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13008for as_dir in $PATH
13009do
13010  IFS=$as_save_IFS
13011  test -z "$as_dir" && as_dir=.
13012    for ac_exec_ext in '' $ac_executable_extensions; do
13013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13014    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13016    break 2
13017  fi
13018done
13019  done
13020IFS=$as_save_IFS
13021
13022  ;;
13023esac
13024fi
13025DF=$ac_cv_path_DF
13026if test -n "$DF"; then
13027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13028$as_echo "$DF" >&6; }
13029else
13030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031$as_echo "no" >&6; }
13032fi
13033
13034
13035  test -n "$DF" && break
13036done
13037
13038    else
13039      # If it succeeded, then it was overridden by the user. We will use it
13040      # for the tool.
13041
13042      # First remove it from the list of overridden variables, so we can test
13043      # for unknown variables in the end.
13044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13045
13046      # Check if the provided tool contains a complete path.
13047      tool_specified="$DF"
13048      tool_basename="${tool_specified##*/}"
13049      if test "x$tool_basename" = "x$tool_specified"; then
13050        # A command without a complete path is provided, search $PATH.
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13052$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13053        # Extract the first word of "$tool_basename", so it can be a program name with args.
13054set dummy $tool_basename; ac_word=$2
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13056$as_echo_n "checking for $ac_word... " >&6; }
13057if ${ac_cv_path_DF+:} false; then :
13058  $as_echo_n "(cached) " >&6
13059else
13060  case $DF in
13061  [\\/]* | ?:[\\/]*)
13062  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13063  ;;
13064  *)
13065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13066for as_dir in $PATH
13067do
13068  IFS=$as_save_IFS
13069  test -z "$as_dir" && as_dir=.
13070    for ac_exec_ext in '' $ac_executable_extensions; do
13071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13072    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13074    break 2
13075  fi
13076done
13077  done
13078IFS=$as_save_IFS
13079
13080  ;;
13081esac
13082fi
13083DF=$ac_cv_path_DF
13084if test -n "$DF"; then
13085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13086$as_echo "$DF" >&6; }
13087else
13088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13089$as_echo "no" >&6; }
13090fi
13091
13092
13093        if test "x$DF" = x; then
13094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13095        fi
13096      else
13097        # Otherwise we believe it is a complete path. Use it as it is.
13098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13099$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13101$as_echo_n "checking for DF... " >&6; }
13102        if test ! -x "$tool_specified"; then
13103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13104$as_echo "not found" >&6; }
13105          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13106        fi
13107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13108$as_echo "$tool_specified" >&6; }
13109      fi
13110    fi
13111  fi
13112
13113
13114
13115
13116  # Publish this variable in the help.
13117
13118
13119  if test "x$SETFILE" = x; then
13120    # The variable is not set by user, try to locate tool using the code snippet
13121    for ac_prog in SetFile
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_path_SETFILE+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  case $SETFILE in
13131  [\\/]* | ?:[\\/]*)
13132  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13133  ;;
13134  *)
13135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13136for as_dir in $PATH
13137do
13138  IFS=$as_save_IFS
13139  test -z "$as_dir" && as_dir=.
13140    for ac_exec_ext in '' $ac_executable_extensions; do
13141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13142    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13144    break 2
13145  fi
13146done
13147  done
13148IFS=$as_save_IFS
13149
13150  ;;
13151esac
13152fi
13153SETFILE=$ac_cv_path_SETFILE
13154if test -n "$SETFILE"; then
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13156$as_echo "$SETFILE" >&6; }
13157else
13158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13159$as_echo "no" >&6; }
13160fi
13161
13162
13163  test -n "$SETFILE" && break
13164done
13165
13166  else
13167    # The variable is set, but is it from the command line or the environment?
13168
13169    # Try to remove the string !SETFILE! from our list.
13170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13172      # If it failed, the variable was not from the command line. Ignore it,
13173      # but warn the user (except for BASH, which is always set by the calling BASH).
13174      if test "xSETFILE" != xBASH; then
13175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13176$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13177      fi
13178      # Try to locate tool using the code snippet
13179      for ac_prog in SetFile
13180do
13181  # Extract the first word of "$ac_prog", so it can be a program name with args.
13182set dummy $ac_prog; ac_word=$2
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13184$as_echo_n "checking for $ac_word... " >&6; }
13185if ${ac_cv_path_SETFILE+:} false; then :
13186  $as_echo_n "(cached) " >&6
13187else
13188  case $SETFILE in
13189  [\\/]* | ?:[\\/]*)
13190  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13191  ;;
13192  *)
13193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13194for as_dir in $PATH
13195do
13196  IFS=$as_save_IFS
13197  test -z "$as_dir" && as_dir=.
13198    for ac_exec_ext in '' $ac_executable_extensions; do
13199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13200    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13202    break 2
13203  fi
13204done
13205  done
13206IFS=$as_save_IFS
13207
13208  ;;
13209esac
13210fi
13211SETFILE=$ac_cv_path_SETFILE
13212if test -n "$SETFILE"; then
13213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13214$as_echo "$SETFILE" >&6; }
13215else
13216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13217$as_echo "no" >&6; }
13218fi
13219
13220
13221  test -n "$SETFILE" && break
13222done
13223
13224    else
13225      # If it succeeded, then it was overridden by the user. We will use it
13226      # for the tool.
13227
13228      # First remove it from the list of overridden variables, so we can test
13229      # for unknown variables in the end.
13230      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13231
13232      # Check if the provided tool contains a complete path.
13233      tool_specified="$SETFILE"
13234      tool_basename="${tool_specified##*/}"
13235      if test "x$tool_basename" = "x$tool_specified"; then
13236        # A command without a complete path is provided, search $PATH.
13237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13238$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13239        # Extract the first word of "$tool_basename", so it can be a program name with args.
13240set dummy $tool_basename; ac_word=$2
13241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13242$as_echo_n "checking for $ac_word... " >&6; }
13243if ${ac_cv_path_SETFILE+:} false; then :
13244  $as_echo_n "(cached) " >&6
13245else
13246  case $SETFILE in
13247  [\\/]* | ?:[\\/]*)
13248  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13249  ;;
13250  *)
13251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13252for as_dir in $PATH
13253do
13254  IFS=$as_save_IFS
13255  test -z "$as_dir" && as_dir=.
13256    for ac_exec_ext in '' $ac_executable_extensions; do
13257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13258    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13260    break 2
13261  fi
13262done
13263  done
13264IFS=$as_save_IFS
13265
13266  ;;
13267esac
13268fi
13269SETFILE=$ac_cv_path_SETFILE
13270if test -n "$SETFILE"; then
13271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13272$as_echo "$SETFILE" >&6; }
13273else
13274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13275$as_echo "no" >&6; }
13276fi
13277
13278
13279        if test "x$SETFILE" = x; then
13280          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13281        fi
13282      else
13283        # Otherwise we believe it is a complete path. Use it as it is.
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13285$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13287$as_echo_n "checking for SETFILE... " >&6; }
13288        if test ! -x "$tool_specified"; then
13289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13290$as_echo "not found" >&6; }
13291          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13292        fi
13293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13294$as_echo "$tool_specified" >&6; }
13295      fi
13296    fi
13297  fi
13298
13299
13300
13301
13302# Now we can determine OpenJDK build and target platforms. This is required to
13303# have early on.
13304# Make sure we can run config.sub.
13305$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13306  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13307
13308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13309$as_echo_n "checking build system type... " >&6; }
13310if ${ac_cv_build+:} false; then :
13311  $as_echo_n "(cached) " >&6
13312else
13313  ac_build_alias=$build_alias
13314test "x$ac_build_alias" = x &&
13315  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13316test "x$ac_build_alias" = x &&
13317  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13318ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13319  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13320
13321fi
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13323$as_echo "$ac_cv_build" >&6; }
13324case $ac_cv_build in
13325*-*-*) ;;
13326*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13327esac
13328build=$ac_cv_build
13329ac_save_IFS=$IFS; IFS='-'
13330set x $ac_cv_build
13331shift
13332build_cpu=$1
13333build_vendor=$2
13334shift; shift
13335# Remember, the first character of IFS is used to create $*,
13336# except with old shells:
13337build_os=$*
13338IFS=$ac_save_IFS
13339case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13340
13341
13342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13343$as_echo_n "checking host system type... " >&6; }
13344if ${ac_cv_host+:} false; then :
13345  $as_echo_n "(cached) " >&6
13346else
13347  if test "x$host_alias" = x; then
13348  ac_cv_host=$ac_cv_build
13349else
13350  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13351    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13352fi
13353
13354fi
13355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13356$as_echo "$ac_cv_host" >&6; }
13357case $ac_cv_host in
13358*-*-*) ;;
13359*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13360esac
13361host=$ac_cv_host
13362ac_save_IFS=$IFS; IFS='-'
13363set x $ac_cv_host
13364shift
13365host_cpu=$1
13366host_vendor=$2
13367shift; shift
13368# Remember, the first character of IFS is used to create $*,
13369# except with old shells:
13370host_os=$*
13371IFS=$ac_save_IFS
13372case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13373
13374
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13376$as_echo_n "checking target system type... " >&6; }
13377if ${ac_cv_target+:} false; then :
13378  $as_echo_n "(cached) " >&6
13379else
13380  if test "x$target_alias" = x; then
13381  ac_cv_target=$ac_cv_host
13382else
13383  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13384    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13385fi
13386
13387fi
13388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13389$as_echo "$ac_cv_target" >&6; }
13390case $ac_cv_target in
13391*-*-*) ;;
13392*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13393esac
13394target=$ac_cv_target
13395ac_save_IFS=$IFS; IFS='-'
13396set x $ac_cv_target
13397shift
13398target_cpu=$1
13399target_vendor=$2
13400shift; shift
13401# Remember, the first character of IFS is used to create $*,
13402# except with old shells:
13403target_os=$*
13404IFS=$ac_save_IFS
13405case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13406
13407
13408# The aliases save the names the user supplied, while $host etc.
13409# will get canonicalized.
13410test -n "$target_alias" &&
13411  test "$program_prefix$program_suffix$program_transform_name" = \
13412    NONENONEs,x,x, &&
13413  program_prefix=${target_alias}-
13414
13415  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13416  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13417  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13418  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13419  # to use the configure naming style.
13420
13421
13422
13423
13424
13425  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13426  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13427  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13428  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13429  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13430  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13431
13432
13433
13434  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13435
13436  case "$build_os" in
13437    *linux*)
13438      VAR_OS=linux
13439      VAR_OS_API=posix
13440      VAR_OS_ENV=linux
13441      ;;
13442    *solaris*)
13443      VAR_OS=solaris
13444      VAR_OS_API=posix
13445      VAR_OS_ENV=solaris
13446      ;;
13447    *darwin*)
13448      VAR_OS=macosx
13449      VAR_OS_API=posix
13450      VAR_OS_ENV=macosx
13451      ;;
13452    *bsd*)
13453      VAR_OS=bsd
13454      VAR_OS_API=posix
13455      VAR_OS_ENV=bsd
13456      ;;
13457    *cygwin*)
13458      VAR_OS=windows
13459      VAR_OS_API=winapi
13460      VAR_OS_ENV=windows.cygwin
13461      ;;
13462    *mingw*)
13463      VAR_OS=windows
13464      VAR_OS_API=winapi
13465      VAR_OS_ENV=windows.msys
13466      ;;
13467    *aix*)
13468      VAR_OS=aix
13469      VAR_OS_API=posix
13470      VAR_OS_ENV=aix
13471      ;;
13472    *)
13473      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13474      ;;
13475  esac
13476
13477
13478  # First argument is the cpu name from the trip/quad
13479  case "$build_cpu" in
13480    x86_64)
13481      VAR_CPU=x86_64
13482      VAR_CPU_ARCH=x86
13483      VAR_CPU_BITS=64
13484      VAR_CPU_ENDIAN=little
13485      ;;
13486    i?86)
13487      VAR_CPU=x86
13488      VAR_CPU_ARCH=x86
13489      VAR_CPU_BITS=32
13490      VAR_CPU_ENDIAN=little
13491      ;;
13492    arm*)
13493      VAR_CPU=arm
13494      VAR_CPU_ARCH=arm
13495      VAR_CPU_BITS=32
13496      VAR_CPU_ENDIAN=little
13497      ;;
13498    powerpc)
13499      VAR_CPU=ppc
13500      VAR_CPU_ARCH=ppc
13501      VAR_CPU_BITS=32
13502      VAR_CPU_ENDIAN=big
13503      ;;
13504    powerpc64)
13505      VAR_CPU=ppc64
13506      VAR_CPU_ARCH=ppc
13507      VAR_CPU_BITS=64
13508      VAR_CPU_ENDIAN=big
13509      ;;
13510    s390)
13511      VAR_CPU=s390
13512      VAR_CPU_ARCH=s390
13513      VAR_CPU_BITS=32
13514      VAR_CPU_ENDIAN=big
13515      ;;
13516    s390x)
13517      VAR_CPU=s390x
13518      VAR_CPU_ARCH=s390
13519      VAR_CPU_BITS=64
13520      VAR_CPU_ENDIAN=big
13521      ;;
13522    sparc)
13523      VAR_CPU=sparc
13524      VAR_CPU_ARCH=sparc
13525      VAR_CPU_BITS=32
13526      VAR_CPU_ENDIAN=big
13527      ;;
13528    sparcv9)
13529      VAR_CPU=sparcv9
13530      VAR_CPU_ARCH=sparc
13531      VAR_CPU_BITS=64
13532      VAR_CPU_ENDIAN=big
13533      ;;
13534    *)
13535      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13536      ;;
13537  esac
13538
13539  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13540  OPENJDK_BUILD_OS="$VAR_OS"
13541  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13542  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13543  OPENJDK_BUILD_CPU="$VAR_CPU"
13544  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13545  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13546  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13547
13548
13549
13550
13551
13552
13553
13554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13555$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13557$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13558
13559  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13560
13561  case "$host_os" in
13562    *linux*)
13563      VAR_OS=linux
13564      VAR_OS_API=posix
13565      VAR_OS_ENV=linux
13566      ;;
13567    *solaris*)
13568      VAR_OS=solaris
13569      VAR_OS_API=posix
13570      VAR_OS_ENV=solaris
13571      ;;
13572    *darwin*)
13573      VAR_OS=macosx
13574      VAR_OS_API=posix
13575      VAR_OS_ENV=macosx
13576      ;;
13577    *bsd*)
13578      VAR_OS=bsd
13579      VAR_OS_API=posix
13580      VAR_OS_ENV=bsd
13581      ;;
13582    *cygwin*)
13583      VAR_OS=windows
13584      VAR_OS_API=winapi
13585      VAR_OS_ENV=windows.cygwin
13586      ;;
13587    *mingw*)
13588      VAR_OS=windows
13589      VAR_OS_API=winapi
13590      VAR_OS_ENV=windows.msys
13591      ;;
13592    *aix*)
13593      VAR_OS=aix
13594      VAR_OS_API=posix
13595      VAR_OS_ENV=aix
13596      ;;
13597    *)
13598      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13599      ;;
13600  esac
13601
13602
13603  # First argument is the cpu name from the trip/quad
13604  case "$host_cpu" in
13605    x86_64)
13606      VAR_CPU=x86_64
13607      VAR_CPU_ARCH=x86
13608      VAR_CPU_BITS=64
13609      VAR_CPU_ENDIAN=little
13610      ;;
13611    i?86)
13612      VAR_CPU=x86
13613      VAR_CPU_ARCH=x86
13614      VAR_CPU_BITS=32
13615      VAR_CPU_ENDIAN=little
13616      ;;
13617    arm*)
13618      VAR_CPU=arm
13619      VAR_CPU_ARCH=arm
13620      VAR_CPU_BITS=32
13621      VAR_CPU_ENDIAN=little
13622      ;;
13623    powerpc)
13624      VAR_CPU=ppc
13625      VAR_CPU_ARCH=ppc
13626      VAR_CPU_BITS=32
13627      VAR_CPU_ENDIAN=big
13628      ;;
13629    powerpc64)
13630      VAR_CPU=ppc64
13631      VAR_CPU_ARCH=ppc
13632      VAR_CPU_BITS=64
13633      VAR_CPU_ENDIAN=big
13634      ;;
13635    s390)
13636      VAR_CPU=s390
13637      VAR_CPU_ARCH=s390
13638      VAR_CPU_BITS=32
13639      VAR_CPU_ENDIAN=big
13640      ;;
13641    s390x)
13642      VAR_CPU=s390x
13643      VAR_CPU_ARCH=s390
13644      VAR_CPU_BITS=64
13645      VAR_CPU_ENDIAN=big
13646      ;;
13647    sparc)
13648      VAR_CPU=sparc
13649      VAR_CPU_ARCH=sparc
13650      VAR_CPU_BITS=32
13651      VAR_CPU_ENDIAN=big
13652      ;;
13653    sparcv9)
13654      VAR_CPU=sparcv9
13655      VAR_CPU_ARCH=sparc
13656      VAR_CPU_BITS=64
13657      VAR_CPU_ENDIAN=big
13658      ;;
13659    *)
13660      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13661      ;;
13662  esac
13663
13664  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13665  OPENJDK_TARGET_OS="$VAR_OS"
13666  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13667  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13668  OPENJDK_TARGET_CPU="$VAR_CPU"
13669  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13670  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13671  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13672
13673
13674
13675
13676
13677
13678
13679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13680$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13682$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13683
13684
13685
13686# Check whether --with-target-bits was given.
13687if test "${with_target_bits+set}" = set; then :
13688  withval=$with_target_bits;
13689fi
13690
13691
13692  # We have three types of compiles:
13693  # native  == normal compilation, target system == build system
13694  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13695  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13696  #
13697  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13698    # We're doing a proper cross-compilation
13699    COMPILE_TYPE="cross"
13700  else
13701    COMPILE_TYPE="native"
13702  fi
13703
13704  if test "x$with_target_bits" != x; then
13705    if test "x$COMPILE_TYPE" = "xcross"; then
13706      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13707    fi
13708
13709    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13710      # A reduced build is requested
13711      COMPILE_TYPE="reduced"
13712      OPENJDK_TARGET_CPU_BITS=32
13713      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13714        OPENJDK_TARGET_CPU=x86
13715      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13716        OPENJDK_TARGET_CPU=sparc
13717      else
13718        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13719      fi
13720    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13721      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
13722    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13723      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13724$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13725    else
13726      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13727    fi
13728  fi
13729
13730
13731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13732$as_echo_n "checking compilation type... " >&6; }
13733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13734$as_echo "$COMPILE_TYPE" >&6; }
13735
13736
13737  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13738    REQUIRED_OS_NAME=SunOS
13739    REQUIRED_OS_VERSION=5.10
13740  fi
13741  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13742    REQUIRED_OS_NAME=Linux
13743    REQUIRED_OS_VERSION=2.6
13744  fi
13745  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13746    REQUIRED_OS_NAME=Windows
13747    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13748      REQUIRED_OS_VERSION=5.2
13749    else
13750      REQUIRED_OS_VERSION=5.1
13751    fi
13752  fi
13753  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13754    REQUIRED_OS_NAME=Darwin
13755    REQUIRED_OS_VERSION=11.2
13756  fi
13757
13758
13759
13760
13761
13762  # Also store the legacy naming of the cpu.
13763  # Ie i586 and amd64 instead of x86 and x86_64
13764  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13765  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13766    OPENJDK_TARGET_CPU_LEGACY="i586"
13767  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13768    # On all platforms except MacOSX replace x86_64 with amd64.
13769    OPENJDK_TARGET_CPU_LEGACY="amd64"
13770  fi
13771
13772
13773  # And the second legacy naming of the cpu.
13774  # Ie i386 and amd64 instead of x86 and x86_64.
13775  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13776  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13777    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13778  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13779    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13780  fi
13781
13782
13783  # This is the name of the cpu (but using i386 and amd64 instead of
13784  # x86 and x86_64, respectively), preceeded by a /, to be used when
13785  # locating libraries. On macosx, it's empty, though.
13786  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13787  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13788    OPENJDK_TARGET_CPU_LIBDIR=""
13789  fi
13790
13791
13792  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13793  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13794  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13795  OPENJDK_TARGET_CPU_ISADIR=""
13796  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13797    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13798      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13799    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13800      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13801    fi
13802  fi
13803
13804
13805  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13806  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13807  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13808    # On linux only, we replace x86 with i386.
13809    OPENJDK_TARGET_CPU_OSARCH="i386"
13810  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13811    # On all platforms except macosx, we replace x86_64 with amd64.
13812    OPENJDK_TARGET_CPU_OSARCH="amd64"
13813  fi
13814
13815
13816  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13817  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13818    OPENJDK_TARGET_CPU_JLI="i386"
13819  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13820    # On all platforms except macosx, we replace x86_64 with amd64.
13821    OPENJDK_TARGET_CPU_JLI="amd64"
13822  fi
13823  # Now setup the -D flags for building libjli.
13824  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13825  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13826    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13827      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13828    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13829      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13830    fi
13831  fi
13832
13833
13834  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13835  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13836    OPENJDK_TARGET_OS_API_DIR="solaris"
13837  fi
13838  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13839    OPENJDK_TARGET_OS_API_DIR="windows"
13840  fi
13841
13842
13843  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13844      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13845  else
13846      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13847  fi
13848
13849
13850  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13851    A_LP64="LP64:="
13852    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13853    # unpack200.exe
13854    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13855      ADD_LP64="-D_LP64=1"
13856    fi
13857  fi
13858  LP64=$A_LP64
13859
13860
13861  if test "x$COMPILE_TYPE" = "xcross"; then
13862    # FIXME: ... or should this include reduced builds..?
13863    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13864  else
13865    DEFINE_CROSS_COMPILE_ARCH=""
13866  fi
13867
13868
13869  # ZERO_ARCHDEF is used to enable architecture-specific code
13870  case "${OPENJDK_TARGET_CPU}" in
13871    ppc*)    ZERO_ARCHDEF=PPC   ;;
13872    s390*)   ZERO_ARCHDEF=S390  ;;
13873    sparc*)  ZERO_ARCHDEF=SPARC ;;
13874    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13875    x86)     ZERO_ARCHDEF=IA32  ;;
13876    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13877  esac
13878
13879
13880
13881
13882# Continue setting up basic stuff. Most remaining code require fundamental tools.
13883
13884  # Save the current directory this script was started from
13885  CURDIR="$PWD"
13886
13887  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13888    PATH_SEP=";"
13889
13890  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13891  if test $SRC_ROOT_LENGTH -gt 100; then
13892    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13893  fi
13894
13895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13897$as_echo_n "checking cygwin release... " >&6; }
13898    CYGWIN_VERSION=`$UNAME -r`
13899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13900$as_echo "$CYGWIN_VERSION" >&6; }
13901    WINDOWS_ENV_VENDOR='cygwin'
13902    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13903
13904    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13905    if test "x$CYGWIN_VERSION_OK" = x; then
13906      { $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
13907$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;}
13908      as_fn_error $? "Cannot continue" "$LINENO" 5
13909    fi
13910    if test "x$CYGPATH" = x; then
13911      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13912    fi
13913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13914$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13915    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13916    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13917    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13918    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13920$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13921    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13922    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13923    if test "x$test_cygdrive_prefix" = x; then
13924      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13925    fi
13926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13928$as_echo_n "checking msys release... " >&6; }
13929    MSYS_VERSION=`$UNAME -r`
13930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13931$as_echo "$MSYS_VERSION" >&6; }
13932
13933    WINDOWS_ENV_VENDOR='msys'
13934    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13935
13936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13937$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13938    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13939    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13940
13941  windows_path="$MSYS_ROOT_PATH"
13942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13943    unix_path=`$CYGPATH -u "$windows_path"`
13944    MSYS_ROOT_PATH="$unix_path"
13945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13947    MSYS_ROOT_PATH="$unix_path"
13948  fi
13949
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13951$as_echo "$MSYS_ROOT_PATH" >&6; }
13952    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13953  else
13954    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13955  fi
13956
13957  # Test if windows or unix (cygwin/msys) find is first in path.
13958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13959$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13960  FIND_BINARY_OUTPUT=`find --version 2>&1`
13961  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13963$as_echo "unix style" >&6; }
13964  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13966$as_echo "Windows" >&6; }
13967    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13968$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13969    { $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
13970$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13971    as_fn_error $? "Cannot continue" "$LINENO" 5
13972  else
13973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13974$as_echo "unknown" >&6; }
13975    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13976$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13977  fi
13978
13979  else
13980    PATH_SEP=":"
13981  fi
13982
13983
13984  # We get the top-level directory from the supporting wrappers.
13985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13986$as_echo_n "checking for top-level directory... " >&6; }
13987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13988$as_echo "$TOPDIR" >&6; }
13989
13990
13991  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13992
13993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13994
13995  # Input might be given as Windows format, start by converting to
13996  # unix format.
13997  path="$CURDIR"
13998  new_path=`$CYGPATH -u "$path"`
13999
14000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14003  # "foo.exe" is OK but "foo" is an error.
14004  #
14005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14006  # It is also a way to make sure we got the proper file name for the real test later on.
14007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14008  if test "x$test_shortpath" = x; then
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14010$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14011    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14012  fi
14013
14014  # Call helper function which possibly converts this using DOS-style short mode.
14015  # If so, the updated path is stored in $new_path.
14016
14017  input_path="$new_path"
14018  # Check if we need to convert this using DOS-style short mode. If the path
14019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14020  # take no chances and rewrite it.
14021  # Note: m4 eats our [], so we need to use [ and ] instead.
14022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14023  if test "x$has_forbidden_chars" != x; then
14024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14028      # Going to short mode and back again did indeed matter. Since short mode is
14029      # case insensitive, let's make it lowercase to improve readability.
14030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14031      # Now convert it back to Unix-stile (cygpath)
14032      input_path=`$CYGPATH -u "$shortmode_path"`
14033      new_path="$input_path"
14034    fi
14035  fi
14036
14037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14038  if test "x$test_cygdrive_prefix" = x; then
14039    # As a simple fix, exclude /usr/bin since it's not a real path.
14040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14042      # a path prefixed by /cygdrive for fixpath to work.
14043      new_path="$CYGWIN_ROOT_PATH$input_path"
14044    fi
14045  fi
14046
14047
14048  if test "x$path" != "x$new_path"; then
14049    CURDIR="$new_path"
14050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14051$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14052  fi
14053
14054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14055
14056  path="$CURDIR"
14057  has_colon=`$ECHO $path | $GREP ^.:`
14058  new_path="$path"
14059  if test "x$has_colon" = x; then
14060    # Not in mixed or Windows style, start by that.
14061    new_path=`cmd //c echo $path`
14062  fi
14063
14064
14065  input_path="$new_path"
14066  # Check if we need to convert this using DOS-style short mode. If the path
14067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14068  # take no chances and rewrite it.
14069  # Note: m4 eats our [], so we need to use [ and ] instead.
14070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14071  if test "x$has_forbidden_chars" != x; then
14072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14074  fi
14075
14076
14077  windows_path="$new_path"
14078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14079    unix_path=`$CYGPATH -u "$windows_path"`
14080    new_path="$unix_path"
14081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14083    new_path="$unix_path"
14084  fi
14085
14086  if test "x$path" != "x$new_path"; then
14087    CURDIR="$new_path"
14088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14089$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14090  fi
14091
14092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14094
14095  else
14096    # We're on a posix platform. Hooray! :)
14097    path="$CURDIR"
14098    has_space=`$ECHO "$path" | $GREP " "`
14099    if test "x$has_space" != x; then
14100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14101$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14102      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14103    fi
14104
14105    # Use eval to expand a potential ~
14106    eval path="$path"
14107    if test ! -f "$path" && test ! -d "$path"; then
14108      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14109    fi
14110
14111    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14112  fi
14113
14114
14115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14116
14117  # Input might be given as Windows format, start by converting to
14118  # unix format.
14119  path="$TOPDIR"
14120  new_path=`$CYGPATH -u "$path"`
14121
14122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14125  # "foo.exe" is OK but "foo" is an error.
14126  #
14127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14128  # It is also a way to make sure we got the proper file name for the real test later on.
14129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14130  if test "x$test_shortpath" = x; then
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14132$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14133    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14134  fi
14135
14136  # Call helper function which possibly converts this using DOS-style short mode.
14137  # If so, the updated path is stored in $new_path.
14138
14139  input_path="$new_path"
14140  # Check if we need to convert this using DOS-style short mode. If the path
14141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14142  # take no chances and rewrite it.
14143  # Note: m4 eats our [], so we need to use [ and ] instead.
14144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14145  if test "x$has_forbidden_chars" != x; then
14146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14150      # Going to short mode and back again did indeed matter. Since short mode is
14151      # case insensitive, let's make it lowercase to improve readability.
14152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14153      # Now convert it back to Unix-stile (cygpath)
14154      input_path=`$CYGPATH -u "$shortmode_path"`
14155      new_path="$input_path"
14156    fi
14157  fi
14158
14159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14160  if test "x$test_cygdrive_prefix" = x; then
14161    # As a simple fix, exclude /usr/bin since it's not a real path.
14162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14164      # a path prefixed by /cygdrive for fixpath to work.
14165      new_path="$CYGWIN_ROOT_PATH$input_path"
14166    fi
14167  fi
14168
14169
14170  if test "x$path" != "x$new_path"; then
14171    TOPDIR="$new_path"
14172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14173$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14174  fi
14175
14176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14177
14178  path="$TOPDIR"
14179  has_colon=`$ECHO $path | $GREP ^.:`
14180  new_path="$path"
14181  if test "x$has_colon" = x; then
14182    # Not in mixed or Windows style, start by that.
14183    new_path=`cmd //c echo $path`
14184  fi
14185
14186
14187  input_path="$new_path"
14188  # Check if we need to convert this using DOS-style short mode. If the path
14189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14190  # take no chances and rewrite it.
14191  # Note: m4 eats our [], so we need to use [ and ] instead.
14192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14193  if test "x$has_forbidden_chars" != x; then
14194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14196  fi
14197
14198
14199  windows_path="$new_path"
14200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14201    unix_path=`$CYGPATH -u "$windows_path"`
14202    new_path="$unix_path"
14203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14205    new_path="$unix_path"
14206  fi
14207
14208  if test "x$path" != "x$new_path"; then
14209    TOPDIR="$new_path"
14210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14211$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14212  fi
14213
14214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14216
14217  else
14218    # We're on a posix platform. Hooray! :)
14219    path="$TOPDIR"
14220    has_space=`$ECHO "$path" | $GREP " "`
14221    if test "x$has_space" != x; then
14222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14223$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14224      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14225    fi
14226
14227    # Use eval to expand a potential ~
14228    eval path="$path"
14229    if test ! -f "$path" && test ! -d "$path"; then
14230      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14231    fi
14232
14233    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14234  fi
14235
14236  # SRC_ROOT is a traditional alias for TOPDIR.
14237  SRC_ROOT=$TOPDIR
14238
14239  # Locate the directory of this script.
14240  AUTOCONF_DIR=$TOPDIR/common/autoconf
14241
14242  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14243    # Add extra search paths on solaris for utilities like ar and as etc...
14244    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14245  fi
14246
14247  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14248  # is not correct.
14249
14250# Check whether --with-sys-root was given.
14251if test "${with_sys_root+set}" = set; then :
14252  withval=$with_sys_root;
14253fi
14254
14255
14256  if test "x$with_sys_root" != x; then
14257    SYS_ROOT=$with_sys_root
14258  else
14259    SYS_ROOT=/
14260  fi
14261
14262
14263
14264# Check whether --with-tools-dir was given.
14265if test "${with_tools_dir+set}" = set; then :
14266  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14267
14268fi
14269
14270
14271
14272# Check whether --with-devkit was given.
14273if test "${with_devkit+set}" = set; then :
14274  withval=$with_devkit;
14275        if test "x$with_sys_root" != x; then
14276          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14277        fi
14278
14279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14280
14281  # Input might be given as Windows format, start by converting to
14282  # unix format.
14283  path="$with_devkit"
14284  new_path=`$CYGPATH -u "$path"`
14285
14286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14289  # "foo.exe" is OK but "foo" is an error.
14290  #
14291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14292  # It is also a way to make sure we got the proper file name for the real test later on.
14293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14294  if test "x$test_shortpath" = x; then
14295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14296$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14297    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14298  fi
14299
14300  # Call helper function which possibly converts this using DOS-style short mode.
14301  # If so, the updated path is stored in $new_path.
14302
14303  input_path="$new_path"
14304  # Check if we need to convert this using DOS-style short mode. If the path
14305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14306  # take no chances and rewrite it.
14307  # Note: m4 eats our [], so we need to use [ and ] instead.
14308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14309  if test "x$has_forbidden_chars" != x; then
14310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14314      # Going to short mode and back again did indeed matter. Since short mode is
14315      # case insensitive, let's make it lowercase to improve readability.
14316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14317      # Now convert it back to Unix-stile (cygpath)
14318      input_path=`$CYGPATH -u "$shortmode_path"`
14319      new_path="$input_path"
14320    fi
14321  fi
14322
14323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14324  if test "x$test_cygdrive_prefix" = x; then
14325    # As a simple fix, exclude /usr/bin since it's not a real path.
14326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14328      # a path prefixed by /cygdrive for fixpath to work.
14329      new_path="$CYGWIN_ROOT_PATH$input_path"
14330    fi
14331  fi
14332
14333
14334  if test "x$path" != "x$new_path"; then
14335    with_devkit="$new_path"
14336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14337$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14338  fi
14339
14340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14341
14342  path="$with_devkit"
14343  has_colon=`$ECHO $path | $GREP ^.:`
14344  new_path="$path"
14345  if test "x$has_colon" = x; then
14346    # Not in mixed or Windows style, start by that.
14347    new_path=`cmd //c echo $path`
14348  fi
14349
14350
14351  input_path="$new_path"
14352  # Check if we need to convert this using DOS-style short mode. If the path
14353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14354  # take no chances and rewrite it.
14355  # Note: m4 eats our [], so we need to use [ and ] instead.
14356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14357  if test "x$has_forbidden_chars" != x; then
14358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14360  fi
14361
14362
14363  windows_path="$new_path"
14364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14365    unix_path=`$CYGPATH -u "$windows_path"`
14366    new_path="$unix_path"
14367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14369    new_path="$unix_path"
14370  fi
14371
14372  if test "x$path" != "x$new_path"; then
14373    with_devkit="$new_path"
14374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14375$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14376  fi
14377
14378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14380
14381  else
14382    # We're on a posix platform. Hooray! :)
14383    path="$with_devkit"
14384    has_space=`$ECHO "$path" | $GREP " "`
14385    if test "x$has_space" != x; then
14386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14387$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14388      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14389    fi
14390
14391    # Use eval to expand a potential ~
14392    eval path="$path"
14393    if test ! -f "$path" && test ! -d "$path"; then
14394      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14395    fi
14396
14397    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14398  fi
14399
14400
14401  if test "x$TOOLS_DIR" = x; then
14402    TOOLS_DIR="$with_devkit/bin"
14403  else
14404    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14405  fi
14406
14407        if test -d "$with_devkit/$host_alias/libc"; then
14408          SYS_ROOT=$with_devkit/$host_alias/libc
14409        elif test -d "$with_devkit/$host/sys-root"; then
14410          SYS_ROOT=$with_devkit/$host/sys-root
14411        fi
14412
14413fi
14414
14415
14416
14417  # Setup default logging of stdout and stderr to build.log in the output root.
14418  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14419  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14420  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14421
14422
14423
14424
14425
14426# Check if it's a pure open build or if custom sources are to be used.
14427
14428  # Check whether --enable-openjdk-only was given.
14429if test "${enable_openjdk_only+set}" = set; then :
14430  enableval=$enable_openjdk_only;
14431else
14432  enable_openjdk_only="no"
14433fi
14434
14435
14436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14437$as_echo_n "checking for presence of closed sources... " >&6; }
14438  if test -d "$SRC_ROOT/jdk/src/closed"; then
14439    CLOSED_SOURCE_PRESENT=yes
14440  else
14441    CLOSED_SOURCE_PRESENT=no
14442  fi
14443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14444$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14445
14446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14447$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14448  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14450$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14451
14452  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14453    OPENJDK=true
14454    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14455      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14456$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14457    fi
14458  else
14459    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14460      OPENJDK=true
14461    else
14462      OPENJDK=false
14463    fi
14464  fi
14465
14466  if test "x$OPENJDK" = "xtrue"; then
14467    SET_OPENJDK="OPENJDK=true"
14468  fi
14469
14470
14471
14472  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14473  # the IncludeCustomExtension macro.
14474
14475
14476# Check whether --with-custom-make-dir was given.
14477if test "${with_custom_make_dir+set}" = set; then :
14478  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
14479$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14480fi
14481
14482
14483
14484
14485# These are needed to be able to create a configuration name (and thus the output directory)
14486
14487  ###############################################################################
14488  #
14489  # Check which variant of the JDK that we want to build.
14490  # Currently we have:
14491  #    normal:   standard edition
14492  # but the custom make system may add other variants
14493  #
14494  # Effectively the JDK variant gives a name to a specific set of
14495  # modules to compile into the JDK. In the future, these modules
14496  # might even be Jigsaw modules.
14497  #
14498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14499$as_echo_n "checking which variant of the JDK to build... " >&6; }
14500
14501# Check whether --with-jdk-variant was given.
14502if test "${with_jdk_variant+set}" = set; then :
14503  withval=$with_jdk_variant;
14504fi
14505
14506
14507  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14508    JDK_VARIANT="normal"
14509  else
14510    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14511  fi
14512
14513
14514
14515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14516$as_echo "$JDK_VARIANT" >&6; }
14517
14518
14519###############################################################################
14520#
14521# Check which interpreter of the JVM we want to build.
14522# Currently we have:
14523#    template: Template interpreter (the default)
14524#    cpp     : C++ interpreter
14525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14526$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14527
14528# Check whether --with-jvm-interpreter was given.
14529if test "${with_jvm_interpreter+set}" = set; then :
14530  withval=$with_jvm_interpreter;
14531fi
14532
14533
14534if test "x$with_jvm_interpreter" = x; then
14535     with_jvm_interpreter="template"
14536fi
14537
14538JVM_INTERPRETER="$with_jvm_interpreter"
14539
14540if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14541   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14542fi
14543
14544
14545
14546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14547$as_echo "$with_jvm_interpreter" >&6; }
14548
14549
14550
14551  ###############################################################################
14552  #
14553  # Check which variants of the JVM that we want to build.
14554  # Currently we have:
14555  #    server: normal interpreter and a tiered C1/C2 compiler
14556  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14557  #    minimal1: reduced form of client with optional VM services and features stripped out
14558  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14559  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14560  #    zero: no machine code interpreter, no compiler
14561  #    zeroshark: zero interpreter and shark/llvm compiler backend
14562#    core: interpreter only, no compiler (only works on some platforms)
14563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14564$as_echo_n "checking which variants of the JVM to build... " >&6; }
14565
14566# Check whether --with-jvm-variants was given.
14567if test "${with_jvm_variants+set}" = set; then :
14568  withval=$with_jvm_variants;
14569fi
14570
14571
14572  if test "x$with_jvm_variants" = x; then
14573    with_jvm_variants="server"
14574  fi
14575
14576  JVM_VARIANTS=",$with_jvm_variants,"
14577  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,//'`
14578
14579  if test "x$TEST_VARIANTS" != "x,"; then
14580     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14581  fi
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14583$as_echo "$with_jvm_variants" >&6; }
14584
14585  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14586  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14587  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14588  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14589  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14590  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14591  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14592
14593  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14594    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14595      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14596    fi
14597  fi
14598  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14599    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14600      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14601    fi
14602  fi
14603  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14604    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14605      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14606    fi
14607  fi
14608
14609  # Replace the commas with AND for use in the build directory name.
14610  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14611  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/'`
14612  if test "x$COUNT_VARIANTS" != "x,1"; then
14613    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14614  else
14615    BUILDING_MULTIPLE_JVM_VARIANTS=no
14616  fi
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627  INCLUDE_SA=true
14628  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14629    INCLUDE_SA=false
14630  fi
14631  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14632    INCLUDE_SA=false
14633  fi
14634  if test "x$VAR_CPU" = xppc64 ; then
14635    INCLUDE_SA=false
14636  fi
14637
14638
14639  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14640    MACOSX_UNIVERSAL="true"
14641  fi
14642
14643
14644
14645
14646  ###############################################################################
14647  #
14648  # Set the debug level
14649  #    release: no debug information, all optimizations, no asserts.
14650  #    fastdebug: debug information (-g), all optimizations, all asserts
14651  #    slowdebug: debug information (-g), no optimizations, all asserts
14652  #
14653  DEBUG_LEVEL="release"
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14655$as_echo_n "checking which debug level to use... " >&6; }
14656  # Check whether --enable-debug was given.
14657if test "${enable_debug+set}" = set; then :
14658  enableval=$enable_debug;
14659        ENABLE_DEBUG="${enableval}"
14660        DEBUG_LEVEL="fastdebug"
14661
14662else
14663  ENABLE_DEBUG="no"
14664fi
14665
14666
14667
14668# Check whether --with-debug-level was given.
14669if test "${with_debug_level+set}" = set; then :
14670  withval=$with_debug_level;
14671        DEBUG_LEVEL="${withval}"
14672        if test "x$ENABLE_DEBUG" = xyes; then
14673          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14674        fi
14675
14676fi
14677
14678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14679$as_echo "$DEBUG_LEVEL" >&6; }
14680
14681  if test "x$DEBUG_LEVEL" != xrelease && \
14682      test "x$DEBUG_LEVEL" != xfastdebug && \
14683      test "x$DEBUG_LEVEL" != xslowdebug; then
14684    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14685  fi
14686
14687
14688  ###############################################################################
14689  #
14690  # Setup legacy vars/targets and new vars to deal with different debug levels.
14691  #
14692
14693  case $DEBUG_LEVEL in
14694    release )
14695      VARIANT="OPT"
14696      FASTDEBUG="false"
14697      DEBUG_CLASSFILES="false"
14698      BUILD_VARIANT_RELEASE=""
14699      HOTSPOT_DEBUG_LEVEL="product"
14700      HOTSPOT_EXPORT="product"
14701      ;;
14702    fastdebug )
14703      VARIANT="DBG"
14704      FASTDEBUG="true"
14705      DEBUG_CLASSFILES="true"
14706      BUILD_VARIANT_RELEASE="-fastdebug"
14707      HOTSPOT_DEBUG_LEVEL="fastdebug"
14708      HOTSPOT_EXPORT="fastdebug"
14709      ;;
14710    slowdebug )
14711      VARIANT="DBG"
14712      FASTDEBUG="false"
14713      DEBUG_CLASSFILES="true"
14714      BUILD_VARIANT_RELEASE="-debug"
14715      HOTSPOT_DEBUG_LEVEL="jvmg"
14716      HOTSPOT_EXPORT="debug"
14717      ;;
14718  esac
14719
14720  #####
14721  # Generate the legacy makefile targets for hotspot.
14722  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14723  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14724  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14725  # But until then ...
14726  HOTSPOT_TARGET=""
14727
14728  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14729    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14730  fi
14731
14732  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14733    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14734  fi
14735
14736  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14737    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14738  fi
14739
14740  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14741    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14742  fi
14743
14744  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14745    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14746  fi
14747
14748  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14749    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14750  fi
14751
14752  if test "x$JVM_VARIANT_CORE" = xtrue; then
14753    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14754  fi
14755
14756  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14757
14758  # On Macosx universal binaries are produced, but they only contain
14759  # 64 bit intel. This invalidates control of which jvms are built
14760  # from configure, but only server is valid anyway. Fix this
14761  # when hotspot makefiles are rewritten.
14762  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14763    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14764  fi
14765
14766  #####
14767
14768
14769
14770
14771
14772
14773
14774
14775# With basic setup done, call the custom early hook.
14776
14777
14778# To properly create a configuration name, we need to have the OpenJDK target
14779# and options (variants and debug level) parsed.
14780
14781
14782
14783# Check whether --with-conf-name was given.
14784if test "${with_conf_name+set}" = set; then :
14785  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14786fi
14787
14788
14789  # Test from where we are running configure, in or outside of src root.
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14791$as_echo_n "checking where to store configuration... " >&6; }
14792  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14793      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14794      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14795    # We are running configure from the src root.
14796    # Create a default ./build/target-variant-debuglevel output root.
14797    if test "x${CONF_NAME}" = x; then
14798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14799$as_echo "in default location" >&6; }
14800      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14801    else
14802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14803$as_echo "in build directory with custom name" >&6; }
14804    fi
14805    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14806    $MKDIR -p "$OUTPUT_ROOT"
14807    if test ! -d "$OUTPUT_ROOT"; then
14808      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14809    fi
14810  else
14811    # We are running configure from outside of the src dir.
14812    # Then use the current directory as output dir!
14813    # If configuration is situated in normal build directory, just use the build
14814    # directory name as configuration name, otherwise use the complete path.
14815    if test "x${CONF_NAME}" = x; then
14816      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14817    fi
14818    OUTPUT_ROOT="$CURDIR"
14819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14820$as_echo "in current directory" >&6; }
14821
14822    # WARNING: This might be a bad thing to do. You need to be sure you want to
14823    # have a configuration in this directory. Do some sanity checks!
14824
14825    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14826      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14827      # other files
14828      files_present=`$LS $OUTPUT_ROOT`
14829      # Configure has already touched config.log and confdefs.h in the current dir when this check
14830      # is performed.
14831      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14832      | $TR -d '\n'`
14833      if test "x$filtered_files" != x; then
14834        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14835$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14836        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14837$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14838        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14839$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14840        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14841$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14843$as_echo "$as_me: seriously mess up just about everything." >&6;}
14844        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14845$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14846        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14847$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14848        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14849      fi
14850    fi
14851  fi
14852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14853$as_echo_n "checking what configuration name to use... " >&6; }
14854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14855$as_echo "$CONF_NAME" >&6; }
14856
14857
14858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14859
14860  # Input might be given as Windows format, start by converting to
14861  # unix format.
14862  path="$OUTPUT_ROOT"
14863  new_path=`$CYGPATH -u "$path"`
14864
14865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14868  # "foo.exe" is OK but "foo" is an error.
14869  #
14870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14871  # It is also a way to make sure we got the proper file name for the real test later on.
14872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14873  if test "x$test_shortpath" = x; then
14874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14875$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14876    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14877  fi
14878
14879  # Call helper function which possibly converts this using DOS-style short mode.
14880  # If so, the updated path is stored in $new_path.
14881
14882  input_path="$new_path"
14883  # Check if we need to convert this using DOS-style short mode. If the path
14884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14885  # take no chances and rewrite it.
14886  # Note: m4 eats our [], so we need to use [ and ] instead.
14887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14888  if test "x$has_forbidden_chars" != x; then
14889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14893      # Going to short mode and back again did indeed matter. Since short mode is
14894      # case insensitive, let's make it lowercase to improve readability.
14895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14896      # Now convert it back to Unix-stile (cygpath)
14897      input_path=`$CYGPATH -u "$shortmode_path"`
14898      new_path="$input_path"
14899    fi
14900  fi
14901
14902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14903  if test "x$test_cygdrive_prefix" = x; then
14904    # As a simple fix, exclude /usr/bin since it's not a real path.
14905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14907      # a path prefixed by /cygdrive for fixpath to work.
14908      new_path="$CYGWIN_ROOT_PATH$input_path"
14909    fi
14910  fi
14911
14912
14913  if test "x$path" != "x$new_path"; then
14914    OUTPUT_ROOT="$new_path"
14915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14916$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14917  fi
14918
14919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14920
14921  path="$OUTPUT_ROOT"
14922  has_colon=`$ECHO $path | $GREP ^.:`
14923  new_path="$path"
14924  if test "x$has_colon" = x; then
14925    # Not in mixed or Windows style, start by that.
14926    new_path=`cmd //c echo $path`
14927  fi
14928
14929
14930  input_path="$new_path"
14931  # Check if we need to convert this using DOS-style short mode. If the path
14932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14933  # take no chances and rewrite it.
14934  # Note: m4 eats our [], so we need to use [ and ] instead.
14935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14936  if test "x$has_forbidden_chars" != x; then
14937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14939  fi
14940
14941
14942  windows_path="$new_path"
14943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14944    unix_path=`$CYGPATH -u "$windows_path"`
14945    new_path="$unix_path"
14946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14948    new_path="$unix_path"
14949  fi
14950
14951  if test "x$path" != "x$new_path"; then
14952    OUTPUT_ROOT="$new_path"
14953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14954$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14955  fi
14956
14957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14959
14960  else
14961    # We're on a posix platform. Hooray! :)
14962    path="$OUTPUT_ROOT"
14963    has_space=`$ECHO "$path" | $GREP " "`
14964    if test "x$has_space" != x; then
14965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14966$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14967      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14968    fi
14969
14970    # Use eval to expand a potential ~
14971    eval path="$path"
14972    if test ! -f "$path" && test ! -d "$path"; then
14973      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14974    fi
14975
14976    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14977  fi
14978
14979
14980  SPEC=$OUTPUT_ROOT/spec.gmk
14981
14982  CONF_NAME=$CONF_NAME
14983
14984  OUTPUT_ROOT=$OUTPUT_ROOT
14985
14986
14987  # Most of the probed defines are put into config.h
14988  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14989
14990  # The spec.gmk file contains all variables for the make system.
14991  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14992
14993  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14994  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14995
14996  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14997  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14998
14999  # The compare.sh is used to compare the build output to other builds.
15000  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15001
15002  # Spec.sh is currently used by compare-objects.sh
15003  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15004
15005  # The generated Makefile knows where the spec.gmk is and where the source is.
15006  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15007  # which will look for generated configurations
15008  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15009
15010
15011
15012# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15013
15014  for ac_prog in apt-get yum port pkgutil pkgadd
15015do
15016  # Extract the first word of "$ac_prog", so it can be a program name with args.
15017set dummy $ac_prog; ac_word=$2
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15019$as_echo_n "checking for $ac_word... " >&6; }
15020if ${ac_cv_prog_PKGHANDLER+:} false; then :
15021  $as_echo_n "(cached) " >&6
15022else
15023  if test -n "$PKGHANDLER"; then
15024  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15025else
15026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15027for as_dir in $PATH
15028do
15029  IFS=$as_save_IFS
15030  test -z "$as_dir" && as_dir=.
15031    for ac_exec_ext in '' $ac_executable_extensions; do
15032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15033    ac_cv_prog_PKGHANDLER="$ac_prog"
15034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15035    break 2
15036  fi
15037done
15038  done
15039IFS=$as_save_IFS
15040
15041fi
15042fi
15043PKGHANDLER=$ac_cv_prog_PKGHANDLER
15044if test -n "$PKGHANDLER"; then
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15046$as_echo "$PKGHANDLER" >&6; }
15047else
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
15050fi
15051
15052
15053  test -n "$PKGHANDLER" && break
15054done
15055
15056
15057
15058# Setup tools that requires more complex handling, or that is not needed by the configure script.
15059
15060
15061  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15062  if test "x$MAKE" != x; then
15063    # User has supplied a make, test it.
15064    if test ! -f "$MAKE"; then
15065      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15066    fi
15067
15068  MAKE_CANDIDATE=""$MAKE""
15069  DESCRIPTION="user supplied MAKE=$MAKE"
15070  if test "x$MAKE_CANDIDATE" != x; then
15071    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15072$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15073    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15074    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15075    if test "x$IS_GNU_MAKE" = x; then
15076      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15077$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15078    else
15079      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15080      if test "x$IS_MODERN_MAKE" = x; then
15081        { $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
15082$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;}
15083      else
15084        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15085          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15086            MAKE_EXPECTED_ENV='cygwin'
15087          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15088            MAKE_EXPECTED_ENV='msys'
15089          else
15090            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15091          fi
15092          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15093          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15094        else
15095          # Not relevant for non-Windows
15096          IS_MAKE_CORRECT_ENV=true
15097        fi
15098        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15099          { $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
15100$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;}
15101        else
15102          FOUND_MAKE=$MAKE_CANDIDATE
15103
15104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15105
15106  # First separate the path from the arguments. This will split at the first
15107  # space.
15108  complete="$FOUND_MAKE"
15109  path="${complete%% *}"
15110  tmp="$complete EOL"
15111  arguments="${tmp#* }"
15112
15113  # Input might be given as Windows format, start by converting to
15114  # unix format.
15115  new_path=`$CYGPATH -u "$path"`
15116
15117  # Now try to locate executable using which
15118  new_path=`$WHICH "$new_path" 2> /dev/null`
15119  # bat and cmd files are not always considered executable in cygwin causing which
15120  # to not find them
15121  if test "x$new_path" = x \
15122      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15123      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15124    new_path=`$CYGPATH -u "$path"`
15125  fi
15126  if test "x$new_path" = x; then
15127    # Oops. Which didn't find the executable.
15128    # The splitting of arguments from the executable at a space might have been incorrect,
15129    # since paths with space are more likely in Windows. Give it another try with the whole
15130    # argument.
15131    path="$complete"
15132    arguments="EOL"
15133    new_path=`$CYGPATH -u "$path"`
15134    new_path=`$WHICH "$new_path" 2> /dev/null`
15135    # bat and cmd files are not always considered executable in cygwin causing which
15136    # to not find them
15137    if test "x$new_path" = x \
15138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15140      new_path=`$CYGPATH -u "$path"`
15141    fi
15142    if test "x$new_path" = x; then
15143      # It's still not found. Now this is an unrecoverable error.
15144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15145$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15146      has_space=`$ECHO "$complete" | $GREP " "`
15147      if test "x$has_space" != x; then
15148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15150      fi
15151      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15152    fi
15153  fi
15154
15155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15158  # "foo.exe" is OK but "foo" is an error.
15159  #
15160  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15161  # It is also a way to make sure we got the proper file name for the real test later on.
15162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15163  if test "x$test_shortpath" = x; then
15164    # Short path failed, file does not exist as specified.
15165    # Try adding .exe or .cmd
15166    if test -f "${new_path}.exe"; then
15167      input_to_shortpath="${new_path}.exe"
15168    elif test -f "${new_path}.cmd"; then
15169      input_to_shortpath="${new_path}.cmd"
15170    else
15171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15172$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15173      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15175      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15176    fi
15177  else
15178    input_to_shortpath="$new_path"
15179  fi
15180
15181  # Call helper function which possibly converts this using DOS-style short mode.
15182  # If so, the updated path is stored in $new_path.
15183  new_path="$input_to_shortpath"
15184
15185  input_path="$input_to_shortpath"
15186  # Check if we need to convert this using DOS-style short mode. If the path
15187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15188  # take no chances and rewrite it.
15189  # Note: m4 eats our [], so we need to use [ and ] instead.
15190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15191  if test "x$has_forbidden_chars" != x; then
15192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15196      # Going to short mode and back again did indeed matter. Since short mode is
15197      # case insensitive, let's make it lowercase to improve readability.
15198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15199      # Now convert it back to Unix-stile (cygpath)
15200      input_path=`$CYGPATH -u "$shortmode_path"`
15201      new_path="$input_path"
15202    fi
15203  fi
15204
15205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15206  if test "x$test_cygdrive_prefix" = x; then
15207    # As a simple fix, exclude /usr/bin since it's not a real path.
15208    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15210      # a path prefixed by /cygdrive for fixpath to work.
15211      new_path="$CYGWIN_ROOT_PATH$input_path"
15212    fi
15213  fi
15214
15215  # remove trailing .exe if any
15216  new_path="${new_path/%.exe/}"
15217
15218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15219
15220  # First separate the path from the arguments. This will split at the first
15221  # space.
15222  complete="$FOUND_MAKE"
15223  path="${complete%% *}"
15224  tmp="$complete EOL"
15225  arguments="${tmp#* }"
15226
15227  # Input might be given as Windows format, start by converting to
15228  # unix format.
15229  new_path="$path"
15230
15231  windows_path="$new_path"
15232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15233    unix_path=`$CYGPATH -u "$windows_path"`
15234    new_path="$unix_path"
15235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15237    new_path="$unix_path"
15238  fi
15239
15240
15241  # Now try to locate executable using which
15242  new_path=`$WHICH "$new_path" 2> /dev/null`
15243
15244  if test "x$new_path" = x; then
15245    # Oops. Which didn't find the executable.
15246    # The splitting of arguments from the executable at a space might have been incorrect,
15247    # since paths with space are more likely in Windows. Give it another try with the whole
15248    # argument.
15249    path="$complete"
15250    arguments="EOL"
15251    new_path="$path"
15252
15253  windows_path="$new_path"
15254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15255    unix_path=`$CYGPATH -u "$windows_path"`
15256    new_path="$unix_path"
15257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15259    new_path="$unix_path"
15260  fi
15261
15262
15263    new_path=`$WHICH "$new_path" 2> /dev/null`
15264
15265    if test "x$new_path" = x; then
15266      # It's still not found. Now this is an unrecoverable error.
15267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15269      has_space=`$ECHO "$complete" | $GREP " "`
15270      if test "x$has_space" != x; then
15271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15273      fi
15274      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15275    fi
15276  fi
15277
15278  # Now new_path has a complete unix path to the binary
15279  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15280    # Keep paths in /bin as-is, but remove trailing .exe if any
15281    new_path="${new_path/%.exe/}"
15282    # Do not save /bin paths to all_fixpath_prefixes!
15283  else
15284    # Not in mixed or Windows style, start by that.
15285    new_path=`cmd //c echo $new_path`
15286
15287  input_path="$new_path"
15288  # Check if we need to convert this using DOS-style short mode. If the path
15289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15290  # take no chances and rewrite it.
15291  # Note: m4 eats our [], so we need to use [ and ] instead.
15292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15293  if test "x$has_forbidden_chars" != x; then
15294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15296  fi
15297
15298    # Output is in $new_path
15299
15300  windows_path="$new_path"
15301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15302    unix_path=`$CYGPATH -u "$windows_path"`
15303    new_path="$unix_path"
15304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15306    new_path="$unix_path"
15307  fi
15308
15309    # remove trailing .exe if any
15310    new_path="${new_path/%.exe/}"
15311
15312    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15313    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15314  fi
15315
15316  else
15317    # We're on a posix platform. Hooray! :)
15318    # First separate the path from the arguments. This will split at the first
15319    # space.
15320    complete="$FOUND_MAKE"
15321    path="${complete%% *}"
15322    tmp="$complete EOL"
15323    arguments="${tmp#* }"
15324
15325    # Cannot rely on the command "which" here since it doesn't always work.
15326    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15327    if test -z "$is_absolute_path"; then
15328      # Path to executable is not absolute. Find it.
15329      IFS_save="$IFS"
15330      IFS=:
15331      for p in $PATH; do
15332        if test -f "$p/$path" && test -x "$p/$path"; then
15333          new_path="$p/$path"
15334          break
15335        fi
15336      done
15337      IFS="$IFS_save"
15338    else
15339      # This is an absolute path, we can use it without further modifications.
15340      new_path="$path"
15341    fi
15342
15343    if test "x$new_path" = x; then
15344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15345$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15346      has_space=`$ECHO "$complete" | $GREP " "`
15347      if test "x$has_space" != x; then
15348        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15350      fi
15351      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15352    fi
15353  fi
15354
15355  # Now join together the path and the arguments once again
15356  if test "x$arguments" != xEOL; then
15357    new_complete="$new_path ${arguments% *}"
15358  else
15359    new_complete="$new_path"
15360  fi
15361
15362  if test "x$complete" != "x$new_complete"; then
15363    FOUND_MAKE="$new_complete"
15364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15365$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15366  fi
15367
15368        fi
15369      fi
15370    fi
15371  fi
15372
15373    if test "x$FOUND_MAKE" = x; then
15374      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15375    fi
15376  else
15377    # Try our hardest to locate a correct version of GNU make
15378    for ac_prog in gmake
15379do
15380  # Extract the first word of "$ac_prog", so it can be a program name with args.
15381set dummy $ac_prog; ac_word=$2
15382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15383$as_echo_n "checking for $ac_word... " >&6; }
15384if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15385  $as_echo_n "(cached) " >&6
15386else
15387  case $CHECK_GMAKE in
15388  [\\/]* | ?:[\\/]*)
15389  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15390  ;;
15391  *)
15392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15393for as_dir in $PATH
15394do
15395  IFS=$as_save_IFS
15396  test -z "$as_dir" && as_dir=.
15397    for ac_exec_ext in '' $ac_executable_extensions; do
15398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15399    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15401    break 2
15402  fi
15403done
15404  done
15405IFS=$as_save_IFS
15406
15407  ;;
15408esac
15409fi
15410CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15411if test -n "$CHECK_GMAKE"; then
15412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15413$as_echo "$CHECK_GMAKE" >&6; }
15414else
15415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15416$as_echo "no" >&6; }
15417fi
15418
15419
15420  test -n "$CHECK_GMAKE" && break
15421done
15422
15423
15424  MAKE_CANDIDATE=""$CHECK_GMAKE""
15425  DESCRIPTION="gmake in PATH"
15426  if test "x$MAKE_CANDIDATE" != x; then
15427    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15428$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15429    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15430    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15431    if test "x$IS_GNU_MAKE" = x; then
15432      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15433$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15434    else
15435      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15436      if test "x$IS_MODERN_MAKE" = x; then
15437        { $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
15438$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;}
15439      else
15440        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15441          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15442            MAKE_EXPECTED_ENV='cygwin'
15443          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15444            MAKE_EXPECTED_ENV='msys'
15445          else
15446            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15447          fi
15448          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15449          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15450        else
15451          # Not relevant for non-Windows
15452          IS_MAKE_CORRECT_ENV=true
15453        fi
15454        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15455          { $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
15456$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;}
15457        else
15458          FOUND_MAKE=$MAKE_CANDIDATE
15459
15460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15461
15462  # First separate the path from the arguments. This will split at the first
15463  # space.
15464  complete="$FOUND_MAKE"
15465  path="${complete%% *}"
15466  tmp="$complete EOL"
15467  arguments="${tmp#* }"
15468
15469  # Input might be given as Windows format, start by converting to
15470  # unix format.
15471  new_path=`$CYGPATH -u "$path"`
15472
15473  # Now try to locate executable using which
15474  new_path=`$WHICH "$new_path" 2> /dev/null`
15475  # bat and cmd files are not always considered executable in cygwin causing which
15476  # to not find them
15477  if test "x$new_path" = x \
15478      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15479      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15480    new_path=`$CYGPATH -u "$path"`
15481  fi
15482  if test "x$new_path" = x; then
15483    # Oops. Which didn't find the executable.
15484    # The splitting of arguments from the executable at a space might have been incorrect,
15485    # since paths with space are more likely in Windows. Give it another try with the whole
15486    # argument.
15487    path="$complete"
15488    arguments="EOL"
15489    new_path=`$CYGPATH -u "$path"`
15490    new_path=`$WHICH "$new_path" 2> /dev/null`
15491    # bat and cmd files are not always considered executable in cygwin causing which
15492    # to not find them
15493    if test "x$new_path" = x \
15494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15496      new_path=`$CYGPATH -u "$path"`
15497    fi
15498    if test "x$new_path" = x; then
15499      # It's still not found. Now this is an unrecoverable error.
15500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15501$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15502      has_space=`$ECHO "$complete" | $GREP " "`
15503      if test "x$has_space" != x; then
15504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15506      fi
15507      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15508    fi
15509  fi
15510
15511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15514  # "foo.exe" is OK but "foo" is an error.
15515  #
15516  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15517  # It is also a way to make sure we got the proper file name for the real test later on.
15518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15519  if test "x$test_shortpath" = x; then
15520    # Short path failed, file does not exist as specified.
15521    # Try adding .exe or .cmd
15522    if test -f "${new_path}.exe"; then
15523      input_to_shortpath="${new_path}.exe"
15524    elif test -f "${new_path}.cmd"; then
15525      input_to_shortpath="${new_path}.cmd"
15526    else
15527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15531      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15532    fi
15533  else
15534    input_to_shortpath="$new_path"
15535  fi
15536
15537  # Call helper function which possibly converts this using DOS-style short mode.
15538  # If so, the updated path is stored in $new_path.
15539  new_path="$input_to_shortpath"
15540
15541  input_path="$input_to_shortpath"
15542  # Check if we need to convert this using DOS-style short mode. If the path
15543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15544  # take no chances and rewrite it.
15545  # Note: m4 eats our [], so we need to use [ and ] instead.
15546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15547  if test "x$has_forbidden_chars" != x; then
15548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15552      # Going to short mode and back again did indeed matter. Since short mode is
15553      # case insensitive, let's make it lowercase to improve readability.
15554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15555      # Now convert it back to Unix-stile (cygpath)
15556      input_path=`$CYGPATH -u "$shortmode_path"`
15557      new_path="$input_path"
15558    fi
15559  fi
15560
15561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15562  if test "x$test_cygdrive_prefix" = x; then
15563    # As a simple fix, exclude /usr/bin since it's not a real path.
15564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15566      # a path prefixed by /cygdrive for fixpath to work.
15567      new_path="$CYGWIN_ROOT_PATH$input_path"
15568    fi
15569  fi
15570
15571  # remove trailing .exe if any
15572  new_path="${new_path/%.exe/}"
15573
15574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15575
15576  # First separate the path from the arguments. This will split at the first
15577  # space.
15578  complete="$FOUND_MAKE"
15579  path="${complete%% *}"
15580  tmp="$complete EOL"
15581  arguments="${tmp#* }"
15582
15583  # Input might be given as Windows format, start by converting to
15584  # unix format.
15585  new_path="$path"
15586
15587  windows_path="$new_path"
15588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15589    unix_path=`$CYGPATH -u "$windows_path"`
15590    new_path="$unix_path"
15591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15593    new_path="$unix_path"
15594  fi
15595
15596
15597  # Now try to locate executable using which
15598  new_path=`$WHICH "$new_path" 2> /dev/null`
15599
15600  if test "x$new_path" = x; then
15601    # Oops. Which didn't find the executable.
15602    # The splitting of arguments from the executable at a space might have been incorrect,
15603    # since paths with space are more likely in Windows. Give it another try with the whole
15604    # argument.
15605    path="$complete"
15606    arguments="EOL"
15607    new_path="$path"
15608
15609  windows_path="$new_path"
15610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15611    unix_path=`$CYGPATH -u "$windows_path"`
15612    new_path="$unix_path"
15613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15615    new_path="$unix_path"
15616  fi
15617
15618
15619    new_path=`$WHICH "$new_path" 2> /dev/null`
15620
15621    if test "x$new_path" = x; then
15622      # It's still not found. Now this is an unrecoverable error.
15623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15624$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15625      has_space=`$ECHO "$complete" | $GREP " "`
15626      if test "x$has_space" != x; then
15627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15629      fi
15630      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15631    fi
15632  fi
15633
15634  # Now new_path has a complete unix path to the binary
15635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15636    # Keep paths in /bin as-is, but remove trailing .exe if any
15637    new_path="${new_path/%.exe/}"
15638    # Do not save /bin paths to all_fixpath_prefixes!
15639  else
15640    # Not in mixed or Windows style, start by that.
15641    new_path=`cmd //c echo $new_path`
15642
15643  input_path="$new_path"
15644  # Check if we need to convert this using DOS-style short mode. If the path
15645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15646  # take no chances and rewrite it.
15647  # Note: m4 eats our [], so we need to use [ and ] instead.
15648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15649  if test "x$has_forbidden_chars" != x; then
15650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15652  fi
15653
15654    # Output is in $new_path
15655
15656  windows_path="$new_path"
15657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15658    unix_path=`$CYGPATH -u "$windows_path"`
15659    new_path="$unix_path"
15660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15662    new_path="$unix_path"
15663  fi
15664
15665    # remove trailing .exe if any
15666    new_path="${new_path/%.exe/}"
15667
15668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15670  fi
15671
15672  else
15673    # We're on a posix platform. Hooray! :)
15674    # First separate the path from the arguments. This will split at the first
15675    # space.
15676    complete="$FOUND_MAKE"
15677    path="${complete%% *}"
15678    tmp="$complete EOL"
15679    arguments="${tmp#* }"
15680
15681    # Cannot rely on the command "which" here since it doesn't always work.
15682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15683    if test -z "$is_absolute_path"; then
15684      # Path to executable is not absolute. Find it.
15685      IFS_save="$IFS"
15686      IFS=:
15687      for p in $PATH; do
15688        if test -f "$p/$path" && test -x "$p/$path"; then
15689          new_path="$p/$path"
15690          break
15691        fi
15692      done
15693      IFS="$IFS_save"
15694    else
15695      # This is an absolute path, we can use it without further modifications.
15696      new_path="$path"
15697    fi
15698
15699    if test "x$new_path" = x; then
15700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15702      has_space=`$ECHO "$complete" | $GREP " "`
15703      if test "x$has_space" != x; then
15704        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15706      fi
15707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15708    fi
15709  fi
15710
15711  # Now join together the path and the arguments once again
15712  if test "x$arguments" != xEOL; then
15713    new_complete="$new_path ${arguments% *}"
15714  else
15715    new_complete="$new_path"
15716  fi
15717
15718  if test "x$complete" != "x$new_complete"; then
15719    FOUND_MAKE="$new_complete"
15720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15721$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15722  fi
15723
15724        fi
15725      fi
15726    fi
15727  fi
15728
15729
15730    if test "x$FOUND_MAKE" = x; then
15731      for ac_prog in make
15732do
15733  # Extract the first word of "$ac_prog", so it can be a program name with args.
15734set dummy $ac_prog; ac_word=$2
15735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15736$as_echo_n "checking for $ac_word... " >&6; }
15737if ${ac_cv_path_CHECK_MAKE+:} false; then :
15738  $as_echo_n "(cached) " >&6
15739else
15740  case $CHECK_MAKE in
15741  [\\/]* | ?:[\\/]*)
15742  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15743  ;;
15744  *)
15745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15746for as_dir in $PATH
15747do
15748  IFS=$as_save_IFS
15749  test -z "$as_dir" && as_dir=.
15750    for ac_exec_ext in '' $ac_executable_extensions; do
15751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15752    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15754    break 2
15755  fi
15756done
15757  done
15758IFS=$as_save_IFS
15759
15760  ;;
15761esac
15762fi
15763CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15764if test -n "$CHECK_MAKE"; then
15765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15766$as_echo "$CHECK_MAKE" >&6; }
15767else
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15769$as_echo "no" >&6; }
15770fi
15771
15772
15773  test -n "$CHECK_MAKE" && break
15774done
15775
15776
15777  MAKE_CANDIDATE=""$CHECK_MAKE""
15778  DESCRIPTION="make in PATH"
15779  if test "x$MAKE_CANDIDATE" != x; then
15780    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15781$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15782    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15783    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15784    if test "x$IS_GNU_MAKE" = x; then
15785      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15786$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15787    else
15788      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15789      if test "x$IS_MODERN_MAKE" = x; then
15790        { $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
15791$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;}
15792      else
15793        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15794          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15795            MAKE_EXPECTED_ENV='cygwin'
15796          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15797            MAKE_EXPECTED_ENV='msys'
15798          else
15799            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15800          fi
15801          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15802          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15803        else
15804          # Not relevant for non-Windows
15805          IS_MAKE_CORRECT_ENV=true
15806        fi
15807        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15808          { $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
15809$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;}
15810        else
15811          FOUND_MAKE=$MAKE_CANDIDATE
15812
15813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15814
15815  # First separate the path from the arguments. This will split at the first
15816  # space.
15817  complete="$FOUND_MAKE"
15818  path="${complete%% *}"
15819  tmp="$complete EOL"
15820  arguments="${tmp#* }"
15821
15822  # Input might be given as Windows format, start by converting to
15823  # unix format.
15824  new_path=`$CYGPATH -u "$path"`
15825
15826  # Now try to locate executable using which
15827  new_path=`$WHICH "$new_path" 2> /dev/null`
15828  # bat and cmd files are not always considered executable in cygwin causing which
15829  # to not find them
15830  if test "x$new_path" = x \
15831      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15832      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15833    new_path=`$CYGPATH -u "$path"`
15834  fi
15835  if test "x$new_path" = x; then
15836    # Oops. Which didn't find the executable.
15837    # The splitting of arguments from the executable at a space might have been incorrect,
15838    # since paths with space are more likely in Windows. Give it another try with the whole
15839    # argument.
15840    path="$complete"
15841    arguments="EOL"
15842    new_path=`$CYGPATH -u "$path"`
15843    new_path=`$WHICH "$new_path" 2> /dev/null`
15844    # bat and cmd files are not always considered executable in cygwin causing which
15845    # to not find them
15846    if test "x$new_path" = x \
15847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15849      new_path=`$CYGPATH -u "$path"`
15850    fi
15851    if test "x$new_path" = x; then
15852      # It's still not found. Now this is an unrecoverable error.
15853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15855      has_space=`$ECHO "$complete" | $GREP " "`
15856      if test "x$has_space" != x; then
15857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15859      fi
15860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15861    fi
15862  fi
15863
15864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15867  # "foo.exe" is OK but "foo" is an error.
15868  #
15869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15870  # It is also a way to make sure we got the proper file name for the real test later on.
15871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15872  if test "x$test_shortpath" = x; then
15873    # Short path failed, file does not exist as specified.
15874    # Try adding .exe or .cmd
15875    if test -f "${new_path}.exe"; then
15876      input_to_shortpath="${new_path}.exe"
15877    elif test -f "${new_path}.cmd"; then
15878      input_to_shortpath="${new_path}.cmd"
15879    else
15880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15884      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15885    fi
15886  else
15887    input_to_shortpath="$new_path"
15888  fi
15889
15890  # Call helper function which possibly converts this using DOS-style short mode.
15891  # If so, the updated path is stored in $new_path.
15892  new_path="$input_to_shortpath"
15893
15894  input_path="$input_to_shortpath"
15895  # Check if we need to convert this using DOS-style short mode. If the path
15896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15897  # take no chances and rewrite it.
15898  # Note: m4 eats our [], so we need to use [ and ] instead.
15899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15900  if test "x$has_forbidden_chars" != x; then
15901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15905      # Going to short mode and back again did indeed matter. Since short mode is
15906      # case insensitive, let's make it lowercase to improve readability.
15907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15908      # Now convert it back to Unix-stile (cygpath)
15909      input_path=`$CYGPATH -u "$shortmode_path"`
15910      new_path="$input_path"
15911    fi
15912  fi
15913
15914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15915  if test "x$test_cygdrive_prefix" = x; then
15916    # As a simple fix, exclude /usr/bin since it's not a real path.
15917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15919      # a path prefixed by /cygdrive for fixpath to work.
15920      new_path="$CYGWIN_ROOT_PATH$input_path"
15921    fi
15922  fi
15923
15924  # remove trailing .exe if any
15925  new_path="${new_path/%.exe/}"
15926
15927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15928
15929  # First separate the path from the arguments. This will split at the first
15930  # space.
15931  complete="$FOUND_MAKE"
15932  path="${complete%% *}"
15933  tmp="$complete EOL"
15934  arguments="${tmp#* }"
15935
15936  # Input might be given as Windows format, start by converting to
15937  # unix format.
15938  new_path="$path"
15939
15940  windows_path="$new_path"
15941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15942    unix_path=`$CYGPATH -u "$windows_path"`
15943    new_path="$unix_path"
15944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15946    new_path="$unix_path"
15947  fi
15948
15949
15950  # Now try to locate executable using which
15951  new_path=`$WHICH "$new_path" 2> /dev/null`
15952
15953  if test "x$new_path" = x; then
15954    # Oops. Which didn't find the executable.
15955    # The splitting of arguments from the executable at a space might have been incorrect,
15956    # since paths with space are more likely in Windows. Give it another try with the whole
15957    # argument.
15958    path="$complete"
15959    arguments="EOL"
15960    new_path="$path"
15961
15962  windows_path="$new_path"
15963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15964    unix_path=`$CYGPATH -u "$windows_path"`
15965    new_path="$unix_path"
15966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15968    new_path="$unix_path"
15969  fi
15970
15971
15972    new_path=`$WHICH "$new_path" 2> /dev/null`
15973
15974    if test "x$new_path" = x; then
15975      # It's still not found. Now this is an unrecoverable error.
15976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15978      has_space=`$ECHO "$complete" | $GREP " "`
15979      if test "x$has_space" != x; then
15980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15982      fi
15983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15984    fi
15985  fi
15986
15987  # Now new_path has a complete unix path to the binary
15988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15989    # Keep paths in /bin as-is, but remove trailing .exe if any
15990    new_path="${new_path/%.exe/}"
15991    # Do not save /bin paths to all_fixpath_prefixes!
15992  else
15993    # Not in mixed or Windows style, start by that.
15994    new_path=`cmd //c echo $new_path`
15995
15996  input_path="$new_path"
15997  # Check if we need to convert this using DOS-style short mode. If the path
15998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15999  # take no chances and rewrite it.
16000  # Note: m4 eats our [], so we need to use [ and ] instead.
16001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16002  if test "x$has_forbidden_chars" != x; then
16003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16005  fi
16006
16007    # Output is in $new_path
16008
16009  windows_path="$new_path"
16010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16011    unix_path=`$CYGPATH -u "$windows_path"`
16012    new_path="$unix_path"
16013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16015    new_path="$unix_path"
16016  fi
16017
16018    # remove trailing .exe if any
16019    new_path="${new_path/%.exe/}"
16020
16021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16023  fi
16024
16025  else
16026    # We're on a posix platform. Hooray! :)
16027    # First separate the path from the arguments. This will split at the first
16028    # space.
16029    complete="$FOUND_MAKE"
16030    path="${complete%% *}"
16031    tmp="$complete EOL"
16032    arguments="${tmp#* }"
16033
16034    # Cannot rely on the command "which" here since it doesn't always work.
16035    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16036    if test -z "$is_absolute_path"; then
16037      # Path to executable is not absolute. Find it.
16038      IFS_save="$IFS"
16039      IFS=:
16040      for p in $PATH; do
16041        if test -f "$p/$path" && test -x "$p/$path"; then
16042          new_path="$p/$path"
16043          break
16044        fi
16045      done
16046      IFS="$IFS_save"
16047    else
16048      # This is an absolute path, we can use it without further modifications.
16049      new_path="$path"
16050    fi
16051
16052    if test "x$new_path" = x; then
16053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16054$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16055      has_space=`$ECHO "$complete" | $GREP " "`
16056      if test "x$has_space" != x; then
16057        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16059      fi
16060      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16061    fi
16062  fi
16063
16064  # Now join together the path and the arguments once again
16065  if test "x$arguments" != xEOL; then
16066    new_complete="$new_path ${arguments% *}"
16067  else
16068    new_complete="$new_path"
16069  fi
16070
16071  if test "x$complete" != "x$new_complete"; then
16072    FOUND_MAKE="$new_complete"
16073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16074$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16075  fi
16076
16077        fi
16078      fi
16079    fi
16080  fi
16081
16082    fi
16083
16084    if test "x$FOUND_MAKE" = x; then
16085      if test "x$TOOLS_DIR" != x; then
16086        # We have a tools-dir, check that as well before giving up.
16087        OLD_PATH=$PATH
16088        PATH=$TOOLS_DIR:$PATH
16089        for ac_prog in gmake
16090do
16091  # Extract the first word of "$ac_prog", so it can be a program name with args.
16092set dummy $ac_prog; ac_word=$2
16093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16094$as_echo_n "checking for $ac_word... " >&6; }
16095if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16096  $as_echo_n "(cached) " >&6
16097else
16098  case $CHECK_TOOLSDIR_GMAKE in
16099  [\\/]* | ?:[\\/]*)
16100  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16101  ;;
16102  *)
16103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16104for as_dir in $PATH
16105do
16106  IFS=$as_save_IFS
16107  test -z "$as_dir" && as_dir=.
16108    for ac_exec_ext in '' $ac_executable_extensions; do
16109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16110    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16112    break 2
16113  fi
16114done
16115  done
16116IFS=$as_save_IFS
16117
16118  ;;
16119esac
16120fi
16121CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16122if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16124$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16125else
16126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16127$as_echo "no" >&6; }
16128fi
16129
16130
16131  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16132done
16133
16134
16135  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16136  DESCRIPTION="gmake in tools-dir"
16137  if test "x$MAKE_CANDIDATE" != x; then
16138    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16139$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16140    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16141    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16142    if test "x$IS_GNU_MAKE" = x; then
16143      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16144$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16145    else
16146      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16147      if test "x$IS_MODERN_MAKE" = x; then
16148        { $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
16149$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;}
16150      else
16151        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16152          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16153            MAKE_EXPECTED_ENV='cygwin'
16154          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16155            MAKE_EXPECTED_ENV='msys'
16156          else
16157            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16158          fi
16159          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16160          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16161        else
16162          # Not relevant for non-Windows
16163          IS_MAKE_CORRECT_ENV=true
16164        fi
16165        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16166          { $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
16167$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;}
16168        else
16169          FOUND_MAKE=$MAKE_CANDIDATE
16170
16171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16172
16173  # First separate the path from the arguments. This will split at the first
16174  # space.
16175  complete="$FOUND_MAKE"
16176  path="${complete%% *}"
16177  tmp="$complete EOL"
16178  arguments="${tmp#* }"
16179
16180  # Input might be given as Windows format, start by converting to
16181  # unix format.
16182  new_path=`$CYGPATH -u "$path"`
16183
16184  # Now try to locate executable using which
16185  new_path=`$WHICH "$new_path" 2> /dev/null`
16186  # bat and cmd files are not always considered executable in cygwin causing which
16187  # to not find them
16188  if test "x$new_path" = x \
16189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16191    new_path=`$CYGPATH -u "$path"`
16192  fi
16193  if test "x$new_path" = x; then
16194    # Oops. Which didn't find the executable.
16195    # The splitting of arguments from the executable at a space might have been incorrect,
16196    # since paths with space are more likely in Windows. Give it another try with the whole
16197    # argument.
16198    path="$complete"
16199    arguments="EOL"
16200    new_path=`$CYGPATH -u "$path"`
16201    new_path=`$WHICH "$new_path" 2> /dev/null`
16202    # bat and cmd files are not always considered executable in cygwin causing which
16203    # to not find them
16204    if test "x$new_path" = x \
16205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16207      new_path=`$CYGPATH -u "$path"`
16208    fi
16209    if test "x$new_path" = x; then
16210      # It's still not found. Now this is an unrecoverable error.
16211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16213      has_space=`$ECHO "$complete" | $GREP " "`
16214      if test "x$has_space" != x; then
16215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16217      fi
16218      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16219    fi
16220  fi
16221
16222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16225  # "foo.exe" is OK but "foo" is an error.
16226  #
16227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16228  # It is also a way to make sure we got the proper file name for the real test later on.
16229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16230  if test "x$test_shortpath" = x; then
16231    # Short path failed, file does not exist as specified.
16232    # Try adding .exe or .cmd
16233    if test -f "${new_path}.exe"; then
16234      input_to_shortpath="${new_path}.exe"
16235    elif test -f "${new_path}.cmd"; then
16236      input_to_shortpath="${new_path}.cmd"
16237    else
16238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16243    fi
16244  else
16245    input_to_shortpath="$new_path"
16246  fi
16247
16248  # Call helper function which possibly converts this using DOS-style short mode.
16249  # If so, the updated path is stored in $new_path.
16250  new_path="$input_to_shortpath"
16251
16252  input_path="$input_to_shortpath"
16253  # Check if we need to convert this using DOS-style short mode. If the path
16254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16255  # take no chances and rewrite it.
16256  # Note: m4 eats our [], so we need to use [ and ] instead.
16257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16258  if test "x$has_forbidden_chars" != x; then
16259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16263      # Going to short mode and back again did indeed matter. Since short mode is
16264      # case insensitive, let's make it lowercase to improve readability.
16265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16266      # Now convert it back to Unix-stile (cygpath)
16267      input_path=`$CYGPATH -u "$shortmode_path"`
16268      new_path="$input_path"
16269    fi
16270  fi
16271
16272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16273  if test "x$test_cygdrive_prefix" = x; then
16274    # As a simple fix, exclude /usr/bin since it's not a real path.
16275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16277      # a path prefixed by /cygdrive for fixpath to work.
16278      new_path="$CYGWIN_ROOT_PATH$input_path"
16279    fi
16280  fi
16281
16282  # remove trailing .exe if any
16283  new_path="${new_path/%.exe/}"
16284
16285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16286
16287  # First separate the path from the arguments. This will split at the first
16288  # space.
16289  complete="$FOUND_MAKE"
16290  path="${complete%% *}"
16291  tmp="$complete EOL"
16292  arguments="${tmp#* }"
16293
16294  # Input might be given as Windows format, start by converting to
16295  # unix format.
16296  new_path="$path"
16297
16298  windows_path="$new_path"
16299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16300    unix_path=`$CYGPATH -u "$windows_path"`
16301    new_path="$unix_path"
16302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16304    new_path="$unix_path"
16305  fi
16306
16307
16308  # Now try to locate executable using which
16309  new_path=`$WHICH "$new_path" 2> /dev/null`
16310
16311  if test "x$new_path" = x; then
16312    # Oops. Which didn't find the executable.
16313    # The splitting of arguments from the executable at a space might have been incorrect,
16314    # since paths with space are more likely in Windows. Give it another try with the whole
16315    # argument.
16316    path="$complete"
16317    arguments="EOL"
16318    new_path="$path"
16319
16320  windows_path="$new_path"
16321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16322    unix_path=`$CYGPATH -u "$windows_path"`
16323    new_path="$unix_path"
16324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16326    new_path="$unix_path"
16327  fi
16328
16329
16330    new_path=`$WHICH "$new_path" 2> /dev/null`
16331
16332    if test "x$new_path" = x; then
16333      # It's still not found. Now this is an unrecoverable error.
16334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16335$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16336      has_space=`$ECHO "$complete" | $GREP " "`
16337      if test "x$has_space" != x; then
16338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16340      fi
16341      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16342    fi
16343  fi
16344
16345  # Now new_path has a complete unix path to the binary
16346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16347    # Keep paths in /bin as-is, but remove trailing .exe if any
16348    new_path="${new_path/%.exe/}"
16349    # Do not save /bin paths to all_fixpath_prefixes!
16350  else
16351    # Not in mixed or Windows style, start by that.
16352    new_path=`cmd //c echo $new_path`
16353
16354  input_path="$new_path"
16355  # Check if we need to convert this using DOS-style short mode. If the path
16356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16357  # take no chances and rewrite it.
16358  # Note: m4 eats our [], so we need to use [ and ] instead.
16359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16360  if test "x$has_forbidden_chars" != x; then
16361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16363  fi
16364
16365    # Output is in $new_path
16366
16367  windows_path="$new_path"
16368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16369    unix_path=`$CYGPATH -u "$windows_path"`
16370    new_path="$unix_path"
16371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16373    new_path="$unix_path"
16374  fi
16375
16376    # remove trailing .exe if any
16377    new_path="${new_path/%.exe/}"
16378
16379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16381  fi
16382
16383  else
16384    # We're on a posix platform. Hooray! :)
16385    # First separate the path from the arguments. This will split at the first
16386    # space.
16387    complete="$FOUND_MAKE"
16388    path="${complete%% *}"
16389    tmp="$complete EOL"
16390    arguments="${tmp#* }"
16391
16392    # Cannot rely on the command "which" here since it doesn't always work.
16393    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16394    if test -z "$is_absolute_path"; then
16395      # Path to executable is not absolute. Find it.
16396      IFS_save="$IFS"
16397      IFS=:
16398      for p in $PATH; do
16399        if test -f "$p/$path" && test -x "$p/$path"; then
16400          new_path="$p/$path"
16401          break
16402        fi
16403      done
16404      IFS="$IFS_save"
16405    else
16406      # This is an absolute path, we can use it without further modifications.
16407      new_path="$path"
16408    fi
16409
16410    if test "x$new_path" = x; then
16411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16413      has_space=`$ECHO "$complete" | $GREP " "`
16414      if test "x$has_space" != x; then
16415        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16417      fi
16418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16419    fi
16420  fi
16421
16422  # Now join together the path and the arguments once again
16423  if test "x$arguments" != xEOL; then
16424    new_complete="$new_path ${arguments% *}"
16425  else
16426    new_complete="$new_path"
16427  fi
16428
16429  if test "x$complete" != "x$new_complete"; then
16430    FOUND_MAKE="$new_complete"
16431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16432$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16433  fi
16434
16435        fi
16436      fi
16437    fi
16438  fi
16439
16440        if test "x$FOUND_MAKE" = x; then
16441          for ac_prog in make
16442do
16443  # Extract the first word of "$ac_prog", so it can be a program name with args.
16444set dummy $ac_prog; ac_word=$2
16445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16446$as_echo_n "checking for $ac_word... " >&6; }
16447if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16448  $as_echo_n "(cached) " >&6
16449else
16450  case $CHECK_TOOLSDIR_MAKE in
16451  [\\/]* | ?:[\\/]*)
16452  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16453  ;;
16454  *)
16455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16456for as_dir in $PATH
16457do
16458  IFS=$as_save_IFS
16459  test -z "$as_dir" && as_dir=.
16460    for ac_exec_ext in '' $ac_executable_extensions; do
16461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16462    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16464    break 2
16465  fi
16466done
16467  done
16468IFS=$as_save_IFS
16469
16470  ;;
16471esac
16472fi
16473CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16474if test -n "$CHECK_TOOLSDIR_MAKE"; then
16475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16476$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16477else
16478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16479$as_echo "no" >&6; }
16480fi
16481
16482
16483  test -n "$CHECK_TOOLSDIR_MAKE" && break
16484done
16485
16486
16487  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16488  DESCRIPTION="make in tools-dir"
16489  if test "x$MAKE_CANDIDATE" != x; then
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16491$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16492    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16493    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16494    if test "x$IS_GNU_MAKE" = x; then
16495      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16496$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16497    else
16498      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16499      if test "x$IS_MODERN_MAKE" = x; then
16500        { $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
16501$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;}
16502      else
16503        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16504          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16505            MAKE_EXPECTED_ENV='cygwin'
16506          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16507            MAKE_EXPECTED_ENV='msys'
16508          else
16509            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16510          fi
16511          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16512          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16513        else
16514          # Not relevant for non-Windows
16515          IS_MAKE_CORRECT_ENV=true
16516        fi
16517        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16518          { $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
16519$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;}
16520        else
16521          FOUND_MAKE=$MAKE_CANDIDATE
16522
16523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16524
16525  # First separate the path from the arguments. This will split at the first
16526  # space.
16527  complete="$FOUND_MAKE"
16528  path="${complete%% *}"
16529  tmp="$complete EOL"
16530  arguments="${tmp#* }"
16531
16532  # Input might be given as Windows format, start by converting to
16533  # unix format.
16534  new_path=`$CYGPATH -u "$path"`
16535
16536  # Now try to locate executable using which
16537  new_path=`$WHICH "$new_path" 2> /dev/null`
16538  # bat and cmd files are not always considered executable in cygwin causing which
16539  # to not find them
16540  if test "x$new_path" = x \
16541      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16542      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16543    new_path=`$CYGPATH -u "$path"`
16544  fi
16545  if test "x$new_path" = x; then
16546    # Oops. Which didn't find the executable.
16547    # The splitting of arguments from the executable at a space might have been incorrect,
16548    # since paths with space are more likely in Windows. Give it another try with the whole
16549    # argument.
16550    path="$complete"
16551    arguments="EOL"
16552    new_path=`$CYGPATH -u "$path"`
16553    new_path=`$WHICH "$new_path" 2> /dev/null`
16554    # bat and cmd files are not always considered executable in cygwin causing which
16555    # to not find them
16556    if test "x$new_path" = x \
16557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16559      new_path=`$CYGPATH -u "$path"`
16560    fi
16561    if test "x$new_path" = x; then
16562      # It's still not found. Now this is an unrecoverable error.
16563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16564$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16565      has_space=`$ECHO "$complete" | $GREP " "`
16566      if test "x$has_space" != x; then
16567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16569      fi
16570      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16571    fi
16572  fi
16573
16574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16577  # "foo.exe" is OK but "foo" is an error.
16578  #
16579  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16580  # It is also a way to make sure we got the proper file name for the real test later on.
16581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16582  if test "x$test_shortpath" = x; then
16583    # Short path failed, file does not exist as specified.
16584    # Try adding .exe or .cmd
16585    if test -f "${new_path}.exe"; then
16586      input_to_shortpath="${new_path}.exe"
16587    elif test -f "${new_path}.cmd"; then
16588      input_to_shortpath="${new_path}.cmd"
16589    else
16590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16592      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16593$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16594      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16595    fi
16596  else
16597    input_to_shortpath="$new_path"
16598  fi
16599
16600  # Call helper function which possibly converts this using DOS-style short mode.
16601  # If so, the updated path is stored in $new_path.
16602  new_path="$input_to_shortpath"
16603
16604  input_path="$input_to_shortpath"
16605  # Check if we need to convert this using DOS-style short mode. If the path
16606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16607  # take no chances and rewrite it.
16608  # Note: m4 eats our [], so we need to use [ and ] instead.
16609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16610  if test "x$has_forbidden_chars" != x; then
16611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16615      # Going to short mode and back again did indeed matter. Since short mode is
16616      # case insensitive, let's make it lowercase to improve readability.
16617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16618      # Now convert it back to Unix-stile (cygpath)
16619      input_path=`$CYGPATH -u "$shortmode_path"`
16620      new_path="$input_path"
16621    fi
16622  fi
16623
16624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16625  if test "x$test_cygdrive_prefix" = x; then
16626    # As a simple fix, exclude /usr/bin since it's not a real path.
16627    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16629      # a path prefixed by /cygdrive for fixpath to work.
16630      new_path="$CYGWIN_ROOT_PATH$input_path"
16631    fi
16632  fi
16633
16634  # remove trailing .exe if any
16635  new_path="${new_path/%.exe/}"
16636
16637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16638
16639  # First separate the path from the arguments. This will split at the first
16640  # space.
16641  complete="$FOUND_MAKE"
16642  path="${complete%% *}"
16643  tmp="$complete EOL"
16644  arguments="${tmp#* }"
16645
16646  # Input might be given as Windows format, start by converting to
16647  # unix format.
16648  new_path="$path"
16649
16650  windows_path="$new_path"
16651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16652    unix_path=`$CYGPATH -u "$windows_path"`
16653    new_path="$unix_path"
16654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16656    new_path="$unix_path"
16657  fi
16658
16659
16660  # Now try to locate executable using which
16661  new_path=`$WHICH "$new_path" 2> /dev/null`
16662
16663  if test "x$new_path" = x; then
16664    # Oops. Which didn't find the executable.
16665    # The splitting of arguments from the executable at a space might have been incorrect,
16666    # since paths with space are more likely in Windows. Give it another try with the whole
16667    # argument.
16668    path="$complete"
16669    arguments="EOL"
16670    new_path="$path"
16671
16672  windows_path="$new_path"
16673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16674    unix_path=`$CYGPATH -u "$windows_path"`
16675    new_path="$unix_path"
16676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16678    new_path="$unix_path"
16679  fi
16680
16681
16682    new_path=`$WHICH "$new_path" 2> /dev/null`
16683
16684    if test "x$new_path" = x; then
16685      # It's still not found. Now this is an unrecoverable error.
16686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16688      has_space=`$ECHO "$complete" | $GREP " "`
16689      if test "x$has_space" != x; then
16690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16692      fi
16693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16694    fi
16695  fi
16696
16697  # Now new_path has a complete unix path to the binary
16698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16699    # Keep paths in /bin as-is, but remove trailing .exe if any
16700    new_path="${new_path/%.exe/}"
16701    # Do not save /bin paths to all_fixpath_prefixes!
16702  else
16703    # Not in mixed or Windows style, start by that.
16704    new_path=`cmd //c echo $new_path`
16705
16706  input_path="$new_path"
16707  # Check if we need to convert this using DOS-style short mode. If the path
16708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16709  # take no chances and rewrite it.
16710  # Note: m4 eats our [], so we need to use [ and ] instead.
16711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16712  if test "x$has_forbidden_chars" != x; then
16713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16715  fi
16716
16717    # Output is in $new_path
16718
16719  windows_path="$new_path"
16720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16721    unix_path=`$CYGPATH -u "$windows_path"`
16722    new_path="$unix_path"
16723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16725    new_path="$unix_path"
16726  fi
16727
16728    # remove trailing .exe if any
16729    new_path="${new_path/%.exe/}"
16730
16731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16733  fi
16734
16735  else
16736    # We're on a posix platform. Hooray! :)
16737    # First separate the path from the arguments. This will split at the first
16738    # space.
16739    complete="$FOUND_MAKE"
16740    path="${complete%% *}"
16741    tmp="$complete EOL"
16742    arguments="${tmp#* }"
16743
16744    # Cannot rely on the command "which" here since it doesn't always work.
16745    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16746    if test -z "$is_absolute_path"; then
16747      # Path to executable is not absolute. Find it.
16748      IFS_save="$IFS"
16749      IFS=:
16750      for p in $PATH; do
16751        if test -f "$p/$path" && test -x "$p/$path"; then
16752          new_path="$p/$path"
16753          break
16754        fi
16755      done
16756      IFS="$IFS_save"
16757    else
16758      # This is an absolute path, we can use it without further modifications.
16759      new_path="$path"
16760    fi
16761
16762    if test "x$new_path" = x; then
16763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16764$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16765      has_space=`$ECHO "$complete" | $GREP " "`
16766      if test "x$has_space" != x; then
16767        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16768$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16769      fi
16770      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16771    fi
16772  fi
16773
16774  # Now join together the path and the arguments once again
16775  if test "x$arguments" != xEOL; then
16776    new_complete="$new_path ${arguments% *}"
16777  else
16778    new_complete="$new_path"
16779  fi
16780
16781  if test "x$complete" != "x$new_complete"; then
16782    FOUND_MAKE="$new_complete"
16783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16784$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16785  fi
16786
16787        fi
16788      fi
16789    fi
16790  fi
16791
16792        fi
16793        PATH=$OLD_PATH
16794      fi
16795    fi
16796
16797    if test "x$FOUND_MAKE" = x; then
16798      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
16799    fi
16800  fi
16801
16802  MAKE=$FOUND_MAKE
16803
16804  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16805$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16806
16807
16808
16809  # Test if find supports -delete
16810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16811$as_echo_n "checking if find supports -delete... " >&6; }
16812  FIND_DELETE="-delete"
16813
16814  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16815
16816  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16817
16818  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16819  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16820    # No, it does not.
16821    rm $DELETEDIR/TestIfFindSupportsDelete
16822    FIND_DELETE="-exec rm \{\} \+"
16823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16824$as_echo "no" >&6; }
16825  else
16826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16827$as_echo "yes" >&6; }
16828  fi
16829  rmdir $DELETEDIR
16830
16831
16832
16833  # These tools might not be installed by default,
16834  # need hint on how to install them.
16835
16836
16837
16838  # Publish this variable in the help.
16839
16840
16841  if test "x$UNZIP" = x; then
16842    # The variable is not set by user, try to locate tool using the code snippet
16843    for ac_prog in unzip
16844do
16845  # Extract the first word of "$ac_prog", so it can be a program name with args.
16846set dummy $ac_prog; ac_word=$2
16847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16848$as_echo_n "checking for $ac_word... " >&6; }
16849if ${ac_cv_path_UNZIP+:} false; then :
16850  $as_echo_n "(cached) " >&6
16851else
16852  case $UNZIP in
16853  [\\/]* | ?:[\\/]*)
16854  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16855  ;;
16856  *)
16857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16858for as_dir in $PATH
16859do
16860  IFS=$as_save_IFS
16861  test -z "$as_dir" && as_dir=.
16862    for ac_exec_ext in '' $ac_executable_extensions; do
16863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16864    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16866    break 2
16867  fi
16868done
16869  done
16870IFS=$as_save_IFS
16871
16872  ;;
16873esac
16874fi
16875UNZIP=$ac_cv_path_UNZIP
16876if test -n "$UNZIP"; then
16877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16878$as_echo "$UNZIP" >&6; }
16879else
16880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16881$as_echo "no" >&6; }
16882fi
16883
16884
16885  test -n "$UNZIP" && break
16886done
16887
16888  else
16889    # The variable is set, but is it from the command line or the environment?
16890
16891    # Try to remove the string !UNZIP! from our list.
16892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16894      # If it failed, the variable was not from the command line. Ignore it,
16895      # but warn the user (except for BASH, which is always set by the calling BASH).
16896      if test "xUNZIP" != xBASH; then
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16898$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16899      fi
16900      # Try to locate tool using the code snippet
16901      for ac_prog in unzip
16902do
16903  # Extract the first word of "$ac_prog", so it can be a program name with args.
16904set dummy $ac_prog; ac_word=$2
16905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16906$as_echo_n "checking for $ac_word... " >&6; }
16907if ${ac_cv_path_UNZIP+:} false; then :
16908  $as_echo_n "(cached) " >&6
16909else
16910  case $UNZIP in
16911  [\\/]* | ?:[\\/]*)
16912  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16913  ;;
16914  *)
16915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16916for as_dir in $PATH
16917do
16918  IFS=$as_save_IFS
16919  test -z "$as_dir" && as_dir=.
16920    for ac_exec_ext in '' $ac_executable_extensions; do
16921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16922    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16924    break 2
16925  fi
16926done
16927  done
16928IFS=$as_save_IFS
16929
16930  ;;
16931esac
16932fi
16933UNZIP=$ac_cv_path_UNZIP
16934if test -n "$UNZIP"; then
16935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16936$as_echo "$UNZIP" >&6; }
16937else
16938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16939$as_echo "no" >&6; }
16940fi
16941
16942
16943  test -n "$UNZIP" && break
16944done
16945
16946    else
16947      # If it succeeded, then it was overridden by the user. We will use it
16948      # for the tool.
16949
16950      # First remove it from the list of overridden variables, so we can test
16951      # for unknown variables in the end.
16952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16953
16954      # Check if the provided tool contains a complete path.
16955      tool_specified="$UNZIP"
16956      tool_basename="${tool_specified##*/}"
16957      if test "x$tool_basename" = "x$tool_specified"; then
16958        # A command without a complete path is provided, search $PATH.
16959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16960$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16961        # Extract the first word of "$tool_basename", so it can be a program name with args.
16962set dummy $tool_basename; ac_word=$2
16963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16964$as_echo_n "checking for $ac_word... " >&6; }
16965if ${ac_cv_path_UNZIP+:} false; then :
16966  $as_echo_n "(cached) " >&6
16967else
16968  case $UNZIP in
16969  [\\/]* | ?:[\\/]*)
16970  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16971  ;;
16972  *)
16973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16974for as_dir in $PATH
16975do
16976  IFS=$as_save_IFS
16977  test -z "$as_dir" && as_dir=.
16978    for ac_exec_ext in '' $ac_executable_extensions; do
16979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16980    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16982    break 2
16983  fi
16984done
16985  done
16986IFS=$as_save_IFS
16987
16988  ;;
16989esac
16990fi
16991UNZIP=$ac_cv_path_UNZIP
16992if test -n "$UNZIP"; then
16993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16994$as_echo "$UNZIP" >&6; }
16995else
16996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16997$as_echo "no" >&6; }
16998fi
16999
17000
17001        if test "x$UNZIP" = x; then
17002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17003        fi
17004      else
17005        # Otherwise we believe it is a complete path. Use it as it is.
17006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17007$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17009$as_echo_n "checking for UNZIP... " >&6; }
17010        if test ! -x "$tool_specified"; then
17011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17012$as_echo "not found" >&6; }
17013          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17014        fi
17015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17016$as_echo "$tool_specified" >&6; }
17017      fi
17018    fi
17019  fi
17020
17021
17022
17023  if test "x$UNZIP" = x; then
17024    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17025  fi
17026
17027
17028
17029
17030
17031  # Publish this variable in the help.
17032
17033
17034  if test "x$ZIP" = x; then
17035    # The variable is not set by user, try to locate tool using the code snippet
17036    for ac_prog in zip
17037do
17038  # Extract the first word of "$ac_prog", so it can be a program name with args.
17039set dummy $ac_prog; ac_word=$2
17040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17041$as_echo_n "checking for $ac_word... " >&6; }
17042if ${ac_cv_path_ZIP+:} false; then :
17043  $as_echo_n "(cached) " >&6
17044else
17045  case $ZIP in
17046  [\\/]* | ?:[\\/]*)
17047  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17048  ;;
17049  *)
17050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17051for as_dir in $PATH
17052do
17053  IFS=$as_save_IFS
17054  test -z "$as_dir" && as_dir=.
17055    for ac_exec_ext in '' $ac_executable_extensions; do
17056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17057    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17059    break 2
17060  fi
17061done
17062  done
17063IFS=$as_save_IFS
17064
17065  ;;
17066esac
17067fi
17068ZIP=$ac_cv_path_ZIP
17069if test -n "$ZIP"; then
17070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17071$as_echo "$ZIP" >&6; }
17072else
17073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17074$as_echo "no" >&6; }
17075fi
17076
17077
17078  test -n "$ZIP" && break
17079done
17080
17081  else
17082    # The variable is set, but is it from the command line or the environment?
17083
17084    # Try to remove the string !ZIP! from our list.
17085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17087      # If it failed, the variable was not from the command line. Ignore it,
17088      # but warn the user (except for BASH, which is always set by the calling BASH).
17089      if test "xZIP" != xBASH; then
17090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17091$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17092      fi
17093      # Try to locate tool using the code snippet
17094      for ac_prog in zip
17095do
17096  # Extract the first word of "$ac_prog", so it can be a program name with args.
17097set dummy $ac_prog; ac_word=$2
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17099$as_echo_n "checking for $ac_word... " >&6; }
17100if ${ac_cv_path_ZIP+:} false; then :
17101  $as_echo_n "(cached) " >&6
17102else
17103  case $ZIP in
17104  [\\/]* | ?:[\\/]*)
17105  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17106  ;;
17107  *)
17108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17109for as_dir in $PATH
17110do
17111  IFS=$as_save_IFS
17112  test -z "$as_dir" && as_dir=.
17113    for ac_exec_ext in '' $ac_executable_extensions; do
17114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17115    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17117    break 2
17118  fi
17119done
17120  done
17121IFS=$as_save_IFS
17122
17123  ;;
17124esac
17125fi
17126ZIP=$ac_cv_path_ZIP
17127if test -n "$ZIP"; then
17128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17129$as_echo "$ZIP" >&6; }
17130else
17131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17132$as_echo "no" >&6; }
17133fi
17134
17135
17136  test -n "$ZIP" && break
17137done
17138
17139    else
17140      # If it succeeded, then it was overridden by the user. We will use it
17141      # for the tool.
17142
17143      # First remove it from the list of overridden variables, so we can test
17144      # for unknown variables in the end.
17145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17146
17147      # Check if the provided tool contains a complete path.
17148      tool_specified="$ZIP"
17149      tool_basename="${tool_specified##*/}"
17150      if test "x$tool_basename" = "x$tool_specified"; then
17151        # A command without a complete path is provided, search $PATH.
17152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17153$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17154        # Extract the first word of "$tool_basename", so it can be a program name with args.
17155set dummy $tool_basename; ac_word=$2
17156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17157$as_echo_n "checking for $ac_word... " >&6; }
17158if ${ac_cv_path_ZIP+:} false; then :
17159  $as_echo_n "(cached) " >&6
17160else
17161  case $ZIP in
17162  [\\/]* | ?:[\\/]*)
17163  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17164  ;;
17165  *)
17166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17167for as_dir in $PATH
17168do
17169  IFS=$as_save_IFS
17170  test -z "$as_dir" && as_dir=.
17171    for ac_exec_ext in '' $ac_executable_extensions; do
17172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17173    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17175    break 2
17176  fi
17177done
17178  done
17179IFS=$as_save_IFS
17180
17181  ;;
17182esac
17183fi
17184ZIP=$ac_cv_path_ZIP
17185if test -n "$ZIP"; then
17186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17187$as_echo "$ZIP" >&6; }
17188else
17189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17190$as_echo "no" >&6; }
17191fi
17192
17193
17194        if test "x$ZIP" = x; then
17195          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17196        fi
17197      else
17198        # Otherwise we believe it is a complete path. Use it as it is.
17199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17200$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17202$as_echo_n "checking for ZIP... " >&6; }
17203        if test ! -x "$tool_specified"; then
17204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17205$as_echo "not found" >&6; }
17206          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17207        fi
17208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17209$as_echo "$tool_specified" >&6; }
17210      fi
17211    fi
17212  fi
17213
17214
17215
17216  if test "x$ZIP" = x; then
17217    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17218  fi
17219
17220
17221
17222  # Non-required basic tools
17223
17224
17225
17226  # Publish this variable in the help.
17227
17228
17229  if test "x$LDD" = x; then
17230    # The variable is not set by user, try to locate tool using the code snippet
17231    for ac_prog in ldd
17232do
17233  # Extract the first word of "$ac_prog", so it can be a program name with args.
17234set dummy $ac_prog; ac_word=$2
17235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17236$as_echo_n "checking for $ac_word... " >&6; }
17237if ${ac_cv_path_LDD+:} false; then :
17238  $as_echo_n "(cached) " >&6
17239else
17240  case $LDD in
17241  [\\/]* | ?:[\\/]*)
17242  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17243  ;;
17244  *)
17245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17246for as_dir in $PATH
17247do
17248  IFS=$as_save_IFS
17249  test -z "$as_dir" && as_dir=.
17250    for ac_exec_ext in '' $ac_executable_extensions; do
17251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17252    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17254    break 2
17255  fi
17256done
17257  done
17258IFS=$as_save_IFS
17259
17260  ;;
17261esac
17262fi
17263LDD=$ac_cv_path_LDD
17264if test -n "$LDD"; then
17265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17266$as_echo "$LDD" >&6; }
17267else
17268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17269$as_echo "no" >&6; }
17270fi
17271
17272
17273  test -n "$LDD" && break
17274done
17275
17276  else
17277    # The variable is set, but is it from the command line or the environment?
17278
17279    # Try to remove the string !LDD! from our list.
17280    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17281    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17282      # If it failed, the variable was not from the command line. Ignore it,
17283      # but warn the user (except for BASH, which is always set by the calling BASH).
17284      if test "xLDD" != xBASH; then
17285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17286$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17287      fi
17288      # Try to locate tool using the code snippet
17289      for ac_prog in ldd
17290do
17291  # Extract the first word of "$ac_prog", so it can be a program name with args.
17292set dummy $ac_prog; ac_word=$2
17293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17294$as_echo_n "checking for $ac_word... " >&6; }
17295if ${ac_cv_path_LDD+:} false; then :
17296  $as_echo_n "(cached) " >&6
17297else
17298  case $LDD in
17299  [\\/]* | ?:[\\/]*)
17300  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17301  ;;
17302  *)
17303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17304for as_dir in $PATH
17305do
17306  IFS=$as_save_IFS
17307  test -z "$as_dir" && as_dir=.
17308    for ac_exec_ext in '' $ac_executable_extensions; do
17309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17310    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17312    break 2
17313  fi
17314done
17315  done
17316IFS=$as_save_IFS
17317
17318  ;;
17319esac
17320fi
17321LDD=$ac_cv_path_LDD
17322if test -n "$LDD"; then
17323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17324$as_echo "$LDD" >&6; }
17325else
17326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17327$as_echo "no" >&6; }
17328fi
17329
17330
17331  test -n "$LDD" && break
17332done
17333
17334    else
17335      # If it succeeded, then it was overridden by the user. We will use it
17336      # for the tool.
17337
17338      # First remove it from the list of overridden variables, so we can test
17339      # for unknown variables in the end.
17340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17341
17342      # Check if the provided tool contains a complete path.
17343      tool_specified="$LDD"
17344      tool_basename="${tool_specified##*/}"
17345      if test "x$tool_basename" = "x$tool_specified"; then
17346        # A command without a complete path is provided, search $PATH.
17347        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17348$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17349        # Extract the first word of "$tool_basename", so it can be a program name with args.
17350set dummy $tool_basename; ac_word=$2
17351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17352$as_echo_n "checking for $ac_word... " >&6; }
17353if ${ac_cv_path_LDD+:} false; then :
17354  $as_echo_n "(cached) " >&6
17355else
17356  case $LDD in
17357  [\\/]* | ?:[\\/]*)
17358  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17359  ;;
17360  *)
17361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17362for as_dir in $PATH
17363do
17364  IFS=$as_save_IFS
17365  test -z "$as_dir" && as_dir=.
17366    for ac_exec_ext in '' $ac_executable_extensions; do
17367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17368    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17370    break 2
17371  fi
17372done
17373  done
17374IFS=$as_save_IFS
17375
17376  ;;
17377esac
17378fi
17379LDD=$ac_cv_path_LDD
17380if test -n "$LDD"; then
17381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17382$as_echo "$LDD" >&6; }
17383else
17384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17385$as_echo "no" >&6; }
17386fi
17387
17388
17389        if test "x$LDD" = x; then
17390          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17391        fi
17392      else
17393        # Otherwise we believe it is a complete path. Use it as it is.
17394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17395$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17397$as_echo_n "checking for LDD... " >&6; }
17398        if test ! -x "$tool_specified"; then
17399          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17400$as_echo "not found" >&6; }
17401          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17402        fi
17403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17404$as_echo "$tool_specified" >&6; }
17405      fi
17406    fi
17407  fi
17408
17409
17410  if test "x$LDD" = "x"; then
17411    # List shared lib dependencies is used for
17412    # debug output and checking for forbidden dependencies.
17413    # We can build without it.
17414    LDD="true"
17415  fi
17416
17417
17418  # Publish this variable in the help.
17419
17420
17421  if test "x$OTOOL" = x; then
17422    # The variable is not set by user, try to locate tool using the code snippet
17423    for ac_prog in otool
17424do
17425  # Extract the first word of "$ac_prog", so it can be a program name with args.
17426set dummy $ac_prog; ac_word=$2
17427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17428$as_echo_n "checking for $ac_word... " >&6; }
17429if ${ac_cv_path_OTOOL+:} false; then :
17430  $as_echo_n "(cached) " >&6
17431else
17432  case $OTOOL in
17433  [\\/]* | ?:[\\/]*)
17434  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17435  ;;
17436  *)
17437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17438for as_dir in $PATH
17439do
17440  IFS=$as_save_IFS
17441  test -z "$as_dir" && as_dir=.
17442    for ac_exec_ext in '' $ac_executable_extensions; do
17443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17444    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17446    break 2
17447  fi
17448done
17449  done
17450IFS=$as_save_IFS
17451
17452  ;;
17453esac
17454fi
17455OTOOL=$ac_cv_path_OTOOL
17456if test -n "$OTOOL"; then
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17458$as_echo "$OTOOL" >&6; }
17459else
17460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17461$as_echo "no" >&6; }
17462fi
17463
17464
17465  test -n "$OTOOL" && break
17466done
17467
17468  else
17469    # The variable is set, but is it from the command line or the environment?
17470
17471    # Try to remove the string !OTOOL! from our list.
17472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17474      # If it failed, the variable was not from the command line. Ignore it,
17475      # but warn the user (except for BASH, which is always set by the calling BASH).
17476      if test "xOTOOL" != xBASH; then
17477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17478$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17479      fi
17480      # Try to locate tool using the code snippet
17481      for ac_prog in otool
17482do
17483  # Extract the first word of "$ac_prog", so it can be a program name with args.
17484set dummy $ac_prog; ac_word=$2
17485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17486$as_echo_n "checking for $ac_word... " >&6; }
17487if ${ac_cv_path_OTOOL+:} false; then :
17488  $as_echo_n "(cached) " >&6
17489else
17490  case $OTOOL in
17491  [\\/]* | ?:[\\/]*)
17492  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17493  ;;
17494  *)
17495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17496for as_dir in $PATH
17497do
17498  IFS=$as_save_IFS
17499  test -z "$as_dir" && as_dir=.
17500    for ac_exec_ext in '' $ac_executable_extensions; do
17501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17502    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17504    break 2
17505  fi
17506done
17507  done
17508IFS=$as_save_IFS
17509
17510  ;;
17511esac
17512fi
17513OTOOL=$ac_cv_path_OTOOL
17514if test -n "$OTOOL"; then
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17516$as_echo "$OTOOL" >&6; }
17517else
17518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17519$as_echo "no" >&6; }
17520fi
17521
17522
17523  test -n "$OTOOL" && break
17524done
17525
17526    else
17527      # If it succeeded, then it was overridden by the user. We will use it
17528      # for the tool.
17529
17530      # First remove it from the list of overridden variables, so we can test
17531      # for unknown variables in the end.
17532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17533
17534      # Check if the provided tool contains a complete path.
17535      tool_specified="$OTOOL"
17536      tool_basename="${tool_specified##*/}"
17537      if test "x$tool_basename" = "x$tool_specified"; then
17538        # A command without a complete path is provided, search $PATH.
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17540$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17541        # Extract the first word of "$tool_basename", so it can be a program name with args.
17542set dummy $tool_basename; ac_word=$2
17543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17544$as_echo_n "checking for $ac_word... " >&6; }
17545if ${ac_cv_path_OTOOL+:} false; then :
17546  $as_echo_n "(cached) " >&6
17547else
17548  case $OTOOL in
17549  [\\/]* | ?:[\\/]*)
17550  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17551  ;;
17552  *)
17553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17554for as_dir in $PATH
17555do
17556  IFS=$as_save_IFS
17557  test -z "$as_dir" && as_dir=.
17558    for ac_exec_ext in '' $ac_executable_extensions; do
17559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17560    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17562    break 2
17563  fi
17564done
17565  done
17566IFS=$as_save_IFS
17567
17568  ;;
17569esac
17570fi
17571OTOOL=$ac_cv_path_OTOOL
17572if test -n "$OTOOL"; then
17573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17574$as_echo "$OTOOL" >&6; }
17575else
17576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17577$as_echo "no" >&6; }
17578fi
17579
17580
17581        if test "x$OTOOL" = x; then
17582          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17583        fi
17584      else
17585        # Otherwise we believe it is a complete path. Use it as it is.
17586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17587$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17589$as_echo_n "checking for OTOOL... " >&6; }
17590        if test ! -x "$tool_specified"; then
17591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17592$as_echo "not found" >&6; }
17593          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17594        fi
17595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17596$as_echo "$tool_specified" >&6; }
17597      fi
17598    fi
17599  fi
17600
17601
17602  if test "x$OTOOL" = "x"; then
17603    OTOOL="true"
17604  fi
17605
17606
17607  # Publish this variable in the help.
17608
17609
17610  if test "x$READELF" = x; then
17611    # The variable is not set by user, try to locate tool using the code snippet
17612    for ac_prog in greadelf readelf
17613do
17614  # Extract the first word of "$ac_prog", so it can be a program name with args.
17615set dummy $ac_prog; ac_word=$2
17616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17617$as_echo_n "checking for $ac_word... " >&6; }
17618if ${ac_cv_path_READELF+:} false; then :
17619  $as_echo_n "(cached) " >&6
17620else
17621  case $READELF in
17622  [\\/]* | ?:[\\/]*)
17623  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17624  ;;
17625  *)
17626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17627for as_dir in $PATH
17628do
17629  IFS=$as_save_IFS
17630  test -z "$as_dir" && as_dir=.
17631    for ac_exec_ext in '' $ac_executable_extensions; do
17632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17633    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17635    break 2
17636  fi
17637done
17638  done
17639IFS=$as_save_IFS
17640
17641  ;;
17642esac
17643fi
17644READELF=$ac_cv_path_READELF
17645if test -n "$READELF"; then
17646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17647$as_echo "$READELF" >&6; }
17648else
17649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17650$as_echo "no" >&6; }
17651fi
17652
17653
17654  test -n "$READELF" && break
17655done
17656
17657  else
17658    # The variable is set, but is it from the command line or the environment?
17659
17660    # Try to remove the string !READELF! from our list.
17661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17663      # If it failed, the variable was not from the command line. Ignore it,
17664      # but warn the user (except for BASH, which is always set by the calling BASH).
17665      if test "xREADELF" != xBASH; then
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17667$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17668      fi
17669      # Try to locate tool using the code snippet
17670      for ac_prog in greadelf readelf
17671do
17672  # Extract the first word of "$ac_prog", so it can be a program name with args.
17673set dummy $ac_prog; ac_word=$2
17674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17675$as_echo_n "checking for $ac_word... " >&6; }
17676if ${ac_cv_path_READELF+:} false; then :
17677  $as_echo_n "(cached) " >&6
17678else
17679  case $READELF in
17680  [\\/]* | ?:[\\/]*)
17681  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17682  ;;
17683  *)
17684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17685for as_dir in $PATH
17686do
17687  IFS=$as_save_IFS
17688  test -z "$as_dir" && as_dir=.
17689    for ac_exec_ext in '' $ac_executable_extensions; do
17690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17691    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17693    break 2
17694  fi
17695done
17696  done
17697IFS=$as_save_IFS
17698
17699  ;;
17700esac
17701fi
17702READELF=$ac_cv_path_READELF
17703if test -n "$READELF"; then
17704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17705$as_echo "$READELF" >&6; }
17706else
17707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17708$as_echo "no" >&6; }
17709fi
17710
17711
17712  test -n "$READELF" && break
17713done
17714
17715    else
17716      # If it succeeded, then it was overridden by the user. We will use it
17717      # for the tool.
17718
17719      # First remove it from the list of overridden variables, so we can test
17720      # for unknown variables in the end.
17721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17722
17723      # Check if the provided tool contains a complete path.
17724      tool_specified="$READELF"
17725      tool_basename="${tool_specified##*/}"
17726      if test "x$tool_basename" = "x$tool_specified"; then
17727        # A command without a complete path is provided, search $PATH.
17728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17729$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17730        # Extract the first word of "$tool_basename", so it can be a program name with args.
17731set dummy $tool_basename; ac_word=$2
17732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17733$as_echo_n "checking for $ac_word... " >&6; }
17734if ${ac_cv_path_READELF+:} false; then :
17735  $as_echo_n "(cached) " >&6
17736else
17737  case $READELF in
17738  [\\/]* | ?:[\\/]*)
17739  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17740  ;;
17741  *)
17742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17743for as_dir in $PATH
17744do
17745  IFS=$as_save_IFS
17746  test -z "$as_dir" && as_dir=.
17747    for ac_exec_ext in '' $ac_executable_extensions; do
17748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17749    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17751    break 2
17752  fi
17753done
17754  done
17755IFS=$as_save_IFS
17756
17757  ;;
17758esac
17759fi
17760READELF=$ac_cv_path_READELF
17761if test -n "$READELF"; then
17762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17763$as_echo "$READELF" >&6; }
17764else
17765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17766$as_echo "no" >&6; }
17767fi
17768
17769
17770        if test "x$READELF" = x; then
17771          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17772        fi
17773      else
17774        # Otherwise we believe it is a complete path. Use it as it is.
17775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17776$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17778$as_echo_n "checking for READELF... " >&6; }
17779        if test ! -x "$tool_specified"; then
17780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17781$as_echo "not found" >&6; }
17782          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17783        fi
17784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17785$as_echo "$tool_specified" >&6; }
17786      fi
17787    fi
17788  fi
17789
17790
17791
17792
17793  # Publish this variable in the help.
17794
17795
17796  if test "x$HG" = x; then
17797    # The variable is not set by user, try to locate tool using the code snippet
17798    for ac_prog in hg
17799do
17800  # Extract the first word of "$ac_prog", so it can be a program name with args.
17801set dummy $ac_prog; ac_word=$2
17802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17803$as_echo_n "checking for $ac_word... " >&6; }
17804if ${ac_cv_path_HG+:} false; then :
17805  $as_echo_n "(cached) " >&6
17806else
17807  case $HG in
17808  [\\/]* | ?:[\\/]*)
17809  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17810  ;;
17811  *)
17812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17813for as_dir in $PATH
17814do
17815  IFS=$as_save_IFS
17816  test -z "$as_dir" && as_dir=.
17817    for ac_exec_ext in '' $ac_executable_extensions; do
17818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17819    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17821    break 2
17822  fi
17823done
17824  done
17825IFS=$as_save_IFS
17826
17827  ;;
17828esac
17829fi
17830HG=$ac_cv_path_HG
17831if test -n "$HG"; then
17832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17833$as_echo "$HG" >&6; }
17834else
17835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17836$as_echo "no" >&6; }
17837fi
17838
17839
17840  test -n "$HG" && break
17841done
17842
17843  else
17844    # The variable is set, but is it from the command line or the environment?
17845
17846    # Try to remove the string !HG! from our list.
17847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17849      # If it failed, the variable was not from the command line. Ignore it,
17850      # but warn the user (except for BASH, which is always set by the calling BASH).
17851      if test "xHG" != xBASH; then
17852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17853$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17854      fi
17855      # Try to locate tool using the code snippet
17856      for ac_prog in hg
17857do
17858  # Extract the first word of "$ac_prog", so it can be a program name with args.
17859set dummy $ac_prog; ac_word=$2
17860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17861$as_echo_n "checking for $ac_word... " >&6; }
17862if ${ac_cv_path_HG+:} false; then :
17863  $as_echo_n "(cached) " >&6
17864else
17865  case $HG in
17866  [\\/]* | ?:[\\/]*)
17867  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17868  ;;
17869  *)
17870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17871for as_dir in $PATH
17872do
17873  IFS=$as_save_IFS
17874  test -z "$as_dir" && as_dir=.
17875    for ac_exec_ext in '' $ac_executable_extensions; do
17876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17877    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17879    break 2
17880  fi
17881done
17882  done
17883IFS=$as_save_IFS
17884
17885  ;;
17886esac
17887fi
17888HG=$ac_cv_path_HG
17889if test -n "$HG"; then
17890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17891$as_echo "$HG" >&6; }
17892else
17893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17894$as_echo "no" >&6; }
17895fi
17896
17897
17898  test -n "$HG" && break
17899done
17900
17901    else
17902      # If it succeeded, then it was overridden by the user. We will use it
17903      # for the tool.
17904
17905      # First remove it from the list of overridden variables, so we can test
17906      # for unknown variables in the end.
17907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17908
17909      # Check if the provided tool contains a complete path.
17910      tool_specified="$HG"
17911      tool_basename="${tool_specified##*/}"
17912      if test "x$tool_basename" = "x$tool_specified"; then
17913        # A command without a complete path is provided, search $PATH.
17914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17915$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17916        # Extract the first word of "$tool_basename", so it can be a program name with args.
17917set dummy $tool_basename; ac_word=$2
17918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17919$as_echo_n "checking for $ac_word... " >&6; }
17920if ${ac_cv_path_HG+:} false; then :
17921  $as_echo_n "(cached) " >&6
17922else
17923  case $HG in
17924  [\\/]* | ?:[\\/]*)
17925  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17926  ;;
17927  *)
17928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17929for as_dir in $PATH
17930do
17931  IFS=$as_save_IFS
17932  test -z "$as_dir" && as_dir=.
17933    for ac_exec_ext in '' $ac_executable_extensions; do
17934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17935    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17937    break 2
17938  fi
17939done
17940  done
17941IFS=$as_save_IFS
17942
17943  ;;
17944esac
17945fi
17946HG=$ac_cv_path_HG
17947if test -n "$HG"; then
17948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17949$as_echo "$HG" >&6; }
17950else
17951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17952$as_echo "no" >&6; }
17953fi
17954
17955
17956        if test "x$HG" = x; then
17957          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17958        fi
17959      else
17960        # Otherwise we believe it is a complete path. Use it as it is.
17961        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17962$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17964$as_echo_n "checking for HG... " >&6; }
17965        if test ! -x "$tool_specified"; then
17966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17967$as_echo "not found" >&6; }
17968          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17969        fi
17970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17971$as_echo "$tool_specified" >&6; }
17972      fi
17973    fi
17974  fi
17975
17976
17977
17978
17979  # Publish this variable in the help.
17980
17981
17982  if test "x$STAT" = x; then
17983    # The variable is not set by user, try to locate tool using the code snippet
17984    for ac_prog in stat
17985do
17986  # Extract the first word of "$ac_prog", so it can be a program name with args.
17987set dummy $ac_prog; ac_word=$2
17988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17989$as_echo_n "checking for $ac_word... " >&6; }
17990if ${ac_cv_path_STAT+:} false; then :
17991  $as_echo_n "(cached) " >&6
17992else
17993  case $STAT in
17994  [\\/]* | ?:[\\/]*)
17995  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17996  ;;
17997  *)
17998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17999for as_dir in $PATH
18000do
18001  IFS=$as_save_IFS
18002  test -z "$as_dir" && as_dir=.
18003    for ac_exec_ext in '' $ac_executable_extensions; do
18004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18005    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18007    break 2
18008  fi
18009done
18010  done
18011IFS=$as_save_IFS
18012
18013  ;;
18014esac
18015fi
18016STAT=$ac_cv_path_STAT
18017if test -n "$STAT"; then
18018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18019$as_echo "$STAT" >&6; }
18020else
18021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18022$as_echo "no" >&6; }
18023fi
18024
18025
18026  test -n "$STAT" && break
18027done
18028
18029  else
18030    # The variable is set, but is it from the command line or the environment?
18031
18032    # Try to remove the string !STAT! from our list.
18033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18035      # If it failed, the variable was not from the command line. Ignore it,
18036      # but warn the user (except for BASH, which is always set by the calling BASH).
18037      if test "xSTAT" != xBASH; then
18038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18039$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18040      fi
18041      # Try to locate tool using the code snippet
18042      for ac_prog in stat
18043do
18044  # Extract the first word of "$ac_prog", so it can be a program name with args.
18045set dummy $ac_prog; ac_word=$2
18046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18047$as_echo_n "checking for $ac_word... " >&6; }
18048if ${ac_cv_path_STAT+:} false; then :
18049  $as_echo_n "(cached) " >&6
18050else
18051  case $STAT in
18052  [\\/]* | ?:[\\/]*)
18053  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18054  ;;
18055  *)
18056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18057for as_dir in $PATH
18058do
18059  IFS=$as_save_IFS
18060  test -z "$as_dir" && as_dir=.
18061    for ac_exec_ext in '' $ac_executable_extensions; do
18062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18063    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18065    break 2
18066  fi
18067done
18068  done
18069IFS=$as_save_IFS
18070
18071  ;;
18072esac
18073fi
18074STAT=$ac_cv_path_STAT
18075if test -n "$STAT"; then
18076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18077$as_echo "$STAT" >&6; }
18078else
18079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18080$as_echo "no" >&6; }
18081fi
18082
18083
18084  test -n "$STAT" && break
18085done
18086
18087    else
18088      # If it succeeded, then it was overridden by the user. We will use it
18089      # for the tool.
18090
18091      # First remove it from the list of overridden variables, so we can test
18092      # for unknown variables in the end.
18093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18094
18095      # Check if the provided tool contains a complete path.
18096      tool_specified="$STAT"
18097      tool_basename="${tool_specified##*/}"
18098      if test "x$tool_basename" = "x$tool_specified"; then
18099        # A command without a complete path is provided, search $PATH.
18100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18101$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18102        # Extract the first word of "$tool_basename", so it can be a program name with args.
18103set dummy $tool_basename; ac_word=$2
18104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18105$as_echo_n "checking for $ac_word... " >&6; }
18106if ${ac_cv_path_STAT+:} false; then :
18107  $as_echo_n "(cached) " >&6
18108else
18109  case $STAT in
18110  [\\/]* | ?:[\\/]*)
18111  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18112  ;;
18113  *)
18114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18115for as_dir in $PATH
18116do
18117  IFS=$as_save_IFS
18118  test -z "$as_dir" && as_dir=.
18119    for ac_exec_ext in '' $ac_executable_extensions; do
18120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18121    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18123    break 2
18124  fi
18125done
18126  done
18127IFS=$as_save_IFS
18128
18129  ;;
18130esac
18131fi
18132STAT=$ac_cv_path_STAT
18133if test -n "$STAT"; then
18134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18135$as_echo "$STAT" >&6; }
18136else
18137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18138$as_echo "no" >&6; }
18139fi
18140
18141
18142        if test "x$STAT" = x; then
18143          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18144        fi
18145      else
18146        # Otherwise we believe it is a complete path. Use it as it is.
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18148$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18150$as_echo_n "checking for STAT... " >&6; }
18151        if test ! -x "$tool_specified"; then
18152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18153$as_echo "not found" >&6; }
18154          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18155        fi
18156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18157$as_echo "$tool_specified" >&6; }
18158      fi
18159    fi
18160  fi
18161
18162
18163
18164
18165  # Publish this variable in the help.
18166
18167
18168  if test "x$TIME" = x; then
18169    # The variable is not set by user, try to locate tool using the code snippet
18170    for ac_prog in time
18171do
18172  # Extract the first word of "$ac_prog", so it can be a program name with args.
18173set dummy $ac_prog; ac_word=$2
18174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18175$as_echo_n "checking for $ac_word... " >&6; }
18176if ${ac_cv_path_TIME+:} false; then :
18177  $as_echo_n "(cached) " >&6
18178else
18179  case $TIME in
18180  [\\/]* | ?:[\\/]*)
18181  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18182  ;;
18183  *)
18184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18185for as_dir in $PATH
18186do
18187  IFS=$as_save_IFS
18188  test -z "$as_dir" && as_dir=.
18189    for ac_exec_ext in '' $ac_executable_extensions; do
18190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18191    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18193    break 2
18194  fi
18195done
18196  done
18197IFS=$as_save_IFS
18198
18199  ;;
18200esac
18201fi
18202TIME=$ac_cv_path_TIME
18203if test -n "$TIME"; then
18204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18205$as_echo "$TIME" >&6; }
18206else
18207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18208$as_echo "no" >&6; }
18209fi
18210
18211
18212  test -n "$TIME" && break
18213done
18214
18215  else
18216    # The variable is set, but is it from the command line or the environment?
18217
18218    # Try to remove the string !TIME! from our list.
18219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18221      # If it failed, the variable was not from the command line. Ignore it,
18222      # but warn the user (except for BASH, which is always set by the calling BASH).
18223      if test "xTIME" != xBASH; then
18224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18225$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18226      fi
18227      # Try to locate tool using the code snippet
18228      for ac_prog in time
18229do
18230  # Extract the first word of "$ac_prog", so it can be a program name with args.
18231set dummy $ac_prog; ac_word=$2
18232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18233$as_echo_n "checking for $ac_word... " >&6; }
18234if ${ac_cv_path_TIME+:} false; then :
18235  $as_echo_n "(cached) " >&6
18236else
18237  case $TIME in
18238  [\\/]* | ?:[\\/]*)
18239  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18240  ;;
18241  *)
18242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18243for as_dir in $PATH
18244do
18245  IFS=$as_save_IFS
18246  test -z "$as_dir" && as_dir=.
18247    for ac_exec_ext in '' $ac_executable_extensions; do
18248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18249    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18251    break 2
18252  fi
18253done
18254  done
18255IFS=$as_save_IFS
18256
18257  ;;
18258esac
18259fi
18260TIME=$ac_cv_path_TIME
18261if test -n "$TIME"; then
18262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18263$as_echo "$TIME" >&6; }
18264else
18265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18266$as_echo "no" >&6; }
18267fi
18268
18269
18270  test -n "$TIME" && break
18271done
18272
18273    else
18274      # If it succeeded, then it was overridden by the user. We will use it
18275      # for the tool.
18276
18277      # First remove it from the list of overridden variables, so we can test
18278      # for unknown variables in the end.
18279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18280
18281      # Check if the provided tool contains a complete path.
18282      tool_specified="$TIME"
18283      tool_basename="${tool_specified##*/}"
18284      if test "x$tool_basename" = "x$tool_specified"; then
18285        # A command without a complete path is provided, search $PATH.
18286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18287$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18288        # Extract the first word of "$tool_basename", so it can be a program name with args.
18289set dummy $tool_basename; ac_word=$2
18290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18291$as_echo_n "checking for $ac_word... " >&6; }
18292if ${ac_cv_path_TIME+:} false; then :
18293  $as_echo_n "(cached) " >&6
18294else
18295  case $TIME in
18296  [\\/]* | ?:[\\/]*)
18297  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18298  ;;
18299  *)
18300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18301for as_dir in $PATH
18302do
18303  IFS=$as_save_IFS
18304  test -z "$as_dir" && as_dir=.
18305    for ac_exec_ext in '' $ac_executable_extensions; do
18306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18307    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18309    break 2
18310  fi
18311done
18312  done
18313IFS=$as_save_IFS
18314
18315  ;;
18316esac
18317fi
18318TIME=$ac_cv_path_TIME
18319if test -n "$TIME"; then
18320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18321$as_echo "$TIME" >&6; }
18322else
18323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18324$as_echo "no" >&6; }
18325fi
18326
18327
18328        if test "x$TIME" = x; then
18329          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18330        fi
18331      else
18332        # Otherwise we believe it is a complete path. Use it as it is.
18333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18334$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18336$as_echo_n "checking for TIME... " >&6; }
18337        if test ! -x "$tool_specified"; then
18338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18339$as_echo "not found" >&6; }
18340          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18341        fi
18342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18343$as_echo "$tool_specified" >&6; }
18344      fi
18345    fi
18346  fi
18347
18348
18349  # Check if it's GNU time
18350  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18351  if test "x$IS_GNU_TIME" != x; then
18352    IS_GNU_TIME=yes
18353  else
18354    IS_GNU_TIME=no
18355  fi
18356
18357
18358  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18359
18360
18361
18362  # Publish this variable in the help.
18363
18364
18365  if test "x$COMM" = x; then
18366    # The variable is not set by user, try to locate tool using the code snippet
18367    for ac_prog in comm
18368do
18369  # Extract the first word of "$ac_prog", so it can be a program name with args.
18370set dummy $ac_prog; ac_word=$2
18371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372$as_echo_n "checking for $ac_word... " >&6; }
18373if ${ac_cv_path_COMM+:} false; then :
18374  $as_echo_n "(cached) " >&6
18375else
18376  case $COMM in
18377  [\\/]* | ?:[\\/]*)
18378  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18379  ;;
18380  *)
18381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382for as_dir in $PATH
18383do
18384  IFS=$as_save_IFS
18385  test -z "$as_dir" && as_dir=.
18386    for ac_exec_ext in '' $ac_executable_extensions; do
18387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390    break 2
18391  fi
18392done
18393  done
18394IFS=$as_save_IFS
18395
18396  ;;
18397esac
18398fi
18399COMM=$ac_cv_path_COMM
18400if test -n "$COMM"; then
18401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18402$as_echo "$COMM" >&6; }
18403else
18404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405$as_echo "no" >&6; }
18406fi
18407
18408
18409  test -n "$COMM" && break
18410done
18411
18412  else
18413    # The variable is set, but is it from the command line or the environment?
18414
18415    # Try to remove the string !COMM! from our list.
18416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18418      # If it failed, the variable was not from the command line. Ignore it,
18419      # but warn the user (except for BASH, which is always set by the calling BASH).
18420      if test "xCOMM" != xBASH; then
18421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18422$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18423      fi
18424      # Try to locate tool using the code snippet
18425      for ac_prog in comm
18426do
18427  # Extract the first word of "$ac_prog", so it can be a program name with args.
18428set dummy $ac_prog; ac_word=$2
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18430$as_echo_n "checking for $ac_word... " >&6; }
18431if ${ac_cv_path_COMM+:} false; then :
18432  $as_echo_n "(cached) " >&6
18433else
18434  case $COMM in
18435  [\\/]* | ?:[\\/]*)
18436  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18437  ;;
18438  *)
18439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18440for as_dir in $PATH
18441do
18442  IFS=$as_save_IFS
18443  test -z "$as_dir" && as_dir=.
18444    for ac_exec_ext in '' $ac_executable_extensions; do
18445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18446    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18448    break 2
18449  fi
18450done
18451  done
18452IFS=$as_save_IFS
18453
18454  ;;
18455esac
18456fi
18457COMM=$ac_cv_path_COMM
18458if test -n "$COMM"; then
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18460$as_echo "$COMM" >&6; }
18461else
18462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18463$as_echo "no" >&6; }
18464fi
18465
18466
18467  test -n "$COMM" && break
18468done
18469
18470    else
18471      # If it succeeded, then it was overridden by the user. We will use it
18472      # for the tool.
18473
18474      # First remove it from the list of overridden variables, so we can test
18475      # for unknown variables in the end.
18476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18477
18478      # Check if the provided tool contains a complete path.
18479      tool_specified="$COMM"
18480      tool_basename="${tool_specified##*/}"
18481      if test "x$tool_basename" = "x$tool_specified"; then
18482        # A command without a complete path is provided, search $PATH.
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18484$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18485        # Extract the first word of "$tool_basename", so it can be a program name with args.
18486set dummy $tool_basename; ac_word=$2
18487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18488$as_echo_n "checking for $ac_word... " >&6; }
18489if ${ac_cv_path_COMM+:} false; then :
18490  $as_echo_n "(cached) " >&6
18491else
18492  case $COMM in
18493  [\\/]* | ?:[\\/]*)
18494  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18495  ;;
18496  *)
18497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18498for as_dir in $PATH
18499do
18500  IFS=$as_save_IFS
18501  test -z "$as_dir" && as_dir=.
18502    for ac_exec_ext in '' $ac_executable_extensions; do
18503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18504    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18506    break 2
18507  fi
18508done
18509  done
18510IFS=$as_save_IFS
18511
18512  ;;
18513esac
18514fi
18515COMM=$ac_cv_path_COMM
18516if test -n "$COMM"; then
18517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18518$as_echo "$COMM" >&6; }
18519else
18520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18521$as_echo "no" >&6; }
18522fi
18523
18524
18525        if test "x$COMM" = x; then
18526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18527        fi
18528      else
18529        # Otherwise we believe it is a complete path. Use it as it is.
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18531$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18533$as_echo_n "checking for COMM... " >&6; }
18534        if test ! -x "$tool_specified"; then
18535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18536$as_echo "not found" >&6; }
18537          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18538        fi
18539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18540$as_echo "$tool_specified" >&6; }
18541      fi
18542    fi
18543  fi
18544
18545
18546
18547  if test "x$COMM" = x; then
18548    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18549  fi
18550
18551
18552  fi
18553
18554  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18555
18556
18557
18558  # Publish this variable in the help.
18559
18560
18561  if test "x$DSYMUTIL" = x; then
18562    # The variable is not set by user, try to locate tool using the code snippet
18563    for ac_prog in dsymutil
18564do
18565  # Extract the first word of "$ac_prog", so it can be a program name with args.
18566set dummy $ac_prog; ac_word=$2
18567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18568$as_echo_n "checking for $ac_word... " >&6; }
18569if ${ac_cv_path_DSYMUTIL+:} false; then :
18570  $as_echo_n "(cached) " >&6
18571else
18572  case $DSYMUTIL in
18573  [\\/]* | ?:[\\/]*)
18574  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18575  ;;
18576  *)
18577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18578for as_dir in $PATH
18579do
18580  IFS=$as_save_IFS
18581  test -z "$as_dir" && as_dir=.
18582    for ac_exec_ext in '' $ac_executable_extensions; do
18583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18584    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18586    break 2
18587  fi
18588done
18589  done
18590IFS=$as_save_IFS
18591
18592  ;;
18593esac
18594fi
18595DSYMUTIL=$ac_cv_path_DSYMUTIL
18596if test -n "$DSYMUTIL"; then
18597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18598$as_echo "$DSYMUTIL" >&6; }
18599else
18600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18601$as_echo "no" >&6; }
18602fi
18603
18604
18605  test -n "$DSYMUTIL" && break
18606done
18607
18608  else
18609    # The variable is set, but is it from the command line or the environment?
18610
18611    # Try to remove the string !DSYMUTIL! from our list.
18612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18614      # If it failed, the variable was not from the command line. Ignore it,
18615      # but warn the user (except for BASH, which is always set by the calling BASH).
18616      if test "xDSYMUTIL" != xBASH; then
18617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18618$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18619      fi
18620      # Try to locate tool using the code snippet
18621      for ac_prog in dsymutil
18622do
18623  # Extract the first word of "$ac_prog", so it can be a program name with args.
18624set dummy $ac_prog; ac_word=$2
18625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18626$as_echo_n "checking for $ac_word... " >&6; }
18627if ${ac_cv_path_DSYMUTIL+:} false; then :
18628  $as_echo_n "(cached) " >&6
18629else
18630  case $DSYMUTIL in
18631  [\\/]* | ?:[\\/]*)
18632  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18633  ;;
18634  *)
18635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18636for as_dir in $PATH
18637do
18638  IFS=$as_save_IFS
18639  test -z "$as_dir" && as_dir=.
18640    for ac_exec_ext in '' $ac_executable_extensions; do
18641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18642    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18644    break 2
18645  fi
18646done
18647  done
18648IFS=$as_save_IFS
18649
18650  ;;
18651esac
18652fi
18653DSYMUTIL=$ac_cv_path_DSYMUTIL
18654if test -n "$DSYMUTIL"; then
18655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18656$as_echo "$DSYMUTIL" >&6; }
18657else
18658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18659$as_echo "no" >&6; }
18660fi
18661
18662
18663  test -n "$DSYMUTIL" && break
18664done
18665
18666    else
18667      # If it succeeded, then it was overridden by the user. We will use it
18668      # for the tool.
18669
18670      # First remove it from the list of overridden variables, so we can test
18671      # for unknown variables in the end.
18672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18673
18674      # Check if the provided tool contains a complete path.
18675      tool_specified="$DSYMUTIL"
18676      tool_basename="${tool_specified##*/}"
18677      if test "x$tool_basename" = "x$tool_specified"; then
18678        # A command without a complete path is provided, search $PATH.
18679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18680$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18681        # Extract the first word of "$tool_basename", so it can be a program name with args.
18682set dummy $tool_basename; ac_word=$2
18683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18684$as_echo_n "checking for $ac_word... " >&6; }
18685if ${ac_cv_path_DSYMUTIL+:} false; then :
18686  $as_echo_n "(cached) " >&6
18687else
18688  case $DSYMUTIL in
18689  [\\/]* | ?:[\\/]*)
18690  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18691  ;;
18692  *)
18693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18694for as_dir in $PATH
18695do
18696  IFS=$as_save_IFS
18697  test -z "$as_dir" && as_dir=.
18698    for ac_exec_ext in '' $ac_executable_extensions; do
18699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18700    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18702    break 2
18703  fi
18704done
18705  done
18706IFS=$as_save_IFS
18707
18708  ;;
18709esac
18710fi
18711DSYMUTIL=$ac_cv_path_DSYMUTIL
18712if test -n "$DSYMUTIL"; then
18713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18714$as_echo "$DSYMUTIL" >&6; }
18715else
18716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18717$as_echo "no" >&6; }
18718fi
18719
18720
18721        if test "x$DSYMUTIL" = x; then
18722          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18723        fi
18724      else
18725        # Otherwise we believe it is a complete path. Use it as it is.
18726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18727$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18729$as_echo_n "checking for DSYMUTIL... " >&6; }
18730        if test ! -x "$tool_specified"; then
18731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18732$as_echo "not found" >&6; }
18733          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18734        fi
18735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18736$as_echo "$tool_specified" >&6; }
18737      fi
18738    fi
18739  fi
18740
18741
18742
18743  if test "x$DSYMUTIL" = x; then
18744    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18745  fi
18746
18747
18748
18749
18750
18751  # Publish this variable in the help.
18752
18753
18754  if test "x$XATTR" = x; then
18755    # The variable is not set by user, try to locate tool using the code snippet
18756    for ac_prog in xattr
18757do
18758  # Extract the first word of "$ac_prog", so it can be a program name with args.
18759set dummy $ac_prog; ac_word=$2
18760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761$as_echo_n "checking for $ac_word... " >&6; }
18762if ${ac_cv_path_XATTR+:} false; then :
18763  $as_echo_n "(cached) " >&6
18764else
18765  case $XATTR in
18766  [\\/]* | ?:[\\/]*)
18767  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18768  ;;
18769  *)
18770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18771for as_dir in $PATH
18772do
18773  IFS=$as_save_IFS
18774  test -z "$as_dir" && as_dir=.
18775    for ac_exec_ext in '' $ac_executable_extensions; do
18776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18777    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18779    break 2
18780  fi
18781done
18782  done
18783IFS=$as_save_IFS
18784
18785  ;;
18786esac
18787fi
18788XATTR=$ac_cv_path_XATTR
18789if test -n "$XATTR"; then
18790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18791$as_echo "$XATTR" >&6; }
18792else
18793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18794$as_echo "no" >&6; }
18795fi
18796
18797
18798  test -n "$XATTR" && break
18799done
18800
18801  else
18802    # The variable is set, but is it from the command line or the environment?
18803
18804    # Try to remove the string !XATTR! from our list.
18805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18807      # If it failed, the variable was not from the command line. Ignore it,
18808      # but warn the user (except for BASH, which is always set by the calling BASH).
18809      if test "xXATTR" != xBASH; then
18810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18811$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18812      fi
18813      # Try to locate tool using the code snippet
18814      for ac_prog in xattr
18815do
18816  # Extract the first word of "$ac_prog", so it can be a program name with args.
18817set dummy $ac_prog; ac_word=$2
18818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18819$as_echo_n "checking for $ac_word... " >&6; }
18820if ${ac_cv_path_XATTR+:} false; then :
18821  $as_echo_n "(cached) " >&6
18822else
18823  case $XATTR in
18824  [\\/]* | ?:[\\/]*)
18825  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18826  ;;
18827  *)
18828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18829for as_dir in $PATH
18830do
18831  IFS=$as_save_IFS
18832  test -z "$as_dir" && as_dir=.
18833    for ac_exec_ext in '' $ac_executable_extensions; do
18834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18835    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18837    break 2
18838  fi
18839done
18840  done
18841IFS=$as_save_IFS
18842
18843  ;;
18844esac
18845fi
18846XATTR=$ac_cv_path_XATTR
18847if test -n "$XATTR"; then
18848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18849$as_echo "$XATTR" >&6; }
18850else
18851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18852$as_echo "no" >&6; }
18853fi
18854
18855
18856  test -n "$XATTR" && break
18857done
18858
18859    else
18860      # If it succeeded, then it was overridden by the user. We will use it
18861      # for the tool.
18862
18863      # First remove it from the list of overridden variables, so we can test
18864      # for unknown variables in the end.
18865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18866
18867      # Check if the provided tool contains a complete path.
18868      tool_specified="$XATTR"
18869      tool_basename="${tool_specified##*/}"
18870      if test "x$tool_basename" = "x$tool_specified"; then
18871        # A command without a complete path is provided, search $PATH.
18872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18873$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18874        # Extract the first word of "$tool_basename", so it can be a program name with args.
18875set dummy $tool_basename; ac_word=$2
18876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18877$as_echo_n "checking for $ac_word... " >&6; }
18878if ${ac_cv_path_XATTR+:} false; then :
18879  $as_echo_n "(cached) " >&6
18880else
18881  case $XATTR in
18882  [\\/]* | ?:[\\/]*)
18883  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18884  ;;
18885  *)
18886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18887for as_dir in $PATH
18888do
18889  IFS=$as_save_IFS
18890  test -z "$as_dir" && as_dir=.
18891    for ac_exec_ext in '' $ac_executable_extensions; do
18892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18893    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18895    break 2
18896  fi
18897done
18898  done
18899IFS=$as_save_IFS
18900
18901  ;;
18902esac
18903fi
18904XATTR=$ac_cv_path_XATTR
18905if test -n "$XATTR"; then
18906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18907$as_echo "$XATTR" >&6; }
18908else
18909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18910$as_echo "no" >&6; }
18911fi
18912
18913
18914        if test "x$XATTR" = x; then
18915          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18916        fi
18917      else
18918        # Otherwise we believe it is a complete path. Use it as it is.
18919        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18920$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18922$as_echo_n "checking for XATTR... " >&6; }
18923        if test ! -x "$tool_specified"; then
18924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18925$as_echo "not found" >&6; }
18926          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18927        fi
18928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18929$as_echo "$tool_specified" >&6; }
18930      fi
18931    fi
18932  fi
18933
18934
18935
18936  if test "x$XATTR" = x; then
18937    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18938  fi
18939
18940
18941
18942
18943  # Publish this variable in the help.
18944
18945
18946  if test "x$CODESIGN" = x; then
18947    # The variable is not set by user, try to locate tool using the code snippet
18948    for ac_prog in codesign
18949do
18950  # Extract the first word of "$ac_prog", so it can be a program name with args.
18951set dummy $ac_prog; ac_word=$2
18952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18953$as_echo_n "checking for $ac_word... " >&6; }
18954if ${ac_cv_path_CODESIGN+:} false; then :
18955  $as_echo_n "(cached) " >&6
18956else
18957  case $CODESIGN in
18958  [\\/]* | ?:[\\/]*)
18959  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18960  ;;
18961  *)
18962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18963for as_dir in $PATH
18964do
18965  IFS=$as_save_IFS
18966  test -z "$as_dir" && as_dir=.
18967    for ac_exec_ext in '' $ac_executable_extensions; do
18968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18969    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18971    break 2
18972  fi
18973done
18974  done
18975IFS=$as_save_IFS
18976
18977  ;;
18978esac
18979fi
18980CODESIGN=$ac_cv_path_CODESIGN
18981if test -n "$CODESIGN"; then
18982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18983$as_echo "$CODESIGN" >&6; }
18984else
18985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18986$as_echo "no" >&6; }
18987fi
18988
18989
18990  test -n "$CODESIGN" && break
18991done
18992
18993  else
18994    # The variable is set, but is it from the command line or the environment?
18995
18996    # Try to remove the string !CODESIGN! from our list.
18997    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18998    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18999      # If it failed, the variable was not from the command line. Ignore it,
19000      # but warn the user (except for BASH, which is always set by the calling BASH).
19001      if test "xCODESIGN" != xBASH; then
19002        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19003$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19004      fi
19005      # Try to locate tool using the code snippet
19006      for ac_prog in codesign
19007do
19008  # Extract the first word of "$ac_prog", so it can be a program name with args.
19009set dummy $ac_prog; ac_word=$2
19010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19011$as_echo_n "checking for $ac_word... " >&6; }
19012if ${ac_cv_path_CODESIGN+:} false; then :
19013  $as_echo_n "(cached) " >&6
19014else
19015  case $CODESIGN in
19016  [\\/]* | ?:[\\/]*)
19017  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19018  ;;
19019  *)
19020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19021for as_dir in $PATH
19022do
19023  IFS=$as_save_IFS
19024  test -z "$as_dir" && as_dir=.
19025    for ac_exec_ext in '' $ac_executable_extensions; do
19026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19027    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19029    break 2
19030  fi
19031done
19032  done
19033IFS=$as_save_IFS
19034
19035  ;;
19036esac
19037fi
19038CODESIGN=$ac_cv_path_CODESIGN
19039if test -n "$CODESIGN"; then
19040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19041$as_echo "$CODESIGN" >&6; }
19042else
19043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19044$as_echo "no" >&6; }
19045fi
19046
19047
19048  test -n "$CODESIGN" && break
19049done
19050
19051    else
19052      # If it succeeded, then it was overridden by the user. We will use it
19053      # for the tool.
19054
19055      # First remove it from the list of overridden variables, so we can test
19056      # for unknown variables in the end.
19057      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19058
19059      # Check if the provided tool contains a complete path.
19060      tool_specified="$CODESIGN"
19061      tool_basename="${tool_specified##*/}"
19062      if test "x$tool_basename" = "x$tool_specified"; then
19063        # A command without a complete path is provided, search $PATH.
19064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19065$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19066        # Extract the first word of "$tool_basename", so it can be a program name with args.
19067set dummy $tool_basename; ac_word=$2
19068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19069$as_echo_n "checking for $ac_word... " >&6; }
19070if ${ac_cv_path_CODESIGN+:} false; then :
19071  $as_echo_n "(cached) " >&6
19072else
19073  case $CODESIGN in
19074  [\\/]* | ?:[\\/]*)
19075  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19076  ;;
19077  *)
19078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19079for as_dir in $PATH
19080do
19081  IFS=$as_save_IFS
19082  test -z "$as_dir" && as_dir=.
19083    for ac_exec_ext in '' $ac_executable_extensions; do
19084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19085    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19087    break 2
19088  fi
19089done
19090  done
19091IFS=$as_save_IFS
19092
19093  ;;
19094esac
19095fi
19096CODESIGN=$ac_cv_path_CODESIGN
19097if test -n "$CODESIGN"; then
19098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19099$as_echo "$CODESIGN" >&6; }
19100else
19101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19102$as_echo "no" >&6; }
19103fi
19104
19105
19106        if test "x$CODESIGN" = x; then
19107          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19108        fi
19109      else
19110        # Otherwise we believe it is a complete path. Use it as it is.
19111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19112$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19114$as_echo_n "checking for CODESIGN... " >&6; }
19115        if test ! -x "$tool_specified"; then
19116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19117$as_echo "not found" >&6; }
19118          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19119        fi
19120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19121$as_echo "$tool_specified" >&6; }
19122      fi
19123    fi
19124  fi
19125
19126
19127    if test "x$CODESIGN" != "x"; then
19128      # Verify that the openjdk_codesign certificate is present
19129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19130$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19131      rm -f codesign-testfile
19132      touch codesign-testfile
19133      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19134      rm -f codesign-testfile
19135      if test "x$CODESIGN" = x; then
19136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19137$as_echo "no" >&6; }
19138      else
19139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19140$as_echo "yes" >&6; }
19141      fi
19142    fi
19143  fi
19144
19145
19146# Check if pkg-config is available.
19147
19148
19149if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19150	if test -n "$ac_tool_prefix"; then
19151  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19152set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19154$as_echo_n "checking for $ac_word... " >&6; }
19155if ${ac_cv_path_PKG_CONFIG+:} false; then :
19156  $as_echo_n "(cached) " >&6
19157else
19158  case $PKG_CONFIG in
19159  [\\/]* | ?:[\\/]*)
19160  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19161  ;;
19162  *)
19163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19164for as_dir in $PATH
19165do
19166  IFS=$as_save_IFS
19167  test -z "$as_dir" && as_dir=.
19168    for ac_exec_ext in '' $ac_executable_extensions; do
19169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19170    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19172    break 2
19173  fi
19174done
19175  done
19176IFS=$as_save_IFS
19177
19178  ;;
19179esac
19180fi
19181PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19182if test -n "$PKG_CONFIG"; then
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19184$as_echo "$PKG_CONFIG" >&6; }
19185else
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187$as_echo "no" >&6; }
19188fi
19189
19190
19191fi
19192if test -z "$ac_cv_path_PKG_CONFIG"; then
19193  ac_pt_PKG_CONFIG=$PKG_CONFIG
19194  # Extract the first word of "pkg-config", so it can be a program name with args.
19195set dummy pkg-config; ac_word=$2
19196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19197$as_echo_n "checking for $ac_word... " >&6; }
19198if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19199  $as_echo_n "(cached) " >&6
19200else
19201  case $ac_pt_PKG_CONFIG in
19202  [\\/]* | ?:[\\/]*)
19203  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19204  ;;
19205  *)
19206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19207for as_dir in $PATH
19208do
19209  IFS=$as_save_IFS
19210  test -z "$as_dir" && as_dir=.
19211    for ac_exec_ext in '' $ac_executable_extensions; do
19212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19213    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19215    break 2
19216  fi
19217done
19218  done
19219IFS=$as_save_IFS
19220
19221  ;;
19222esac
19223fi
19224ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19225if test -n "$ac_pt_PKG_CONFIG"; then
19226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19227$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19228else
19229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19230$as_echo "no" >&6; }
19231fi
19232
19233  if test "x$ac_pt_PKG_CONFIG" = x; then
19234    PKG_CONFIG=""
19235  else
19236    case $cross_compiling:$ac_tool_warned in
19237yes:)
19238{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19239$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19240ac_tool_warned=yes ;;
19241esac
19242    PKG_CONFIG=$ac_pt_PKG_CONFIG
19243  fi
19244else
19245  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19246fi
19247
19248fi
19249if test -n "$PKG_CONFIG"; then
19250	_pkg_min_version=0.9.0
19251	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19252$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19253	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19254		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19255$as_echo "yes" >&6; }
19256	else
19257		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19258$as_echo "no" >&6; }
19259		PKG_CONFIG=""
19260	fi
19261
19262fi
19263
19264# After basic tools have been setup, we can check build os specific details.
19265
19266  ###############################################################################
19267
19268  # Note that this is the build platform OS version!
19269
19270  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19271  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19272  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19273  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19274
19275
19276
19277
19278
19279# Setup builddeps, for automatic downloading of tools we need.
19280# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19281# boot-jdk setup, but we need to have basic tools setup first.
19282
19283
19284# Check whether --with-builddeps-conf was given.
19285if test "${with_builddeps_conf+set}" = set; then :
19286  withval=$with_builddeps_conf;
19287fi
19288
19289
19290
19291# Check whether --with-builddeps-server was given.
19292if test "${with_builddeps_server+set}" = set; then :
19293  withval=$with_builddeps_server;
19294fi
19295
19296
19297
19298# Check whether --with-builddeps-dir was given.
19299if test "${with_builddeps_dir+set}" = set; then :
19300  withval=$with_builddeps_dir;
19301else
19302  with_builddeps_dir=/localhome/builddeps
19303fi
19304
19305
19306
19307# Check whether --with-builddeps-group was given.
19308if test "${with_builddeps_group+set}" = set; then :
19309  withval=$with_builddeps_group;
19310fi
19311
19312
19313
19314
19315  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19316    if test "x$with_builddeps_conf" != x; then
19317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19318$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19319      builddepsfile=$with_builddeps_conf
19320      if test -s $builddepsfile; then
19321        . $builddepsfile
19322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19323$as_echo "loaded!" >&6; }
19324      else
19325        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19326      fi
19327    else
19328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19329$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19330      builddepsfile=`mktemp`
19331      touch $builddepsfile
19332      # Put all found confs into a single file.
19333      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19334      # Source the file to acquire the variables
19335      if test -s $builddepsfile; then
19336        . $builddepsfile
19337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19338$as_echo "found at least one!" >&6; }
19339      else
19340        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19341      fi
19342    fi
19343    # Create build and target names that use _ instead of "-" and ".".
19344    # This is necessary to use them in variable names.
19345    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19346    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19347    # Extract rewrite information for build and target
19348    eval rewritten_build=\${REWRITE_${build_var}}
19349    if test "x$rewritten_build" = x; then
19350      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19351      echo Build stays the same $rewritten_build
19352    else
19353      echo Rewriting build for builddeps into $rewritten_build
19354    fi
19355    eval rewritten_target=\${REWRITE_${target_var}}
19356    if test "x$rewritten_target" = x; then
19357      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19358      echo Target stays the same $rewritten_target
19359    else
19360      echo Rewriting target for builddeps into $rewritten_target
19361    fi
19362    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19363    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19364  fi
19365  for ac_prog in 7z unzip
19366do
19367  # Extract the first word of "$ac_prog", so it can be a program name with args.
19368set dummy $ac_prog; ac_word=$2
19369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19370$as_echo_n "checking for $ac_word... " >&6; }
19371if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19372  $as_echo_n "(cached) " >&6
19373else
19374  if test -n "$BDEPS_UNZIP"; then
19375  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19376else
19377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19378for as_dir in $PATH
19379do
19380  IFS=$as_save_IFS
19381  test -z "$as_dir" && as_dir=.
19382    for ac_exec_ext in '' $ac_executable_extensions; do
19383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19384    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19386    break 2
19387  fi
19388done
19389  done
19390IFS=$as_save_IFS
19391
19392fi
19393fi
19394BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19395if test -n "$BDEPS_UNZIP"; then
19396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19397$as_echo "$BDEPS_UNZIP" >&6; }
19398else
19399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19400$as_echo "no" >&6; }
19401fi
19402
19403
19404  test -n "$BDEPS_UNZIP" && break
19405done
19406
19407  if test "x$BDEPS_UNZIP" = x7z; then
19408    BDEPS_UNZIP="7z x"
19409  fi
19410
19411  for ac_prog in wget lftp ftp
19412do
19413  # Extract the first word of "$ac_prog", so it can be a program name with args.
19414set dummy $ac_prog; ac_word=$2
19415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19416$as_echo_n "checking for $ac_word... " >&6; }
19417if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19418  $as_echo_n "(cached) " >&6
19419else
19420  if test -n "$BDEPS_FTP"; then
19421  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19422else
19423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19424for as_dir in $PATH
19425do
19426  IFS=$as_save_IFS
19427  test -z "$as_dir" && as_dir=.
19428    for ac_exec_ext in '' $ac_executable_extensions; do
19429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19430    ac_cv_prog_BDEPS_FTP="$ac_prog"
19431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19432    break 2
19433  fi
19434done
19435  done
19436IFS=$as_save_IFS
19437
19438fi
19439fi
19440BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19441if test -n "$BDEPS_FTP"; then
19442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19443$as_echo "$BDEPS_FTP" >&6; }
19444else
19445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19446$as_echo "no" >&6; }
19447fi
19448
19449
19450  test -n "$BDEPS_FTP" && break
19451done
19452
19453
19454
19455###############################################################################
19456#
19457# Determine OpenJDK variants, options and version numbers.
19458#
19459###############################################################################
19460
19461# We need build & target for this.
19462
19463
19464  ###############################################################################
19465  #
19466  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19467  # We always build headless support.
19468  #
19469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19470$as_echo_n "checking headful support... " >&6; }
19471  # Check whether --enable-headful was given.
19472if test "${enable_headful+set}" = set; then :
19473  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19474else
19475  SUPPORT_HEADFUL=yes
19476fi
19477
19478
19479  SUPPORT_HEADLESS=yes
19480  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19481
19482  if test "x$SUPPORT_HEADFUL" = xyes; then
19483    # We are building both headful and headless.
19484    headful_msg="include support for both headful and headless"
19485  fi
19486
19487  if test "x$SUPPORT_HEADFUL" = xno; then
19488    # Thus we are building headless only.
19489    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19490    headful_msg="headless only"
19491  fi
19492
19493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19494$as_echo "$headful_msg" >&6; }
19495
19496
19497
19498
19499
19500  # Control wether Hotspot runs Queens test after build.
19501  # Check whether --enable-hotspot-test-in-build was given.
19502if test "${enable_hotspot_test_in_build+set}" = set; then :
19503  enableval=$enable_hotspot_test_in_build;
19504else
19505  enable_hotspot_test_in_build=no
19506fi
19507
19508  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19509    TEST_IN_BUILD=true
19510  else
19511    TEST_IN_BUILD=false
19512  fi
19513
19514
19515  ###############################################################################
19516  #
19517  # Choose cacerts source file
19518  #
19519
19520# Check whether --with-cacerts-file was given.
19521if test "${with_cacerts_file+set}" = set; then :
19522  withval=$with_cacerts_file;
19523fi
19524
19525  if test "x$with_cacerts_file" != x; then
19526    CACERTS_FILE=$with_cacerts_file
19527  else
19528    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19529  fi
19530
19531
19532  ###############################################################################
19533  #
19534  # Enable or disable unlimited crypto
19535  #
19536  # Check whether --enable-unlimited-crypto was given.
19537if test "${enable_unlimited_crypto+set}" = set; then :
19538  enableval=$enable_unlimited_crypto;
19539else
19540  enable_unlimited_crypto=no
19541fi
19542
19543  if test "x$enable_unlimited_crypto" = "xyes"; then
19544    UNLIMITED_CRYPTO=true
19545  else
19546    UNLIMITED_CRYPTO=false
19547  fi
19548
19549
19550  ###############################################################################
19551  #
19552  # Enable or disable the elliptic curve crypto implementation
19553  #
19554
19555
19556  ###############################################################################
19557  #
19558  # --enable-rmiconnector-iiop
19559  #
19560  # Check whether --enable-rmiconnector-iiop was given.
19561if test "${enable_rmiconnector_iiop+set}" = set; then :
19562  enableval=$enable_rmiconnector_iiop;
19563fi
19564
19565  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19566    RMICONNECTOR_IIOP=true
19567  else
19568    RMICONNECTOR_IIOP=false
19569  fi
19570
19571
19572  ###############################################################################
19573  #
19574  # Compress jars
19575  #
19576  COMPRESS_JARS=false
19577
19578
19579
19580
19581  # Source the version numbers
19582  . $AUTOCONF_DIR/version-numbers
19583
19584  # Get the settings from parameters
19585
19586# Check whether --with-milestone was given.
19587if test "${with_milestone+set}" = set; then :
19588  withval=$with_milestone;
19589fi
19590
19591  if test "x$with_milestone" = xyes; then
19592    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19593  elif test "x$with_milestone" != x; then
19594    MILESTONE="$with_milestone"
19595  fi
19596  if test "x$MILESTONE" = x; then
19597    MILESTONE=internal
19598  fi
19599
19600
19601# Check whether --with-update-version was given.
19602if test "${with_update_version+set}" = set; then :
19603  withval=$with_update_version;
19604fi
19605
19606  if test "x$with_update_version" = xyes; then
19607    as_fn_error $? "Update version must have a value" "$LINENO" 5
19608  elif test "x$with_update_version" != x; then
19609    JDK_UPDATE_VERSION="$with_update_version"
19610    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19611    # to a bug in expr (which reduces it to just X). To work around this, we
19612    # always add a 0 to one digit update versions.
19613    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19614      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19615    fi
19616  fi
19617
19618
19619# Check whether --with-user-release-suffix was given.
19620if test "${with_user_release_suffix+set}" = set; then :
19621  withval=$with_user_release_suffix;
19622fi
19623
19624  if test "x$with_user_release_suffix" = xyes; then
19625    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19626  elif test "x$with_user_release_suffix" != x; then
19627    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19628  fi
19629
19630
19631# Check whether --with-build-number was given.
19632if test "${with_build_number+set}" = set; then :
19633  withval=$with_build_number;
19634fi
19635
19636  if test "x$with_build_number" = xyes; then
19637    as_fn_error $? "Build number must have a value" "$LINENO" 5
19638  elif test "x$with_build_number" != x; then
19639    JDK_BUILD_NUMBER="$with_build_number"
19640  fi
19641  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19642  if test "x$JDK_BUILD_NUMBER" = x; then
19643    JDK_BUILD_NUMBER=b00
19644    if test "x$USER_RELEASE_SUFFIX" = x; then
19645      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19646      # Avoid [:alnum:] since it depends on the locale.
19647      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19648      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19649    fi
19650  fi
19651
19652  # Now set the JDK version, milestone, build number etc.
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668  COPYRIGHT_YEAR=`date +'%Y'`
19669
19670
19671  if test "x$JDK_UPDATE_VERSION" != x; then
19672    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19673  else
19674    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19675  fi
19676
19677
19678  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19679
19680
19681
19682###############################################################################
19683#
19684# Setup BootJDK, used to bootstrap the build.
19685#
19686###############################################################################
19687
19688
19689  BOOT_JDK_FOUND=no
19690
19691# Check whether --with-boot-jdk was given.
19692if test "${with_boot_jdk+set}" = set; then :
19693  withval=$with_boot_jdk;
19694fi
19695
19696
19697  # We look for the Boot JDK through various means, going from more certain to
19698  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19699  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19700  # must check if this is indeed valid; otherwise we'll continue looking.
19701
19702  # Test: Is bootjdk explicitely set by command line arguments?
19703
19704  if test "x$BOOT_JDK_FOUND" = xno; then
19705    # Now execute the test
19706
19707  if test "x$with_boot_jdk" != x; then
19708    BOOT_JDK=$with_boot_jdk
19709    BOOT_JDK_FOUND=maybe
19710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19711$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19712  fi
19713
19714
19715    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19716    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19717      # Do we have a bin/java?
19718      if test ! -x "$BOOT_JDK/bin/java"; then
19719        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19721        BOOT_JDK_FOUND=no
19722      else
19723        # Do we have a bin/javac?
19724        if test ! -x "$BOOT_JDK/bin/javac"; then
19725          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19727          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19728$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19729          BOOT_JDK_FOUND=no
19730        else
19731          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19732          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19735            BOOT_JDK_FOUND=no
19736          else
19737            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19738            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19739
19740            # Extra M4 quote needed to protect [] in grep expression.
19741            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19742            if test "x$FOUND_CORRECT_VERSION" = x; then
19743              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19745              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19746$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19747              BOOT_JDK_FOUND=no
19748            else
19749              # We're done! :-)
19750              BOOT_JDK_FOUND=yes
19751
19752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19753
19754  # Input might be given as Windows format, start by converting to
19755  # unix format.
19756  path="$BOOT_JDK"
19757  new_path=`$CYGPATH -u "$path"`
19758
19759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19762  # "foo.exe" is OK but "foo" is an error.
19763  #
19764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19765  # It is also a way to make sure we got the proper file name for the real test later on.
19766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19767  if test "x$test_shortpath" = x; then
19768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19771  fi
19772
19773  # Call helper function which possibly converts this using DOS-style short mode.
19774  # If so, the updated path is stored in $new_path.
19775
19776  input_path="$new_path"
19777  # Check if we need to convert this using DOS-style short mode. If the path
19778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19779  # take no chances and rewrite it.
19780  # Note: m4 eats our [], so we need to use [ and ] instead.
19781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19782  if test "x$has_forbidden_chars" != x; then
19783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19787      # Going to short mode and back again did indeed matter. Since short mode is
19788      # case insensitive, let's make it lowercase to improve readability.
19789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19790      # Now convert it back to Unix-stile (cygpath)
19791      input_path=`$CYGPATH -u "$shortmode_path"`
19792      new_path="$input_path"
19793    fi
19794  fi
19795
19796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19797  if test "x$test_cygdrive_prefix" = x; then
19798    # As a simple fix, exclude /usr/bin since it's not a real path.
19799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19801      # a path prefixed by /cygdrive for fixpath to work.
19802      new_path="$CYGWIN_ROOT_PATH$input_path"
19803    fi
19804  fi
19805
19806
19807  if test "x$path" != "x$new_path"; then
19808    BOOT_JDK="$new_path"
19809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19811  fi
19812
19813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19814
19815  path="$BOOT_JDK"
19816  has_colon=`$ECHO $path | $GREP ^.:`
19817  new_path="$path"
19818  if test "x$has_colon" = x; then
19819    # Not in mixed or Windows style, start by that.
19820    new_path=`cmd //c echo $path`
19821  fi
19822
19823
19824  input_path="$new_path"
19825  # Check if we need to convert this using DOS-style short mode. If the path
19826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19827  # take no chances and rewrite it.
19828  # Note: m4 eats our [], so we need to use [ and ] instead.
19829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19830  if test "x$has_forbidden_chars" != x; then
19831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19833  fi
19834
19835
19836  windows_path="$new_path"
19837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19838    unix_path=`$CYGPATH -u "$windows_path"`
19839    new_path="$unix_path"
19840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19842    new_path="$unix_path"
19843  fi
19844
19845  if test "x$path" != "x$new_path"; then
19846    BOOT_JDK="$new_path"
19847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19849  fi
19850
19851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19853
19854  else
19855    # We're on a posix platform. Hooray! :)
19856    path="$BOOT_JDK"
19857    has_space=`$ECHO "$path" | $GREP " "`
19858    if test "x$has_space" != x; then
19859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19861      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19862    fi
19863
19864    # Use eval to expand a potential ~
19865    eval path="$path"
19866    if test ! -f "$path" && test ! -d "$path"; then
19867      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19868    fi
19869
19870    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19871  fi
19872
19873              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19874$as_echo_n "checking for Boot JDK... " >&6; }
19875              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19876$as_echo "$BOOT_JDK" >&6; }
19877              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19878$as_echo_n "checking Boot JDK version... " >&6; }
19879              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19880              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19881$as_echo "$BOOT_JDK_VERSION" >&6; }
19882            fi # end check jdk version
19883          fi # end check rt.jar
19884        fi # end check javac
19885      fi # end check java
19886    fi # end check boot jdk found
19887  fi
19888
19889  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19890    # Having specified an argument which is incorrect will produce an instant failure;
19891    # we should not go on looking
19892    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19893  fi
19894
19895  # Test: Is bootjdk available from builddeps?
19896
19897  if test "x$BOOT_JDK_FOUND" = xno; then
19898    # Now execute the test
19899
19900
19901
19902  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19903    # Source the builddeps file again, to make sure it uses the latest variables!
19904    . $builddepsfile
19905    # Look for a target and build machine specific resource!
19906    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19907    if test "x$resource" = x; then
19908      # Ok, lets instead look for a target specific resource
19909      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19910    fi
19911    if test "x$resource" = x; then
19912      # Ok, lets instead look for a build specific resource
19913      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19914    fi
19915    if test "x$resource" = x; then
19916      # Ok, lets instead look for a generic resource
19917      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19918      resource=${builddep_bootjdk}
19919    fi
19920    if test "x$resource" != x; then
19921      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19922$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19923      # If the resource in the builddeps.conf file is an existing directory,
19924      # for example /java/linux/cups
19925      if test -d ${resource}; then
19926        depdir=${resource}
19927      else
19928
19929  # bootjdk is for example mymodule
19930  # $resource is for example libs/general/libmymod_1_2_3.zip
19931  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19932  # $with_builddeps_dir is for example /localhome/builddeps
19933  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19934  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19935  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19936  filename=`basename $resource`
19937  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19938  filebase=${filename%%.*}
19939  extension=${filename#*.}
19940  installdir=$with_builddeps_dir/$filebase
19941  if test ! -f $installdir/$filename.unpacked; then
19942    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19943$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19944    if test ! -d $installdir; then
19945      mkdir -p $installdir
19946    fi
19947    if test ! -d $installdir; then
19948      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19949    fi
19950    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19951    touch $tmpfile
19952    if test ! -f $tmpfile; then
19953      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19954    fi
19955
19956  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19957  # $tmpfile is the local file name for the downloaded file.
19958  VALID_TOOL=no
19959  if test "x$BDEPS_FTP" = xwget; then
19960    VALID_TOOL=yes
19961    wget -O $tmpfile $with_builddeps_server/$resource
19962  fi
19963  if test "x$BDEPS_FTP" = xlftp; then
19964    VALID_TOOL=yes
19965    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19966  fi
19967  if test "x$BDEPS_FTP" = xftp; then
19968    VALID_TOOL=yes
19969    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19970    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19971    FTPUSERPWD=${FTPSERVER%%@*}
19972    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19973      FTPUSER=${userpwd%%:*}
19974      FTPPWD=${userpwd#*@}
19975      FTPSERVER=${FTPSERVER#*@}
19976    else
19977      FTPUSER=ftp
19978      FTPPWD=ftp
19979    fi
19980    # the "pass" command does not work on some
19981    # ftp clients (read ftp.exe) but if it works,
19982    # passive mode is better!
19983    ( \
19984        echo "user $FTPUSER $FTPPWD"        ; \
19985        echo "pass"                         ; \
19986        echo "bin"                          ; \
19987        echo "get $FTPPATH $tmpfile"              ; \
19988    ) | ftp -in $FTPSERVER
19989  fi
19990  if test "x$VALID_TOOL" != xyes; then
19991    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19992  fi
19993
19994    mv $tmpfile $installdir/$filename
19995    if test ! -s $installdir/$filename; then
19996      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19997    fi
19998    case "$extension" in
19999      zip)  echo "Unzipping $installdir/$filename..."
20000        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20001        ;;
20002      tar.gz) echo "Untaring $installdir/$filename..."
20003        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20004        ;;
20005      tgz) echo "Untaring $installdir/$filename..."
20006        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20007        ;;
20008      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20009        ;;
20010    esac
20011  fi
20012  if test -f $installdir/$filename.unpacked; then
20013    depdir=$installdir
20014  fi
20015
20016      fi
20017      # Source the builddeps file again, because in the previous command, the depdir
20018      # was updated to point at the current build dependency install directory.
20019      . $builddepsfile
20020      # Now extract variables from the builddeps.conf files.
20021      theroot=${builddep_bootjdk_ROOT}
20022      thecflags=${builddep_bootjdk_CFLAGS}
20023      thelibs=${builddep_bootjdk_LIBS}
20024      if test "x$depdir" = x; then
20025        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20026      fi
20027      BOOT_JDK=$depdir
20028      if test "x$theroot" != x; then
20029        BOOT_JDK="$theroot"
20030      fi
20031      if test "x$thecflags" != x; then
20032        BOOT_JDK_CFLAGS="$thecflags"
20033      fi
20034      if test "x$thelibs" != x; then
20035        BOOT_JDK_LIBS="$thelibs"
20036      fi
20037      BOOT_JDK_FOUND=maybe
20038      else BOOT_JDK_FOUND=no
20039
20040    fi
20041    else BOOT_JDK_FOUND=no
20042
20043  fi
20044
20045
20046
20047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20049      # Do we have a bin/java?
20050      if test ! -x "$BOOT_JDK/bin/java"; then
20051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20053        BOOT_JDK_FOUND=no
20054      else
20055        # Do we have a bin/javac?
20056        if test ! -x "$BOOT_JDK/bin/javac"; then
20057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20061          BOOT_JDK_FOUND=no
20062        else
20063          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20064          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20065            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20067            BOOT_JDK_FOUND=no
20068          else
20069            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20071
20072            # Extra M4 quote needed to protect [] in grep expression.
20073            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20074            if test "x$FOUND_CORRECT_VERSION" = x; then
20075              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20077              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20078$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20079              BOOT_JDK_FOUND=no
20080            else
20081              # We're done! :-)
20082              BOOT_JDK_FOUND=yes
20083
20084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20085
20086  # Input might be given as Windows format, start by converting to
20087  # unix format.
20088  path="$BOOT_JDK"
20089  new_path=`$CYGPATH -u "$path"`
20090
20091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20094  # "foo.exe" is OK but "foo" is an error.
20095  #
20096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20097  # It is also a way to make sure we got the proper file name for the real test later on.
20098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20099  if test "x$test_shortpath" = x; then
20100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20103  fi
20104
20105  # Call helper function which possibly converts this using DOS-style short mode.
20106  # If so, the updated path is stored in $new_path.
20107
20108  input_path="$new_path"
20109  # Check if we need to convert this using DOS-style short mode. If the path
20110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20111  # take no chances and rewrite it.
20112  # Note: m4 eats our [], so we need to use [ and ] instead.
20113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20114  if test "x$has_forbidden_chars" != x; then
20115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20119      # Going to short mode and back again did indeed matter. Since short mode is
20120      # case insensitive, let's make it lowercase to improve readability.
20121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20122      # Now convert it back to Unix-stile (cygpath)
20123      input_path=`$CYGPATH -u "$shortmode_path"`
20124      new_path="$input_path"
20125    fi
20126  fi
20127
20128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20129  if test "x$test_cygdrive_prefix" = x; then
20130    # As a simple fix, exclude /usr/bin since it's not a real path.
20131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20133      # a path prefixed by /cygdrive for fixpath to work.
20134      new_path="$CYGWIN_ROOT_PATH$input_path"
20135    fi
20136  fi
20137
20138
20139  if test "x$path" != "x$new_path"; then
20140    BOOT_JDK="$new_path"
20141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20143  fi
20144
20145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20146
20147  path="$BOOT_JDK"
20148  has_colon=`$ECHO $path | $GREP ^.:`
20149  new_path="$path"
20150  if test "x$has_colon" = x; then
20151    # Not in mixed or Windows style, start by that.
20152    new_path=`cmd //c echo $path`
20153  fi
20154
20155
20156  input_path="$new_path"
20157  # Check if we need to convert this using DOS-style short mode. If the path
20158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20159  # take no chances and rewrite it.
20160  # Note: m4 eats our [], so we need to use [ and ] instead.
20161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20162  if test "x$has_forbidden_chars" != x; then
20163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20165  fi
20166
20167
20168  windows_path="$new_path"
20169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20170    unix_path=`$CYGPATH -u "$windows_path"`
20171    new_path="$unix_path"
20172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20174    new_path="$unix_path"
20175  fi
20176
20177  if test "x$path" != "x$new_path"; then
20178    BOOT_JDK="$new_path"
20179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20181  fi
20182
20183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20185
20186  else
20187    # We're on a posix platform. Hooray! :)
20188    path="$BOOT_JDK"
20189    has_space=`$ECHO "$path" | $GREP " "`
20190    if test "x$has_space" != x; then
20191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20194    fi
20195
20196    # Use eval to expand a potential ~
20197    eval path="$path"
20198    if test ! -f "$path" && test ! -d "$path"; then
20199      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20200    fi
20201
20202    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20203  fi
20204
20205              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20206$as_echo_n "checking for Boot JDK... " >&6; }
20207              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20208$as_echo "$BOOT_JDK" >&6; }
20209              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20210$as_echo_n "checking Boot JDK version... " >&6; }
20211              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20212              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20213$as_echo "$BOOT_JDK_VERSION" >&6; }
20214            fi # end check jdk version
20215          fi # end check rt.jar
20216        fi # end check javac
20217      fi # end check java
20218    fi # end check boot jdk found
20219  fi
20220
20221
20222  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20223
20224  if test "x$BOOT_JDK_FOUND" = xno; then
20225    # Now execute the test
20226
20227  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20228    # First check at user selected default
20229
20230  if test "x$BOOT_JDK_FOUND" = xno; then
20231    # Now execute the test
20232
20233  if test -x /usr/libexec/java_home; then
20234    BOOT_JDK=`/usr/libexec/java_home `
20235    BOOT_JDK_FOUND=maybe
20236    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20237$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20238  fi
20239
20240
20241    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20242    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20243      # Do we have a bin/java?
20244      if test ! -x "$BOOT_JDK/bin/java"; then
20245        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20247        BOOT_JDK_FOUND=no
20248      else
20249        # Do we have a bin/javac?
20250        if test ! -x "$BOOT_JDK/bin/javac"; then
20251          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20253          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20254$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20255          BOOT_JDK_FOUND=no
20256        else
20257          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20258          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20259            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20261            BOOT_JDK_FOUND=no
20262          else
20263            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20264            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20265
20266            # Extra M4 quote needed to protect [] in grep expression.
20267            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20268            if test "x$FOUND_CORRECT_VERSION" = x; then
20269              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20271              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20272$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20273              BOOT_JDK_FOUND=no
20274            else
20275              # We're done! :-)
20276              BOOT_JDK_FOUND=yes
20277
20278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20279
20280  # Input might be given as Windows format, start by converting to
20281  # unix format.
20282  path="$BOOT_JDK"
20283  new_path=`$CYGPATH -u "$path"`
20284
20285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20288  # "foo.exe" is OK but "foo" is an error.
20289  #
20290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20291  # It is also a way to make sure we got the proper file name for the real test later on.
20292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20293  if test "x$test_shortpath" = x; then
20294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20296    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20297  fi
20298
20299  # Call helper function which possibly converts this using DOS-style short mode.
20300  # If so, the updated path is stored in $new_path.
20301
20302  input_path="$new_path"
20303  # Check if we need to convert this using DOS-style short mode. If the path
20304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20305  # take no chances and rewrite it.
20306  # Note: m4 eats our [], so we need to use [ and ] instead.
20307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20308  if test "x$has_forbidden_chars" != x; then
20309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20313      # Going to short mode and back again did indeed matter. Since short mode is
20314      # case insensitive, let's make it lowercase to improve readability.
20315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20316      # Now convert it back to Unix-stile (cygpath)
20317      input_path=`$CYGPATH -u "$shortmode_path"`
20318      new_path="$input_path"
20319    fi
20320  fi
20321
20322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20323  if test "x$test_cygdrive_prefix" = x; then
20324    # As a simple fix, exclude /usr/bin since it's not a real path.
20325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20327      # a path prefixed by /cygdrive for fixpath to work.
20328      new_path="$CYGWIN_ROOT_PATH$input_path"
20329    fi
20330  fi
20331
20332
20333  if test "x$path" != "x$new_path"; then
20334    BOOT_JDK="$new_path"
20335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20336$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20337  fi
20338
20339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20340
20341  path="$BOOT_JDK"
20342  has_colon=`$ECHO $path | $GREP ^.:`
20343  new_path="$path"
20344  if test "x$has_colon" = x; then
20345    # Not in mixed or Windows style, start by that.
20346    new_path=`cmd //c echo $path`
20347  fi
20348
20349
20350  input_path="$new_path"
20351  # Check if we need to convert this using DOS-style short mode. If the path
20352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20353  # take no chances and rewrite it.
20354  # Note: m4 eats our [], so we need to use [ and ] instead.
20355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20356  if test "x$has_forbidden_chars" != x; then
20357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20359  fi
20360
20361
20362  windows_path="$new_path"
20363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20364    unix_path=`$CYGPATH -u "$windows_path"`
20365    new_path="$unix_path"
20366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20368    new_path="$unix_path"
20369  fi
20370
20371  if test "x$path" != "x$new_path"; then
20372    BOOT_JDK="$new_path"
20373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20375  fi
20376
20377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20379
20380  else
20381    # We're on a posix platform. Hooray! :)
20382    path="$BOOT_JDK"
20383    has_space=`$ECHO "$path" | $GREP " "`
20384    if test "x$has_space" != x; then
20385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20387      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20388    fi
20389
20390    # Use eval to expand a potential ~
20391    eval path="$path"
20392    if test ! -f "$path" && test ! -d "$path"; then
20393      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20394    fi
20395
20396    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20397  fi
20398
20399              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20400$as_echo_n "checking for Boot JDK... " >&6; }
20401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20402$as_echo "$BOOT_JDK" >&6; }
20403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20404$as_echo_n "checking Boot JDK version... " >&6; }
20405              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20407$as_echo "$BOOT_JDK_VERSION" >&6; }
20408            fi # end check jdk version
20409          fi # end check rt.jar
20410        fi # end check javac
20411      fi # end check java
20412    fi # end check boot jdk found
20413  fi
20414
20415    # If that did not work out (e.g. too old), try explicit versions instead
20416
20417  if test "x$BOOT_JDK_FOUND" = xno; then
20418    # Now execute the test
20419
20420  if test -x /usr/libexec/java_home; then
20421    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20422    BOOT_JDK_FOUND=maybe
20423    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20424$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20425  fi
20426
20427
20428    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20429    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20430      # Do we have a bin/java?
20431      if test ! -x "$BOOT_JDK/bin/java"; then
20432        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20434        BOOT_JDK_FOUND=no
20435      else
20436        # Do we have a bin/javac?
20437        if test ! -x "$BOOT_JDK/bin/javac"; then
20438          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20440          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20441$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20442          BOOT_JDK_FOUND=no
20443        else
20444          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20445          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20448            BOOT_JDK_FOUND=no
20449          else
20450            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20451            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20452
20453            # Extra M4 quote needed to protect [] in grep expression.
20454            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20455            if test "x$FOUND_CORRECT_VERSION" = x; then
20456              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20458              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20459$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20460              BOOT_JDK_FOUND=no
20461            else
20462              # We're done! :-)
20463              BOOT_JDK_FOUND=yes
20464
20465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20466
20467  # Input might be given as Windows format, start by converting to
20468  # unix format.
20469  path="$BOOT_JDK"
20470  new_path=`$CYGPATH -u "$path"`
20471
20472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20475  # "foo.exe" is OK but "foo" is an error.
20476  #
20477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20478  # It is also a way to make sure we got the proper file name for the real test later on.
20479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20480  if test "x$test_shortpath" = x; then
20481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20483    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20484  fi
20485
20486  # Call helper function which possibly converts this using DOS-style short mode.
20487  # If so, the updated path is stored in $new_path.
20488
20489  input_path="$new_path"
20490  # Check if we need to convert this using DOS-style short mode. If the path
20491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20492  # take no chances and rewrite it.
20493  # Note: m4 eats our [], so we need to use [ and ] instead.
20494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20495  if test "x$has_forbidden_chars" != x; then
20496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20500      # Going to short mode and back again did indeed matter. Since short mode is
20501      # case insensitive, let's make it lowercase to improve readability.
20502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20503      # Now convert it back to Unix-stile (cygpath)
20504      input_path=`$CYGPATH -u "$shortmode_path"`
20505      new_path="$input_path"
20506    fi
20507  fi
20508
20509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20510  if test "x$test_cygdrive_prefix" = x; then
20511    # As a simple fix, exclude /usr/bin since it's not a real path.
20512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20514      # a path prefixed by /cygdrive for fixpath to work.
20515      new_path="$CYGWIN_ROOT_PATH$input_path"
20516    fi
20517  fi
20518
20519
20520  if test "x$path" != "x$new_path"; then
20521    BOOT_JDK="$new_path"
20522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20524  fi
20525
20526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20527
20528  path="$BOOT_JDK"
20529  has_colon=`$ECHO $path | $GREP ^.:`
20530  new_path="$path"
20531  if test "x$has_colon" = x; then
20532    # Not in mixed or Windows style, start by that.
20533    new_path=`cmd //c echo $path`
20534  fi
20535
20536
20537  input_path="$new_path"
20538  # Check if we need to convert this using DOS-style short mode. If the path
20539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20540  # take no chances and rewrite it.
20541  # Note: m4 eats our [], so we need to use [ and ] instead.
20542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20543  if test "x$has_forbidden_chars" != x; then
20544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20546  fi
20547
20548
20549  windows_path="$new_path"
20550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20551    unix_path=`$CYGPATH -u "$windows_path"`
20552    new_path="$unix_path"
20553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20555    new_path="$unix_path"
20556  fi
20557
20558  if test "x$path" != "x$new_path"; then
20559    BOOT_JDK="$new_path"
20560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20562  fi
20563
20564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20566
20567  else
20568    # We're on a posix platform. Hooray! :)
20569    path="$BOOT_JDK"
20570    has_space=`$ECHO "$path" | $GREP " "`
20571    if test "x$has_space" != x; then
20572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20574      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20575    fi
20576
20577    # Use eval to expand a potential ~
20578    eval path="$path"
20579    if test ! -f "$path" && test ! -d "$path"; then
20580      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20581    fi
20582
20583    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20584  fi
20585
20586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20587$as_echo_n "checking for Boot JDK... " >&6; }
20588              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20589$as_echo "$BOOT_JDK" >&6; }
20590              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20591$as_echo_n "checking Boot JDK version... " >&6; }
20592              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20593              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20594$as_echo "$BOOT_JDK_VERSION" >&6; }
20595            fi # end check jdk version
20596          fi # end check rt.jar
20597        fi # end check javac
20598      fi # end check java
20599    fi # end check boot jdk found
20600  fi
20601
20602
20603  if test "x$BOOT_JDK_FOUND" = xno; then
20604    # Now execute the test
20605
20606  if test -x /usr/libexec/java_home; then
20607    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20608    BOOT_JDK_FOUND=maybe
20609    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20610$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20611  fi
20612
20613
20614    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20615    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20616      # Do we have a bin/java?
20617      if test ! -x "$BOOT_JDK/bin/java"; then
20618        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20620        BOOT_JDK_FOUND=no
20621      else
20622        # Do we have a bin/javac?
20623        if test ! -x "$BOOT_JDK/bin/javac"; then
20624          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20626          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20627$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20628          BOOT_JDK_FOUND=no
20629        else
20630          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20631          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20632            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20634            BOOT_JDK_FOUND=no
20635          else
20636            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20637            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20638
20639            # Extra M4 quote needed to protect [] in grep expression.
20640            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20641            if test "x$FOUND_CORRECT_VERSION" = x; then
20642              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20644              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20645$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20646              BOOT_JDK_FOUND=no
20647            else
20648              # We're done! :-)
20649              BOOT_JDK_FOUND=yes
20650
20651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20652
20653  # Input might be given as Windows format, start by converting to
20654  # unix format.
20655  path="$BOOT_JDK"
20656  new_path=`$CYGPATH -u "$path"`
20657
20658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20661  # "foo.exe" is OK but "foo" is an error.
20662  #
20663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20664  # It is also a way to make sure we got the proper file name for the real test later on.
20665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20666  if test "x$test_shortpath" = x; then
20667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20670  fi
20671
20672  # Call helper function which possibly converts this using DOS-style short mode.
20673  # If so, the updated path is stored in $new_path.
20674
20675  input_path="$new_path"
20676  # Check if we need to convert this using DOS-style short mode. If the path
20677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20678  # take no chances and rewrite it.
20679  # Note: m4 eats our [], so we need to use [ and ] instead.
20680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20681  if test "x$has_forbidden_chars" != x; then
20682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20686      # Going to short mode and back again did indeed matter. Since short mode is
20687      # case insensitive, let's make it lowercase to improve readability.
20688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20689      # Now convert it back to Unix-stile (cygpath)
20690      input_path=`$CYGPATH -u "$shortmode_path"`
20691      new_path="$input_path"
20692    fi
20693  fi
20694
20695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20696  if test "x$test_cygdrive_prefix" = x; then
20697    # As a simple fix, exclude /usr/bin since it's not a real path.
20698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20700      # a path prefixed by /cygdrive for fixpath to work.
20701      new_path="$CYGWIN_ROOT_PATH$input_path"
20702    fi
20703  fi
20704
20705
20706  if test "x$path" != "x$new_path"; then
20707    BOOT_JDK="$new_path"
20708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20710  fi
20711
20712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20713
20714  path="$BOOT_JDK"
20715  has_colon=`$ECHO $path | $GREP ^.:`
20716  new_path="$path"
20717  if test "x$has_colon" = x; then
20718    # Not in mixed or Windows style, start by that.
20719    new_path=`cmd //c echo $path`
20720  fi
20721
20722
20723  input_path="$new_path"
20724  # Check if we need to convert this using DOS-style short mode. If the path
20725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20726  # take no chances and rewrite it.
20727  # Note: m4 eats our [], so we need to use [ and ] instead.
20728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20729  if test "x$has_forbidden_chars" != x; then
20730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20732  fi
20733
20734
20735  windows_path="$new_path"
20736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20737    unix_path=`$CYGPATH -u "$windows_path"`
20738    new_path="$unix_path"
20739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20741    new_path="$unix_path"
20742  fi
20743
20744  if test "x$path" != "x$new_path"; then
20745    BOOT_JDK="$new_path"
20746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20748  fi
20749
20750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20752
20753  else
20754    # We're on a posix platform. Hooray! :)
20755    path="$BOOT_JDK"
20756    has_space=`$ECHO "$path" | $GREP " "`
20757    if test "x$has_space" != x; then
20758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20760      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20761    fi
20762
20763    # Use eval to expand a potential ~
20764    eval path="$path"
20765    if test ! -f "$path" && test ! -d "$path"; then
20766      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20767    fi
20768
20769    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20770  fi
20771
20772              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20773$as_echo_n "checking for Boot JDK... " >&6; }
20774              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20775$as_echo "$BOOT_JDK" >&6; }
20776              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20777$as_echo_n "checking Boot JDK version... " >&6; }
20778              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20780$as_echo "$BOOT_JDK_VERSION" >&6; }
20781            fi # end check jdk version
20782          fi # end check rt.jar
20783        fi # end check javac
20784      fi # end check java
20785    fi # end check boot jdk found
20786  fi
20787
20788
20789  if test "x$BOOT_JDK_FOUND" = xno; then
20790    # Now execute the test
20791
20792  if test -x /usr/libexec/java_home; then
20793    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20794    BOOT_JDK_FOUND=maybe
20795    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20796$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20797  fi
20798
20799
20800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20802      # Do we have a bin/java?
20803      if test ! -x "$BOOT_JDK/bin/java"; then
20804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20806        BOOT_JDK_FOUND=no
20807      else
20808        # Do we have a bin/javac?
20809        if test ! -x "$BOOT_JDK/bin/javac"; then
20810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20814          BOOT_JDK_FOUND=no
20815        else
20816          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20817          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20820            BOOT_JDK_FOUND=no
20821          else
20822            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20823            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20824
20825            # Extra M4 quote needed to protect [] in grep expression.
20826            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20827            if test "x$FOUND_CORRECT_VERSION" = x; then
20828              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20830              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20831$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20832              BOOT_JDK_FOUND=no
20833            else
20834              # We're done! :-)
20835              BOOT_JDK_FOUND=yes
20836
20837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20838
20839  # Input might be given as Windows format, start by converting to
20840  # unix format.
20841  path="$BOOT_JDK"
20842  new_path=`$CYGPATH -u "$path"`
20843
20844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20847  # "foo.exe" is OK but "foo" is an error.
20848  #
20849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20850  # It is also a way to make sure we got the proper file name for the real test later on.
20851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20852  if test "x$test_shortpath" = x; then
20853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20856  fi
20857
20858  # Call helper function which possibly converts this using DOS-style short mode.
20859  # If so, the updated path is stored in $new_path.
20860
20861  input_path="$new_path"
20862  # Check if we need to convert this using DOS-style short mode. If the path
20863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20864  # take no chances and rewrite it.
20865  # Note: m4 eats our [], so we need to use [ and ] instead.
20866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20867  if test "x$has_forbidden_chars" != x; then
20868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20872      # Going to short mode and back again did indeed matter. Since short mode is
20873      # case insensitive, let's make it lowercase to improve readability.
20874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20875      # Now convert it back to Unix-stile (cygpath)
20876      input_path=`$CYGPATH -u "$shortmode_path"`
20877      new_path="$input_path"
20878    fi
20879  fi
20880
20881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20882  if test "x$test_cygdrive_prefix" = x; then
20883    # As a simple fix, exclude /usr/bin since it's not a real path.
20884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20886      # a path prefixed by /cygdrive for fixpath to work.
20887      new_path="$CYGWIN_ROOT_PATH$input_path"
20888    fi
20889  fi
20890
20891
20892  if test "x$path" != "x$new_path"; then
20893    BOOT_JDK="$new_path"
20894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20896  fi
20897
20898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20899
20900  path="$BOOT_JDK"
20901  has_colon=`$ECHO $path | $GREP ^.:`
20902  new_path="$path"
20903  if test "x$has_colon" = x; then
20904    # Not in mixed or Windows style, start by that.
20905    new_path=`cmd //c echo $path`
20906  fi
20907
20908
20909  input_path="$new_path"
20910  # Check if we need to convert this using DOS-style short mode. If the path
20911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20912  # take no chances and rewrite it.
20913  # Note: m4 eats our [], so we need to use [ and ] instead.
20914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20915  if test "x$has_forbidden_chars" != x; then
20916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20918  fi
20919
20920
20921  windows_path="$new_path"
20922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20923    unix_path=`$CYGPATH -u "$windows_path"`
20924    new_path="$unix_path"
20925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20927    new_path="$unix_path"
20928  fi
20929
20930  if test "x$path" != "x$new_path"; then
20931    BOOT_JDK="$new_path"
20932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20934  fi
20935
20936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20938
20939  else
20940    # We're on a posix platform. Hooray! :)
20941    path="$BOOT_JDK"
20942    has_space=`$ECHO "$path" | $GREP " "`
20943    if test "x$has_space" != x; then
20944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20946      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20947    fi
20948
20949    # Use eval to expand a potential ~
20950    eval path="$path"
20951    if test ! -f "$path" && test ! -d "$path"; then
20952      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20953    fi
20954
20955    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20956  fi
20957
20958              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20959$as_echo_n "checking for Boot JDK... " >&6; }
20960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20961$as_echo "$BOOT_JDK" >&6; }
20962              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20963$as_echo_n "checking Boot JDK version... " >&6; }
20964              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20966$as_echo "$BOOT_JDK_VERSION" >&6; }
20967            fi # end check jdk version
20968          fi # end check rt.jar
20969        fi # end check javac
20970      fi # end check java
20971    fi # end check boot jdk found
20972  fi
20973
20974  fi
20975
20976
20977    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20978    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20979      # Do we have a bin/java?
20980      if test ! -x "$BOOT_JDK/bin/java"; then
20981        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20983        BOOT_JDK_FOUND=no
20984      else
20985        # Do we have a bin/javac?
20986        if test ! -x "$BOOT_JDK/bin/javac"; then
20987          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20989          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20990$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20991          BOOT_JDK_FOUND=no
20992        else
20993          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20994          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20995            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20997            BOOT_JDK_FOUND=no
20998          else
20999            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21000            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21001
21002            # Extra M4 quote needed to protect [] in grep expression.
21003            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21004            if test "x$FOUND_CORRECT_VERSION" = x; then
21005              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21007              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21008$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21009              BOOT_JDK_FOUND=no
21010            else
21011              # We're done! :-)
21012              BOOT_JDK_FOUND=yes
21013
21014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21015
21016  # Input might be given as Windows format, start by converting to
21017  # unix format.
21018  path="$BOOT_JDK"
21019  new_path=`$CYGPATH -u "$path"`
21020
21021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21024  # "foo.exe" is OK but "foo" is an error.
21025  #
21026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21027  # It is also a way to make sure we got the proper file name for the real test later on.
21028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21029  if test "x$test_shortpath" = x; then
21030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21032    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21033  fi
21034
21035  # Call helper function which possibly converts this using DOS-style short mode.
21036  # If so, the updated path is stored in $new_path.
21037
21038  input_path="$new_path"
21039  # Check if we need to convert this using DOS-style short mode. If the path
21040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21041  # take no chances and rewrite it.
21042  # Note: m4 eats our [], so we need to use [ and ] instead.
21043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21044  if test "x$has_forbidden_chars" != x; then
21045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21049      # Going to short mode and back again did indeed matter. Since short mode is
21050      # case insensitive, let's make it lowercase to improve readability.
21051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21052      # Now convert it back to Unix-stile (cygpath)
21053      input_path=`$CYGPATH -u "$shortmode_path"`
21054      new_path="$input_path"
21055    fi
21056  fi
21057
21058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21059  if test "x$test_cygdrive_prefix" = x; then
21060    # As a simple fix, exclude /usr/bin since it's not a real path.
21061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21063      # a path prefixed by /cygdrive for fixpath to work.
21064      new_path="$CYGWIN_ROOT_PATH$input_path"
21065    fi
21066  fi
21067
21068
21069  if test "x$path" != "x$new_path"; then
21070    BOOT_JDK="$new_path"
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21073  fi
21074
21075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21076
21077  path="$BOOT_JDK"
21078  has_colon=`$ECHO $path | $GREP ^.:`
21079  new_path="$path"
21080  if test "x$has_colon" = x; then
21081    # Not in mixed or Windows style, start by that.
21082    new_path=`cmd //c echo $path`
21083  fi
21084
21085
21086  input_path="$new_path"
21087  # Check if we need to convert this using DOS-style short mode. If the path
21088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21089  # take no chances and rewrite it.
21090  # Note: m4 eats our [], so we need to use [ and ] instead.
21091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21092  if test "x$has_forbidden_chars" != x; then
21093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21095  fi
21096
21097
21098  windows_path="$new_path"
21099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21100    unix_path=`$CYGPATH -u "$windows_path"`
21101    new_path="$unix_path"
21102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21104    new_path="$unix_path"
21105  fi
21106
21107  if test "x$path" != "x$new_path"; then
21108    BOOT_JDK="$new_path"
21109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21111  fi
21112
21113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21115
21116  else
21117    # We're on a posix platform. Hooray! :)
21118    path="$BOOT_JDK"
21119    has_space=`$ECHO "$path" | $GREP " "`
21120    if test "x$has_space" != x; then
21121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21122$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21123      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21124    fi
21125
21126    # Use eval to expand a potential ~
21127    eval path="$path"
21128    if test ! -f "$path" && test ! -d "$path"; then
21129      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21130    fi
21131
21132    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21133  fi
21134
21135              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21136$as_echo_n "checking for Boot JDK... " >&6; }
21137              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21138$as_echo "$BOOT_JDK" >&6; }
21139              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21140$as_echo_n "checking Boot JDK version... " >&6; }
21141              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21142              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21143$as_echo "$BOOT_JDK_VERSION" >&6; }
21144            fi # end check jdk version
21145          fi # end check rt.jar
21146        fi # end check javac
21147      fi # end check java
21148    fi # end check boot jdk found
21149  fi
21150
21151
21152  # Test: Is $JAVA_HOME set?
21153
21154  if test "x$BOOT_JDK_FOUND" = xno; then
21155    # Now execute the test
21156
21157  if test "x$JAVA_HOME" != x; then
21158    JAVA_HOME_PROCESSED="$JAVA_HOME"
21159
21160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21161
21162  # Input might be given as Windows format, start by converting to
21163  # unix format.
21164  path="$JAVA_HOME_PROCESSED"
21165  new_path=`$CYGPATH -u "$path"`
21166
21167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21170  # "foo.exe" is OK but "foo" is an error.
21171  #
21172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21173  # It is also a way to make sure we got the proper file name for the real test later on.
21174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21175  if test "x$test_shortpath" = x; then
21176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21177$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21178    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21179  fi
21180
21181  # Call helper function which possibly converts this using DOS-style short mode.
21182  # If so, the updated path is stored in $new_path.
21183
21184  input_path="$new_path"
21185  # Check if we need to convert this using DOS-style short mode. If the path
21186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21187  # take no chances and rewrite it.
21188  # Note: m4 eats our [], so we need to use [ and ] instead.
21189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21190  if test "x$has_forbidden_chars" != x; then
21191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21195      # Going to short mode and back again did indeed matter. Since short mode is
21196      # case insensitive, let's make it lowercase to improve readability.
21197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21198      # Now convert it back to Unix-stile (cygpath)
21199      input_path=`$CYGPATH -u "$shortmode_path"`
21200      new_path="$input_path"
21201    fi
21202  fi
21203
21204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21205  if test "x$test_cygdrive_prefix" = x; then
21206    # As a simple fix, exclude /usr/bin since it's not a real path.
21207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21209      # a path prefixed by /cygdrive for fixpath to work.
21210      new_path="$CYGWIN_ROOT_PATH$input_path"
21211    fi
21212  fi
21213
21214
21215  if test "x$path" != "x$new_path"; then
21216    JAVA_HOME_PROCESSED="$new_path"
21217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21218$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21219  fi
21220
21221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21222
21223  path="$JAVA_HOME_PROCESSED"
21224  has_colon=`$ECHO $path | $GREP ^.:`
21225  new_path="$path"
21226  if test "x$has_colon" = x; then
21227    # Not in mixed or Windows style, start by that.
21228    new_path=`cmd //c echo $path`
21229  fi
21230
21231
21232  input_path="$new_path"
21233  # Check if we need to convert this using DOS-style short mode. If the path
21234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21235  # take no chances and rewrite it.
21236  # Note: m4 eats our [], so we need to use [ and ] instead.
21237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21238  if test "x$has_forbidden_chars" != x; then
21239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21241  fi
21242
21243
21244  windows_path="$new_path"
21245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21246    unix_path=`$CYGPATH -u "$windows_path"`
21247    new_path="$unix_path"
21248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21250    new_path="$unix_path"
21251  fi
21252
21253  if test "x$path" != "x$new_path"; then
21254    JAVA_HOME_PROCESSED="$new_path"
21255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21256$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21257  fi
21258
21259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21261
21262  else
21263    # We're on a posix platform. Hooray! :)
21264    path="$JAVA_HOME_PROCESSED"
21265    has_space=`$ECHO "$path" | $GREP " "`
21266    if test "x$has_space" != x; then
21267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21268$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21269      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21270    fi
21271
21272    # Use eval to expand a potential ~
21273    eval path="$path"
21274    if test ! -f "$path" && test ! -d "$path"; then
21275      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21276    fi
21277
21278    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21279  fi
21280
21281    if test ! -d "$JAVA_HOME_PROCESSED"; then
21282      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21283$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21284    else
21285      # Aha, the user has set a JAVA_HOME
21286      # let us use that as the Boot JDK.
21287      BOOT_JDK="$JAVA_HOME_PROCESSED"
21288      BOOT_JDK_FOUND=maybe
21289      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21290$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21291    fi
21292  fi
21293
21294
21295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21297      # Do we have a bin/java?
21298      if test ! -x "$BOOT_JDK/bin/java"; then
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21301        BOOT_JDK_FOUND=no
21302      else
21303        # Do we have a bin/javac?
21304        if test ! -x "$BOOT_JDK/bin/javac"; then
21305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21309          BOOT_JDK_FOUND=no
21310        else
21311          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21312          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21313            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21315            BOOT_JDK_FOUND=no
21316          else
21317            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21319
21320            # Extra M4 quote needed to protect [] in grep expression.
21321            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21322            if test "x$FOUND_CORRECT_VERSION" = x; then
21323              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21325              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21326$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21327              BOOT_JDK_FOUND=no
21328            else
21329              # We're done! :-)
21330              BOOT_JDK_FOUND=yes
21331
21332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21333
21334  # Input might be given as Windows format, start by converting to
21335  # unix format.
21336  path="$BOOT_JDK"
21337  new_path=`$CYGPATH -u "$path"`
21338
21339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21342  # "foo.exe" is OK but "foo" is an error.
21343  #
21344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21345  # It is also a way to make sure we got the proper file name for the real test later on.
21346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21347  if test "x$test_shortpath" = x; then
21348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21351  fi
21352
21353  # Call helper function which possibly converts this using DOS-style short mode.
21354  # If so, the updated path is stored in $new_path.
21355
21356  input_path="$new_path"
21357  # Check if we need to convert this using DOS-style short mode. If the path
21358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21359  # take no chances and rewrite it.
21360  # Note: m4 eats our [], so we need to use [ and ] instead.
21361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21362  if test "x$has_forbidden_chars" != x; then
21363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21367      # Going to short mode and back again did indeed matter. Since short mode is
21368      # case insensitive, let's make it lowercase to improve readability.
21369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21370      # Now convert it back to Unix-stile (cygpath)
21371      input_path=`$CYGPATH -u "$shortmode_path"`
21372      new_path="$input_path"
21373    fi
21374  fi
21375
21376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21377  if test "x$test_cygdrive_prefix" = x; then
21378    # As a simple fix, exclude /usr/bin since it's not a real path.
21379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21381      # a path prefixed by /cygdrive for fixpath to work.
21382      new_path="$CYGWIN_ROOT_PATH$input_path"
21383    fi
21384  fi
21385
21386
21387  if test "x$path" != "x$new_path"; then
21388    BOOT_JDK="$new_path"
21389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21391  fi
21392
21393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21394
21395  path="$BOOT_JDK"
21396  has_colon=`$ECHO $path | $GREP ^.:`
21397  new_path="$path"
21398  if test "x$has_colon" = x; then
21399    # Not in mixed or Windows style, start by that.
21400    new_path=`cmd //c echo $path`
21401  fi
21402
21403
21404  input_path="$new_path"
21405  # Check if we need to convert this using DOS-style short mode. If the path
21406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21407  # take no chances and rewrite it.
21408  # Note: m4 eats our [], so we need to use [ and ] instead.
21409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21410  if test "x$has_forbidden_chars" != x; then
21411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21413  fi
21414
21415
21416  windows_path="$new_path"
21417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21418    unix_path=`$CYGPATH -u "$windows_path"`
21419    new_path="$unix_path"
21420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21422    new_path="$unix_path"
21423  fi
21424
21425  if test "x$path" != "x$new_path"; then
21426    BOOT_JDK="$new_path"
21427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21429  fi
21430
21431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21433
21434  else
21435    # We're on a posix platform. Hooray! :)
21436    path="$BOOT_JDK"
21437    has_space=`$ECHO "$path" | $GREP " "`
21438    if test "x$has_space" != x; then
21439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21441      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21442    fi
21443
21444    # Use eval to expand a potential ~
21445    eval path="$path"
21446    if test ! -f "$path" && test ! -d "$path"; then
21447      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21448    fi
21449
21450    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21451  fi
21452
21453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21454$as_echo_n "checking for Boot JDK... " >&6; }
21455              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21456$as_echo "$BOOT_JDK" >&6; }
21457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21458$as_echo_n "checking Boot JDK version... " >&6; }
21459              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21461$as_echo "$BOOT_JDK_VERSION" >&6; }
21462            fi # end check jdk version
21463          fi # end check rt.jar
21464        fi # end check javac
21465      fi # end check java
21466    fi # end check boot jdk found
21467  fi
21468
21469
21470  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21471
21472  if test "x$BOOT_JDK_FOUND" = xno; then
21473    # Now execute the test
21474
21475  # Extract the first word of "javac", so it can be a program name with args.
21476set dummy javac; ac_word=$2
21477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21478$as_echo_n "checking for $ac_word... " >&6; }
21479if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21480  $as_echo_n "(cached) " >&6
21481else
21482  case $JAVAC_CHECK in
21483  [\\/]* | ?:[\\/]*)
21484  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21485  ;;
21486  *)
21487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21488for as_dir in $PATH
21489do
21490  IFS=$as_save_IFS
21491  test -z "$as_dir" && as_dir=.
21492    for ac_exec_ext in '' $ac_executable_extensions; do
21493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21494    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21496    break 2
21497  fi
21498done
21499  done
21500IFS=$as_save_IFS
21501
21502  ;;
21503esac
21504fi
21505JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21506if test -n "$JAVAC_CHECK"; then
21507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21508$as_echo "$JAVAC_CHECK" >&6; }
21509else
21510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21511$as_echo "no" >&6; }
21512fi
21513
21514
21515  # Extract the first word of "java", so it can be a program name with args.
21516set dummy java; ac_word=$2
21517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21518$as_echo_n "checking for $ac_word... " >&6; }
21519if ${ac_cv_path_JAVA_CHECK+:} false; then :
21520  $as_echo_n "(cached) " >&6
21521else
21522  case $JAVA_CHECK in
21523  [\\/]* | ?:[\\/]*)
21524  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21525  ;;
21526  *)
21527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21528for as_dir in $PATH
21529do
21530  IFS=$as_save_IFS
21531  test -z "$as_dir" && as_dir=.
21532    for ac_exec_ext in '' $ac_executable_extensions; do
21533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21534    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21536    break 2
21537  fi
21538done
21539  done
21540IFS=$as_save_IFS
21541
21542  ;;
21543esac
21544fi
21545JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21546if test -n "$JAVA_CHECK"; then
21547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21548$as_echo "$JAVA_CHECK" >&6; }
21549else
21550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21551$as_echo "no" >&6; }
21552fi
21553
21554
21555  BINARY="$JAVAC_CHECK"
21556  if test "x$JAVAC_CHECK" = x; then
21557    BINARY="$JAVA_CHECK"
21558  fi
21559  if test "x$BINARY" != x; then
21560    # So there is a java(c) binary, it might be part of a JDK.
21561    # Lets find the JDK/JRE directory by following symbolic links.
21562    # Linux/GNU systems often have links from /usr/bin/java to
21563    # /etc/alternatives/java to the real JDK binary.
21564
21565  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21566    # Follow a chain of symbolic links. Use readlink
21567    # where it exists, else fall back to horribly
21568    # complicated shell code.
21569    if test "x$READLINK_TESTED" != yes; then
21570      # On MacOSX there is a readlink tool with a different
21571      # purpose than the GNU readlink tool. Check the found readlink.
21572      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21573      if test "x$ISGNU" = x; then
21574        # A readlink that we do not know how to use.
21575        # Are there other non-GNU readlinks out there?
21576        READLINK_TESTED=yes
21577        READLINK=
21578      fi
21579    fi
21580
21581    if test "x$READLINK" != x; then
21582      BINARY=`$READLINK -f $BINARY`
21583    else
21584      # Save the current directory for restoring afterwards
21585      STARTDIR=$PWD
21586      COUNTER=0
21587      sym_link_dir=`$DIRNAME $BINARY`
21588      sym_link_file=`$BASENAME $BINARY`
21589      cd $sym_link_dir
21590      # Use -P flag to resolve symlinks in directories.
21591      cd `$THEPWDCMD -P`
21592      sym_link_dir=`$THEPWDCMD -P`
21593      # Resolve file symlinks
21594      while test $COUNTER -lt 20; do
21595        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21596        if test "x$ISLINK" == x; then
21597          # This is not a symbolic link! We are done!
21598          break
21599        fi
21600        # Again resolve directory symlinks since the target of the just found
21601        # link could be in a different directory
21602        cd `$DIRNAME $ISLINK`
21603        sym_link_dir=`$THEPWDCMD -P`
21604        sym_link_file=`$BASENAME $ISLINK`
21605        let COUNTER=COUNTER+1
21606      done
21607      cd $STARTDIR
21608      BINARY=$sym_link_dir/$sym_link_file
21609    fi
21610  fi
21611
21612    BOOT_JDK=`dirname "$BINARY"`
21613    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21614    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21615      # Looks like we found ourselves an JDK
21616      BOOT_JDK_FOUND=maybe
21617      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21618$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21619    fi
21620  fi
21621
21622
21623    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21624    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21625      # Do we have a bin/java?
21626      if test ! -x "$BOOT_JDK/bin/java"; then
21627        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21629        BOOT_JDK_FOUND=no
21630      else
21631        # Do we have a bin/javac?
21632        if test ! -x "$BOOT_JDK/bin/javac"; then
21633          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21635          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21636$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21637          BOOT_JDK_FOUND=no
21638        else
21639          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21640          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21641            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21643            BOOT_JDK_FOUND=no
21644          else
21645            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21646            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21647
21648            # Extra M4 quote needed to protect [] in grep expression.
21649            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21650            if test "x$FOUND_CORRECT_VERSION" = x; then
21651              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21653              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21654$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21655              BOOT_JDK_FOUND=no
21656            else
21657              # We're done! :-)
21658              BOOT_JDK_FOUND=yes
21659
21660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21661
21662  # Input might be given as Windows format, start by converting to
21663  # unix format.
21664  path="$BOOT_JDK"
21665  new_path=`$CYGPATH -u "$path"`
21666
21667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21670  # "foo.exe" is OK but "foo" is an error.
21671  #
21672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21673  # It is also a way to make sure we got the proper file name for the real test later on.
21674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21675  if test "x$test_shortpath" = x; then
21676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21677$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21678    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21679  fi
21680
21681  # Call helper function which possibly converts this using DOS-style short mode.
21682  # If so, the updated path is stored in $new_path.
21683
21684  input_path="$new_path"
21685  # Check if we need to convert this using DOS-style short mode. If the path
21686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21687  # take no chances and rewrite it.
21688  # Note: m4 eats our [], so we need to use [ and ] instead.
21689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21690  if test "x$has_forbidden_chars" != x; then
21691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21695      # Going to short mode and back again did indeed matter. Since short mode is
21696      # case insensitive, let's make it lowercase to improve readability.
21697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21698      # Now convert it back to Unix-stile (cygpath)
21699      input_path=`$CYGPATH -u "$shortmode_path"`
21700      new_path="$input_path"
21701    fi
21702  fi
21703
21704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21705  if test "x$test_cygdrive_prefix" = x; then
21706    # As a simple fix, exclude /usr/bin since it's not a real path.
21707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21709      # a path prefixed by /cygdrive for fixpath to work.
21710      new_path="$CYGWIN_ROOT_PATH$input_path"
21711    fi
21712  fi
21713
21714
21715  if test "x$path" != "x$new_path"; then
21716    BOOT_JDK="$new_path"
21717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21719  fi
21720
21721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21722
21723  path="$BOOT_JDK"
21724  has_colon=`$ECHO $path | $GREP ^.:`
21725  new_path="$path"
21726  if test "x$has_colon" = x; then
21727    # Not in mixed or Windows style, start by that.
21728    new_path=`cmd //c echo $path`
21729  fi
21730
21731
21732  input_path="$new_path"
21733  # Check if we need to convert this using DOS-style short mode. If the path
21734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21735  # take no chances and rewrite it.
21736  # Note: m4 eats our [], so we need to use [ and ] instead.
21737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21738  if test "x$has_forbidden_chars" != x; then
21739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21741  fi
21742
21743
21744  windows_path="$new_path"
21745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21746    unix_path=`$CYGPATH -u "$windows_path"`
21747    new_path="$unix_path"
21748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21750    new_path="$unix_path"
21751  fi
21752
21753  if test "x$path" != "x$new_path"; then
21754    BOOT_JDK="$new_path"
21755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21757  fi
21758
21759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21761
21762  else
21763    # We're on a posix platform. Hooray! :)
21764    path="$BOOT_JDK"
21765    has_space=`$ECHO "$path" | $GREP " "`
21766    if test "x$has_space" != x; then
21767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21770    fi
21771
21772    # Use eval to expand a potential ~
21773    eval path="$path"
21774    if test ! -f "$path" && test ! -d "$path"; then
21775      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21776    fi
21777
21778    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21779  fi
21780
21781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21782$as_echo_n "checking for Boot JDK... " >&6; }
21783              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21784$as_echo "$BOOT_JDK" >&6; }
21785              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21786$as_echo_n "checking Boot JDK version... " >&6; }
21787              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21788              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21789$as_echo "$BOOT_JDK_VERSION" >&6; }
21790            fi # end check jdk version
21791          fi # end check rt.jar
21792        fi # end check javac
21793      fi # end check java
21794    fi # end check boot jdk found
21795  fi
21796
21797
21798  # Test: Is there a JDK installed in default, well-known locations?
21799
21800  if test "x$BOOT_JDK_FOUND" = xno; then
21801    # Now execute the test
21802
21803  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21804
21805  if test "x$BOOT_JDK_FOUND" = xno; then
21806    # Now execute the test
21807
21808  if test "x$ProgramW6432" != x; then
21809    VIRTUAL_DIR="$ProgramW6432/Java"
21810
21811  windows_path="$VIRTUAL_DIR"
21812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21813    unix_path=`$CYGPATH -u "$windows_path"`
21814    VIRTUAL_DIR="$unix_path"
21815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21817    VIRTUAL_DIR="$unix_path"
21818  fi
21819
21820
21821  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21822  BOOT_JDK_SUFFIX=""
21823  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21824  if test "x$ALL_JDKS_FOUND" != x; then
21825    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21826
21827  if test "x$BOOT_JDK_FOUND" = xno; then
21828    # Now execute the test
21829
21830        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21831        if test -d "$BOOT_JDK"; then
21832          BOOT_JDK_FOUND=maybe
21833          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21834$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21835        fi
21836
21837
21838    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21839    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21840      # Do we have a bin/java?
21841      if test ! -x "$BOOT_JDK/bin/java"; then
21842        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21844        BOOT_JDK_FOUND=no
21845      else
21846        # Do we have a bin/javac?
21847        if test ! -x "$BOOT_JDK/bin/javac"; then
21848          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21850          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21851$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21852          BOOT_JDK_FOUND=no
21853        else
21854          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21855          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21856            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21858            BOOT_JDK_FOUND=no
21859          else
21860            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21861            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21862
21863            # Extra M4 quote needed to protect [] in grep expression.
21864            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21865            if test "x$FOUND_CORRECT_VERSION" = x; then
21866              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21868              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21869$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21870              BOOT_JDK_FOUND=no
21871            else
21872              # We're done! :-)
21873              BOOT_JDK_FOUND=yes
21874
21875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21876
21877  # Input might be given as Windows format, start by converting to
21878  # unix format.
21879  path="$BOOT_JDK"
21880  new_path=`$CYGPATH -u "$path"`
21881
21882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21885  # "foo.exe" is OK but "foo" is an error.
21886  #
21887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21888  # It is also a way to make sure we got the proper file name for the real test later on.
21889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21890  if test "x$test_shortpath" = x; then
21891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21892$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21893    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21894  fi
21895
21896  # Call helper function which possibly converts this using DOS-style short mode.
21897  # If so, the updated path is stored in $new_path.
21898
21899  input_path="$new_path"
21900  # Check if we need to convert this using DOS-style short mode. If the path
21901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21902  # take no chances and rewrite it.
21903  # Note: m4 eats our [], so we need to use [ and ] instead.
21904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21905  if test "x$has_forbidden_chars" != x; then
21906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21910      # Going to short mode and back again did indeed matter. Since short mode is
21911      # case insensitive, let's make it lowercase to improve readability.
21912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21913      # Now convert it back to Unix-stile (cygpath)
21914      input_path=`$CYGPATH -u "$shortmode_path"`
21915      new_path="$input_path"
21916    fi
21917  fi
21918
21919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21920  if test "x$test_cygdrive_prefix" = x; then
21921    # As a simple fix, exclude /usr/bin since it's not a real path.
21922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21924      # a path prefixed by /cygdrive for fixpath to work.
21925      new_path="$CYGWIN_ROOT_PATH$input_path"
21926    fi
21927  fi
21928
21929
21930  if test "x$path" != "x$new_path"; then
21931    BOOT_JDK="$new_path"
21932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21934  fi
21935
21936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21937
21938  path="$BOOT_JDK"
21939  has_colon=`$ECHO $path | $GREP ^.:`
21940  new_path="$path"
21941  if test "x$has_colon" = x; then
21942    # Not in mixed or Windows style, start by that.
21943    new_path=`cmd //c echo $path`
21944  fi
21945
21946
21947  input_path="$new_path"
21948  # Check if we need to convert this using DOS-style short mode. If the path
21949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21950  # take no chances and rewrite it.
21951  # Note: m4 eats our [], so we need to use [ and ] instead.
21952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21953  if test "x$has_forbidden_chars" != x; then
21954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21956  fi
21957
21958
21959  windows_path="$new_path"
21960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21961    unix_path=`$CYGPATH -u "$windows_path"`
21962    new_path="$unix_path"
21963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21965    new_path="$unix_path"
21966  fi
21967
21968  if test "x$path" != "x$new_path"; then
21969    BOOT_JDK="$new_path"
21970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21971$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21972  fi
21973
21974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21976
21977  else
21978    # We're on a posix platform. Hooray! :)
21979    path="$BOOT_JDK"
21980    has_space=`$ECHO "$path" | $GREP " "`
21981    if test "x$has_space" != x; then
21982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21984      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21985    fi
21986
21987    # Use eval to expand a potential ~
21988    eval path="$path"
21989    if test ! -f "$path" && test ! -d "$path"; then
21990      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21991    fi
21992
21993    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21994  fi
21995
21996              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21997$as_echo_n "checking for Boot JDK... " >&6; }
21998              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21999$as_echo "$BOOT_JDK" >&6; }
22000              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22001$as_echo_n "checking Boot JDK version... " >&6; }
22002              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22003              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22004$as_echo "$BOOT_JDK_VERSION" >&6; }
22005            fi # end check jdk version
22006          fi # end check rt.jar
22007        fi # end check javac
22008      fi # end check java
22009    fi # end check boot jdk found
22010  fi
22011
22012    done
22013  fi
22014
22015  fi
22016
22017
22018    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22019    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22020      # Do we have a bin/java?
22021      if test ! -x "$BOOT_JDK/bin/java"; then
22022        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22024        BOOT_JDK_FOUND=no
22025      else
22026        # Do we have a bin/javac?
22027        if test ! -x "$BOOT_JDK/bin/javac"; then
22028          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22030          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22031$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22032          BOOT_JDK_FOUND=no
22033        else
22034          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22035          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22038            BOOT_JDK_FOUND=no
22039          else
22040            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22042
22043            # Extra M4 quote needed to protect [] in grep expression.
22044            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22045            if test "x$FOUND_CORRECT_VERSION" = x; then
22046              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22048              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22049$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22050              BOOT_JDK_FOUND=no
22051            else
22052              # We're done! :-)
22053              BOOT_JDK_FOUND=yes
22054
22055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22056
22057  # Input might be given as Windows format, start by converting to
22058  # unix format.
22059  path="$BOOT_JDK"
22060  new_path=`$CYGPATH -u "$path"`
22061
22062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22065  # "foo.exe" is OK but "foo" is an error.
22066  #
22067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22068  # It is also a way to make sure we got the proper file name for the real test later on.
22069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22070  if test "x$test_shortpath" = x; then
22071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22073    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22074  fi
22075
22076  # Call helper function which possibly converts this using DOS-style short mode.
22077  # If so, the updated path is stored in $new_path.
22078
22079  input_path="$new_path"
22080  # Check if we need to convert this using DOS-style short mode. If the path
22081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22082  # take no chances and rewrite it.
22083  # Note: m4 eats our [], so we need to use [ and ] instead.
22084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22085  if test "x$has_forbidden_chars" != x; then
22086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22090      # Going to short mode and back again did indeed matter. Since short mode is
22091      # case insensitive, let's make it lowercase to improve readability.
22092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22093      # Now convert it back to Unix-stile (cygpath)
22094      input_path=`$CYGPATH -u "$shortmode_path"`
22095      new_path="$input_path"
22096    fi
22097  fi
22098
22099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22100  if test "x$test_cygdrive_prefix" = x; then
22101    # As a simple fix, exclude /usr/bin since it's not a real path.
22102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22104      # a path prefixed by /cygdrive for fixpath to work.
22105      new_path="$CYGWIN_ROOT_PATH$input_path"
22106    fi
22107  fi
22108
22109
22110  if test "x$path" != "x$new_path"; then
22111    BOOT_JDK="$new_path"
22112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22114  fi
22115
22116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22117
22118  path="$BOOT_JDK"
22119  has_colon=`$ECHO $path | $GREP ^.:`
22120  new_path="$path"
22121  if test "x$has_colon" = x; then
22122    # Not in mixed or Windows style, start by that.
22123    new_path=`cmd //c echo $path`
22124  fi
22125
22126
22127  input_path="$new_path"
22128  # Check if we need to convert this using DOS-style short mode. If the path
22129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22130  # take no chances and rewrite it.
22131  # Note: m4 eats our [], so we need to use [ and ] instead.
22132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22133  if test "x$has_forbidden_chars" != x; then
22134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22136  fi
22137
22138
22139  windows_path="$new_path"
22140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22141    unix_path=`$CYGPATH -u "$windows_path"`
22142    new_path="$unix_path"
22143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22145    new_path="$unix_path"
22146  fi
22147
22148  if test "x$path" != "x$new_path"; then
22149    BOOT_JDK="$new_path"
22150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22152  fi
22153
22154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22156
22157  else
22158    # We're on a posix platform. Hooray! :)
22159    path="$BOOT_JDK"
22160    has_space=`$ECHO "$path" | $GREP " "`
22161    if test "x$has_space" != x; then
22162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22164      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22165    fi
22166
22167    # Use eval to expand a potential ~
22168    eval path="$path"
22169    if test ! -f "$path" && test ! -d "$path"; then
22170      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22171    fi
22172
22173    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22174  fi
22175
22176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22177$as_echo_n "checking for Boot JDK... " >&6; }
22178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22179$as_echo "$BOOT_JDK" >&6; }
22180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22181$as_echo_n "checking Boot JDK version... " >&6; }
22182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22184$as_echo "$BOOT_JDK_VERSION" >&6; }
22185            fi # end check jdk version
22186          fi # end check rt.jar
22187        fi # end check javac
22188      fi # end check java
22189    fi # end check boot jdk found
22190  fi
22191
22192
22193  if test "x$BOOT_JDK_FOUND" = xno; then
22194    # Now execute the test
22195
22196  if test "x$PROGRAMW6432" != x; then
22197    VIRTUAL_DIR="$PROGRAMW6432/Java"
22198
22199  windows_path="$VIRTUAL_DIR"
22200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22201    unix_path=`$CYGPATH -u "$windows_path"`
22202    VIRTUAL_DIR="$unix_path"
22203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22205    VIRTUAL_DIR="$unix_path"
22206  fi
22207
22208
22209  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22210  BOOT_JDK_SUFFIX=""
22211  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22212  if test "x$ALL_JDKS_FOUND" != x; then
22213    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22214
22215  if test "x$BOOT_JDK_FOUND" = xno; then
22216    # Now execute the test
22217
22218        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22219        if test -d "$BOOT_JDK"; then
22220          BOOT_JDK_FOUND=maybe
22221          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22222$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22223        fi
22224
22225
22226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22228      # Do we have a bin/java?
22229      if test ! -x "$BOOT_JDK/bin/java"; then
22230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22232        BOOT_JDK_FOUND=no
22233      else
22234        # Do we have a bin/javac?
22235        if test ! -x "$BOOT_JDK/bin/javac"; then
22236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22240          BOOT_JDK_FOUND=no
22241        else
22242          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22243          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22244            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22246            BOOT_JDK_FOUND=no
22247          else
22248            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22249            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22250
22251            # Extra M4 quote needed to protect [] in grep expression.
22252            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22253            if test "x$FOUND_CORRECT_VERSION" = x; then
22254              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22256              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22257$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22258              BOOT_JDK_FOUND=no
22259            else
22260              # We're done! :-)
22261              BOOT_JDK_FOUND=yes
22262
22263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22264
22265  # Input might be given as Windows format, start by converting to
22266  # unix format.
22267  path="$BOOT_JDK"
22268  new_path=`$CYGPATH -u "$path"`
22269
22270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22273  # "foo.exe" is OK but "foo" is an error.
22274  #
22275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22276  # It is also a way to make sure we got the proper file name for the real test later on.
22277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22278  if test "x$test_shortpath" = x; then
22279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22281    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22282  fi
22283
22284  # Call helper function which possibly converts this using DOS-style short mode.
22285  # If so, the updated path is stored in $new_path.
22286
22287  input_path="$new_path"
22288  # Check if we need to convert this using DOS-style short mode. If the path
22289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22290  # take no chances and rewrite it.
22291  # Note: m4 eats our [], so we need to use [ and ] instead.
22292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22293  if test "x$has_forbidden_chars" != x; then
22294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22298      # Going to short mode and back again did indeed matter. Since short mode is
22299      # case insensitive, let's make it lowercase to improve readability.
22300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22301      # Now convert it back to Unix-stile (cygpath)
22302      input_path=`$CYGPATH -u "$shortmode_path"`
22303      new_path="$input_path"
22304    fi
22305  fi
22306
22307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22308  if test "x$test_cygdrive_prefix" = x; then
22309    # As a simple fix, exclude /usr/bin since it's not a real path.
22310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22312      # a path prefixed by /cygdrive for fixpath to work.
22313      new_path="$CYGWIN_ROOT_PATH$input_path"
22314    fi
22315  fi
22316
22317
22318  if test "x$path" != "x$new_path"; then
22319    BOOT_JDK="$new_path"
22320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22322  fi
22323
22324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22325
22326  path="$BOOT_JDK"
22327  has_colon=`$ECHO $path | $GREP ^.:`
22328  new_path="$path"
22329  if test "x$has_colon" = x; then
22330    # Not in mixed or Windows style, start by that.
22331    new_path=`cmd //c echo $path`
22332  fi
22333
22334
22335  input_path="$new_path"
22336  # Check if we need to convert this using DOS-style short mode. If the path
22337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22338  # take no chances and rewrite it.
22339  # Note: m4 eats our [], so we need to use [ and ] instead.
22340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22341  if test "x$has_forbidden_chars" != x; then
22342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22344  fi
22345
22346
22347  windows_path="$new_path"
22348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22349    unix_path=`$CYGPATH -u "$windows_path"`
22350    new_path="$unix_path"
22351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22353    new_path="$unix_path"
22354  fi
22355
22356  if test "x$path" != "x$new_path"; then
22357    BOOT_JDK="$new_path"
22358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22360  fi
22361
22362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22364
22365  else
22366    # We're on a posix platform. Hooray! :)
22367    path="$BOOT_JDK"
22368    has_space=`$ECHO "$path" | $GREP " "`
22369    if test "x$has_space" != x; then
22370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22373    fi
22374
22375    # Use eval to expand a potential ~
22376    eval path="$path"
22377    if test ! -f "$path" && test ! -d "$path"; then
22378      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22379    fi
22380
22381    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22382  fi
22383
22384              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22385$as_echo_n "checking for Boot JDK... " >&6; }
22386              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22387$as_echo "$BOOT_JDK" >&6; }
22388              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22389$as_echo_n "checking Boot JDK version... " >&6; }
22390              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22391              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22392$as_echo "$BOOT_JDK_VERSION" >&6; }
22393            fi # end check jdk version
22394          fi # end check rt.jar
22395        fi # end check javac
22396      fi # end check java
22397    fi # end check boot jdk found
22398  fi
22399
22400    done
22401  fi
22402
22403  fi
22404
22405
22406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22408      # Do we have a bin/java?
22409      if test ! -x "$BOOT_JDK/bin/java"; then
22410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22412        BOOT_JDK_FOUND=no
22413      else
22414        # Do we have a bin/javac?
22415        if test ! -x "$BOOT_JDK/bin/javac"; then
22416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22420          BOOT_JDK_FOUND=no
22421        else
22422          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22423          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22424            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22426            BOOT_JDK_FOUND=no
22427          else
22428            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22429            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22430
22431            # Extra M4 quote needed to protect [] in grep expression.
22432            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22433            if test "x$FOUND_CORRECT_VERSION" = x; then
22434              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22436              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22437$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22438              BOOT_JDK_FOUND=no
22439            else
22440              # We're done! :-)
22441              BOOT_JDK_FOUND=yes
22442
22443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22444
22445  # Input might be given as Windows format, start by converting to
22446  # unix format.
22447  path="$BOOT_JDK"
22448  new_path=`$CYGPATH -u "$path"`
22449
22450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22453  # "foo.exe" is OK but "foo" is an error.
22454  #
22455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22456  # It is also a way to make sure we got the proper file name for the real test later on.
22457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22458  if test "x$test_shortpath" = x; then
22459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22461    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22462  fi
22463
22464  # Call helper function which possibly converts this using DOS-style short mode.
22465  # If so, the updated path is stored in $new_path.
22466
22467  input_path="$new_path"
22468  # Check if we need to convert this using DOS-style short mode. If the path
22469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22470  # take no chances and rewrite it.
22471  # Note: m4 eats our [], so we need to use [ and ] instead.
22472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22473  if test "x$has_forbidden_chars" != x; then
22474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22478      # Going to short mode and back again did indeed matter. Since short mode is
22479      # case insensitive, let's make it lowercase to improve readability.
22480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22481      # Now convert it back to Unix-stile (cygpath)
22482      input_path=`$CYGPATH -u "$shortmode_path"`
22483      new_path="$input_path"
22484    fi
22485  fi
22486
22487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22488  if test "x$test_cygdrive_prefix" = x; then
22489    # As a simple fix, exclude /usr/bin since it's not a real path.
22490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22492      # a path prefixed by /cygdrive for fixpath to work.
22493      new_path="$CYGWIN_ROOT_PATH$input_path"
22494    fi
22495  fi
22496
22497
22498  if test "x$path" != "x$new_path"; then
22499    BOOT_JDK="$new_path"
22500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22502  fi
22503
22504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22505
22506  path="$BOOT_JDK"
22507  has_colon=`$ECHO $path | $GREP ^.:`
22508  new_path="$path"
22509  if test "x$has_colon" = x; then
22510    # Not in mixed or Windows style, start by that.
22511    new_path=`cmd //c echo $path`
22512  fi
22513
22514
22515  input_path="$new_path"
22516  # Check if we need to convert this using DOS-style short mode. If the path
22517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22518  # take no chances and rewrite it.
22519  # Note: m4 eats our [], so we need to use [ and ] instead.
22520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22521  if test "x$has_forbidden_chars" != x; then
22522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22524  fi
22525
22526
22527  windows_path="$new_path"
22528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22529    unix_path=`$CYGPATH -u "$windows_path"`
22530    new_path="$unix_path"
22531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22533    new_path="$unix_path"
22534  fi
22535
22536  if test "x$path" != "x$new_path"; then
22537    BOOT_JDK="$new_path"
22538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22540  fi
22541
22542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22544
22545  else
22546    # We're on a posix platform. Hooray! :)
22547    path="$BOOT_JDK"
22548    has_space=`$ECHO "$path" | $GREP " "`
22549    if test "x$has_space" != x; then
22550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22552      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22553    fi
22554
22555    # Use eval to expand a potential ~
22556    eval path="$path"
22557    if test ! -f "$path" && test ! -d "$path"; then
22558      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22559    fi
22560
22561    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22562  fi
22563
22564              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22565$as_echo_n "checking for Boot JDK... " >&6; }
22566              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22567$as_echo "$BOOT_JDK" >&6; }
22568              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22569$as_echo_n "checking Boot JDK version... " >&6; }
22570              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22571              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22572$as_echo "$BOOT_JDK_VERSION" >&6; }
22573            fi # end check jdk version
22574          fi # end check rt.jar
22575        fi # end check javac
22576      fi # end check java
22577    fi # end check boot jdk found
22578  fi
22579
22580
22581  if test "x$BOOT_JDK_FOUND" = xno; then
22582    # Now execute the test
22583
22584  if test "x$PROGRAMFILES" != x; then
22585    VIRTUAL_DIR="$PROGRAMFILES/Java"
22586
22587  windows_path="$VIRTUAL_DIR"
22588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22589    unix_path=`$CYGPATH -u "$windows_path"`
22590    VIRTUAL_DIR="$unix_path"
22591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22593    VIRTUAL_DIR="$unix_path"
22594  fi
22595
22596
22597  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22598  BOOT_JDK_SUFFIX=""
22599  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22600  if test "x$ALL_JDKS_FOUND" != x; then
22601    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22602
22603  if test "x$BOOT_JDK_FOUND" = xno; then
22604    # Now execute the test
22605
22606        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22607        if test -d "$BOOT_JDK"; then
22608          BOOT_JDK_FOUND=maybe
22609          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22610$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22611        fi
22612
22613
22614    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22615    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22616      # Do we have a bin/java?
22617      if test ! -x "$BOOT_JDK/bin/java"; then
22618        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22620        BOOT_JDK_FOUND=no
22621      else
22622        # Do we have a bin/javac?
22623        if test ! -x "$BOOT_JDK/bin/javac"; then
22624          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22626          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22627$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22628          BOOT_JDK_FOUND=no
22629        else
22630          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22631          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22632            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22634            BOOT_JDK_FOUND=no
22635          else
22636            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22637            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22638
22639            # Extra M4 quote needed to protect [] in grep expression.
22640            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22641            if test "x$FOUND_CORRECT_VERSION" = x; then
22642              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22644              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22645$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22646              BOOT_JDK_FOUND=no
22647            else
22648              # We're done! :-)
22649              BOOT_JDK_FOUND=yes
22650
22651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22652
22653  # Input might be given as Windows format, start by converting to
22654  # unix format.
22655  path="$BOOT_JDK"
22656  new_path=`$CYGPATH -u "$path"`
22657
22658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22661  # "foo.exe" is OK but "foo" is an error.
22662  #
22663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22664  # It is also a way to make sure we got the proper file name for the real test later on.
22665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22666  if test "x$test_shortpath" = x; then
22667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22670  fi
22671
22672  # Call helper function which possibly converts this using DOS-style short mode.
22673  # If so, the updated path is stored in $new_path.
22674
22675  input_path="$new_path"
22676  # Check if we need to convert this using DOS-style short mode. If the path
22677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22678  # take no chances and rewrite it.
22679  # Note: m4 eats our [], so we need to use [ and ] instead.
22680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22681  if test "x$has_forbidden_chars" != x; then
22682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22686      # Going to short mode and back again did indeed matter. Since short mode is
22687      # case insensitive, let's make it lowercase to improve readability.
22688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22689      # Now convert it back to Unix-stile (cygpath)
22690      input_path=`$CYGPATH -u "$shortmode_path"`
22691      new_path="$input_path"
22692    fi
22693  fi
22694
22695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22696  if test "x$test_cygdrive_prefix" = x; then
22697    # As a simple fix, exclude /usr/bin since it's not a real path.
22698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22700      # a path prefixed by /cygdrive for fixpath to work.
22701      new_path="$CYGWIN_ROOT_PATH$input_path"
22702    fi
22703  fi
22704
22705
22706  if test "x$path" != "x$new_path"; then
22707    BOOT_JDK="$new_path"
22708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22710  fi
22711
22712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22713
22714  path="$BOOT_JDK"
22715  has_colon=`$ECHO $path | $GREP ^.:`
22716  new_path="$path"
22717  if test "x$has_colon" = x; then
22718    # Not in mixed or Windows style, start by that.
22719    new_path=`cmd //c echo $path`
22720  fi
22721
22722
22723  input_path="$new_path"
22724  # Check if we need to convert this using DOS-style short mode. If the path
22725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22726  # take no chances and rewrite it.
22727  # Note: m4 eats our [], so we need to use [ and ] instead.
22728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22729  if test "x$has_forbidden_chars" != x; then
22730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22732  fi
22733
22734
22735  windows_path="$new_path"
22736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22737    unix_path=`$CYGPATH -u "$windows_path"`
22738    new_path="$unix_path"
22739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22741    new_path="$unix_path"
22742  fi
22743
22744  if test "x$path" != "x$new_path"; then
22745    BOOT_JDK="$new_path"
22746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22748  fi
22749
22750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22752
22753  else
22754    # We're on a posix platform. Hooray! :)
22755    path="$BOOT_JDK"
22756    has_space=`$ECHO "$path" | $GREP " "`
22757    if test "x$has_space" != x; then
22758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22760      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22761    fi
22762
22763    # Use eval to expand a potential ~
22764    eval path="$path"
22765    if test ! -f "$path" && test ! -d "$path"; then
22766      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22767    fi
22768
22769    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22770  fi
22771
22772              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22773$as_echo_n "checking for Boot JDK... " >&6; }
22774              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22775$as_echo "$BOOT_JDK" >&6; }
22776              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22777$as_echo_n "checking Boot JDK version... " >&6; }
22778              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22780$as_echo "$BOOT_JDK_VERSION" >&6; }
22781            fi # end check jdk version
22782          fi # end check rt.jar
22783        fi # end check javac
22784      fi # end check java
22785    fi # end check boot jdk found
22786  fi
22787
22788    done
22789  fi
22790
22791  fi
22792
22793
22794    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22795    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22796      # Do we have a bin/java?
22797      if test ! -x "$BOOT_JDK/bin/java"; then
22798        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22800        BOOT_JDK_FOUND=no
22801      else
22802        # Do we have a bin/javac?
22803        if test ! -x "$BOOT_JDK/bin/javac"; then
22804          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22806          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22807$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22808          BOOT_JDK_FOUND=no
22809        else
22810          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22811          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22814            BOOT_JDK_FOUND=no
22815          else
22816            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22817            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22818
22819            # Extra M4 quote needed to protect [] in grep expression.
22820            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22821            if test "x$FOUND_CORRECT_VERSION" = x; then
22822              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22824              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22825$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22826              BOOT_JDK_FOUND=no
22827            else
22828              # We're done! :-)
22829              BOOT_JDK_FOUND=yes
22830
22831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22832
22833  # Input might be given as Windows format, start by converting to
22834  # unix format.
22835  path="$BOOT_JDK"
22836  new_path=`$CYGPATH -u "$path"`
22837
22838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22841  # "foo.exe" is OK but "foo" is an error.
22842  #
22843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22844  # It is also a way to make sure we got the proper file name for the real test later on.
22845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22846  if test "x$test_shortpath" = x; then
22847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22850  fi
22851
22852  # Call helper function which possibly converts this using DOS-style short mode.
22853  # If so, the updated path is stored in $new_path.
22854
22855  input_path="$new_path"
22856  # Check if we need to convert this using DOS-style short mode. If the path
22857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22858  # take no chances and rewrite it.
22859  # Note: m4 eats our [], so we need to use [ and ] instead.
22860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22861  if test "x$has_forbidden_chars" != x; then
22862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22866      # Going to short mode and back again did indeed matter. Since short mode is
22867      # case insensitive, let's make it lowercase to improve readability.
22868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22869      # Now convert it back to Unix-stile (cygpath)
22870      input_path=`$CYGPATH -u "$shortmode_path"`
22871      new_path="$input_path"
22872    fi
22873  fi
22874
22875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22876  if test "x$test_cygdrive_prefix" = x; then
22877    # As a simple fix, exclude /usr/bin since it's not a real path.
22878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22880      # a path prefixed by /cygdrive for fixpath to work.
22881      new_path="$CYGWIN_ROOT_PATH$input_path"
22882    fi
22883  fi
22884
22885
22886  if test "x$path" != "x$new_path"; then
22887    BOOT_JDK="$new_path"
22888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22890  fi
22891
22892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22893
22894  path="$BOOT_JDK"
22895  has_colon=`$ECHO $path | $GREP ^.:`
22896  new_path="$path"
22897  if test "x$has_colon" = x; then
22898    # Not in mixed or Windows style, start by that.
22899    new_path=`cmd //c echo $path`
22900  fi
22901
22902
22903  input_path="$new_path"
22904  # Check if we need to convert this using DOS-style short mode. If the path
22905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22906  # take no chances and rewrite it.
22907  # Note: m4 eats our [], so we need to use [ and ] instead.
22908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22909  if test "x$has_forbidden_chars" != x; then
22910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22912  fi
22913
22914
22915  windows_path="$new_path"
22916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22917    unix_path=`$CYGPATH -u "$windows_path"`
22918    new_path="$unix_path"
22919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22921    new_path="$unix_path"
22922  fi
22923
22924  if test "x$path" != "x$new_path"; then
22925    BOOT_JDK="$new_path"
22926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22928  fi
22929
22930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22932
22933  else
22934    # We're on a posix platform. Hooray! :)
22935    path="$BOOT_JDK"
22936    has_space=`$ECHO "$path" | $GREP " "`
22937    if test "x$has_space" != x; then
22938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22940      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22941    fi
22942
22943    # Use eval to expand a potential ~
22944    eval path="$path"
22945    if test ! -f "$path" && test ! -d "$path"; then
22946      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22947    fi
22948
22949    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22950  fi
22951
22952              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22953$as_echo_n "checking for Boot JDK... " >&6; }
22954              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22955$as_echo "$BOOT_JDK" >&6; }
22956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22957$as_echo_n "checking Boot JDK version... " >&6; }
22958              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22960$as_echo "$BOOT_JDK_VERSION" >&6; }
22961            fi # end check jdk version
22962          fi # end check rt.jar
22963        fi # end check javac
22964      fi # end check java
22965    fi # end check boot jdk found
22966  fi
22967
22968
22969  if test "x$BOOT_JDK_FOUND" = xno; then
22970    # Now execute the test
22971
22972  if test "x$ProgramFiles" != x; then
22973    VIRTUAL_DIR="$ProgramFiles/Java"
22974
22975  windows_path="$VIRTUAL_DIR"
22976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22977    unix_path=`$CYGPATH -u "$windows_path"`
22978    VIRTUAL_DIR="$unix_path"
22979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22981    VIRTUAL_DIR="$unix_path"
22982  fi
22983
22984
22985  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22986  BOOT_JDK_SUFFIX=""
22987  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22988  if test "x$ALL_JDKS_FOUND" != x; then
22989    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22990
22991  if test "x$BOOT_JDK_FOUND" = xno; then
22992    # Now execute the test
22993
22994        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22995        if test -d "$BOOT_JDK"; then
22996          BOOT_JDK_FOUND=maybe
22997          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22998$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22999        fi
23000
23001
23002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23004      # Do we have a bin/java?
23005      if test ! -x "$BOOT_JDK/bin/java"; then
23006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23008        BOOT_JDK_FOUND=no
23009      else
23010        # Do we have a bin/javac?
23011        if test ! -x "$BOOT_JDK/bin/javac"; then
23012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23016          BOOT_JDK_FOUND=no
23017        else
23018          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23019          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23022            BOOT_JDK_FOUND=no
23023          else
23024            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23026
23027            # Extra M4 quote needed to protect [] in grep expression.
23028            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23029            if test "x$FOUND_CORRECT_VERSION" = x; then
23030              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23032              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23033$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23034              BOOT_JDK_FOUND=no
23035            else
23036              # We're done! :-)
23037              BOOT_JDK_FOUND=yes
23038
23039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23040
23041  # Input might be given as Windows format, start by converting to
23042  # unix format.
23043  path="$BOOT_JDK"
23044  new_path=`$CYGPATH -u "$path"`
23045
23046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23049  # "foo.exe" is OK but "foo" is an error.
23050  #
23051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23052  # It is also a way to make sure we got the proper file name for the real test later on.
23053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23054  if test "x$test_shortpath" = x; then
23055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23058  fi
23059
23060  # Call helper function which possibly converts this using DOS-style short mode.
23061  # If so, the updated path is stored in $new_path.
23062
23063  input_path="$new_path"
23064  # Check if we need to convert this using DOS-style short mode. If the path
23065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23066  # take no chances and rewrite it.
23067  # Note: m4 eats our [], so we need to use [ and ] instead.
23068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23069  if test "x$has_forbidden_chars" != x; then
23070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23074      # Going to short mode and back again did indeed matter. Since short mode is
23075      # case insensitive, let's make it lowercase to improve readability.
23076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23077      # Now convert it back to Unix-stile (cygpath)
23078      input_path=`$CYGPATH -u "$shortmode_path"`
23079      new_path="$input_path"
23080    fi
23081  fi
23082
23083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23084  if test "x$test_cygdrive_prefix" = x; then
23085    # As a simple fix, exclude /usr/bin since it's not a real path.
23086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23088      # a path prefixed by /cygdrive for fixpath to work.
23089      new_path="$CYGWIN_ROOT_PATH$input_path"
23090    fi
23091  fi
23092
23093
23094  if test "x$path" != "x$new_path"; then
23095    BOOT_JDK="$new_path"
23096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23098  fi
23099
23100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23101
23102  path="$BOOT_JDK"
23103  has_colon=`$ECHO $path | $GREP ^.:`
23104  new_path="$path"
23105  if test "x$has_colon" = x; then
23106    # Not in mixed or Windows style, start by that.
23107    new_path=`cmd //c echo $path`
23108  fi
23109
23110
23111  input_path="$new_path"
23112  # Check if we need to convert this using DOS-style short mode. If the path
23113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23114  # take no chances and rewrite it.
23115  # Note: m4 eats our [], so we need to use [ and ] instead.
23116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23117  if test "x$has_forbidden_chars" != x; then
23118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23120  fi
23121
23122
23123  windows_path="$new_path"
23124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23125    unix_path=`$CYGPATH -u "$windows_path"`
23126    new_path="$unix_path"
23127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23129    new_path="$unix_path"
23130  fi
23131
23132  if test "x$path" != "x$new_path"; then
23133    BOOT_JDK="$new_path"
23134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23136  fi
23137
23138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23140
23141  else
23142    # We're on a posix platform. Hooray! :)
23143    path="$BOOT_JDK"
23144    has_space=`$ECHO "$path" | $GREP " "`
23145    if test "x$has_space" != x; then
23146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23147$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23148      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23149    fi
23150
23151    # Use eval to expand a potential ~
23152    eval path="$path"
23153    if test ! -f "$path" && test ! -d "$path"; then
23154      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23155    fi
23156
23157    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23158  fi
23159
23160              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23161$as_echo_n "checking for Boot JDK... " >&6; }
23162              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23163$as_echo "$BOOT_JDK" >&6; }
23164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23165$as_echo_n "checking Boot JDK version... " >&6; }
23166              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23168$as_echo "$BOOT_JDK_VERSION" >&6; }
23169            fi # end check jdk version
23170          fi # end check rt.jar
23171        fi # end check javac
23172      fi # end check java
23173    fi # end check boot jdk found
23174  fi
23175
23176    done
23177  fi
23178
23179  fi
23180
23181
23182    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23183    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23184      # Do we have a bin/java?
23185      if test ! -x "$BOOT_JDK/bin/java"; then
23186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23188        BOOT_JDK_FOUND=no
23189      else
23190        # Do we have a bin/javac?
23191        if test ! -x "$BOOT_JDK/bin/javac"; then
23192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23194          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23195$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23196          BOOT_JDK_FOUND=no
23197        else
23198          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23199          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23202            BOOT_JDK_FOUND=no
23203          else
23204            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23205            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23206
23207            # Extra M4 quote needed to protect [] in grep expression.
23208            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23209            if test "x$FOUND_CORRECT_VERSION" = x; then
23210              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23212              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23213$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23214              BOOT_JDK_FOUND=no
23215            else
23216              # We're done! :-)
23217              BOOT_JDK_FOUND=yes
23218
23219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23220
23221  # Input might be given as Windows format, start by converting to
23222  # unix format.
23223  path="$BOOT_JDK"
23224  new_path=`$CYGPATH -u "$path"`
23225
23226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23229  # "foo.exe" is OK but "foo" is an error.
23230  #
23231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23232  # It is also a way to make sure we got the proper file name for the real test later on.
23233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23234  if test "x$test_shortpath" = x; then
23235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23238  fi
23239
23240  # Call helper function which possibly converts this using DOS-style short mode.
23241  # If so, the updated path is stored in $new_path.
23242
23243  input_path="$new_path"
23244  # Check if we need to convert this using DOS-style short mode. If the path
23245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23246  # take no chances and rewrite it.
23247  # Note: m4 eats our [], so we need to use [ and ] instead.
23248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23249  if test "x$has_forbidden_chars" != x; then
23250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23254      # Going to short mode and back again did indeed matter. Since short mode is
23255      # case insensitive, let's make it lowercase to improve readability.
23256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23257      # Now convert it back to Unix-stile (cygpath)
23258      input_path=`$CYGPATH -u "$shortmode_path"`
23259      new_path="$input_path"
23260    fi
23261  fi
23262
23263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23264  if test "x$test_cygdrive_prefix" = x; then
23265    # As a simple fix, exclude /usr/bin since it's not a real path.
23266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23268      # a path prefixed by /cygdrive for fixpath to work.
23269      new_path="$CYGWIN_ROOT_PATH$input_path"
23270    fi
23271  fi
23272
23273
23274  if test "x$path" != "x$new_path"; then
23275    BOOT_JDK="$new_path"
23276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23278  fi
23279
23280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23281
23282  path="$BOOT_JDK"
23283  has_colon=`$ECHO $path | $GREP ^.:`
23284  new_path="$path"
23285  if test "x$has_colon" = x; then
23286    # Not in mixed or Windows style, start by that.
23287    new_path=`cmd //c echo $path`
23288  fi
23289
23290
23291  input_path="$new_path"
23292  # Check if we need to convert this using DOS-style short mode. If the path
23293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23294  # take no chances and rewrite it.
23295  # Note: m4 eats our [], so we need to use [ and ] instead.
23296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23297  if test "x$has_forbidden_chars" != x; then
23298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23300  fi
23301
23302
23303  windows_path="$new_path"
23304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23305    unix_path=`$CYGPATH -u "$windows_path"`
23306    new_path="$unix_path"
23307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23309    new_path="$unix_path"
23310  fi
23311
23312  if test "x$path" != "x$new_path"; then
23313    BOOT_JDK="$new_path"
23314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23316  fi
23317
23318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23320
23321  else
23322    # We're on a posix platform. Hooray! :)
23323    path="$BOOT_JDK"
23324    has_space=`$ECHO "$path" | $GREP " "`
23325    if test "x$has_space" != x; then
23326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23328      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23329    fi
23330
23331    # Use eval to expand a potential ~
23332    eval path="$path"
23333    if test ! -f "$path" && test ! -d "$path"; then
23334      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23335    fi
23336
23337    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23338  fi
23339
23340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23341$as_echo_n "checking for Boot JDK... " >&6; }
23342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23343$as_echo "$BOOT_JDK" >&6; }
23344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23345$as_echo_n "checking Boot JDK version... " >&6; }
23346              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23348$as_echo "$BOOT_JDK_VERSION" >&6; }
23349            fi # end check jdk version
23350          fi # end check rt.jar
23351        fi # end check javac
23352      fi # end check java
23353    fi # end check boot jdk found
23354  fi
23355
23356
23357  if test "x$BOOT_JDK_FOUND" = xno; then
23358    # Now execute the test
23359
23360  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23361  BOOT_JDK_SUFFIX=""
23362  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23363  if test "x$ALL_JDKS_FOUND" != x; then
23364    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23365
23366  if test "x$BOOT_JDK_FOUND" = xno; then
23367    # Now execute the test
23368
23369        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23370        if test -d "$BOOT_JDK"; then
23371          BOOT_JDK_FOUND=maybe
23372          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23373$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23374        fi
23375
23376
23377    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23378    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23379      # Do we have a bin/java?
23380      if test ! -x "$BOOT_JDK/bin/java"; then
23381        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23383        BOOT_JDK_FOUND=no
23384      else
23385        # Do we have a bin/javac?
23386        if test ! -x "$BOOT_JDK/bin/javac"; then
23387          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23389          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23390$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23391          BOOT_JDK_FOUND=no
23392        else
23393          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23394          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23397            BOOT_JDK_FOUND=no
23398          else
23399            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23400            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23401
23402            # Extra M4 quote needed to protect [] in grep expression.
23403            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23404            if test "x$FOUND_CORRECT_VERSION" = x; then
23405              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23407              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23408$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23409              BOOT_JDK_FOUND=no
23410            else
23411              # We're done! :-)
23412              BOOT_JDK_FOUND=yes
23413
23414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23415
23416  # Input might be given as Windows format, start by converting to
23417  # unix format.
23418  path="$BOOT_JDK"
23419  new_path=`$CYGPATH -u "$path"`
23420
23421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23424  # "foo.exe" is OK but "foo" is an error.
23425  #
23426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23427  # It is also a way to make sure we got the proper file name for the real test later on.
23428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23429  if test "x$test_shortpath" = x; then
23430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23431$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23432    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23433  fi
23434
23435  # Call helper function which possibly converts this using DOS-style short mode.
23436  # If so, the updated path is stored in $new_path.
23437
23438  input_path="$new_path"
23439  # Check if we need to convert this using DOS-style short mode. If the path
23440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23441  # take no chances and rewrite it.
23442  # Note: m4 eats our [], so we need to use [ and ] instead.
23443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23444  if test "x$has_forbidden_chars" != x; then
23445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23449      # Going to short mode and back again did indeed matter. Since short mode is
23450      # case insensitive, let's make it lowercase to improve readability.
23451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23452      # Now convert it back to Unix-stile (cygpath)
23453      input_path=`$CYGPATH -u "$shortmode_path"`
23454      new_path="$input_path"
23455    fi
23456  fi
23457
23458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23459  if test "x$test_cygdrive_prefix" = x; then
23460    # As a simple fix, exclude /usr/bin since it's not a real path.
23461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23463      # a path prefixed by /cygdrive for fixpath to work.
23464      new_path="$CYGWIN_ROOT_PATH$input_path"
23465    fi
23466  fi
23467
23468
23469  if test "x$path" != "x$new_path"; then
23470    BOOT_JDK="$new_path"
23471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23473  fi
23474
23475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23476
23477  path="$BOOT_JDK"
23478  has_colon=`$ECHO $path | $GREP ^.:`
23479  new_path="$path"
23480  if test "x$has_colon" = x; then
23481    # Not in mixed or Windows style, start by that.
23482    new_path=`cmd //c echo $path`
23483  fi
23484
23485
23486  input_path="$new_path"
23487  # Check if we need to convert this using DOS-style short mode. If the path
23488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23489  # take no chances and rewrite it.
23490  # Note: m4 eats our [], so we need to use [ and ] instead.
23491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23492  if test "x$has_forbidden_chars" != x; then
23493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23495  fi
23496
23497
23498  windows_path="$new_path"
23499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23500    unix_path=`$CYGPATH -u "$windows_path"`
23501    new_path="$unix_path"
23502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23504    new_path="$unix_path"
23505  fi
23506
23507  if test "x$path" != "x$new_path"; then
23508    BOOT_JDK="$new_path"
23509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23510$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23511  fi
23512
23513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23515
23516  else
23517    # We're on a posix platform. Hooray! :)
23518    path="$BOOT_JDK"
23519    has_space=`$ECHO "$path" | $GREP " "`
23520    if test "x$has_space" != x; then
23521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23523      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23524    fi
23525
23526    # Use eval to expand a potential ~
23527    eval path="$path"
23528    if test ! -f "$path" && test ! -d "$path"; then
23529      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23530    fi
23531
23532    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23533  fi
23534
23535              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23536$as_echo_n "checking for Boot JDK... " >&6; }
23537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23538$as_echo "$BOOT_JDK" >&6; }
23539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23540$as_echo_n "checking Boot JDK version... " >&6; }
23541              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23542              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23543$as_echo "$BOOT_JDK_VERSION" >&6; }
23544            fi # end check jdk version
23545          fi # end check rt.jar
23546        fi # end check javac
23547      fi # end check java
23548    fi # end check boot jdk found
23549  fi
23550
23551    done
23552  fi
23553
23554
23555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23557      # Do we have a bin/java?
23558      if test ! -x "$BOOT_JDK/bin/java"; then
23559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23561        BOOT_JDK_FOUND=no
23562      else
23563        # Do we have a bin/javac?
23564        if test ! -x "$BOOT_JDK/bin/javac"; then
23565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23569          BOOT_JDK_FOUND=no
23570        else
23571          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23572          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23575            BOOT_JDK_FOUND=no
23576          else
23577            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23579
23580            # Extra M4 quote needed to protect [] in grep expression.
23581            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23582            if test "x$FOUND_CORRECT_VERSION" = x; then
23583              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23585              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23586$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23587              BOOT_JDK_FOUND=no
23588            else
23589              # We're done! :-)
23590              BOOT_JDK_FOUND=yes
23591
23592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23593
23594  # Input might be given as Windows format, start by converting to
23595  # unix format.
23596  path="$BOOT_JDK"
23597  new_path=`$CYGPATH -u "$path"`
23598
23599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23602  # "foo.exe" is OK but "foo" is an error.
23603  #
23604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23605  # It is also a way to make sure we got the proper file name for the real test later on.
23606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23607  if test "x$test_shortpath" = x; then
23608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23611  fi
23612
23613  # Call helper function which possibly converts this using DOS-style short mode.
23614  # If so, the updated path is stored in $new_path.
23615
23616  input_path="$new_path"
23617  # Check if we need to convert this using DOS-style short mode. If the path
23618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23619  # take no chances and rewrite it.
23620  # Note: m4 eats our [], so we need to use [ and ] instead.
23621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23622  if test "x$has_forbidden_chars" != x; then
23623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23627      # Going to short mode and back again did indeed matter. Since short mode is
23628      # case insensitive, let's make it lowercase to improve readability.
23629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23630      # Now convert it back to Unix-stile (cygpath)
23631      input_path=`$CYGPATH -u "$shortmode_path"`
23632      new_path="$input_path"
23633    fi
23634  fi
23635
23636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23637  if test "x$test_cygdrive_prefix" = x; then
23638    # As a simple fix, exclude /usr/bin since it's not a real path.
23639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23641      # a path prefixed by /cygdrive for fixpath to work.
23642      new_path="$CYGWIN_ROOT_PATH$input_path"
23643    fi
23644  fi
23645
23646
23647  if test "x$path" != "x$new_path"; then
23648    BOOT_JDK="$new_path"
23649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23651  fi
23652
23653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23654
23655  path="$BOOT_JDK"
23656  has_colon=`$ECHO $path | $GREP ^.:`
23657  new_path="$path"
23658  if test "x$has_colon" = x; then
23659    # Not in mixed or Windows style, start by that.
23660    new_path=`cmd //c echo $path`
23661  fi
23662
23663
23664  input_path="$new_path"
23665  # Check if we need to convert this using DOS-style short mode. If the path
23666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23667  # take no chances and rewrite it.
23668  # Note: m4 eats our [], so we need to use [ and ] instead.
23669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23670  if test "x$has_forbidden_chars" != x; then
23671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23673  fi
23674
23675
23676  windows_path="$new_path"
23677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678    unix_path=`$CYGPATH -u "$windows_path"`
23679    new_path="$unix_path"
23680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23682    new_path="$unix_path"
23683  fi
23684
23685  if test "x$path" != "x$new_path"; then
23686    BOOT_JDK="$new_path"
23687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23689  fi
23690
23691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23693
23694  else
23695    # We're on a posix platform. Hooray! :)
23696    path="$BOOT_JDK"
23697    has_space=`$ECHO "$path" | $GREP " "`
23698    if test "x$has_space" != x; then
23699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23701      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23702    fi
23703
23704    # Use eval to expand a potential ~
23705    eval path="$path"
23706    if test ! -f "$path" && test ! -d "$path"; then
23707      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23708    fi
23709
23710    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23711  fi
23712
23713              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23714$as_echo_n "checking for Boot JDK... " >&6; }
23715              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23716$as_echo "$BOOT_JDK" >&6; }
23717              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23718$as_echo_n "checking Boot JDK version... " >&6; }
23719              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23720              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23721$as_echo "$BOOT_JDK_VERSION" >&6; }
23722            fi # end check jdk version
23723          fi # end check rt.jar
23724        fi # end check javac
23725      fi # end check java
23726    fi # end check boot jdk found
23727  fi
23728
23729  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23730
23731  if test "x$BOOT_JDK_FOUND" = xno; then
23732    # Now execute the test
23733
23734  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23735  BOOT_JDK_SUFFIX="/Contents/Home"
23736  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23737  if test "x$ALL_JDKS_FOUND" != x; then
23738    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23739
23740  if test "x$BOOT_JDK_FOUND" = xno; then
23741    # Now execute the test
23742
23743        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23744        if test -d "$BOOT_JDK"; then
23745          BOOT_JDK_FOUND=maybe
23746          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23747$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23748        fi
23749
23750
23751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23753      # Do we have a bin/java?
23754      if test ! -x "$BOOT_JDK/bin/java"; then
23755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23757        BOOT_JDK_FOUND=no
23758      else
23759        # Do we have a bin/javac?
23760        if test ! -x "$BOOT_JDK/bin/javac"; then
23761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23765          BOOT_JDK_FOUND=no
23766        else
23767          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23768          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23771            BOOT_JDK_FOUND=no
23772          else
23773            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23775
23776            # Extra M4 quote needed to protect [] in grep expression.
23777            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23778            if test "x$FOUND_CORRECT_VERSION" = x; then
23779              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23781              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23782$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23783              BOOT_JDK_FOUND=no
23784            else
23785              # We're done! :-)
23786              BOOT_JDK_FOUND=yes
23787
23788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  path="$BOOT_JDK"
23793  new_path=`$CYGPATH -u "$path"`
23794
23795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23798  # "foo.exe" is OK but "foo" is an error.
23799  #
23800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23801  # It is also a way to make sure we got the proper file name for the real test later on.
23802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23803  if test "x$test_shortpath" = x; then
23804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23807  fi
23808
23809  # Call helper function which possibly converts this using DOS-style short mode.
23810  # If so, the updated path is stored in $new_path.
23811
23812  input_path="$new_path"
23813  # Check if we need to convert this using DOS-style short mode. If the path
23814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815  # take no chances and rewrite it.
23816  # Note: m4 eats our [], so we need to use [ and ] instead.
23817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23818  if test "x$has_forbidden_chars" != x; then
23819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23823      # Going to short mode and back again did indeed matter. Since short mode is
23824      # case insensitive, let's make it lowercase to improve readability.
23825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23826      # Now convert it back to Unix-stile (cygpath)
23827      input_path=`$CYGPATH -u "$shortmode_path"`
23828      new_path="$input_path"
23829    fi
23830  fi
23831
23832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23833  if test "x$test_cygdrive_prefix" = x; then
23834    # As a simple fix, exclude /usr/bin since it's not a real path.
23835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23837      # a path prefixed by /cygdrive for fixpath to work.
23838      new_path="$CYGWIN_ROOT_PATH$input_path"
23839    fi
23840  fi
23841
23842
23843  if test "x$path" != "x$new_path"; then
23844    BOOT_JDK="$new_path"
23845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847  fi
23848
23849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23850
23851  path="$BOOT_JDK"
23852  has_colon=`$ECHO $path | $GREP ^.:`
23853  new_path="$path"
23854  if test "x$has_colon" = x; then
23855    # Not in mixed or Windows style, start by that.
23856    new_path=`cmd //c echo $path`
23857  fi
23858
23859
23860  input_path="$new_path"
23861  # Check if we need to convert this using DOS-style short mode. If the path
23862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23863  # take no chances and rewrite it.
23864  # Note: m4 eats our [], so we need to use [ and ] instead.
23865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23866  if test "x$has_forbidden_chars" != x; then
23867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23869  fi
23870
23871
23872  windows_path="$new_path"
23873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23874    unix_path=`$CYGPATH -u "$windows_path"`
23875    new_path="$unix_path"
23876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23878    new_path="$unix_path"
23879  fi
23880
23881  if test "x$path" != "x$new_path"; then
23882    BOOT_JDK="$new_path"
23883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23885  fi
23886
23887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23889
23890  else
23891    # We're on a posix platform. Hooray! :)
23892    path="$BOOT_JDK"
23893    has_space=`$ECHO "$path" | $GREP " "`
23894    if test "x$has_space" != x; then
23895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23897      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23898    fi
23899
23900    # Use eval to expand a potential ~
23901    eval path="$path"
23902    if test ! -f "$path" && test ! -d "$path"; then
23903      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23904    fi
23905
23906    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23907  fi
23908
23909              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23910$as_echo_n "checking for Boot JDK... " >&6; }
23911              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23912$as_echo "$BOOT_JDK" >&6; }
23913              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23914$as_echo_n "checking Boot JDK version... " >&6; }
23915              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23917$as_echo "$BOOT_JDK_VERSION" >&6; }
23918            fi # end check jdk version
23919          fi # end check rt.jar
23920        fi # end check javac
23921      fi # end check java
23922    fi # end check boot jdk found
23923  fi
23924
23925    done
23926  fi
23927
23928
23929    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23930    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23931      # Do we have a bin/java?
23932      if test ! -x "$BOOT_JDK/bin/java"; then
23933        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23935        BOOT_JDK_FOUND=no
23936      else
23937        # Do we have a bin/javac?
23938        if test ! -x "$BOOT_JDK/bin/javac"; then
23939          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23941          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23942$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23943          BOOT_JDK_FOUND=no
23944        else
23945          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23946          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23947            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23949            BOOT_JDK_FOUND=no
23950          else
23951            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23953
23954            # Extra M4 quote needed to protect [] in grep expression.
23955            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23956            if test "x$FOUND_CORRECT_VERSION" = x; then
23957              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23959              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23960$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23961              BOOT_JDK_FOUND=no
23962            else
23963              # We're done! :-)
23964              BOOT_JDK_FOUND=yes
23965
23966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23967
23968  # Input might be given as Windows format, start by converting to
23969  # unix format.
23970  path="$BOOT_JDK"
23971  new_path=`$CYGPATH -u "$path"`
23972
23973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23976  # "foo.exe" is OK but "foo" is an error.
23977  #
23978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23979  # It is also a way to make sure we got the proper file name for the real test later on.
23980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23981  if test "x$test_shortpath" = x; then
23982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23985  fi
23986
23987  # Call helper function which possibly converts this using DOS-style short mode.
23988  # If so, the updated path is stored in $new_path.
23989
23990  input_path="$new_path"
23991  # Check if we need to convert this using DOS-style short mode. If the path
23992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23993  # take no chances and rewrite it.
23994  # Note: m4 eats our [], so we need to use [ and ] instead.
23995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23996  if test "x$has_forbidden_chars" != x; then
23997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24001      # Going to short mode and back again did indeed matter. Since short mode is
24002      # case insensitive, let's make it lowercase to improve readability.
24003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24004      # Now convert it back to Unix-stile (cygpath)
24005      input_path=`$CYGPATH -u "$shortmode_path"`
24006      new_path="$input_path"
24007    fi
24008  fi
24009
24010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24011  if test "x$test_cygdrive_prefix" = x; then
24012    # As a simple fix, exclude /usr/bin since it's not a real path.
24013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24015      # a path prefixed by /cygdrive for fixpath to work.
24016      new_path="$CYGWIN_ROOT_PATH$input_path"
24017    fi
24018  fi
24019
24020
24021  if test "x$path" != "x$new_path"; then
24022    BOOT_JDK="$new_path"
24023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24025  fi
24026
24027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24028
24029  path="$BOOT_JDK"
24030  has_colon=`$ECHO $path | $GREP ^.:`
24031  new_path="$path"
24032  if test "x$has_colon" = x; then
24033    # Not in mixed or Windows style, start by that.
24034    new_path=`cmd //c echo $path`
24035  fi
24036
24037
24038  input_path="$new_path"
24039  # Check if we need to convert this using DOS-style short mode. If the path
24040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24041  # take no chances and rewrite it.
24042  # Note: m4 eats our [], so we need to use [ and ] instead.
24043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24044  if test "x$has_forbidden_chars" != x; then
24045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24047  fi
24048
24049
24050  windows_path="$new_path"
24051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24052    unix_path=`$CYGPATH -u "$windows_path"`
24053    new_path="$unix_path"
24054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24056    new_path="$unix_path"
24057  fi
24058
24059  if test "x$path" != "x$new_path"; then
24060    BOOT_JDK="$new_path"
24061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24063  fi
24064
24065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24067
24068  else
24069    # We're on a posix platform. Hooray! :)
24070    path="$BOOT_JDK"
24071    has_space=`$ECHO "$path" | $GREP " "`
24072    if test "x$has_space" != x; then
24073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24075      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24076    fi
24077
24078    # Use eval to expand a potential ~
24079    eval path="$path"
24080    if test ! -f "$path" && test ! -d "$path"; then
24081      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24082    fi
24083
24084    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24085  fi
24086
24087              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24088$as_echo_n "checking for Boot JDK... " >&6; }
24089              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24090$as_echo "$BOOT_JDK" >&6; }
24091              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24092$as_echo_n "checking Boot JDK version... " >&6; }
24093              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24094              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24095$as_echo "$BOOT_JDK_VERSION" >&6; }
24096            fi # end check jdk version
24097          fi # end check rt.jar
24098        fi # end check javac
24099      fi # end check java
24100    fi # end check boot jdk found
24101  fi
24102
24103
24104  if test "x$BOOT_JDK_FOUND" = xno; then
24105    # Now execute the test
24106
24107  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24108  BOOT_JDK_SUFFIX="/Contents/Home"
24109  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24110  if test "x$ALL_JDKS_FOUND" != x; then
24111    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24112
24113  if test "x$BOOT_JDK_FOUND" = xno; then
24114    # Now execute the test
24115
24116        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24117        if test -d "$BOOT_JDK"; then
24118          BOOT_JDK_FOUND=maybe
24119          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24120$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24121        fi
24122
24123
24124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24126      # Do we have a bin/java?
24127      if test ! -x "$BOOT_JDK/bin/java"; then
24128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24130        BOOT_JDK_FOUND=no
24131      else
24132        # Do we have a bin/javac?
24133        if test ! -x "$BOOT_JDK/bin/javac"; then
24134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24138          BOOT_JDK_FOUND=no
24139        else
24140          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24141          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24144            BOOT_JDK_FOUND=no
24145          else
24146            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24148
24149            # Extra M4 quote needed to protect [] in grep expression.
24150            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24151            if test "x$FOUND_CORRECT_VERSION" = x; then
24152              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24154              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24155$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24156              BOOT_JDK_FOUND=no
24157            else
24158              # We're done! :-)
24159              BOOT_JDK_FOUND=yes
24160
24161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24162
24163  # Input might be given as Windows format, start by converting to
24164  # unix format.
24165  path="$BOOT_JDK"
24166  new_path=`$CYGPATH -u "$path"`
24167
24168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24171  # "foo.exe" is OK but "foo" is an error.
24172  #
24173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24174  # It is also a way to make sure we got the proper file name for the real test later on.
24175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24176  if test "x$test_shortpath" = x; then
24177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24180  fi
24181
24182  # Call helper function which possibly converts this using DOS-style short mode.
24183  # If so, the updated path is stored in $new_path.
24184
24185  input_path="$new_path"
24186  # Check if we need to convert this using DOS-style short mode. If the path
24187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24188  # take no chances and rewrite it.
24189  # Note: m4 eats our [], so we need to use [ and ] instead.
24190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24191  if test "x$has_forbidden_chars" != x; then
24192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24196      # Going to short mode and back again did indeed matter. Since short mode is
24197      # case insensitive, let's make it lowercase to improve readability.
24198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24199      # Now convert it back to Unix-stile (cygpath)
24200      input_path=`$CYGPATH -u "$shortmode_path"`
24201      new_path="$input_path"
24202    fi
24203  fi
24204
24205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24206  if test "x$test_cygdrive_prefix" = x; then
24207    # As a simple fix, exclude /usr/bin since it's not a real path.
24208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24210      # a path prefixed by /cygdrive for fixpath to work.
24211      new_path="$CYGWIN_ROOT_PATH$input_path"
24212    fi
24213  fi
24214
24215
24216  if test "x$path" != "x$new_path"; then
24217    BOOT_JDK="$new_path"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24220  fi
24221
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223
24224  path="$BOOT_JDK"
24225  has_colon=`$ECHO $path | $GREP ^.:`
24226  new_path="$path"
24227  if test "x$has_colon" = x; then
24228    # Not in mixed or Windows style, start by that.
24229    new_path=`cmd //c echo $path`
24230  fi
24231
24232
24233  input_path="$new_path"
24234  # Check if we need to convert this using DOS-style short mode. If the path
24235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24236  # take no chances and rewrite it.
24237  # Note: m4 eats our [], so we need to use [ and ] instead.
24238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24239  if test "x$has_forbidden_chars" != x; then
24240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24242  fi
24243
24244
24245  windows_path="$new_path"
24246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24247    unix_path=`$CYGPATH -u "$windows_path"`
24248    new_path="$unix_path"
24249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24251    new_path="$unix_path"
24252  fi
24253
24254  if test "x$path" != "x$new_path"; then
24255    BOOT_JDK="$new_path"
24256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24258  fi
24259
24260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24262
24263  else
24264    # We're on a posix platform. Hooray! :)
24265    path="$BOOT_JDK"
24266    has_space=`$ECHO "$path" | $GREP " "`
24267    if test "x$has_space" != x; then
24268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24270      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24271    fi
24272
24273    # Use eval to expand a potential ~
24274    eval path="$path"
24275    if test ! -f "$path" && test ! -d "$path"; then
24276      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24277    fi
24278
24279    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24280  fi
24281
24282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24283$as_echo_n "checking for Boot JDK... " >&6; }
24284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24285$as_echo "$BOOT_JDK" >&6; }
24286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24287$as_echo_n "checking Boot JDK version... " >&6; }
24288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24290$as_echo "$BOOT_JDK_VERSION" >&6; }
24291            fi # end check jdk version
24292          fi # end check rt.jar
24293        fi # end check javac
24294      fi # end check java
24295    fi # end check boot jdk found
24296  fi
24297
24298    done
24299  fi
24300
24301
24302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24304      # Do we have a bin/java?
24305      if test ! -x "$BOOT_JDK/bin/java"; then
24306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24308        BOOT_JDK_FOUND=no
24309      else
24310        # Do we have a bin/javac?
24311        if test ! -x "$BOOT_JDK/bin/javac"; then
24312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24316          BOOT_JDK_FOUND=no
24317        else
24318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24322            BOOT_JDK_FOUND=no
24323          else
24324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24326
24327            # Extra M4 quote needed to protect [] in grep expression.
24328            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24329            if test "x$FOUND_CORRECT_VERSION" = x; then
24330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24333$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24334              BOOT_JDK_FOUND=no
24335            else
24336              # We're done! :-)
24337              BOOT_JDK_FOUND=yes
24338
24339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24340
24341  # Input might be given as Windows format, start by converting to
24342  # unix format.
24343  path="$BOOT_JDK"
24344  new_path=`$CYGPATH -u "$path"`
24345
24346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24349  # "foo.exe" is OK but "foo" is an error.
24350  #
24351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24352  # It is also a way to make sure we got the proper file name for the real test later on.
24353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24354  if test "x$test_shortpath" = x; then
24355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24358  fi
24359
24360  # Call helper function which possibly converts this using DOS-style short mode.
24361  # If so, the updated path is stored in $new_path.
24362
24363  input_path="$new_path"
24364  # Check if we need to convert this using DOS-style short mode. If the path
24365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24366  # take no chances and rewrite it.
24367  # Note: m4 eats our [], so we need to use [ and ] instead.
24368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24369  if test "x$has_forbidden_chars" != x; then
24370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24374      # Going to short mode and back again did indeed matter. Since short mode is
24375      # case insensitive, let's make it lowercase to improve readability.
24376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24377      # Now convert it back to Unix-stile (cygpath)
24378      input_path=`$CYGPATH -u "$shortmode_path"`
24379      new_path="$input_path"
24380    fi
24381  fi
24382
24383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24384  if test "x$test_cygdrive_prefix" = x; then
24385    # As a simple fix, exclude /usr/bin since it's not a real path.
24386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24388      # a path prefixed by /cygdrive for fixpath to work.
24389      new_path="$CYGWIN_ROOT_PATH$input_path"
24390    fi
24391  fi
24392
24393
24394  if test "x$path" != "x$new_path"; then
24395    BOOT_JDK="$new_path"
24396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24398  fi
24399
24400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24401
24402  path="$BOOT_JDK"
24403  has_colon=`$ECHO $path | $GREP ^.:`
24404  new_path="$path"
24405  if test "x$has_colon" = x; then
24406    # Not in mixed or Windows style, start by that.
24407    new_path=`cmd //c echo $path`
24408  fi
24409
24410
24411  input_path="$new_path"
24412  # Check if we need to convert this using DOS-style short mode. If the path
24413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24414  # take no chances and rewrite it.
24415  # Note: m4 eats our [], so we need to use [ and ] instead.
24416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24417  if test "x$has_forbidden_chars" != x; then
24418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24420  fi
24421
24422
24423  windows_path="$new_path"
24424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24425    unix_path=`$CYGPATH -u "$windows_path"`
24426    new_path="$unix_path"
24427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24429    new_path="$unix_path"
24430  fi
24431
24432  if test "x$path" != "x$new_path"; then
24433    BOOT_JDK="$new_path"
24434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24436  fi
24437
24438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24440
24441  else
24442    # We're on a posix platform. Hooray! :)
24443    path="$BOOT_JDK"
24444    has_space=`$ECHO "$path" | $GREP " "`
24445    if test "x$has_space" != x; then
24446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24449    fi
24450
24451    # Use eval to expand a potential ~
24452    eval path="$path"
24453    if test ! -f "$path" && test ! -d "$path"; then
24454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24455    fi
24456
24457    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24458  fi
24459
24460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24461$as_echo_n "checking for Boot JDK... " >&6; }
24462              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24463$as_echo "$BOOT_JDK" >&6; }
24464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24465$as_echo_n "checking Boot JDK version... " >&6; }
24466              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24468$as_echo "$BOOT_JDK_VERSION" >&6; }
24469            fi # end check jdk version
24470          fi # end check rt.jar
24471        fi # end check javac
24472      fi # end check java
24473    fi # end check boot jdk found
24474  fi
24475
24476  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24477
24478  if test "x$BOOT_JDK_FOUND" = xno; then
24479    # Now execute the test
24480
24481  BOOT_JDK_PREFIX="/usr/lib/jvm"
24482  BOOT_JDK_SUFFIX=""
24483  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24484  if test "x$ALL_JDKS_FOUND" != x; then
24485    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24486
24487  if test "x$BOOT_JDK_FOUND" = xno; then
24488    # Now execute the test
24489
24490        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24491        if test -d "$BOOT_JDK"; then
24492          BOOT_JDK_FOUND=maybe
24493          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24494$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24495        fi
24496
24497
24498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24500      # Do we have a bin/java?
24501      if test ! -x "$BOOT_JDK/bin/java"; then
24502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24504        BOOT_JDK_FOUND=no
24505      else
24506        # Do we have a bin/javac?
24507        if test ! -x "$BOOT_JDK/bin/javac"; then
24508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24512          BOOT_JDK_FOUND=no
24513        else
24514          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24515          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24518            BOOT_JDK_FOUND=no
24519          else
24520            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24522
24523            # Extra M4 quote needed to protect [] in grep expression.
24524            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24525            if test "x$FOUND_CORRECT_VERSION" = x; then
24526              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24528              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24529$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24530              BOOT_JDK_FOUND=no
24531            else
24532              # We're done! :-)
24533              BOOT_JDK_FOUND=yes
24534
24535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536
24537  # Input might be given as Windows format, start by converting to
24538  # unix format.
24539  path="$BOOT_JDK"
24540  new_path=`$CYGPATH -u "$path"`
24541
24542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24545  # "foo.exe" is OK but "foo" is an error.
24546  #
24547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24548  # It is also a way to make sure we got the proper file name for the real test later on.
24549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24550  if test "x$test_shortpath" = x; then
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24554  fi
24555
24556  # Call helper function which possibly converts this using DOS-style short mode.
24557  # If so, the updated path is stored in $new_path.
24558
24559  input_path="$new_path"
24560  # Check if we need to convert this using DOS-style short mode. If the path
24561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24562  # take no chances and rewrite it.
24563  # Note: m4 eats our [], so we need to use [ and ] instead.
24564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24565  if test "x$has_forbidden_chars" != x; then
24566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24570      # Going to short mode and back again did indeed matter. Since short mode is
24571      # case insensitive, let's make it lowercase to improve readability.
24572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24573      # Now convert it back to Unix-stile (cygpath)
24574      input_path=`$CYGPATH -u "$shortmode_path"`
24575      new_path="$input_path"
24576    fi
24577  fi
24578
24579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24580  if test "x$test_cygdrive_prefix" = x; then
24581    # As a simple fix, exclude /usr/bin since it's not a real path.
24582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24584      # a path prefixed by /cygdrive for fixpath to work.
24585      new_path="$CYGWIN_ROOT_PATH$input_path"
24586    fi
24587  fi
24588
24589
24590  if test "x$path" != "x$new_path"; then
24591    BOOT_JDK="$new_path"
24592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24594  fi
24595
24596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24597
24598  path="$BOOT_JDK"
24599  has_colon=`$ECHO $path | $GREP ^.:`
24600  new_path="$path"
24601  if test "x$has_colon" = x; then
24602    # Not in mixed or Windows style, start by that.
24603    new_path=`cmd //c echo $path`
24604  fi
24605
24606
24607  input_path="$new_path"
24608  # Check if we need to convert this using DOS-style short mode. If the path
24609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24610  # take no chances and rewrite it.
24611  # Note: m4 eats our [], so we need to use [ and ] instead.
24612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24613  if test "x$has_forbidden_chars" != x; then
24614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24616  fi
24617
24618
24619  windows_path="$new_path"
24620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24621    unix_path=`$CYGPATH -u "$windows_path"`
24622    new_path="$unix_path"
24623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24625    new_path="$unix_path"
24626  fi
24627
24628  if test "x$path" != "x$new_path"; then
24629    BOOT_JDK="$new_path"
24630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24632  fi
24633
24634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24636
24637  else
24638    # We're on a posix platform. Hooray! :)
24639    path="$BOOT_JDK"
24640    has_space=`$ECHO "$path" | $GREP " "`
24641    if test "x$has_space" != x; then
24642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24645    fi
24646
24647    # Use eval to expand a potential ~
24648    eval path="$path"
24649    if test ! -f "$path" && test ! -d "$path"; then
24650      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24651    fi
24652
24653    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24654  fi
24655
24656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24657$as_echo_n "checking for Boot JDK... " >&6; }
24658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24659$as_echo "$BOOT_JDK" >&6; }
24660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24661$as_echo_n "checking Boot JDK version... " >&6; }
24662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24664$as_echo "$BOOT_JDK_VERSION" >&6; }
24665            fi # end check jdk version
24666          fi # end check rt.jar
24667        fi # end check javac
24668      fi # end check java
24669    fi # end check boot jdk found
24670  fi
24671
24672    done
24673  fi
24674
24675
24676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24678      # Do we have a bin/java?
24679      if test ! -x "$BOOT_JDK/bin/java"; then
24680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24682        BOOT_JDK_FOUND=no
24683      else
24684        # Do we have a bin/javac?
24685        if test ! -x "$BOOT_JDK/bin/javac"; then
24686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24690          BOOT_JDK_FOUND=no
24691        else
24692          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24693          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24696            BOOT_JDK_FOUND=no
24697          else
24698            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24699            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24700
24701            # Extra M4 quote needed to protect [] in grep expression.
24702            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24703            if test "x$FOUND_CORRECT_VERSION" = x; then
24704              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24706              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24707$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24708              BOOT_JDK_FOUND=no
24709            else
24710              # We're done! :-)
24711              BOOT_JDK_FOUND=yes
24712
24713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24714
24715  # Input might be given as Windows format, start by converting to
24716  # unix format.
24717  path="$BOOT_JDK"
24718  new_path=`$CYGPATH -u "$path"`
24719
24720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24723  # "foo.exe" is OK but "foo" is an error.
24724  #
24725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24726  # It is also a way to make sure we got the proper file name for the real test later on.
24727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24728  if test "x$test_shortpath" = x; then
24729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24732  fi
24733
24734  # Call helper function which possibly converts this using DOS-style short mode.
24735  # If so, the updated path is stored in $new_path.
24736
24737  input_path="$new_path"
24738  # Check if we need to convert this using DOS-style short mode. If the path
24739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24740  # take no chances and rewrite it.
24741  # Note: m4 eats our [], so we need to use [ and ] instead.
24742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24743  if test "x$has_forbidden_chars" != x; then
24744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24748      # Going to short mode and back again did indeed matter. Since short mode is
24749      # case insensitive, let's make it lowercase to improve readability.
24750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24751      # Now convert it back to Unix-stile (cygpath)
24752      input_path=`$CYGPATH -u "$shortmode_path"`
24753      new_path="$input_path"
24754    fi
24755  fi
24756
24757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24758  if test "x$test_cygdrive_prefix" = x; then
24759    # As a simple fix, exclude /usr/bin since it's not a real path.
24760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24762      # a path prefixed by /cygdrive for fixpath to work.
24763      new_path="$CYGWIN_ROOT_PATH$input_path"
24764    fi
24765  fi
24766
24767
24768  if test "x$path" != "x$new_path"; then
24769    BOOT_JDK="$new_path"
24770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24772  fi
24773
24774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24775
24776  path="$BOOT_JDK"
24777  has_colon=`$ECHO $path | $GREP ^.:`
24778  new_path="$path"
24779  if test "x$has_colon" = x; then
24780    # Not in mixed or Windows style, start by that.
24781    new_path=`cmd //c echo $path`
24782  fi
24783
24784
24785  input_path="$new_path"
24786  # Check if we need to convert this using DOS-style short mode. If the path
24787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24788  # take no chances and rewrite it.
24789  # Note: m4 eats our [], so we need to use [ and ] instead.
24790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24791  if test "x$has_forbidden_chars" != x; then
24792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24794  fi
24795
24796
24797  windows_path="$new_path"
24798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24799    unix_path=`$CYGPATH -u "$windows_path"`
24800    new_path="$unix_path"
24801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24803    new_path="$unix_path"
24804  fi
24805
24806  if test "x$path" != "x$new_path"; then
24807    BOOT_JDK="$new_path"
24808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24810  fi
24811
24812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24814
24815  else
24816    # We're on a posix platform. Hooray! :)
24817    path="$BOOT_JDK"
24818    has_space=`$ECHO "$path" | $GREP " "`
24819    if test "x$has_space" != x; then
24820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24823    fi
24824
24825    # Use eval to expand a potential ~
24826    eval path="$path"
24827    if test ! -f "$path" && test ! -d "$path"; then
24828      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24829    fi
24830
24831    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24832  fi
24833
24834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24835$as_echo_n "checking for Boot JDK... " >&6; }
24836              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24837$as_echo "$BOOT_JDK" >&6; }
24838              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24839$as_echo_n "checking Boot JDK version... " >&6; }
24840              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24841              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24842$as_echo "$BOOT_JDK_VERSION" >&6; }
24843            fi # end check jdk version
24844          fi # end check rt.jar
24845        fi # end check javac
24846      fi # end check java
24847    fi # end check boot jdk found
24848  fi
24849
24850  fi
24851
24852
24853    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24854    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24855      # Do we have a bin/java?
24856      if test ! -x "$BOOT_JDK/bin/java"; then
24857        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24859        BOOT_JDK_FOUND=no
24860      else
24861        # Do we have a bin/javac?
24862        if test ! -x "$BOOT_JDK/bin/javac"; then
24863          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24865          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24866$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24867          BOOT_JDK_FOUND=no
24868        else
24869          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24870          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24871            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24873            BOOT_JDK_FOUND=no
24874          else
24875            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24877
24878            # Extra M4 quote needed to protect [] in grep expression.
24879            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24880            if test "x$FOUND_CORRECT_VERSION" = x; then
24881              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24883              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24884$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24885              BOOT_JDK_FOUND=no
24886            else
24887              # We're done! :-)
24888              BOOT_JDK_FOUND=yes
24889
24890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24891
24892  # Input might be given as Windows format, start by converting to
24893  # unix format.
24894  path="$BOOT_JDK"
24895  new_path=`$CYGPATH -u "$path"`
24896
24897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24900  # "foo.exe" is OK but "foo" is an error.
24901  #
24902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24903  # It is also a way to make sure we got the proper file name for the real test later on.
24904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24905  if test "x$test_shortpath" = x; then
24906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24908    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24909  fi
24910
24911  # Call helper function which possibly converts this using DOS-style short mode.
24912  # If so, the updated path is stored in $new_path.
24913
24914  input_path="$new_path"
24915  # Check if we need to convert this using DOS-style short mode. If the path
24916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24917  # take no chances and rewrite it.
24918  # Note: m4 eats our [], so we need to use [ and ] instead.
24919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24920  if test "x$has_forbidden_chars" != x; then
24921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24925      # Going to short mode and back again did indeed matter. Since short mode is
24926      # case insensitive, let's make it lowercase to improve readability.
24927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24928      # Now convert it back to Unix-stile (cygpath)
24929      input_path=`$CYGPATH -u "$shortmode_path"`
24930      new_path="$input_path"
24931    fi
24932  fi
24933
24934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24935  if test "x$test_cygdrive_prefix" = x; then
24936    # As a simple fix, exclude /usr/bin since it's not a real path.
24937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24939      # a path prefixed by /cygdrive for fixpath to work.
24940      new_path="$CYGWIN_ROOT_PATH$input_path"
24941    fi
24942  fi
24943
24944
24945  if test "x$path" != "x$new_path"; then
24946    BOOT_JDK="$new_path"
24947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24949  fi
24950
24951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24952
24953  path="$BOOT_JDK"
24954  has_colon=`$ECHO $path | $GREP ^.:`
24955  new_path="$path"
24956  if test "x$has_colon" = x; then
24957    # Not in mixed or Windows style, start by that.
24958    new_path=`cmd //c echo $path`
24959  fi
24960
24961
24962  input_path="$new_path"
24963  # Check if we need to convert this using DOS-style short mode. If the path
24964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24965  # take no chances and rewrite it.
24966  # Note: m4 eats our [], so we need to use [ and ] instead.
24967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24968  if test "x$has_forbidden_chars" != x; then
24969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24971  fi
24972
24973
24974  windows_path="$new_path"
24975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24976    unix_path=`$CYGPATH -u "$windows_path"`
24977    new_path="$unix_path"
24978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24980    new_path="$unix_path"
24981  fi
24982
24983  if test "x$path" != "x$new_path"; then
24984    BOOT_JDK="$new_path"
24985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24987  fi
24988
24989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24991
24992  else
24993    # We're on a posix platform. Hooray! :)
24994    path="$BOOT_JDK"
24995    has_space=`$ECHO "$path" | $GREP " "`
24996    if test "x$has_space" != x; then
24997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24999      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25000    fi
25001
25002    # Use eval to expand a potential ~
25003    eval path="$path"
25004    if test ! -f "$path" && test ! -d "$path"; then
25005      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25006    fi
25007
25008    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25009  fi
25010
25011              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25012$as_echo_n "checking for Boot JDK... " >&6; }
25013              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25014$as_echo "$BOOT_JDK" >&6; }
25015              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25016$as_echo_n "checking Boot JDK version... " >&6; }
25017              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25018              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25019$as_echo "$BOOT_JDK_VERSION" >&6; }
25020            fi # end check jdk version
25021          fi # end check rt.jar
25022        fi # end check javac
25023      fi # end check java
25024    fi # end check boot jdk found
25025  fi
25026
25027
25028  # If we haven't found anything yet, we've truly lost. Give up.
25029  if test "x$BOOT_JDK_FOUND" = xno; then
25030
25031  # Print a helpful message on how to acquire the necessary build dependency.
25032  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25033  MISSING_DEPENDENCY=openjdk
25034
25035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25036    cygwin_help $MISSING_DEPENDENCY
25037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25038    msys_help $MISSING_DEPENDENCY
25039  else
25040    PKGHANDLER_COMMAND=
25041
25042    case $PKGHANDLER in
25043      apt-get)
25044        apt_help     $MISSING_DEPENDENCY ;;
25045      yum)
25046        yum_help     $MISSING_DEPENDENCY ;;
25047      port)
25048        port_help    $MISSING_DEPENDENCY ;;
25049      pkgutil)
25050        pkgutil_help $MISSING_DEPENDENCY ;;
25051      pkgadd)
25052        pkgadd_help  $MISSING_DEPENDENCY ;;
25053    esac
25054
25055    if test "x$PKGHANDLER_COMMAND" != x; then
25056      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25057    fi
25058  fi
25059
25060    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25061$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25062    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25063$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25064    as_fn_error $? "Cannot continue" "$LINENO" 5
25065  fi
25066
25067  # Setup proper paths for what we found
25068  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25069  if test ! -f "$BOOT_RTJAR"; then
25070    # On MacOSX it is called classes.jar
25071    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25072    if test -f "$BOOT_RTJAR"; then
25073      # Remove the ..
25074      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25075    fi
25076  fi
25077  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25078  BOOT_JDK="$BOOT_JDK"
25079
25080
25081
25082
25083  # Setup tools from the Boot JDK.
25084
25085  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25086
25087  # Publish this variable in the help.
25088
25089
25090  if test "x$JAVA" = x; then
25091    # The variable is not set by user, try to locate tool using the code snippet
25092
25093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25094$as_echo_n "checking for java in Boot JDK... " >&6; }
25095      JAVA=$BOOT_JDK/bin/java
25096      if test ! -x $JAVA; then
25097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25098$as_echo "not found" >&6; }
25099        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25100$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25101        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25102      fi
25103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25104$as_echo "ok" >&6; }
25105
25106
25107  else
25108    # The variable is set, but is it from the command line or the environment?
25109
25110    # Try to remove the string !JAVA! from our list.
25111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25113      # If it failed, the variable was not from the command line. Ignore it,
25114      # but warn the user (except for BASH, which is always set by the calling BASH).
25115      if test "xJAVA" != xBASH; then
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25117$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25118      fi
25119      # Try to locate tool using the code snippet
25120
25121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25122$as_echo_n "checking for java in Boot JDK... " >&6; }
25123      JAVA=$BOOT_JDK/bin/java
25124      if test ! -x $JAVA; then
25125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25126$as_echo "not found" >&6; }
25127        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25128$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25129        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25130      fi
25131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25132$as_echo "ok" >&6; }
25133
25134
25135    else
25136      # If it succeeded, then it was overridden by the user. We will use it
25137      # for the tool.
25138
25139      # First remove it from the list of overridden variables, so we can test
25140      # for unknown variables in the end.
25141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25142
25143      # Check if the provided tool contains a complete path.
25144      tool_specified="$JAVA"
25145      tool_basename="${tool_specified##*/}"
25146      if test "x$tool_basename" = "x$tool_specified"; then
25147        # A command without a complete path is provided, search $PATH.
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25149$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25150        # Extract the first word of "$tool_basename", so it can be a program name with args.
25151set dummy $tool_basename; ac_word=$2
25152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25153$as_echo_n "checking for $ac_word... " >&6; }
25154if ${ac_cv_path_JAVA+:} false; then :
25155  $as_echo_n "(cached) " >&6
25156else
25157  case $JAVA in
25158  [\\/]* | ?:[\\/]*)
25159  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25160  ;;
25161  *)
25162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25163for as_dir in $PATH
25164do
25165  IFS=$as_save_IFS
25166  test -z "$as_dir" && as_dir=.
25167    for ac_exec_ext in '' $ac_executable_extensions; do
25168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25169    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25171    break 2
25172  fi
25173done
25174  done
25175IFS=$as_save_IFS
25176
25177  ;;
25178esac
25179fi
25180JAVA=$ac_cv_path_JAVA
25181if test -n "$JAVA"; then
25182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25183$as_echo "$JAVA" >&6; }
25184else
25185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25186$as_echo "no" >&6; }
25187fi
25188
25189
25190        if test "x$JAVA" = x; then
25191          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25192        fi
25193      else
25194        # Otherwise we believe it is a complete path. Use it as it is.
25195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25196$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25198$as_echo_n "checking for JAVA... " >&6; }
25199        if test ! -x "$tool_specified"; then
25200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25201$as_echo "not found" >&6; }
25202          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25203        fi
25204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25205$as_echo "$tool_specified" >&6; }
25206      fi
25207    fi
25208  fi
25209
25210
25211
25212  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25213
25214  # Publish this variable in the help.
25215
25216
25217  if test "x$JAVAC" = x; then
25218    # The variable is not set by user, try to locate tool using the code snippet
25219
25220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25221$as_echo_n "checking for javac in Boot JDK... " >&6; }
25222      JAVAC=$BOOT_JDK/bin/javac
25223      if test ! -x $JAVAC; then
25224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25225$as_echo "not found" >&6; }
25226        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25227$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25228        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25229      fi
25230      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25231$as_echo "ok" >&6; }
25232
25233
25234  else
25235    # The variable is set, but is it from the command line or the environment?
25236
25237    # Try to remove the string !JAVAC! from our list.
25238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25240      # If it failed, the variable was not from the command line. Ignore it,
25241      # but warn the user (except for BASH, which is always set by the calling BASH).
25242      if test "xJAVAC" != xBASH; then
25243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25244$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25245      fi
25246      # Try to locate tool using the code snippet
25247
25248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25249$as_echo_n "checking for javac in Boot JDK... " >&6; }
25250      JAVAC=$BOOT_JDK/bin/javac
25251      if test ! -x $JAVAC; then
25252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25253$as_echo "not found" >&6; }
25254        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25255$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25256        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25257      fi
25258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25259$as_echo "ok" >&6; }
25260
25261
25262    else
25263      # If it succeeded, then it was overridden by the user. We will use it
25264      # for the tool.
25265
25266      # First remove it from the list of overridden variables, so we can test
25267      # for unknown variables in the end.
25268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25269
25270      # Check if the provided tool contains a complete path.
25271      tool_specified="$JAVAC"
25272      tool_basename="${tool_specified##*/}"
25273      if test "x$tool_basename" = "x$tool_specified"; then
25274        # A command without a complete path is provided, search $PATH.
25275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25276$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25277        # Extract the first word of "$tool_basename", so it can be a program name with args.
25278set dummy $tool_basename; ac_word=$2
25279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25280$as_echo_n "checking for $ac_word... " >&6; }
25281if ${ac_cv_path_JAVAC+:} false; then :
25282  $as_echo_n "(cached) " >&6
25283else
25284  case $JAVAC in
25285  [\\/]* | ?:[\\/]*)
25286  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25287  ;;
25288  *)
25289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25290for as_dir in $PATH
25291do
25292  IFS=$as_save_IFS
25293  test -z "$as_dir" && as_dir=.
25294    for ac_exec_ext in '' $ac_executable_extensions; do
25295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25296    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25298    break 2
25299  fi
25300done
25301  done
25302IFS=$as_save_IFS
25303
25304  ;;
25305esac
25306fi
25307JAVAC=$ac_cv_path_JAVAC
25308if test -n "$JAVAC"; then
25309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25310$as_echo "$JAVAC" >&6; }
25311else
25312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25313$as_echo "no" >&6; }
25314fi
25315
25316
25317        if test "x$JAVAC" = x; then
25318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25319        fi
25320      else
25321        # Otherwise we believe it is a complete path. Use it as it is.
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25323$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25325$as_echo_n "checking for JAVAC... " >&6; }
25326        if test ! -x "$tool_specified"; then
25327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25328$as_echo "not found" >&6; }
25329          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25330        fi
25331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25332$as_echo "$tool_specified" >&6; }
25333      fi
25334    fi
25335  fi
25336
25337
25338
25339  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25340
25341  # Publish this variable in the help.
25342
25343
25344  if test "x$JAVAH" = x; then
25345    # The variable is not set by user, try to locate tool using the code snippet
25346
25347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25348$as_echo_n "checking for javah in Boot JDK... " >&6; }
25349      JAVAH=$BOOT_JDK/bin/javah
25350      if test ! -x $JAVAH; then
25351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25352$as_echo "not found" >&6; }
25353        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25354$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25355        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25356      fi
25357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25358$as_echo "ok" >&6; }
25359
25360
25361  else
25362    # The variable is set, but is it from the command line or the environment?
25363
25364    # Try to remove the string !JAVAH! from our list.
25365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25367      # If it failed, the variable was not from the command line. Ignore it,
25368      # but warn the user (except for BASH, which is always set by the calling BASH).
25369      if test "xJAVAH" != xBASH; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25371$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25372      fi
25373      # Try to locate tool using the code snippet
25374
25375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25376$as_echo_n "checking for javah in Boot JDK... " >&6; }
25377      JAVAH=$BOOT_JDK/bin/javah
25378      if test ! -x $JAVAH; then
25379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25380$as_echo "not found" >&6; }
25381        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25382$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25383        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25384      fi
25385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25386$as_echo "ok" >&6; }
25387
25388
25389    else
25390      # If it succeeded, then it was overridden by the user. We will use it
25391      # for the tool.
25392
25393      # First remove it from the list of overridden variables, so we can test
25394      # for unknown variables in the end.
25395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25396
25397      # Check if the provided tool contains a complete path.
25398      tool_specified="$JAVAH"
25399      tool_basename="${tool_specified##*/}"
25400      if test "x$tool_basename" = "x$tool_specified"; then
25401        # A command without a complete path is provided, search $PATH.
25402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25403$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25404        # Extract the first word of "$tool_basename", so it can be a program name with args.
25405set dummy $tool_basename; ac_word=$2
25406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25407$as_echo_n "checking for $ac_word... " >&6; }
25408if ${ac_cv_path_JAVAH+:} false; then :
25409  $as_echo_n "(cached) " >&6
25410else
25411  case $JAVAH in
25412  [\\/]* | ?:[\\/]*)
25413  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25414  ;;
25415  *)
25416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25417for as_dir in $PATH
25418do
25419  IFS=$as_save_IFS
25420  test -z "$as_dir" && as_dir=.
25421    for ac_exec_ext in '' $ac_executable_extensions; do
25422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25423    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25425    break 2
25426  fi
25427done
25428  done
25429IFS=$as_save_IFS
25430
25431  ;;
25432esac
25433fi
25434JAVAH=$ac_cv_path_JAVAH
25435if test -n "$JAVAH"; then
25436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25437$as_echo "$JAVAH" >&6; }
25438else
25439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25440$as_echo "no" >&6; }
25441fi
25442
25443
25444        if test "x$JAVAH" = x; then
25445          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25446        fi
25447      else
25448        # Otherwise we believe it is a complete path. Use it as it is.
25449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25450$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25452$as_echo_n "checking for JAVAH... " >&6; }
25453        if test ! -x "$tool_specified"; then
25454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25455$as_echo "not found" >&6; }
25456          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25457        fi
25458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25459$as_echo "$tool_specified" >&6; }
25460      fi
25461    fi
25462  fi
25463
25464
25465
25466  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25467
25468  # Publish this variable in the help.
25469
25470
25471  if test "x$JAR" = x; then
25472    # The variable is not set by user, try to locate tool using the code snippet
25473
25474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25475$as_echo_n "checking for jar in Boot JDK... " >&6; }
25476      JAR=$BOOT_JDK/bin/jar
25477      if test ! -x $JAR; then
25478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25479$as_echo "not found" >&6; }
25480        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25481$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25482        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25483      fi
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25485$as_echo "ok" >&6; }
25486
25487
25488  else
25489    # The variable is set, but is it from the command line or the environment?
25490
25491    # Try to remove the string !JAR! from our list.
25492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25494      # If it failed, the variable was not from the command line. Ignore it,
25495      # but warn the user (except for BASH, which is always set by the calling BASH).
25496      if test "xJAR" != xBASH; then
25497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25498$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25499      fi
25500      # Try to locate tool using the code snippet
25501
25502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25503$as_echo_n "checking for jar in Boot JDK... " >&6; }
25504      JAR=$BOOT_JDK/bin/jar
25505      if test ! -x $JAR; then
25506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25507$as_echo "not found" >&6; }
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25509$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25510        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25511      fi
25512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25513$as_echo "ok" >&6; }
25514
25515
25516    else
25517      # If it succeeded, then it was overridden by the user. We will use it
25518      # for the tool.
25519
25520      # First remove it from the list of overridden variables, so we can test
25521      # for unknown variables in the end.
25522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25523
25524      # Check if the provided tool contains a complete path.
25525      tool_specified="$JAR"
25526      tool_basename="${tool_specified##*/}"
25527      if test "x$tool_basename" = "x$tool_specified"; then
25528        # A command without a complete path is provided, search $PATH.
25529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25530$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25531        # Extract the first word of "$tool_basename", so it can be a program name with args.
25532set dummy $tool_basename; ac_word=$2
25533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25534$as_echo_n "checking for $ac_word... " >&6; }
25535if ${ac_cv_path_JAR+:} false; then :
25536  $as_echo_n "(cached) " >&6
25537else
25538  case $JAR in
25539  [\\/]* | ?:[\\/]*)
25540  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25541  ;;
25542  *)
25543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25544for as_dir in $PATH
25545do
25546  IFS=$as_save_IFS
25547  test -z "$as_dir" && as_dir=.
25548    for ac_exec_ext in '' $ac_executable_extensions; do
25549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25550    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25552    break 2
25553  fi
25554done
25555  done
25556IFS=$as_save_IFS
25557
25558  ;;
25559esac
25560fi
25561JAR=$ac_cv_path_JAR
25562if test -n "$JAR"; then
25563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25564$as_echo "$JAR" >&6; }
25565else
25566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25567$as_echo "no" >&6; }
25568fi
25569
25570
25571        if test "x$JAR" = x; then
25572          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25573        fi
25574      else
25575        # Otherwise we believe it is a complete path. Use it as it is.
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25577$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25579$as_echo_n "checking for JAR... " >&6; }
25580        if test ! -x "$tool_specified"; then
25581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25582$as_echo "not found" >&6; }
25583          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25584        fi
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25586$as_echo "$tool_specified" >&6; }
25587      fi
25588    fi
25589  fi
25590
25591
25592
25593  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25594
25595  # Publish this variable in the help.
25596
25597
25598  if test "x$NATIVE2ASCII" = x; then
25599    # The variable is not set by user, try to locate tool using the code snippet
25600
25601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25602$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25603      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25604      if test ! -x $NATIVE2ASCII; then
25605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25606$as_echo "not found" >&6; }
25607        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25608$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25609        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25610      fi
25611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25612$as_echo "ok" >&6; }
25613
25614
25615  else
25616    # The variable is set, but is it from the command line or the environment?
25617
25618    # Try to remove the string !NATIVE2ASCII! from our list.
25619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25621      # If it failed, the variable was not from the command line. Ignore it,
25622      # but warn the user (except for BASH, which is always set by the calling BASH).
25623      if test "xNATIVE2ASCII" != xBASH; then
25624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25625$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25626      fi
25627      # Try to locate tool using the code snippet
25628
25629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25630$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25631      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25632      if test ! -x $NATIVE2ASCII; then
25633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25634$as_echo "not found" >&6; }
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25636$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25637        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25638      fi
25639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25640$as_echo "ok" >&6; }
25641
25642
25643    else
25644      # If it succeeded, then it was overridden by the user. We will use it
25645      # for the tool.
25646
25647      # First remove it from the list of overridden variables, so we can test
25648      # for unknown variables in the end.
25649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25650
25651      # Check if the provided tool contains a complete path.
25652      tool_specified="$NATIVE2ASCII"
25653      tool_basename="${tool_specified##*/}"
25654      if test "x$tool_basename" = "x$tool_specified"; then
25655        # A command without a complete path is provided, search $PATH.
25656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25657$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25658        # Extract the first word of "$tool_basename", so it can be a program name with args.
25659set dummy $tool_basename; ac_word=$2
25660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25661$as_echo_n "checking for $ac_word... " >&6; }
25662if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25663  $as_echo_n "(cached) " >&6
25664else
25665  case $NATIVE2ASCII in
25666  [\\/]* | ?:[\\/]*)
25667  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25668  ;;
25669  *)
25670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25671for as_dir in $PATH
25672do
25673  IFS=$as_save_IFS
25674  test -z "$as_dir" && as_dir=.
25675    for ac_exec_ext in '' $ac_executable_extensions; do
25676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25677    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25679    break 2
25680  fi
25681done
25682  done
25683IFS=$as_save_IFS
25684
25685  ;;
25686esac
25687fi
25688NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25689if test -n "$NATIVE2ASCII"; then
25690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25691$as_echo "$NATIVE2ASCII" >&6; }
25692else
25693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25694$as_echo "no" >&6; }
25695fi
25696
25697
25698        if test "x$NATIVE2ASCII" = x; then
25699          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25700        fi
25701      else
25702        # Otherwise we believe it is a complete path. Use it as it is.
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25704$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25706$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25707        if test ! -x "$tool_specified"; then
25708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25709$as_echo "not found" >&6; }
25710          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25711        fi
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25713$as_echo "$tool_specified" >&6; }
25714      fi
25715    fi
25716  fi
25717
25718
25719
25720  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25721
25722  # Publish this variable in the help.
25723
25724
25725  if test "x$JARSIGNER" = x; then
25726    # The variable is not set by user, try to locate tool using the code snippet
25727
25728      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25729$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25730      JARSIGNER=$BOOT_JDK/bin/jarsigner
25731      if test ! -x $JARSIGNER; then
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25733$as_echo "not found" >&6; }
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25735$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25736        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25737      fi
25738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25739$as_echo "ok" >&6; }
25740
25741
25742  else
25743    # The variable is set, but is it from the command line or the environment?
25744
25745    # Try to remove the string !JARSIGNER! from our list.
25746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25748      # If it failed, the variable was not from the command line. Ignore it,
25749      # but warn the user (except for BASH, which is always set by the calling BASH).
25750      if test "xJARSIGNER" != xBASH; then
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25752$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25753      fi
25754      # Try to locate tool using the code snippet
25755
25756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25757$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25758      JARSIGNER=$BOOT_JDK/bin/jarsigner
25759      if test ! -x $JARSIGNER; then
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25761$as_echo "not found" >&6; }
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25763$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25764        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25765      fi
25766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25767$as_echo "ok" >&6; }
25768
25769
25770    else
25771      # If it succeeded, then it was overridden by the user. We will use it
25772      # for the tool.
25773
25774      # First remove it from the list of overridden variables, so we can test
25775      # for unknown variables in the end.
25776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25777
25778      # Check if the provided tool contains a complete path.
25779      tool_specified="$JARSIGNER"
25780      tool_basename="${tool_specified##*/}"
25781      if test "x$tool_basename" = "x$tool_specified"; then
25782        # A command without a complete path is provided, search $PATH.
25783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25784$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25785        # Extract the first word of "$tool_basename", so it can be a program name with args.
25786set dummy $tool_basename; ac_word=$2
25787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25788$as_echo_n "checking for $ac_word... " >&6; }
25789if ${ac_cv_path_JARSIGNER+:} false; then :
25790  $as_echo_n "(cached) " >&6
25791else
25792  case $JARSIGNER in
25793  [\\/]* | ?:[\\/]*)
25794  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25795  ;;
25796  *)
25797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25798for as_dir in $PATH
25799do
25800  IFS=$as_save_IFS
25801  test -z "$as_dir" && as_dir=.
25802    for ac_exec_ext in '' $ac_executable_extensions; do
25803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25804    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25806    break 2
25807  fi
25808done
25809  done
25810IFS=$as_save_IFS
25811
25812  ;;
25813esac
25814fi
25815JARSIGNER=$ac_cv_path_JARSIGNER
25816if test -n "$JARSIGNER"; then
25817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25818$as_echo "$JARSIGNER" >&6; }
25819else
25820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25821$as_echo "no" >&6; }
25822fi
25823
25824
25825        if test "x$JARSIGNER" = x; then
25826          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25827        fi
25828      else
25829        # Otherwise we believe it is a complete path. Use it as it is.
25830        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25831$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25833$as_echo_n "checking for JARSIGNER... " >&6; }
25834        if test ! -x "$tool_specified"; then
25835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25836$as_echo "not found" >&6; }
25837          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25838        fi
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25840$as_echo "$tool_specified" >&6; }
25841      fi
25842    fi
25843  fi
25844
25845
25846
25847  # Finally, set some other options...
25848
25849  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25850  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25851
25852
25853
25854
25855  ##############################################################################
25856  #
25857  # Specify jvm options for anything that is run with the Boot JDK.
25858  # Not all JVM:s accept the same arguments on the command line.
25859  #
25860
25861# Check whether --with-boot-jdk-jvmargs was given.
25862if test "${with_boot_jdk_jvmargs+set}" = set; then :
25863  withval=$with_boot_jdk_jvmargs;
25864fi
25865
25866
25867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
25868$as_echo_n "checking flags for boot jdk java command ... " >&6; }
25869
25870  # Disable special log output when a debug build is used as Boot JDK...
25871
25872  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25873  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25874  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25875  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25876  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25877  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25878    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25879    JVM_ARG_OK=true
25880  else
25881    $ECHO "Arg failed:" >&5
25882    $ECHO "$OUTPUT" >&5
25883    JVM_ARG_OK=false
25884  fi
25885
25886
25887  # Apply user provided options.
25888
25889  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
25890  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
25891  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
25892  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25893  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25894  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25895    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
25896    JVM_ARG_OK=true
25897  else
25898    $ECHO "Arg failed:" >&5
25899    $ECHO "$OUTPUT" >&5
25900    JVM_ARG_OK=false
25901  fi
25902
25903
25904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
25905$as_echo "$boot_jdk_jvmargs" >&6; }
25906
25907  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
25908  JAVA_FLAGS=$boot_jdk_jvmargs
25909
25910
25911
25912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
25913$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
25914
25915  # Starting amount of heap memory.
25916
25917  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25918  $ECHO "Command: $JAVA -Xms64M -version" >&5
25919  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25920  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25921  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25922  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25923    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
25924    JVM_ARG_OK=true
25925  else
25926    $ECHO "Arg failed:" >&5
25927    $ECHO "$OUTPUT" >&5
25928    JVM_ARG_OK=false
25929  fi
25930
25931
25932  # Maximum amount of heap memory.
25933  # Maximum stack size.
25934  if test "x$BUILD_NUM_BITS" = x32; then
25935    JVM_MAX_HEAP=1100M
25936    STACK_SIZE=768
25937  else
25938    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
25939    # pointers are used. Apparently, we need to increase the heap and stack
25940    # space for the jvm. More specifically, when running javac to build huge
25941    # jdk batch
25942    JVM_MAX_HEAP=1600M
25943    STACK_SIZE=1536
25944  fi
25945
25946  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
25947  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
25948  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25949  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25950  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25951  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25952    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
25953    JVM_ARG_OK=true
25954  else
25955    $ECHO "Arg failed:" >&5
25956    $ECHO "$OUTPUT" >&5
25957    JVM_ARG_OK=false
25958  fi
25959
25960
25961  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25962  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25963  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25964  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25965  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25966  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25967    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
25968    JVM_ARG_OK=true
25969  else
25970    $ECHO "Arg failed:" >&5
25971    $ECHO "$OUTPUT" >&5
25972    JVM_ARG_OK=false
25973  fi
25974
25975
25976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
25977$as_echo "$boot_jdk_jvmargs_big" >&6; }
25978
25979  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
25980
25981
25982
25983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
25984$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
25985
25986  # Use serial gc for small short lived tools if possible
25987
25988  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
25989  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
25990  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
25991  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25992  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25993  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25994    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
25995    JVM_ARG_OK=true
25996  else
25997    $ECHO "Arg failed:" >&5
25998    $ECHO "$OUTPUT" >&5
25999    JVM_ARG_OK=false
26000  fi
26001
26002
26003  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26004  $ECHO "Command: $JAVA -Xms32M -version" >&5
26005  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26006  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26007  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26008  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26009    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26010    JVM_ARG_OK=true
26011  else
26012    $ECHO "Arg failed:" >&5
26013    $ECHO "$OUTPUT" >&5
26014    JVM_ARG_OK=false
26015  fi
26016
26017
26018  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26019  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26020  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26021  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26022  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26023  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26024    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26025    JVM_ARG_OK=true
26026  else
26027    $ECHO "Arg failed:" >&5
26028    $ECHO "$OUTPUT" >&5
26029    JVM_ARG_OK=false
26030  fi
26031
26032
26033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26034$as_echo "$boot_jdk_jvmargs_small" >&6; }
26035
26036  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26037
26038
26039
26040###############################################################################
26041#
26042# Configure the sources to use. We can add or override individual directories.
26043#
26044###############################################################################
26045
26046
26047  # Where are the sources. Any of these can be overridden
26048  # using --with-override-corba and the likes.
26049  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26050  CORBA_TOPDIR="$SRC_ROOT/corba"
26051  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26052  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26053  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26054  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26055  JDK_TOPDIR="$SRC_ROOT/jdk"
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066  ###############################################################################
26067  #
26068  # Pickup additional source for a component from outside of the source root
26069  # or override source for a component.
26070  #
26071
26072# Check whether --with-add-source-root was given.
26073if test "${with_add_source_root+set}" = set; then :
26074  withval=$with_add_source_root;
26075fi
26076
26077
26078
26079# Check whether --with-override-source-root was given.
26080if test "${with_override_source_root+set}" = set; then :
26081  withval=$with_override_source_root;
26082fi
26083
26084
26085
26086# Check whether --with-adds-and-overrides was given.
26087if test "${with_adds_and_overrides+set}" = set; then :
26088  withval=$with_adds_and_overrides;
26089fi
26090
26091
26092  if test "x$with_adds_and_overrides" != x; then
26093    with_add_source_root="$with_adds_and_overrides/adds"
26094    with_override_source_root="$with_adds_and_overrides/overrides"
26095  fi
26096
26097  if test "x$with_add_source_root" != x; then
26098    if ! test -d $with_add_source_root; then
26099      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26100    fi
26101    CURDIR="$PWD"
26102    cd "$with_add_source_root"
26103    ADD_SRC_ROOT="`pwd`"
26104    cd "$CURDIR"
26105    # Verify that the addon source root does not have any root makefiles.
26106    # If it does, then it is usually an error, prevent this.
26107    if test -f $with_add_source_root/langtools/make/Makefile; then
26108      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
26109    fi
26110    if test -f $with_add_source_root/corba/make/Makefile; then
26111      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
26112    fi
26113    if test -f $with_add_source_root/jaxp/make/Makefile; then
26114      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
26115    fi
26116    if test -f $with_add_source_root/jaxws/make/Makefile; then
26117      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
26118    fi
26119    if test -f $with_add_source_root/hotspot/make/Makefile; then
26120      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
26121    fi
26122    if test -f $with_add_source_root/nashorn/make/Makefile; then
26123      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
26124    fi
26125    if test -f $with_add_source_root/jdk/make/Makefile; then
26126      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
26127    fi
26128  fi
26129
26130
26131  if test "x$with_override_source_root" != x; then
26132    if ! test -d $with_override_source_root; then
26133      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26134    fi
26135    CURDIR="$PWD"
26136    cd "$with_override_source_root"
26137    OVERRIDE_SRC_ROOT="`pwd`"
26138    cd "$CURDIR"
26139    if test -f $with_override_source_root/langtools/make/Makefile; then
26140      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
26141    fi
26142    if test -f $with_override_source_root/corba/make/Makefile; then
26143      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
26144    fi
26145    if test -f $with_override_source_root/jaxp/make/Makefile; then
26146      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
26147    fi
26148    if test -f $with_override_source_root/jaxws/make/Makefile; then
26149      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
26150    fi
26151    if test -f $with_override_source_root/hotspot/make/Makefile; then
26152      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
26153    fi
26154    if test -f $with_override_source_root/nashorn/make/Makefile; then
26155      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
26156    fi
26157    if test -f $with_override_source_root/jdk/make/Makefile; then
26158      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
26159    fi
26160  fi
26161
26162
26163  ###############################################################################
26164  #
26165  # Override a repo completely, this is used for example when you have 3 small
26166  # development sandboxes of the langtools sources and want to avoid having 3 full
26167  # OpenJDK sources checked out on disk.
26168  #
26169  # Assuming that the 3 langtools sandboxes are located here:
26170  # /home/fredrik/sandbox1/langtools
26171  # /home/fredrik/sandbox2/langtools
26172  # /home/fredrik/sandbox3/langtools
26173  #
26174  # From the source root you create build subdirs manually:
26175  #     mkdir -p build1 build2 build3
26176  # in each build directory run:
26177  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26178  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26179  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26180  #
26181
26182
26183# Check whether --with-override-langtools was given.
26184if test "${with_override_langtools+set}" = set; then :
26185  withval=$with_override_langtools;
26186fi
26187
26188
26189
26190# Check whether --with-override-corba was given.
26191if test "${with_override_corba+set}" = set; then :
26192  withval=$with_override_corba;
26193fi
26194
26195
26196
26197# Check whether --with-override-jaxp was given.
26198if test "${with_override_jaxp+set}" = set; then :
26199  withval=$with_override_jaxp;
26200fi
26201
26202
26203
26204# Check whether --with-override-jaxws was given.
26205if test "${with_override_jaxws+set}" = set; then :
26206  withval=$with_override_jaxws;
26207fi
26208
26209
26210
26211# Check whether --with-override-hotspot was given.
26212if test "${with_override_hotspot+set}" = set; then :
26213  withval=$with_override_hotspot;
26214fi
26215
26216
26217
26218# Check whether --with-override-nashorn was given.
26219if test "${with_override_nashorn+set}" = set; then :
26220  withval=$with_override_nashorn;
26221fi
26222
26223
26224
26225# Check whether --with-override-jdk was given.
26226if test "${with_override_jdk+set}" = set; then :
26227  withval=$with_override_jdk;
26228fi
26229
26230
26231  if test "x$with_override_langtools" != x; then
26232    CURDIR="$PWD"
26233    cd "$with_override_langtools"
26234    LANGTOOLS_TOPDIR="`pwd`"
26235    cd "$CURDIR"
26236    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26237      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26238    fi
26239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26240$as_echo_n "checking if langtools should be overridden... " >&6; }
26241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26242$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26243  fi
26244  if test "x$with_override_corba" != x; then
26245    CURDIR="$PWD"
26246    cd "$with_override_corba"
26247    CORBA_TOPDIR="`pwd`"
26248    cd "$CURDIR"
26249    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26250      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26251    fi
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26253$as_echo_n "checking if corba should be overridden... " >&6; }
26254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26255$as_echo "yes with $CORBA_TOPDIR" >&6; }
26256  fi
26257  if test "x$with_override_jaxp" != x; then
26258    CURDIR="$PWD"
26259    cd "$with_override_jaxp"
26260    JAXP_TOPDIR="`pwd`"
26261    cd "$CURDIR"
26262    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26263      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26264    fi
26265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26266$as_echo_n "checking if jaxp should be overridden... " >&6; }
26267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26268$as_echo "yes with $JAXP_TOPDIR" >&6; }
26269  fi
26270  if test "x$with_override_jaxws" != x; then
26271    CURDIR="$PWD"
26272    cd "$with_override_jaxws"
26273    JAXWS_TOPDIR="`pwd`"
26274    cd "$CURDIR"
26275    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26276      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26277    fi
26278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26279$as_echo_n "checking if jaxws should be overridden... " >&6; }
26280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26281$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26282  fi
26283  if test "x$with_override_hotspot" != x; then
26284    CURDIR="$PWD"
26285    cd "$with_override_hotspot"
26286    HOTSPOT_TOPDIR="`pwd`"
26287    cd "$CURDIR"
26288    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26289      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26290    fi
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26292$as_echo_n "checking if hotspot should be overridden... " >&6; }
26293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26294$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26295  fi
26296  if test "x$with_override_nashorn" != x; then
26297    CURDIR="$PWD"
26298    cd "$with_override_nashorn"
26299    NASHORN_TOPDIR="`pwd`"
26300    cd "$CURDIR"
26301    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26302      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26303    fi
26304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26305$as_echo_n "checking if nashorn should be overridden... " >&6; }
26306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26307$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26308  fi
26309  if test "x$with_override_jdk" != x; then
26310    CURDIR="$PWD"
26311    cd "$with_override_jdk"
26312    JDK_TOPDIR="`pwd`"
26313    cd "$CURDIR"
26314    if ! test -f $JDK_TOPDIR/make/Makefile; then
26315      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26316    fi
26317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26318$as_echo_n "checking if JDK should be overridden... " >&6; }
26319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26320$as_echo "yes with $JDK_TOPDIR" >&6; }
26321  fi
26322
26323
26324  BUILD_OUTPUT="$OUTPUT_ROOT"
26325
26326
26327  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26328  BUILD_HOTSPOT=true
26329
26330
26331
26332# Check whether --with-import-hotspot was given.
26333if test "${with_import_hotspot+set}" = set; then :
26334  withval=$with_import_hotspot;
26335fi
26336
26337  if test "x$with_import_hotspot" != x; then
26338    CURDIR="$PWD"
26339    cd "$with_import_hotspot"
26340    HOTSPOT_DIST="`pwd`"
26341    cd "$CURDIR"
26342    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26343      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26344    fi
26345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26346$as_echo_n "checking if hotspot should be imported... " >&6; }
26347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26348$as_echo "yes from $HOTSPOT_DIST" >&6; }
26349    BUILD_HOTSPOT=false
26350  fi
26351
26352  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26353
26354
26355###############################################################################
26356#
26357# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26358# native code.
26359#
26360###############################################################################
26361
26362# First determine the toolchain type (compiler family)
26363
26364
26365# Check whether --with-toolchain-type was given.
26366if test "${with_toolchain_type+set}" = set; then :
26367  withval=$with_toolchain_type;
26368fi
26369
26370
26371  # Use indirect variable referencing
26372  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26373  VALID_TOOLCHAINS=${!toolchain_var_name}
26374
26375  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26376    # On Mac OS X, default toolchain to clang after Xcode 5
26377    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26378    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26379    if test $? -ne 0; then
26380      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26381    fi
26382    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26383        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26384        $CUT -f 1 -d .`
26385    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26386$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26387    if test $XCODE_MAJOR_VERSION -ge 5; then
26388        DEFAULT_TOOLCHAIN="clang"
26389    else
26390        DEFAULT_TOOLCHAIN="gcc"
26391    fi
26392  else
26393    # First toolchain type in the list is the default
26394    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26395  fi
26396
26397  if test "x$with_toolchain_type" = xlist; then
26398    # List all toolchains
26399    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26400$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26401    for toolchain in $VALID_TOOLCHAINS; do
26402      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26403      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26404      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26405    done
26406
26407    exit 0
26408  elif test "x$with_toolchain_type" != x; then
26409    # User override; check that it is valid
26410    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26411      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26412$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26413      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26414$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26415      as_fn_error $? "Cannot continue." "$LINENO" 5
26416    fi
26417    TOOLCHAIN_TYPE=$with_toolchain_type
26418  else
26419    # No flag given, use default
26420    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26421  fi
26422
26423
26424  TOOLCHAIN_CC_BINARY_clang="clang"
26425  TOOLCHAIN_CC_BINARY_gcc="gcc"
26426  TOOLCHAIN_CC_BINARY_microsoft="cl"
26427  TOOLCHAIN_CC_BINARY_solstudio="cc"
26428  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26429
26430  TOOLCHAIN_CXX_BINARY_clang="clang++"
26431  TOOLCHAIN_CXX_BINARY_gcc="g++"
26432  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26433  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26434  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26435
26436  # Use indirect variable referencing
26437  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26438  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26439  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26440  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26441  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26442  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26443
26444
26445  # Define filename patterns
26446  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26447    LIBRARY_PREFIX=
26448    SHARED_LIBRARY_SUFFIX='.dll'
26449    STATIC_LIBRARY_SUFFIX='.lib'
26450    SHARED_LIBRARY='$1.dll'
26451    STATIC_LIBRARY='$1.lib'
26452    OBJ_SUFFIX='.obj'
26453    EXE_SUFFIX='.exe'
26454  else
26455    LIBRARY_PREFIX=lib
26456    SHARED_LIBRARY_SUFFIX='.so'
26457    STATIC_LIBRARY_SUFFIX='.a'
26458    SHARED_LIBRARY='lib$1.so'
26459    STATIC_LIBRARY='lib$1.a'
26460    OBJ_SUFFIX='.o'
26461    EXE_SUFFIX=''
26462    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26463      SHARED_LIBRARY='lib$1.dylib'
26464      SHARED_LIBRARY_SUFFIX='.dylib'
26465    fi
26466  fi
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26478    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26479$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26480  else
26481    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26482$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26483  fi
26484
26485
26486# Then detect the actual binaries needed
26487
26488  # FIXME: Is this needed?
26489  ac_ext=cpp
26490ac_cpp='$CXXCPP $CPPFLAGS'
26491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26494
26495
26496  # Store the CFLAGS etc passed to the configure script.
26497  ORG_CFLAGS="$CFLAGS"
26498  ORG_CXXFLAGS="$CXXFLAGS"
26499  ORG_OBJCFLAGS="$OBJCFLAGS"
26500
26501  # On Windows, we need to detect the visual studio installation first.
26502  # This will change the PATH, but we need to keep that new PATH even
26503  # after toolchain detection is done, since the compiler (on x86) uses
26504  # it for DLL resolution in runtime.
26505  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26506
26507  # Store path to cygwin link.exe to help excluding it when searching for
26508  # VS linker. This must be done before changing the PATH when looking for VS.
26509  # Extract the first word of "link", so it can be a program name with args.
26510set dummy link; ac_word=$2
26511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26512$as_echo_n "checking for $ac_word... " >&6; }
26513if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26514  $as_echo_n "(cached) " >&6
26515else
26516  case $CYGWIN_LINK in
26517  [\\/]* | ?:[\\/]*)
26518  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26519  ;;
26520  *)
26521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26522for as_dir in $PATH
26523do
26524  IFS=$as_save_IFS
26525  test -z "$as_dir" && as_dir=.
26526    for ac_exec_ext in '' $ac_executable_extensions; do
26527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26528    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26530    break 2
26531  fi
26532done
26533  done
26534IFS=$as_save_IFS
26535
26536  ;;
26537esac
26538fi
26539CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26540if test -n "$CYGWIN_LINK"; then
26541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26542$as_echo "$CYGWIN_LINK" >&6; }
26543else
26544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26545$as_echo "no" >&6; }
26546fi
26547
26548
26549  if test "x$CYGWIN_LINK" != x; then
26550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26551$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26552    "$CYGWIN_LINK" --version > /dev/null
26553    if test $? -eq 0 ; then
26554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26555$as_echo "yes" >&6; }
26556    else
26557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26558$as_echo "no" >&6; }
26559      # This might be the VS linker. Don't exclude it later on.
26560      CYGWIN_LINK=""
26561    fi
26562  fi
26563
26564  # First-hand choice is to locate and run the vsvars bat file.
26565
26566  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26567    VCVARSFILE="vc/bin/vcvars32.bat"
26568  else
26569    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26570  fi
26571
26572  VS_ENV_CMD=""
26573  VS_ENV_ARGS=""
26574  if test "x$with_toolsdir" != x; then
26575
26576  if test "x$VS_ENV_CMD" = x; then
26577    VS100BASE="$with_toolsdir/../.."
26578    METHOD="--with-tools-dir"
26579
26580  windows_path="$VS100BASE"
26581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26582    unix_path=`$CYGPATH -u "$windows_path"`
26583    VS100BASE="$unix_path"
26584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26586    VS100BASE="$unix_path"
26587  fi
26588
26589    if test -d "$VS100BASE"; then
26590      if test -f "$VS100BASE/$VCVARSFILE"; then
26591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26592$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26593        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26594      else
26595        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26596$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26597        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26598$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26599      fi
26600    fi
26601  fi
26602
26603  fi
26604
26605  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26606    # Having specified an argument which is incorrect will produce an instant failure;
26607    # we should not go on looking
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26609$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26610    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26611$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26612    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26613  fi
26614
26615  if test "x$VS100COMNTOOLS" != x; then
26616
26617  if test "x$VS_ENV_CMD" = x; then
26618    VS100BASE="$VS100COMNTOOLS/../.."
26619    METHOD="VS100COMNTOOLS variable"
26620
26621  windows_path="$VS100BASE"
26622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26623    unix_path=`$CYGPATH -u "$windows_path"`
26624    VS100BASE="$unix_path"
26625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26627    VS100BASE="$unix_path"
26628  fi
26629
26630    if test -d "$VS100BASE"; then
26631      if test -f "$VS100BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26635      else
26636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26637$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26639$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26640      fi
26641    fi
26642  fi
26643
26644  fi
26645  if test "x$PROGRAMFILES" != x; then
26646
26647  if test "x$VS_ENV_CMD" = x; then
26648    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26649    METHOD="well-known name"
26650
26651  windows_path="$VS100BASE"
26652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26653    unix_path=`$CYGPATH -u "$windows_path"`
26654    VS100BASE="$unix_path"
26655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26657    VS100BASE="$unix_path"
26658  fi
26659
26660    if test -d "$VS100BASE"; then
26661      if test -f "$VS100BASE/$VCVARSFILE"; then
26662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26663$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26664        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26665      else
26666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26667$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26668        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26669$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26670      fi
26671    fi
26672  fi
26673
26674  fi
26675
26676  if test "x$VS_ENV_CMD" = x; then
26677    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26678    METHOD="well-known name"
26679
26680  windows_path="$VS100BASE"
26681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26682    unix_path=`$CYGPATH -u "$windows_path"`
26683    VS100BASE="$unix_path"
26684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26686    VS100BASE="$unix_path"
26687  fi
26688
26689    if test -d "$VS100BASE"; then
26690      if test -f "$VS100BASE/$VCVARSFILE"; then
26691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26692$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26693        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26694      else
26695        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26696$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26697        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26698$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26699      fi
26700    fi
26701  fi
26702
26703
26704  if test "x$VS_ENV_CMD" = x; then
26705    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26706    METHOD="well-known name"
26707
26708  windows_path="$VS100BASE"
26709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26710    unix_path=`$CYGPATH -u "$windows_path"`
26711    VS100BASE="$unix_path"
26712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26714    VS100BASE="$unix_path"
26715  fi
26716
26717    if test -d "$VS100BASE"; then
26718      if test -f "$VS100BASE/$VCVARSFILE"; then
26719        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26720$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26721        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26722      else
26723        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26724$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26725        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26726$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26727      fi
26728    fi
26729  fi
26730
26731
26732  if test "x$ProgramW6432" != x; then
26733
26734  if test "x$VS_ENV_CMD" = x; then
26735    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26736    METHOD="well-known name"
26737
26738  windows_path="$WIN_SDK_BASE"
26739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740    unix_path=`$CYGPATH -u "$windows_path"`
26741    WIN_SDK_BASE="$unix_path"
26742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26744    WIN_SDK_BASE="$unix_path"
26745  fi
26746
26747    if test -d "$WIN_SDK_BASE"; then
26748      # There have been cases of partial or broken SDK installations. A missing
26749      # lib dir is not going to work.
26750      if test ! -d "$WIN_SDK_BASE/../lib"; then
26751        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26752$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26753        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26754$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26755      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26757$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26758        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26759        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26760          VS_ENV_ARGS="/x86"
26761        else
26762          VS_ENV_ARGS="/x64"
26763        fi
26764      else
26765        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26766$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26767        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26768$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26769      fi
26770    fi
26771  fi
26772
26773  fi
26774  if test "x$PROGRAMW6432" != x; then
26775
26776  if test "x$VS_ENV_CMD" = x; then
26777    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26778    METHOD="well-known name"
26779
26780  windows_path="$WIN_SDK_BASE"
26781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26782    unix_path=`$CYGPATH -u "$windows_path"`
26783    WIN_SDK_BASE="$unix_path"
26784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26786    WIN_SDK_BASE="$unix_path"
26787  fi
26788
26789    if test -d "$WIN_SDK_BASE"; then
26790      # There have been cases of partial or broken SDK installations. A missing
26791      # lib dir is not going to work.
26792      if test ! -d "$WIN_SDK_BASE/../lib"; 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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26796$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26797      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26798        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26799$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26800        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26801        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26802          VS_ENV_ARGS="/x86"
26803        else
26804          VS_ENV_ARGS="/x64"
26805        fi
26806      else
26807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26808$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26810$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26811      fi
26812    fi
26813  fi
26814
26815  fi
26816  if test "x$PROGRAMFILES" != x; then
26817
26818  if test "x$VS_ENV_CMD" = x; then
26819    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26820    METHOD="well-known name"
26821
26822  windows_path="$WIN_SDK_BASE"
26823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26824    unix_path=`$CYGPATH -u "$windows_path"`
26825    WIN_SDK_BASE="$unix_path"
26826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26828    WIN_SDK_BASE="$unix_path"
26829  fi
26830
26831    if test -d "$WIN_SDK_BASE"; then
26832      # There have been cases of partial or broken SDK installations. A missing
26833      # lib dir is not going to work.
26834      if test ! -d "$WIN_SDK_BASE/../lib"; 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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26838$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26839      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26840        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26841$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26842        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26843        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26844          VS_ENV_ARGS="/x86"
26845        else
26846          VS_ENV_ARGS="/x64"
26847        fi
26848      else
26849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26850$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26851        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26852$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26853      fi
26854    fi
26855  fi
26856
26857  fi
26858
26859  if test "x$VS_ENV_CMD" = x; then
26860    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26861    METHOD="well-known name"
26862
26863  windows_path="$WIN_SDK_BASE"
26864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26865    unix_path=`$CYGPATH -u "$windows_path"`
26866    WIN_SDK_BASE="$unix_path"
26867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26869    WIN_SDK_BASE="$unix_path"
26870  fi
26871
26872    if test -d "$WIN_SDK_BASE"; then
26873      # There have been cases of partial or broken SDK installations. A missing
26874      # lib dir is not going to work.
26875      if test ! -d "$WIN_SDK_BASE/../lib"; then
26876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26877$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26878        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26879$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26880      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26882$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26883        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26884        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26885          VS_ENV_ARGS="/x86"
26886        else
26887          VS_ENV_ARGS="/x64"
26888        fi
26889      else
26890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26891$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26893$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26894      fi
26895    fi
26896  fi
26897
26898
26899  if test "x$VS_ENV_CMD" = x; then
26900    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26901    METHOD="well-known name"
26902
26903  windows_path="$WIN_SDK_BASE"
26904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26905    unix_path=`$CYGPATH -u "$windows_path"`
26906    WIN_SDK_BASE="$unix_path"
26907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26909    WIN_SDK_BASE="$unix_path"
26910  fi
26911
26912    if test -d "$WIN_SDK_BASE"; then
26913      # There have been cases of partial or broken SDK installations. A missing
26914      # lib dir is not going to work.
26915      if test ! -d "$WIN_SDK_BASE/../lib"; then
26916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26918        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26919$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26920      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26923        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26924        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26925          VS_ENV_ARGS="/x86"
26926        else
26927          VS_ENV_ARGS="/x64"
26928        fi
26929      else
26930        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26931$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26932        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26933$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26934      fi
26935    fi
26936  fi
26937
26938
26939  if test "x$VS_ENV_CMD" != x; then
26940    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26941
26942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26943
26944  # First separate the path from the arguments. This will split at the first
26945  # space.
26946  complete="$VS_ENV_CMD"
26947  path="${complete%% *}"
26948  tmp="$complete EOL"
26949  arguments="${tmp#* }"
26950
26951  # Input might be given as Windows format, start by converting to
26952  # unix format.
26953  new_path=`$CYGPATH -u "$path"`
26954
26955  # Now try to locate executable using which
26956  new_path=`$WHICH "$new_path" 2> /dev/null`
26957  # bat and cmd files are not always considered executable in cygwin causing which
26958  # to not find them
26959  if test "x$new_path" = x \
26960      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26961      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26962    new_path=`$CYGPATH -u "$path"`
26963  fi
26964  if test "x$new_path" = x; then
26965    # Oops. Which didn't find the executable.
26966    # The splitting of arguments from the executable at a space might have been incorrect,
26967    # since paths with space are more likely in Windows. Give it another try with the whole
26968    # argument.
26969    path="$complete"
26970    arguments="EOL"
26971    new_path=`$CYGPATH -u "$path"`
26972    new_path=`$WHICH "$new_path" 2> /dev/null`
26973    # bat and cmd files are not always considered executable in cygwin causing which
26974    # to not find them
26975    if test "x$new_path" = x \
26976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26978      new_path=`$CYGPATH -u "$path"`
26979    fi
26980    if test "x$new_path" = x; then
26981      # It's still not found. Now this is an unrecoverable error.
26982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26983$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26984      has_space=`$ECHO "$complete" | $GREP " "`
26985      if test "x$has_space" != x; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26988      fi
26989      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26990    fi
26991  fi
26992
26993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26996  # "foo.exe" is OK but "foo" is an error.
26997  #
26998  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26999  # It is also a way to make sure we got the proper file name for the real test later on.
27000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27001  if test "x$test_shortpath" = x; then
27002    # Short path failed, file does not exist as specified.
27003    # Try adding .exe or .cmd
27004    if test -f "${new_path}.exe"; then
27005      input_to_shortpath="${new_path}.exe"
27006    elif test -f "${new_path}.cmd"; then
27007      input_to_shortpath="${new_path}.cmd"
27008    else
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27010$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27012$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27013      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27014    fi
27015  else
27016    input_to_shortpath="$new_path"
27017  fi
27018
27019  # Call helper function which possibly converts this using DOS-style short mode.
27020  # If so, the updated path is stored in $new_path.
27021  new_path="$input_to_shortpath"
27022
27023  input_path="$input_to_shortpath"
27024  # Check if we need to convert this using DOS-style short mode. If the path
27025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27026  # take no chances and rewrite it.
27027  # Note: m4 eats our [], so we need to use [ and ] instead.
27028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27029  if test "x$has_forbidden_chars" != x; then
27030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27034      # Going to short mode and back again did indeed matter. Since short mode is
27035      # case insensitive, let's make it lowercase to improve readability.
27036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27037      # Now convert it back to Unix-stile (cygpath)
27038      input_path=`$CYGPATH -u "$shortmode_path"`
27039      new_path="$input_path"
27040    fi
27041  fi
27042
27043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27044  if test "x$test_cygdrive_prefix" = x; then
27045    # As a simple fix, exclude /usr/bin since it's not a real path.
27046    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27048      # a path prefixed by /cygdrive for fixpath to work.
27049      new_path="$CYGWIN_ROOT_PATH$input_path"
27050    fi
27051  fi
27052
27053  # remove trailing .exe if any
27054  new_path="${new_path/%.exe/}"
27055
27056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27057
27058  # First separate the path from the arguments. This will split at the first
27059  # space.
27060  complete="$VS_ENV_CMD"
27061  path="${complete%% *}"
27062  tmp="$complete EOL"
27063  arguments="${tmp#* }"
27064
27065  # Input might be given as Windows format, start by converting to
27066  # unix format.
27067  new_path="$path"
27068
27069  windows_path="$new_path"
27070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27071    unix_path=`$CYGPATH -u "$windows_path"`
27072    new_path="$unix_path"
27073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27075    new_path="$unix_path"
27076  fi
27077
27078
27079  # Now try to locate executable using which
27080  new_path=`$WHICH "$new_path" 2> /dev/null`
27081
27082  if test "x$new_path" = x; then
27083    # Oops. Which didn't find the executable.
27084    # The splitting of arguments from the executable at a space might have been incorrect,
27085    # since paths with space are more likely in Windows. Give it another try with the whole
27086    # argument.
27087    path="$complete"
27088    arguments="EOL"
27089    new_path="$path"
27090
27091  windows_path="$new_path"
27092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27093    unix_path=`$CYGPATH -u "$windows_path"`
27094    new_path="$unix_path"
27095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27097    new_path="$unix_path"
27098  fi
27099
27100
27101    new_path=`$WHICH "$new_path" 2> /dev/null`
27102
27103    if test "x$new_path" = x; then
27104      # It's still not found. Now this is an unrecoverable error.
27105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27106$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27107      has_space=`$ECHO "$complete" | $GREP " "`
27108      if test "x$has_space" != x; then
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27111      fi
27112      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27113    fi
27114  fi
27115
27116  # Now new_path has a complete unix path to the binary
27117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27118    # Keep paths in /bin as-is, but remove trailing .exe if any
27119    new_path="${new_path/%.exe/}"
27120    # Do not save /bin paths to all_fixpath_prefixes!
27121  else
27122    # Not in mixed or Windows style, start by that.
27123    new_path=`cmd //c echo $new_path`
27124
27125  input_path="$new_path"
27126  # Check if we need to convert this using DOS-style short mode. If the path
27127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27128  # take no chances and rewrite it.
27129  # Note: m4 eats our [], so we need to use [ and ] instead.
27130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27131  if test "x$has_forbidden_chars" != x; then
27132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27134  fi
27135
27136    # Output is in $new_path
27137
27138  windows_path="$new_path"
27139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27140    unix_path=`$CYGPATH -u "$windows_path"`
27141    new_path="$unix_path"
27142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27144    new_path="$unix_path"
27145  fi
27146
27147    # remove trailing .exe if any
27148    new_path="${new_path/%.exe/}"
27149
27150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27152  fi
27153
27154  else
27155    # We're on a posix platform. Hooray! :)
27156    # First separate the path from the arguments. This will split at the first
27157    # space.
27158    complete="$VS_ENV_CMD"
27159    path="${complete%% *}"
27160    tmp="$complete EOL"
27161    arguments="${tmp#* }"
27162
27163    # Cannot rely on the command "which" here since it doesn't always work.
27164    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27165    if test -z "$is_absolute_path"; then
27166      # Path to executable is not absolute. Find it.
27167      IFS_save="$IFS"
27168      IFS=:
27169      for p in $PATH; do
27170        if test -f "$p/$path" && test -x "$p/$path"; then
27171          new_path="$p/$path"
27172          break
27173        fi
27174      done
27175      IFS="$IFS_save"
27176    else
27177      # This is an absolute path, we can use it without further modifications.
27178      new_path="$path"
27179    fi
27180
27181    if test "x$new_path" = x; then
27182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27183$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27184      has_space=`$ECHO "$complete" | $GREP " "`
27185      if test "x$has_space" != x; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27188      fi
27189      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27190    fi
27191  fi
27192
27193  # Now join together the path and the arguments once again
27194  if test "x$arguments" != xEOL; then
27195    new_complete="$new_path ${arguments% *}"
27196  else
27197    new_complete="$new_path"
27198  fi
27199
27200  if test "x$complete" != "x$new_complete"; then
27201    VS_ENV_CMD="$new_complete"
27202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27203$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27204  fi
27205
27206
27207    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27209$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27210    cd $OUTPUT_ROOT
27211    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27212    # to autoconf standards.
27213
27214    #----
27215
27216    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27217    # but calculate the difference in Cygwin environment before/after running it and then
27218    # apply the diff.
27219
27220    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27221      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27222      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27223      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27224    else
27225      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27226      _dosbash=`cmd //c echo \`which bash\``
27227    fi
27228
27229    # generate the set of exported vars before/after the vs10 setup
27230    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27231    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27232    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27233    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27234
27235    # Now execute the newly created bat file.
27236    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27237    cmd /c localdevenvtmp.bat | cat
27238
27239    # apply the diff (less some non-vs10 vars named by "!")
27240    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27241    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27242    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27243
27244    # cleanup
27245    $RM localdevenvtmp*
27246    #----
27247    cd $CURDIR
27248    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27250$as_echo "no" >&6; }
27251      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27252$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27253      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27254$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27255      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27256$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27257      as_fn_error $? "Cannot continue" "$LINENO" 5
27258    fi
27259
27260    # Now set all paths and other env variables. This will allow the rest of
27261    # the configure script to find and run the compiler in the proper way.
27262    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27263$as_echo "$as_me: Setting extracted environment variables" >&6;}
27264    . $OUTPUT_ROOT/localdevenv.sh
27265  else
27266    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27267    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27268$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27269  fi
27270
27271  # At this point, we should have corrent variables in the environment, or we can't continue.
27272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27273$as_echo_n "checking for Visual Studio variables... " >&6; }
27274
27275  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27276    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27278$as_echo "present but broken" >&6; }
27279      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27280    else
27281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27282$as_echo "ok" >&6; }
27283      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27284      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27285      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27286      # Remove any paths containing # (typically F#) as that messes up make
27287      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27288      VS_PATH="$PATH"
27289
27290
27291
27292    fi
27293  else
27294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27295$as_echo "not found" >&6; }
27296
27297    if test "x$VS_ENV_CMD" = x; then
27298      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27299$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27300      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27301$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27302    else
27303      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27304$as_echo "$as_me: Running the extraction script failed." >&6;}
27305    fi
27306    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27307$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27308    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27309$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27310    as_fn_error $? "Cannot continue" "$LINENO" 5
27311  fi
27312
27313  fi
27314
27315  # autoconf magic only relies on PATH, so update it if tools dir is specified
27316  OLD_PATH="$PATH"
27317
27318  # For solaris we really need solaris tools, and not the GNU equivalent.
27319  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27320  # so add that to path before starting to probe.
27321  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27322  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27323    PATH="/usr/ccs/bin:$PATH"
27324  fi
27325
27326  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27327  # override all other locations.
27328  if test "x$TOOLS_DIR" != x; then
27329    PATH=$TOOLS_DIR:$PATH
27330  fi
27331
27332  # If a devkit is found on the builddeps server, then prepend its path to the
27333  # PATH variable. If there are cross compilers available in the devkit, these
27334  # will be found by AC_PROG_CC et al.
27335  DEVKIT=
27336
27337
27338  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27339    # Source the builddeps file again, to make sure it uses the latest variables!
27340    . $builddepsfile
27341    # Look for a target and build machine specific resource!
27342    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27343    if test "x$resource" = x; then
27344      # Ok, lets instead look for a target specific resource
27345      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27346    fi
27347    if test "x$resource" = x; then
27348      # Ok, lets instead look for a build specific resource
27349      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27350    fi
27351    if test "x$resource" = x; then
27352      # Ok, lets instead look for a generic resource
27353      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27354      resource=${builddep_devkit}
27355    fi
27356    if test "x$resource" != x; then
27357      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27358$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27359      # If the resource in the builddeps.conf file is an existing directory,
27360      # for example /java/linux/cups
27361      if test -d ${resource}; then
27362        depdir=${resource}
27363      else
27364
27365  # devkit is for example mymodule
27366  # $resource is for example libs/general/libmymod_1_2_3.zip
27367  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27368  # $with_builddeps_dir is for example /localhome/builddeps
27369  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27370  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27371  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27372  filename=`basename $resource`
27373  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27374  filebase=${filename%%.*}
27375  extension=${filename#*.}
27376  installdir=$with_builddeps_dir/$filebase
27377  if test ! -f $installdir/$filename.unpacked; then
27378    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27379$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27380    if test ! -d $installdir; then
27381      mkdir -p $installdir
27382    fi
27383    if test ! -d $installdir; then
27384      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27385    fi
27386    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27387    touch $tmpfile
27388    if test ! -f $tmpfile; then
27389      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27390    fi
27391
27392  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27393  # $tmpfile is the local file name for the downloaded file.
27394  VALID_TOOL=no
27395  if test "x$BDEPS_FTP" = xwget; then
27396    VALID_TOOL=yes
27397    wget -O $tmpfile $with_builddeps_server/$resource
27398  fi
27399  if test "x$BDEPS_FTP" = xlftp; then
27400    VALID_TOOL=yes
27401    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27402  fi
27403  if test "x$BDEPS_FTP" = xftp; then
27404    VALID_TOOL=yes
27405    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27406    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27407    FTPUSERPWD=${FTPSERVER%%@*}
27408    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27409      FTPUSER=${userpwd%%:*}
27410      FTPPWD=${userpwd#*@}
27411      FTPSERVER=${FTPSERVER#*@}
27412    else
27413      FTPUSER=ftp
27414      FTPPWD=ftp
27415    fi
27416    # the "pass" command does not work on some
27417    # ftp clients (read ftp.exe) but if it works,
27418    # passive mode is better!
27419    ( \
27420        echo "user $FTPUSER $FTPPWD"        ; \
27421        echo "pass"                         ; \
27422        echo "bin"                          ; \
27423        echo "get $FTPPATH $tmpfile"              ; \
27424    ) | ftp -in $FTPSERVER
27425  fi
27426  if test "x$VALID_TOOL" != xyes; then
27427    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27428  fi
27429
27430    mv $tmpfile $installdir/$filename
27431    if test ! -s $installdir/$filename; then
27432      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27433    fi
27434    case "$extension" in
27435      zip)  echo "Unzipping $installdir/$filename..."
27436        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27437        ;;
27438      tar.gz) echo "Untaring $installdir/$filename..."
27439        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27440        ;;
27441      tgz) echo "Untaring $installdir/$filename..."
27442        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27443        ;;
27444      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27445        ;;
27446    esac
27447  fi
27448  if test -f $installdir/$filename.unpacked; then
27449    depdir=$installdir
27450  fi
27451
27452      fi
27453      # Source the builddeps file again, because in the previous command, the depdir
27454      # was updated to point at the current build dependency install directory.
27455      . $builddepsfile
27456      # Now extract variables from the builddeps.conf files.
27457      theroot=${builddep_devkit_ROOT}
27458      thecflags=${builddep_devkit_CFLAGS}
27459      thelibs=${builddep_devkit_LIBS}
27460      if test "x$depdir" = x; then
27461        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27462      fi
27463      DEVKIT=$depdir
27464      if test "x$theroot" != x; then
27465        DEVKIT="$theroot"
27466      fi
27467      if test "x$thecflags" != x; then
27468        DEVKIT_CFLAGS="$thecflags"
27469      fi
27470      if test "x$thelibs" != x; then
27471        DEVKIT_LIBS="$thelibs"
27472      fi
27473
27474        # Found devkit
27475        PATH="$DEVKIT/bin:$PATH"
27476        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27477        if test "x$x_includes" = "xNONE"; then
27478          x_includes="$SYS_ROOT/usr/include/X11"
27479        fi
27480        if test "x$x_libraries" = "xNONE"; then
27481          x_libraries="$SYS_ROOT/usr/lib"
27482        fi
27483
27484
27485    fi
27486
27487  fi
27488
27489
27490
27491  #
27492  # Setup the compilers (CC and CXX)
27493  #
27494
27495  COMPILER_NAME=C
27496  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27497
27498  if test "x$CC" != x; then
27499    # User has supplied compiler name already, always let that override.
27500    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27501$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27502    if test "x`basename $CC`" = "x$CC"; then
27503      # A command without a complete path is provided, search $PATH.
27504
27505      for ac_prog in $CC
27506do
27507  # Extract the first word of "$ac_prog", so it can be a program name with args.
27508set dummy $ac_prog; ac_word=$2
27509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27510$as_echo_n "checking for $ac_word... " >&6; }
27511if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27512  $as_echo_n "(cached) " >&6
27513else
27514  case $POTENTIAL_CC in
27515  [\\/]* | ?:[\\/]*)
27516  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27517  ;;
27518  *)
27519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27520for as_dir in $PATH
27521do
27522  IFS=$as_save_IFS
27523  test -z "$as_dir" && as_dir=.
27524    for ac_exec_ext in '' $ac_executable_extensions; do
27525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27526    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27528    break 2
27529  fi
27530done
27531  done
27532IFS=$as_save_IFS
27533
27534  ;;
27535esac
27536fi
27537POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27538if test -n "$POTENTIAL_CC"; then
27539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27540$as_echo "$POTENTIAL_CC" >&6; }
27541else
27542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27543$as_echo "no" >&6; }
27544fi
27545
27546
27547  test -n "$POTENTIAL_CC" && break
27548done
27549
27550      if test "x$POTENTIAL_CC" != x; then
27551        CC=$POTENTIAL_CC
27552      else
27553        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27554      fi
27555    else
27556      # Otherwise it might already be a complete path
27557      if test ! -x "$CC"; then
27558        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27559      fi
27560    fi
27561  else
27562    # No user supplied value. Locate compiler ourselves.
27563
27564    # If we are cross compiling, assume cross compilation tools follows the
27565    # cross compilation standard where they are prefixed with the autoconf
27566    # standard name for the target. For example the binary
27567    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27568    # If we are not cross compiling, then the default compiler name will be
27569    # used.
27570
27571    CC=
27572    # If TOOLS_DIR is set, check for all compiler names in there first
27573    # before checking the rest of the PATH.
27574    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27575    # step, this should not be necessary.
27576    if test -n "$TOOLS_DIR"; then
27577      PATH_save="$PATH"
27578      PATH="$TOOLS_DIR"
27579      for ac_prog in $SEARCH_LIST
27580do
27581  # Extract the first word of "$ac_prog", so it can be a program name with args.
27582set dummy $ac_prog; ac_word=$2
27583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27584$as_echo_n "checking for $ac_word... " >&6; }
27585if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27586  $as_echo_n "(cached) " >&6
27587else
27588  case $TOOLS_DIR_CC in
27589  [\\/]* | ?:[\\/]*)
27590  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27591  ;;
27592  *)
27593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27594for as_dir in $PATH
27595do
27596  IFS=$as_save_IFS
27597  test -z "$as_dir" && as_dir=.
27598    for ac_exec_ext in '' $ac_executable_extensions; do
27599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27600    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27602    break 2
27603  fi
27604done
27605  done
27606IFS=$as_save_IFS
27607
27608  ;;
27609esac
27610fi
27611TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27612if test -n "$TOOLS_DIR_CC"; then
27613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27614$as_echo "$TOOLS_DIR_CC" >&6; }
27615else
27616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27617$as_echo "no" >&6; }
27618fi
27619
27620
27621  test -n "$TOOLS_DIR_CC" && break
27622done
27623
27624      CC=$TOOLS_DIR_CC
27625      PATH="$PATH_save"
27626    fi
27627
27628    # AC_PATH_PROGS can't be run multiple times with the same variable,
27629    # so create a new name for this run.
27630    if test "x$CC" = x; then
27631      for ac_prog in $SEARCH_LIST
27632do
27633  # Extract the first word of "$ac_prog", so it can be a program name with args.
27634set dummy $ac_prog; ac_word=$2
27635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27636$as_echo_n "checking for $ac_word... " >&6; }
27637if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27638  $as_echo_n "(cached) " >&6
27639else
27640  case $POTENTIAL_CC in
27641  [\\/]* | ?:[\\/]*)
27642  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27643  ;;
27644  *)
27645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27646for as_dir in $PATH
27647do
27648  IFS=$as_save_IFS
27649  test -z "$as_dir" && as_dir=.
27650    for ac_exec_ext in '' $ac_executable_extensions; do
27651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27652    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27654    break 2
27655  fi
27656done
27657  done
27658IFS=$as_save_IFS
27659
27660  ;;
27661esac
27662fi
27663POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27664if test -n "$POTENTIAL_CC"; then
27665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27666$as_echo "$POTENTIAL_CC" >&6; }
27667else
27668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27669$as_echo "no" >&6; }
27670fi
27671
27672
27673  test -n "$POTENTIAL_CC" && break
27674done
27675
27676      CC=$POTENTIAL_CC
27677    fi
27678
27679    if test "x$CC" = x; then
27680
27681  # Print a helpful message on how to acquire the necessary build dependency.
27682  # devkit is the help tag: freetype, cups, pulse, alsa etc
27683  MISSING_DEPENDENCY=devkit
27684
27685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27686    cygwin_help $MISSING_DEPENDENCY
27687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27688    msys_help $MISSING_DEPENDENCY
27689  else
27690    PKGHANDLER_COMMAND=
27691
27692    case $PKGHANDLER in
27693      apt-get)
27694        apt_help     $MISSING_DEPENDENCY ;;
27695      yum)
27696        yum_help     $MISSING_DEPENDENCY ;;
27697      port)
27698        port_help    $MISSING_DEPENDENCY ;;
27699      pkgutil)
27700        pkgutil_help $MISSING_DEPENDENCY ;;
27701      pkgadd)
27702        pkgadd_help  $MISSING_DEPENDENCY ;;
27703    esac
27704
27705    if test "x$PKGHANDLER_COMMAND" != x; then
27706      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27707    fi
27708  fi
27709
27710      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27711    fi
27712  fi
27713
27714  # Now we have a compiler binary in CC. Make sure it's okay.
27715
27716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717
27718  # First separate the path from the arguments. This will split at the first
27719  # space.
27720  complete="$CC"
27721  path="${complete%% *}"
27722  tmp="$complete EOL"
27723  arguments="${tmp#* }"
27724
27725  # Input might be given as Windows format, start by converting to
27726  # unix format.
27727  new_path=`$CYGPATH -u "$path"`
27728
27729  # Now try to locate executable using which
27730  new_path=`$WHICH "$new_path" 2> /dev/null`
27731  # bat and cmd files are not always considered executable in cygwin causing which
27732  # to not find them
27733  if test "x$new_path" = x \
27734      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27735      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27736    new_path=`$CYGPATH -u "$path"`
27737  fi
27738  if test "x$new_path" = x; then
27739    # Oops. Which didn't find the executable.
27740    # The splitting of arguments from the executable at a space might have been incorrect,
27741    # since paths with space are more likely in Windows. Give it another try with the whole
27742    # argument.
27743    path="$complete"
27744    arguments="EOL"
27745    new_path=`$CYGPATH -u "$path"`
27746    new_path=`$WHICH "$new_path" 2> /dev/null`
27747    # bat and cmd files are not always considered executable in cygwin causing which
27748    # to not find them
27749    if test "x$new_path" = x \
27750        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27751        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27752      new_path=`$CYGPATH -u "$path"`
27753    fi
27754    if test "x$new_path" = x; then
27755      # It's still not found. Now this is an unrecoverable error.
27756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27757$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27758      has_space=`$ECHO "$complete" | $GREP " "`
27759      if test "x$has_space" != x; then
27760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27762      fi
27763      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27764    fi
27765  fi
27766
27767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27770  # "foo.exe" is OK but "foo" is an error.
27771  #
27772  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27773  # It is also a way to make sure we got the proper file name for the real test later on.
27774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27775  if test "x$test_shortpath" = x; then
27776    # Short path failed, file does not exist as specified.
27777    # Try adding .exe or .cmd
27778    if test -f "${new_path}.exe"; then
27779      input_to_shortpath="${new_path}.exe"
27780    elif test -f "${new_path}.cmd"; then
27781      input_to_shortpath="${new_path}.cmd"
27782    else
27783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27784$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27785      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27786$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27787      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27788    fi
27789  else
27790    input_to_shortpath="$new_path"
27791  fi
27792
27793  # Call helper function which possibly converts this using DOS-style short mode.
27794  # If so, the updated path is stored in $new_path.
27795  new_path="$input_to_shortpath"
27796
27797  input_path="$input_to_shortpath"
27798  # Check if we need to convert this using DOS-style short mode. If the path
27799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27800  # take no chances and rewrite it.
27801  # Note: m4 eats our [], so we need to use [ and ] instead.
27802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27803  if test "x$has_forbidden_chars" != x; then
27804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27808      # Going to short mode and back again did indeed matter. Since short mode is
27809      # case insensitive, let's make it lowercase to improve readability.
27810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27811      # Now convert it back to Unix-stile (cygpath)
27812      input_path=`$CYGPATH -u "$shortmode_path"`
27813      new_path="$input_path"
27814    fi
27815  fi
27816
27817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27818  if test "x$test_cygdrive_prefix" = x; then
27819    # As a simple fix, exclude /usr/bin since it's not a real path.
27820    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27822      # a path prefixed by /cygdrive for fixpath to work.
27823      new_path="$CYGWIN_ROOT_PATH$input_path"
27824    fi
27825  fi
27826
27827  # remove trailing .exe if any
27828  new_path="${new_path/%.exe/}"
27829
27830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27831
27832  # First separate the path from the arguments. This will split at the first
27833  # space.
27834  complete="$CC"
27835  path="${complete%% *}"
27836  tmp="$complete EOL"
27837  arguments="${tmp#* }"
27838
27839  # Input might be given as Windows format, start by converting to
27840  # unix format.
27841  new_path="$path"
27842
27843  windows_path="$new_path"
27844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27845    unix_path=`$CYGPATH -u "$windows_path"`
27846    new_path="$unix_path"
27847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27849    new_path="$unix_path"
27850  fi
27851
27852
27853  # Now try to locate executable using which
27854  new_path=`$WHICH "$new_path" 2> /dev/null`
27855
27856  if test "x$new_path" = x; then
27857    # Oops. Which didn't find the executable.
27858    # The splitting of arguments from the executable at a space might have been incorrect,
27859    # since paths with space are more likely in Windows. Give it another try with the whole
27860    # argument.
27861    path="$complete"
27862    arguments="EOL"
27863    new_path="$path"
27864
27865  windows_path="$new_path"
27866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27867    unix_path=`$CYGPATH -u "$windows_path"`
27868    new_path="$unix_path"
27869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27871    new_path="$unix_path"
27872  fi
27873
27874
27875    new_path=`$WHICH "$new_path" 2> /dev/null`
27876
27877    if test "x$new_path" = x; then
27878      # It's still not found. Now this is an unrecoverable error.
27879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27880$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27881      has_space=`$ECHO "$complete" | $GREP " "`
27882      if test "x$has_space" != x; then
27883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27885      fi
27886      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27887    fi
27888  fi
27889
27890  # Now new_path has a complete unix path to the binary
27891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27892    # Keep paths in /bin as-is, but remove trailing .exe if any
27893    new_path="${new_path/%.exe/}"
27894    # Do not save /bin paths to all_fixpath_prefixes!
27895  else
27896    # Not in mixed or Windows style, start by that.
27897    new_path=`cmd //c echo $new_path`
27898
27899  input_path="$new_path"
27900  # Check if we need to convert this using DOS-style short mode. If the path
27901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27902  # take no chances and rewrite it.
27903  # Note: m4 eats our [], so we need to use [ and ] instead.
27904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27905  if test "x$has_forbidden_chars" != x; then
27906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27908  fi
27909
27910    # Output is in $new_path
27911
27912  windows_path="$new_path"
27913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27914    unix_path=`$CYGPATH -u "$windows_path"`
27915    new_path="$unix_path"
27916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27918    new_path="$unix_path"
27919  fi
27920
27921    # remove trailing .exe if any
27922    new_path="${new_path/%.exe/}"
27923
27924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27926  fi
27927
27928  else
27929    # We're on a posix platform. Hooray! :)
27930    # First separate the path from the arguments. This will split at the first
27931    # space.
27932    complete="$CC"
27933    path="${complete%% *}"
27934    tmp="$complete EOL"
27935    arguments="${tmp#* }"
27936
27937    # Cannot rely on the command "which" here since it doesn't always work.
27938    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27939    if test -z "$is_absolute_path"; then
27940      # Path to executable is not absolute. Find it.
27941      IFS_save="$IFS"
27942      IFS=:
27943      for p in $PATH; do
27944        if test -f "$p/$path" && test -x "$p/$path"; then
27945          new_path="$p/$path"
27946          break
27947        fi
27948      done
27949      IFS="$IFS_save"
27950    else
27951      # This is an absolute path, we can use it without further modifications.
27952      new_path="$path"
27953    fi
27954
27955    if test "x$new_path" = x; then
27956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27957$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27958      has_space=`$ECHO "$complete" | $GREP " "`
27959      if test "x$has_space" != x; then
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27962      fi
27963      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27964    fi
27965  fi
27966
27967  # Now join together the path and the arguments once again
27968  if test "x$arguments" != xEOL; then
27969    new_complete="$new_path ${arguments% *}"
27970  else
27971    new_complete="$new_path"
27972  fi
27973
27974  if test "x$complete" != "x$new_complete"; then
27975    CC="$new_complete"
27976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27977$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27978  fi
27979
27980  TEST_COMPILER="$CC"
27981  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27982  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27983  if test "x$OPENJDK_BUILD_OS" != xaix; then
27984    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27986$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27987
27988  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27989    # Follow a chain of symbolic links. Use readlink
27990    # where it exists, else fall back to horribly
27991    # complicated shell code.
27992    if test "x$READLINK_TESTED" != yes; then
27993      # On MacOSX there is a readlink tool with a different
27994      # purpose than the GNU readlink tool. Check the found readlink.
27995      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27996      if test "x$ISGNU" = x; then
27997        # A readlink that we do not know how to use.
27998        # Are there other non-GNU readlinks out there?
27999        READLINK_TESTED=yes
28000        READLINK=
28001      fi
28002    fi
28003
28004    if test "x$READLINK" != x; then
28005      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28006    else
28007      # Save the current directory for restoring afterwards
28008      STARTDIR=$PWD
28009      COUNTER=0
28010      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28011      sym_link_file=`$BASENAME $TEST_COMPILER`
28012      cd $sym_link_dir
28013      # Use -P flag to resolve symlinks in directories.
28014      cd `$THEPWDCMD -P`
28015      sym_link_dir=`$THEPWDCMD -P`
28016      # Resolve file symlinks
28017      while test $COUNTER -lt 20; do
28018        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28019        if test "x$ISLINK" == x; then
28020          # This is not a symbolic link! We are done!
28021          break
28022        fi
28023        # Again resolve directory symlinks since the target of the just found
28024        # link could be in a different directory
28025        cd `$DIRNAME $ISLINK`
28026        sym_link_dir=`$THEPWDCMD -P`
28027        sym_link_file=`$BASENAME $ISLINK`
28028        let COUNTER=COUNTER+1
28029      done
28030      cd $STARTDIR
28031      TEST_COMPILER=$sym_link_dir/$sym_link_file
28032    fi
28033  fi
28034
28035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28036$as_echo "$TEST_COMPILER" >&6; }
28037  fi
28038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28039$as_echo_n "checking if CC is disguised ccache... " >&6; }
28040
28041  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28042  if test "x$COMPILER_BASENAME" = "xccache"; then
28043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28044$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28045    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28046    # We want to control ccache invocation ourselves, so ignore this cc and try
28047    # searching again.
28048
28049    # Remove the path to the fake ccache cc from the PATH
28050    RETRY_COMPILER_SAVED_PATH="$PATH"
28051    COMPILER_DIRNAME=`$DIRNAME $CC`
28052    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28053
28054    # Try again looking for our compiler
28055    if test -n "$ac_tool_prefix"; then
28056  for ac_prog in $TOOLCHAIN_CC_BINARY
28057  do
28058    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28061$as_echo_n "checking for $ac_word... " >&6; }
28062if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28063  $as_echo_n "(cached) " >&6
28064else
28065  if test -n "$PROPER_COMPILER_CC"; then
28066  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28067else
28068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28069for as_dir in $PATH
28070do
28071  IFS=$as_save_IFS
28072  test -z "$as_dir" && as_dir=.
28073    for ac_exec_ext in '' $ac_executable_extensions; do
28074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28075    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28077    break 2
28078  fi
28079done
28080  done
28081IFS=$as_save_IFS
28082
28083fi
28084fi
28085PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28086if test -n "$PROPER_COMPILER_CC"; then
28087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28088$as_echo "$PROPER_COMPILER_CC" >&6; }
28089else
28090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28091$as_echo "no" >&6; }
28092fi
28093
28094
28095    test -n "$PROPER_COMPILER_CC" && break
28096  done
28097fi
28098if test -z "$PROPER_COMPILER_CC"; then
28099  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28100  for ac_prog in $TOOLCHAIN_CC_BINARY
28101do
28102  # Extract the first word of "$ac_prog", so it can be a program name with args.
28103set dummy $ac_prog; ac_word=$2
28104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28105$as_echo_n "checking for $ac_word... " >&6; }
28106if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28107  $as_echo_n "(cached) " >&6
28108else
28109  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28110  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28111else
28112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28113for as_dir in $PATH
28114do
28115  IFS=$as_save_IFS
28116  test -z "$as_dir" && as_dir=.
28117    for ac_exec_ext in '' $ac_executable_extensions; do
28118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28119    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28121    break 2
28122  fi
28123done
28124  done
28125IFS=$as_save_IFS
28126
28127fi
28128fi
28129ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28130if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28132$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28133else
28134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28135$as_echo "no" >&6; }
28136fi
28137
28138
28139  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28140done
28141
28142  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28143    PROPER_COMPILER_CC=""
28144  else
28145    case $cross_compiling:$ac_tool_warned in
28146yes:)
28147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28149ac_tool_warned=yes ;;
28150esac
28151    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28152  fi
28153fi
28154
28155
28156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28157
28158  # First separate the path from the arguments. This will split at the first
28159  # space.
28160  complete="$PROPER_COMPILER_CC"
28161  path="${complete%% *}"
28162  tmp="$complete EOL"
28163  arguments="${tmp#* }"
28164
28165  # Input might be given as Windows format, start by converting to
28166  # unix format.
28167  new_path=`$CYGPATH -u "$path"`
28168
28169  # Now try to locate executable using which
28170  new_path=`$WHICH "$new_path" 2> /dev/null`
28171  # bat and cmd files are not always considered executable in cygwin causing which
28172  # to not find them
28173  if test "x$new_path" = x \
28174      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28175      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28176    new_path=`$CYGPATH -u "$path"`
28177  fi
28178  if test "x$new_path" = x; then
28179    # Oops. Which didn't find the executable.
28180    # The splitting of arguments from the executable at a space might have been incorrect,
28181    # since paths with space are more likely in Windows. Give it another try with the whole
28182    # argument.
28183    path="$complete"
28184    arguments="EOL"
28185    new_path=`$CYGPATH -u "$path"`
28186    new_path=`$WHICH "$new_path" 2> /dev/null`
28187    # bat and cmd files are not always considered executable in cygwin causing which
28188    # to not find them
28189    if test "x$new_path" = x \
28190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28192      new_path=`$CYGPATH -u "$path"`
28193    fi
28194    if test "x$new_path" = x; then
28195      # It's still not found. Now this is an unrecoverable error.
28196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28197$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28198      has_space=`$ECHO "$complete" | $GREP " "`
28199      if test "x$has_space" != x; then
28200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28202      fi
28203      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28204    fi
28205  fi
28206
28207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28210  # "foo.exe" is OK but "foo" is an error.
28211  #
28212  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28213  # It is also a way to make sure we got the proper file name for the real test later on.
28214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28215  if test "x$test_shortpath" = x; then
28216    # Short path failed, file does not exist as specified.
28217    # Try adding .exe or .cmd
28218    if test -f "${new_path}.exe"; then
28219      input_to_shortpath="${new_path}.exe"
28220    elif test -f "${new_path}.cmd"; then
28221      input_to_shortpath="${new_path}.cmd"
28222    else
28223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28224$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28227      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28228    fi
28229  else
28230    input_to_shortpath="$new_path"
28231  fi
28232
28233  # Call helper function which possibly converts this using DOS-style short mode.
28234  # If so, the updated path is stored in $new_path.
28235  new_path="$input_to_shortpath"
28236
28237  input_path="$input_to_shortpath"
28238  # Check if we need to convert this using DOS-style short mode. If the path
28239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28240  # take no chances and rewrite it.
28241  # Note: m4 eats our [], so we need to use [ and ] instead.
28242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28243  if test "x$has_forbidden_chars" != x; then
28244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28248      # Going to short mode and back again did indeed matter. Since short mode is
28249      # case insensitive, let's make it lowercase to improve readability.
28250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28251      # Now convert it back to Unix-stile (cygpath)
28252      input_path=`$CYGPATH -u "$shortmode_path"`
28253      new_path="$input_path"
28254    fi
28255  fi
28256
28257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28258  if test "x$test_cygdrive_prefix" = x; then
28259    # As a simple fix, exclude /usr/bin since it's not a real path.
28260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28262      # a path prefixed by /cygdrive for fixpath to work.
28263      new_path="$CYGWIN_ROOT_PATH$input_path"
28264    fi
28265  fi
28266
28267  # remove trailing .exe if any
28268  new_path="${new_path/%.exe/}"
28269
28270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28271
28272  # First separate the path from the arguments. This will split at the first
28273  # space.
28274  complete="$PROPER_COMPILER_CC"
28275  path="${complete%% *}"
28276  tmp="$complete EOL"
28277  arguments="${tmp#* }"
28278
28279  # Input might be given as Windows format, start by converting to
28280  # unix format.
28281  new_path="$path"
28282
28283  windows_path="$new_path"
28284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28285    unix_path=`$CYGPATH -u "$windows_path"`
28286    new_path="$unix_path"
28287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28289    new_path="$unix_path"
28290  fi
28291
28292
28293  # Now try to locate executable using which
28294  new_path=`$WHICH "$new_path" 2> /dev/null`
28295
28296  if test "x$new_path" = x; then
28297    # Oops. Which didn't find the executable.
28298    # The splitting of arguments from the executable at a space might have been incorrect,
28299    # since paths with space are more likely in Windows. Give it another try with the whole
28300    # argument.
28301    path="$complete"
28302    arguments="EOL"
28303    new_path="$path"
28304
28305  windows_path="$new_path"
28306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28307    unix_path=`$CYGPATH -u "$windows_path"`
28308    new_path="$unix_path"
28309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28311    new_path="$unix_path"
28312  fi
28313
28314
28315    new_path=`$WHICH "$new_path" 2> /dev/null`
28316
28317    if test "x$new_path" = x; then
28318      # It's still not found. Now this is an unrecoverable error.
28319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28320$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28321      has_space=`$ECHO "$complete" | $GREP " "`
28322      if test "x$has_space" != x; then
28323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28325      fi
28326      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28327    fi
28328  fi
28329
28330  # Now new_path has a complete unix path to the binary
28331  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28332    # Keep paths in /bin as-is, but remove trailing .exe if any
28333    new_path="${new_path/%.exe/}"
28334    # Do not save /bin paths to all_fixpath_prefixes!
28335  else
28336    # Not in mixed or Windows style, start by that.
28337    new_path=`cmd //c echo $new_path`
28338
28339  input_path="$new_path"
28340  # Check if we need to convert this using DOS-style short mode. If the path
28341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28342  # take no chances and rewrite it.
28343  # Note: m4 eats our [], so we need to use [ and ] instead.
28344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28345  if test "x$has_forbidden_chars" != x; then
28346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28348  fi
28349
28350    # Output is in $new_path
28351
28352  windows_path="$new_path"
28353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28354    unix_path=`$CYGPATH -u "$windows_path"`
28355    new_path="$unix_path"
28356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28358    new_path="$unix_path"
28359  fi
28360
28361    # remove trailing .exe if any
28362    new_path="${new_path/%.exe/}"
28363
28364    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28365    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28366  fi
28367
28368  else
28369    # We're on a posix platform. Hooray! :)
28370    # First separate the path from the arguments. This will split at the first
28371    # space.
28372    complete="$PROPER_COMPILER_CC"
28373    path="${complete%% *}"
28374    tmp="$complete EOL"
28375    arguments="${tmp#* }"
28376
28377    # Cannot rely on the command "which" here since it doesn't always work.
28378    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28379    if test -z "$is_absolute_path"; then
28380      # Path to executable is not absolute. Find it.
28381      IFS_save="$IFS"
28382      IFS=:
28383      for p in $PATH; do
28384        if test -f "$p/$path" && test -x "$p/$path"; then
28385          new_path="$p/$path"
28386          break
28387        fi
28388      done
28389      IFS="$IFS_save"
28390    else
28391      # This is an absolute path, we can use it without further modifications.
28392      new_path="$path"
28393    fi
28394
28395    if test "x$new_path" = x; then
28396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28397$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28398      has_space=`$ECHO "$complete" | $GREP " "`
28399      if test "x$has_space" != x; then
28400        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28401$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28402      fi
28403      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28404    fi
28405  fi
28406
28407  # Now join together the path and the arguments once again
28408  if test "x$arguments" != xEOL; then
28409    new_complete="$new_path ${arguments% *}"
28410  else
28411    new_complete="$new_path"
28412  fi
28413
28414  if test "x$complete" != "x$new_complete"; then
28415    PROPER_COMPILER_CC="$new_complete"
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28417$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28418  fi
28419
28420    PATH="$RETRY_COMPILER_SAVED_PATH"
28421
28422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28423$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28424
28425  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28426    # Follow a chain of symbolic links. Use readlink
28427    # where it exists, else fall back to horribly
28428    # complicated shell code.
28429    if test "x$READLINK_TESTED" != yes; then
28430      # On MacOSX there is a readlink tool with a different
28431      # purpose than the GNU readlink tool. Check the found readlink.
28432      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28433      if test "x$ISGNU" = x; then
28434        # A readlink that we do not know how to use.
28435        # Are there other non-GNU readlinks out there?
28436        READLINK_TESTED=yes
28437        READLINK=
28438      fi
28439    fi
28440
28441    if test "x$READLINK" != x; then
28442      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28443    else
28444      # Save the current directory for restoring afterwards
28445      STARTDIR=$PWD
28446      COUNTER=0
28447      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28448      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28449      cd $sym_link_dir
28450      # Use -P flag to resolve symlinks in directories.
28451      cd `$THEPWDCMD -P`
28452      sym_link_dir=`$THEPWDCMD -P`
28453      # Resolve file symlinks
28454      while test $COUNTER -lt 20; do
28455        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28456        if test "x$ISLINK" == x; then
28457          # This is not a symbolic link! We are done!
28458          break
28459        fi
28460        # Again resolve directory symlinks since the target of the just found
28461        # link could be in a different directory
28462        cd `$DIRNAME $ISLINK`
28463        sym_link_dir=`$THEPWDCMD -P`
28464        sym_link_file=`$BASENAME $ISLINK`
28465        let COUNTER=COUNTER+1
28466      done
28467      cd $STARTDIR
28468      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28469    fi
28470  fi
28471
28472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28473$as_echo "$PROPER_COMPILER_CC" >&6; }
28474    CC="$PROPER_COMPILER_CC"
28475  else
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28477$as_echo "no, keeping CC" >&6; }
28478  fi
28479
28480
28481  COMPILER=$CC
28482  COMPILER_NAME=$COMPILER_NAME
28483
28484  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28485    # cc -V output typically looks like
28486    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28487    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28488    # Check that this is likely to be the Solaris Studio cc.
28489    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28490    if test $? -ne 0; then
28491      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28492      { $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
28493$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28494      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28495$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28496      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28497$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28498      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28499    fi
28500    # Remove usage instructions (if present), and
28501    # collapse compiler output into a single line
28502    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28503        $SED -e 's/ *[Uu]sage:.*//'`
28504    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28505        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28506  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28507    # xlc -qversion output typically looks like
28508    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28509    #     Version: 11.01.0000.0015
28510    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28511    # Check that this is likely to be the IBM XL C compiler.
28512    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28513    if test $? -ne 0; then
28514      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28515      { $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
28516$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28517      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28518$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28520$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28521      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28522    fi
28523    # Collapse compiler output into a single line
28524    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28525    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28526        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28527  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28528    # There is no specific version flag, but all output starts with a version string.
28529    # First line typically looks something like:
28530    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28531    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28532    # Check that this is likely to be Microsoft CL.EXE.
28533    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28534    if test $? -ne 0; then
28535      { $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
28536$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28537      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28538$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28539      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28540    fi
28541    # Collapse compiler output into a single line
28542    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28543    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28544        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28545  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28546    # gcc --version output typically looks like
28547    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28548    #     Copyright (C) 2013 Free Software Foundation, Inc.
28549    #     This is free software; see the source for copying conditions.  There is NO
28550    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28551    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28552    # Check that this is likely to be GCC.
28553    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28554    if test $? -ne 0; then
28555      { $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
28556$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28557      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28558$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28559      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28560    fi
28561    # Remove Copyright and legalese from version string, and
28562    # collapse into a single line
28563    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28564        $SED -e 's/ *Copyright .*//'`
28565    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28566        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28567  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28568    # clang --version output typically looks like
28569    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28570    #    clang version 3.3 (tags/RELEASE_33/final)
28571    # or
28572    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28573    #    Target: x86_64-pc-linux-gnu
28574    #    Thread model: posix
28575    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28576    # Check that this is likely to be clang
28577    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28578    if test $? -ne 0; then
28579      { $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
28580$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28581      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28582$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28583      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28584    fi
28585    # Collapse compiler output into a single line
28586    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28587    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28588        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28589  else
28590      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28591  fi
28592  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28593  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28594  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28595  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28596
28597  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28598$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28599
28600
28601  # Now that we have resolved CC ourself, let autoconf have its go at it
28602  ac_ext=c
28603ac_cpp='$CPP $CPPFLAGS'
28604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28606ac_compiler_gnu=$ac_cv_c_compiler_gnu
28607if test -n "$ac_tool_prefix"; then
28608  for ac_prog in $CC
28609  do
28610    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28611set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28613$as_echo_n "checking for $ac_word... " >&6; }
28614if ${ac_cv_prog_CC+:} false; then :
28615  $as_echo_n "(cached) " >&6
28616else
28617  if test -n "$CC"; then
28618  ac_cv_prog_CC="$CC" # Let the user override the test.
28619else
28620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28621for as_dir in $PATH
28622do
28623  IFS=$as_save_IFS
28624  test -z "$as_dir" && as_dir=.
28625    for ac_exec_ext in '' $ac_executable_extensions; do
28626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28627    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28629    break 2
28630  fi
28631done
28632  done
28633IFS=$as_save_IFS
28634
28635fi
28636fi
28637CC=$ac_cv_prog_CC
28638if test -n "$CC"; then
28639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28640$as_echo "$CC" >&6; }
28641else
28642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28643$as_echo "no" >&6; }
28644fi
28645
28646
28647    test -n "$CC" && break
28648  done
28649fi
28650if test -z "$CC"; then
28651  ac_ct_CC=$CC
28652  for ac_prog in $CC
28653do
28654  # Extract the first word of "$ac_prog", so it can be a program name with args.
28655set dummy $ac_prog; ac_word=$2
28656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28657$as_echo_n "checking for $ac_word... " >&6; }
28658if ${ac_cv_prog_ac_ct_CC+:} false; then :
28659  $as_echo_n "(cached) " >&6
28660else
28661  if test -n "$ac_ct_CC"; then
28662  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28663else
28664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28665for as_dir in $PATH
28666do
28667  IFS=$as_save_IFS
28668  test -z "$as_dir" && as_dir=.
28669    for ac_exec_ext in '' $ac_executable_extensions; do
28670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28671    ac_cv_prog_ac_ct_CC="$ac_prog"
28672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28673    break 2
28674  fi
28675done
28676  done
28677IFS=$as_save_IFS
28678
28679fi
28680fi
28681ac_ct_CC=$ac_cv_prog_ac_ct_CC
28682if test -n "$ac_ct_CC"; then
28683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28684$as_echo "$ac_ct_CC" >&6; }
28685else
28686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28687$as_echo "no" >&6; }
28688fi
28689
28690
28691  test -n "$ac_ct_CC" && break
28692done
28693
28694  if test "x$ac_ct_CC" = x; then
28695    CC=""
28696  else
28697    case $cross_compiling:$ac_tool_warned in
28698yes:)
28699{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28700$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28701ac_tool_warned=yes ;;
28702esac
28703    CC=$ac_ct_CC
28704  fi
28705fi
28706
28707
28708test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28710as_fn_error $? "no acceptable C compiler found in \$PATH
28711See \`config.log' for more details" "$LINENO" 5; }
28712
28713# Provide some information about the compiler.
28714$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28715set X $ac_compile
28716ac_compiler=$2
28717for ac_option in --version -v -V -qversion; do
28718  { { ac_try="$ac_compiler $ac_option >&5"
28719case "(($ac_try" in
28720  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28721  *) ac_try_echo=$ac_try;;
28722esac
28723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28724$as_echo "$ac_try_echo"; } >&5
28725  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28726  ac_status=$?
28727  if test -s conftest.err; then
28728    sed '10a\
28729... rest of stderr output deleted ...
28730         10q' conftest.err >conftest.er1
28731    cat conftest.er1 >&5
28732  fi
28733  rm -f conftest.er1 conftest.err
28734  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28735  test $ac_status = 0; }
28736done
28737
28738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28739/* end confdefs.h.  */
28740
28741int
28742main ()
28743{
28744
28745  ;
28746  return 0;
28747}
28748_ACEOF
28749ac_clean_files_save=$ac_clean_files
28750ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28751# Try to create an executable without -o first, disregard a.out.
28752# It will help us diagnose broken compilers, and finding out an intuition
28753# of exeext.
28754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28755$as_echo_n "checking whether the C compiler works... " >&6; }
28756ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28757
28758# The possible output files:
28759ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28760
28761ac_rmfiles=
28762for ac_file in $ac_files
28763do
28764  case $ac_file in
28765    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28766    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28767  esac
28768done
28769rm -f $ac_rmfiles
28770
28771if { { ac_try="$ac_link_default"
28772case "(($ac_try" in
28773  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28774  *) ac_try_echo=$ac_try;;
28775esac
28776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28777$as_echo "$ac_try_echo"; } >&5
28778  (eval "$ac_link_default") 2>&5
28779  ac_status=$?
28780  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28781  test $ac_status = 0; }; then :
28782  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28783# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28784# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28785# so that the user can short-circuit this test for compilers unknown to
28786# Autoconf.
28787for ac_file in $ac_files ''
28788do
28789  test -f "$ac_file" || continue
28790  case $ac_file in
28791    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28792	;;
28793    [ab].out )
28794	# We found the default executable, but exeext='' is most
28795	# certainly right.
28796	break;;
28797    *.* )
28798	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28799	then :; else
28800	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28801	fi
28802	# We set ac_cv_exeext here because the later test for it is not
28803	# safe: cross compilers may not add the suffix if given an `-o'
28804	# argument, so we may need to know it at that point already.
28805	# Even if this section looks crufty: it has the advantage of
28806	# actually working.
28807	break;;
28808    * )
28809	break;;
28810  esac
28811done
28812test "$ac_cv_exeext" = no && ac_cv_exeext=
28813
28814else
28815  ac_file=''
28816fi
28817if test -z "$ac_file"; then :
28818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28819$as_echo "no" >&6; }
28820$as_echo "$as_me: failed program was:" >&5
28821sed 's/^/| /' conftest.$ac_ext >&5
28822
28823{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28825as_fn_error 77 "C compiler cannot create executables
28826See \`config.log' for more details" "$LINENO" 5; }
28827else
28828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28829$as_echo "yes" >&6; }
28830fi
28831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28832$as_echo_n "checking for C compiler default output file name... " >&6; }
28833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28834$as_echo "$ac_file" >&6; }
28835ac_exeext=$ac_cv_exeext
28836
28837rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28838ac_clean_files=$ac_clean_files_save
28839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28840$as_echo_n "checking for suffix of executables... " >&6; }
28841if { { ac_try="$ac_link"
28842case "(($ac_try" in
28843  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28844  *) ac_try_echo=$ac_try;;
28845esac
28846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28847$as_echo "$ac_try_echo"; } >&5
28848  (eval "$ac_link") 2>&5
28849  ac_status=$?
28850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28851  test $ac_status = 0; }; then :
28852  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28853# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28854# work properly (i.e., refer to `conftest.exe'), while it won't with
28855# `rm'.
28856for ac_file in conftest.exe conftest conftest.*; do
28857  test -f "$ac_file" || continue
28858  case $ac_file in
28859    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28860    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28861	  break;;
28862    * ) break;;
28863  esac
28864done
28865else
28866  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28868as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28869See \`config.log' for more details" "$LINENO" 5; }
28870fi
28871rm -f conftest conftest$ac_cv_exeext
28872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28873$as_echo "$ac_cv_exeext" >&6; }
28874
28875rm -f conftest.$ac_ext
28876EXEEXT=$ac_cv_exeext
28877ac_exeext=$EXEEXT
28878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28879/* end confdefs.h.  */
28880#include <stdio.h>
28881int
28882main ()
28883{
28884FILE *f = fopen ("conftest.out", "w");
28885 return ferror (f) || fclose (f) != 0;
28886
28887  ;
28888  return 0;
28889}
28890_ACEOF
28891ac_clean_files="$ac_clean_files conftest.out"
28892# Check that the compiler produces executables we can run.  If not, either
28893# the compiler is broken, or we cross compile.
28894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28895$as_echo_n "checking whether we are cross compiling... " >&6; }
28896if test "$cross_compiling" != yes; then
28897  { { ac_try="$ac_link"
28898case "(($ac_try" in
28899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28900  *) ac_try_echo=$ac_try;;
28901esac
28902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28903$as_echo "$ac_try_echo"; } >&5
28904  (eval "$ac_link") 2>&5
28905  ac_status=$?
28906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28907  test $ac_status = 0; }
28908  if { ac_try='./conftest$ac_cv_exeext'
28909  { { case "(($ac_try" in
28910  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28911  *) ac_try_echo=$ac_try;;
28912esac
28913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28914$as_echo "$ac_try_echo"; } >&5
28915  (eval "$ac_try") 2>&5
28916  ac_status=$?
28917  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28918  test $ac_status = 0; }; }; then
28919    cross_compiling=no
28920  else
28921    if test "$cross_compiling" = maybe; then
28922	cross_compiling=yes
28923    else
28924	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28926as_fn_error $? "cannot run C compiled programs.
28927If you meant to cross compile, use \`--host'.
28928See \`config.log' for more details" "$LINENO" 5; }
28929    fi
28930  fi
28931fi
28932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28933$as_echo "$cross_compiling" >&6; }
28934
28935rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28936ac_clean_files=$ac_clean_files_save
28937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28938$as_echo_n "checking for suffix of object files... " >&6; }
28939if ${ac_cv_objext+:} false; then :
28940  $as_echo_n "(cached) " >&6
28941else
28942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28943/* end confdefs.h.  */
28944
28945int
28946main ()
28947{
28948
28949  ;
28950  return 0;
28951}
28952_ACEOF
28953rm -f conftest.o conftest.obj
28954if { { ac_try="$ac_compile"
28955case "(($ac_try" in
28956  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28957  *) ac_try_echo=$ac_try;;
28958esac
28959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28960$as_echo "$ac_try_echo"; } >&5
28961  (eval "$ac_compile") 2>&5
28962  ac_status=$?
28963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28964  test $ac_status = 0; }; then :
28965  for ac_file in conftest.o conftest.obj conftest.*; do
28966  test -f "$ac_file" || continue;
28967  case $ac_file in
28968    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28969    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28970       break;;
28971  esac
28972done
28973else
28974  $as_echo "$as_me: failed program was:" >&5
28975sed 's/^/| /' conftest.$ac_ext >&5
28976
28977{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28979as_fn_error $? "cannot compute suffix of object files: cannot compile
28980See \`config.log' for more details" "$LINENO" 5; }
28981fi
28982rm -f conftest.$ac_cv_objext conftest.$ac_ext
28983fi
28984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28985$as_echo "$ac_cv_objext" >&6; }
28986OBJEXT=$ac_cv_objext
28987ac_objext=$OBJEXT
28988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28989$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28990if ${ac_cv_c_compiler_gnu+:} false; then :
28991  $as_echo_n "(cached) " >&6
28992else
28993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28994/* end confdefs.h.  */
28995
28996int
28997main ()
28998{
28999#ifndef __GNUC__
29000       choke me
29001#endif
29002
29003  ;
29004  return 0;
29005}
29006_ACEOF
29007if ac_fn_c_try_compile "$LINENO"; then :
29008  ac_compiler_gnu=yes
29009else
29010  ac_compiler_gnu=no
29011fi
29012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29013ac_cv_c_compiler_gnu=$ac_compiler_gnu
29014
29015fi
29016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29017$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29018if test $ac_compiler_gnu = yes; then
29019  GCC=yes
29020else
29021  GCC=
29022fi
29023ac_test_CFLAGS=${CFLAGS+set}
29024ac_save_CFLAGS=$CFLAGS
29025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29026$as_echo_n "checking whether $CC accepts -g... " >&6; }
29027if ${ac_cv_prog_cc_g+:} false; then :
29028  $as_echo_n "(cached) " >&6
29029else
29030  ac_save_c_werror_flag=$ac_c_werror_flag
29031   ac_c_werror_flag=yes
29032   ac_cv_prog_cc_g=no
29033   CFLAGS="-g"
29034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29035/* end confdefs.h.  */
29036
29037int
29038main ()
29039{
29040
29041  ;
29042  return 0;
29043}
29044_ACEOF
29045if ac_fn_c_try_compile "$LINENO"; then :
29046  ac_cv_prog_cc_g=yes
29047else
29048  CFLAGS=""
29049      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29050/* end confdefs.h.  */
29051
29052int
29053main ()
29054{
29055
29056  ;
29057  return 0;
29058}
29059_ACEOF
29060if ac_fn_c_try_compile "$LINENO"; then :
29061
29062else
29063  ac_c_werror_flag=$ac_save_c_werror_flag
29064	 CFLAGS="-g"
29065	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29066/* end confdefs.h.  */
29067
29068int
29069main ()
29070{
29071
29072  ;
29073  return 0;
29074}
29075_ACEOF
29076if ac_fn_c_try_compile "$LINENO"; then :
29077  ac_cv_prog_cc_g=yes
29078fi
29079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29080fi
29081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29082fi
29083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29084   ac_c_werror_flag=$ac_save_c_werror_flag
29085fi
29086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29087$as_echo "$ac_cv_prog_cc_g" >&6; }
29088if test "$ac_test_CFLAGS" = set; then
29089  CFLAGS=$ac_save_CFLAGS
29090elif test $ac_cv_prog_cc_g = yes; then
29091  if test "$GCC" = yes; then
29092    CFLAGS="-g -O2"
29093  else
29094    CFLAGS="-g"
29095  fi
29096else
29097  if test "$GCC" = yes; then
29098    CFLAGS="-O2"
29099  else
29100    CFLAGS=
29101  fi
29102fi
29103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29104$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29105if ${ac_cv_prog_cc_c89+:} false; then :
29106  $as_echo_n "(cached) " >&6
29107else
29108  ac_cv_prog_cc_c89=no
29109ac_save_CC=$CC
29110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29111/* end confdefs.h.  */
29112#include <stdarg.h>
29113#include <stdio.h>
29114struct stat;
29115/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29116struct buf { int x; };
29117FILE * (*rcsopen) (struct buf *, struct stat *, int);
29118static char *e (p, i)
29119     char **p;
29120     int i;
29121{
29122  return p[i];
29123}
29124static char *f (char * (*g) (char **, int), char **p, ...)
29125{
29126  char *s;
29127  va_list v;
29128  va_start (v,p);
29129  s = g (p, va_arg (v,int));
29130  va_end (v);
29131  return s;
29132}
29133
29134/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29135   function prototypes and stuff, but not '\xHH' hex character constants.
29136   These don't provoke an error unfortunately, instead are silently treated
29137   as 'x'.  The following induces an error, until -std is added to get
29138   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29139   array size at least.  It's necessary to write '\x00'==0 to get something
29140   that's true only with -std.  */
29141int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29142
29143/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29144   inside strings and character constants.  */
29145#define FOO(x) 'x'
29146int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29147
29148int test (int i, double x);
29149struct s1 {int (*f) (int a);};
29150struct s2 {int (*f) (double a);};
29151int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29152int argc;
29153char **argv;
29154int
29155main ()
29156{
29157return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29158  ;
29159  return 0;
29160}
29161_ACEOF
29162for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29163	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29164do
29165  CC="$ac_save_CC $ac_arg"
29166  if ac_fn_c_try_compile "$LINENO"; then :
29167  ac_cv_prog_cc_c89=$ac_arg
29168fi
29169rm -f core conftest.err conftest.$ac_objext
29170  test "x$ac_cv_prog_cc_c89" != "xno" && break
29171done
29172rm -f conftest.$ac_ext
29173CC=$ac_save_CC
29174
29175fi
29176# AC_CACHE_VAL
29177case "x$ac_cv_prog_cc_c89" in
29178  x)
29179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29180$as_echo "none needed" >&6; } ;;
29181  xno)
29182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29183$as_echo "unsupported" >&6; } ;;
29184  *)
29185    CC="$CC $ac_cv_prog_cc_c89"
29186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29187$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29188esac
29189if test "x$ac_cv_prog_cc_c89" != xno; then :
29190
29191fi
29192
29193ac_ext=cpp
29194ac_cpp='$CXXCPP $CPPFLAGS'
29195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29198
29199
29200
29201  COMPILER_NAME=C++
29202  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29203
29204  if test "x$CXX" != x; then
29205    # User has supplied compiler name already, always let that override.
29206    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29207$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29208    if test "x`basename $CXX`" = "x$CXX"; then
29209      # A command without a complete path is provided, search $PATH.
29210
29211      for ac_prog in $CXX
29212do
29213  # Extract the first word of "$ac_prog", so it can be a program name with args.
29214set dummy $ac_prog; ac_word=$2
29215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29216$as_echo_n "checking for $ac_word... " >&6; }
29217if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29218  $as_echo_n "(cached) " >&6
29219else
29220  case $POTENTIAL_CXX in
29221  [\\/]* | ?:[\\/]*)
29222  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29223  ;;
29224  *)
29225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29226for as_dir in $PATH
29227do
29228  IFS=$as_save_IFS
29229  test -z "$as_dir" && as_dir=.
29230    for ac_exec_ext in '' $ac_executable_extensions; do
29231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29232    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29234    break 2
29235  fi
29236done
29237  done
29238IFS=$as_save_IFS
29239
29240  ;;
29241esac
29242fi
29243POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29244if test -n "$POTENTIAL_CXX"; then
29245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29246$as_echo "$POTENTIAL_CXX" >&6; }
29247else
29248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29249$as_echo "no" >&6; }
29250fi
29251
29252
29253  test -n "$POTENTIAL_CXX" && break
29254done
29255
29256      if test "x$POTENTIAL_CXX" != x; then
29257        CXX=$POTENTIAL_CXX
29258      else
29259        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29260      fi
29261    else
29262      # Otherwise it might already be a complete path
29263      if test ! -x "$CXX"; then
29264        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29265      fi
29266    fi
29267  else
29268    # No user supplied value. Locate compiler ourselves.
29269
29270    # If we are cross compiling, assume cross compilation tools follows the
29271    # cross compilation standard where they are prefixed with the autoconf
29272    # standard name for the target. For example the binary
29273    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29274    # If we are not cross compiling, then the default compiler name will be
29275    # used.
29276
29277    CXX=
29278    # If TOOLS_DIR is set, check for all compiler names in there first
29279    # before checking the rest of the PATH.
29280    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29281    # step, this should not be necessary.
29282    if test -n "$TOOLS_DIR"; then
29283      PATH_save="$PATH"
29284      PATH="$TOOLS_DIR"
29285      for ac_prog in $SEARCH_LIST
29286do
29287  # Extract the first word of "$ac_prog", so it can be a program name with args.
29288set dummy $ac_prog; ac_word=$2
29289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29290$as_echo_n "checking for $ac_word... " >&6; }
29291if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29292  $as_echo_n "(cached) " >&6
29293else
29294  case $TOOLS_DIR_CXX in
29295  [\\/]* | ?:[\\/]*)
29296  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29297  ;;
29298  *)
29299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29300for as_dir in $PATH
29301do
29302  IFS=$as_save_IFS
29303  test -z "$as_dir" && as_dir=.
29304    for ac_exec_ext in '' $ac_executable_extensions; do
29305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29306    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29308    break 2
29309  fi
29310done
29311  done
29312IFS=$as_save_IFS
29313
29314  ;;
29315esac
29316fi
29317TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29318if test -n "$TOOLS_DIR_CXX"; then
29319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29320$as_echo "$TOOLS_DIR_CXX" >&6; }
29321else
29322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29323$as_echo "no" >&6; }
29324fi
29325
29326
29327  test -n "$TOOLS_DIR_CXX" && break
29328done
29329
29330      CXX=$TOOLS_DIR_CXX
29331      PATH="$PATH_save"
29332    fi
29333
29334    # AC_PATH_PROGS can't be run multiple times with the same variable,
29335    # so create a new name for this run.
29336    if test "x$CXX" = x; then
29337      for ac_prog in $SEARCH_LIST
29338do
29339  # Extract the first word of "$ac_prog", so it can be a program name with args.
29340set dummy $ac_prog; ac_word=$2
29341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29342$as_echo_n "checking for $ac_word... " >&6; }
29343if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29344  $as_echo_n "(cached) " >&6
29345else
29346  case $POTENTIAL_CXX in
29347  [\\/]* | ?:[\\/]*)
29348  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29349  ;;
29350  *)
29351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29352for as_dir in $PATH
29353do
29354  IFS=$as_save_IFS
29355  test -z "$as_dir" && as_dir=.
29356    for ac_exec_ext in '' $ac_executable_extensions; do
29357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29358    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29360    break 2
29361  fi
29362done
29363  done
29364IFS=$as_save_IFS
29365
29366  ;;
29367esac
29368fi
29369POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29370if test -n "$POTENTIAL_CXX"; then
29371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29372$as_echo "$POTENTIAL_CXX" >&6; }
29373else
29374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29375$as_echo "no" >&6; }
29376fi
29377
29378
29379  test -n "$POTENTIAL_CXX" && break
29380done
29381
29382      CXX=$POTENTIAL_CXX
29383    fi
29384
29385    if test "x$CXX" = x; then
29386
29387  # Print a helpful message on how to acquire the necessary build dependency.
29388  # devkit is the help tag: freetype, cups, pulse, alsa etc
29389  MISSING_DEPENDENCY=devkit
29390
29391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29392    cygwin_help $MISSING_DEPENDENCY
29393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29394    msys_help $MISSING_DEPENDENCY
29395  else
29396    PKGHANDLER_COMMAND=
29397
29398    case $PKGHANDLER in
29399      apt-get)
29400        apt_help     $MISSING_DEPENDENCY ;;
29401      yum)
29402        yum_help     $MISSING_DEPENDENCY ;;
29403      port)
29404        port_help    $MISSING_DEPENDENCY ;;
29405      pkgutil)
29406        pkgutil_help $MISSING_DEPENDENCY ;;
29407      pkgadd)
29408        pkgadd_help  $MISSING_DEPENDENCY ;;
29409    esac
29410
29411    if test "x$PKGHANDLER_COMMAND" != x; then
29412      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29413    fi
29414  fi
29415
29416      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29417    fi
29418  fi
29419
29420  # Now we have a compiler binary in CXX. Make sure it's okay.
29421
29422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29423
29424  # First separate the path from the arguments. This will split at the first
29425  # space.
29426  complete="$CXX"
29427  path="${complete%% *}"
29428  tmp="$complete EOL"
29429  arguments="${tmp#* }"
29430
29431  # Input might be given as Windows format, start by converting to
29432  # unix format.
29433  new_path=`$CYGPATH -u "$path"`
29434
29435  # Now try to locate executable using which
29436  new_path=`$WHICH "$new_path" 2> /dev/null`
29437  # bat and cmd files are not always considered executable in cygwin causing which
29438  # to not find them
29439  if test "x$new_path" = x \
29440      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29441      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29442    new_path=`$CYGPATH -u "$path"`
29443  fi
29444  if test "x$new_path" = x; then
29445    # Oops. Which didn't find the executable.
29446    # The splitting of arguments from the executable at a space might have been incorrect,
29447    # since paths with space are more likely in Windows. Give it another try with the whole
29448    # argument.
29449    path="$complete"
29450    arguments="EOL"
29451    new_path=`$CYGPATH -u "$path"`
29452    new_path=`$WHICH "$new_path" 2> /dev/null`
29453    # bat and cmd files are not always considered executable in cygwin causing which
29454    # to not find them
29455    if test "x$new_path" = x \
29456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29458      new_path=`$CYGPATH -u "$path"`
29459    fi
29460    if test "x$new_path" = x; then
29461      # It's still not found. Now this is an unrecoverable error.
29462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29463$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29464      has_space=`$ECHO "$complete" | $GREP " "`
29465      if test "x$has_space" != x; then
29466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29468      fi
29469      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29470    fi
29471  fi
29472
29473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29476  # "foo.exe" is OK but "foo" is an error.
29477  #
29478  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29479  # It is also a way to make sure we got the proper file name for the real test later on.
29480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29481  if test "x$test_shortpath" = x; then
29482    # Short path failed, file does not exist as specified.
29483    # Try adding .exe or .cmd
29484    if test -f "${new_path}.exe"; then
29485      input_to_shortpath="${new_path}.exe"
29486    elif test -f "${new_path}.cmd"; then
29487      input_to_shortpath="${new_path}.cmd"
29488    else
29489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29490$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29491      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29492$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29493      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29494    fi
29495  else
29496    input_to_shortpath="$new_path"
29497  fi
29498
29499  # Call helper function which possibly converts this using DOS-style short mode.
29500  # If so, the updated path is stored in $new_path.
29501  new_path="$input_to_shortpath"
29502
29503  input_path="$input_to_shortpath"
29504  # Check if we need to convert this using DOS-style short mode. If the path
29505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29506  # take no chances and rewrite it.
29507  # Note: m4 eats our [], so we need to use [ and ] instead.
29508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29509  if test "x$has_forbidden_chars" != x; then
29510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29514      # Going to short mode and back again did indeed matter. Since short mode is
29515      # case insensitive, let's make it lowercase to improve readability.
29516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29517      # Now convert it back to Unix-stile (cygpath)
29518      input_path=`$CYGPATH -u "$shortmode_path"`
29519      new_path="$input_path"
29520    fi
29521  fi
29522
29523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29524  if test "x$test_cygdrive_prefix" = x; then
29525    # As a simple fix, exclude /usr/bin since it's not a real path.
29526    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29528      # a path prefixed by /cygdrive for fixpath to work.
29529      new_path="$CYGWIN_ROOT_PATH$input_path"
29530    fi
29531  fi
29532
29533  # remove trailing .exe if any
29534  new_path="${new_path/%.exe/}"
29535
29536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29537
29538  # First separate the path from the arguments. This will split at the first
29539  # space.
29540  complete="$CXX"
29541  path="${complete%% *}"
29542  tmp="$complete EOL"
29543  arguments="${tmp#* }"
29544
29545  # Input might be given as Windows format, start by converting to
29546  # unix format.
29547  new_path="$path"
29548
29549  windows_path="$new_path"
29550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29551    unix_path=`$CYGPATH -u "$windows_path"`
29552    new_path="$unix_path"
29553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29555    new_path="$unix_path"
29556  fi
29557
29558
29559  # Now try to locate executable using which
29560  new_path=`$WHICH "$new_path" 2> /dev/null`
29561
29562  if test "x$new_path" = x; then
29563    # Oops. Which didn't find the executable.
29564    # The splitting of arguments from the executable at a space might have been incorrect,
29565    # since paths with space are more likely in Windows. Give it another try with the whole
29566    # argument.
29567    path="$complete"
29568    arguments="EOL"
29569    new_path="$path"
29570
29571  windows_path="$new_path"
29572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29573    unix_path=`$CYGPATH -u "$windows_path"`
29574    new_path="$unix_path"
29575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29577    new_path="$unix_path"
29578  fi
29579
29580
29581    new_path=`$WHICH "$new_path" 2> /dev/null`
29582
29583    if test "x$new_path" = x; then
29584      # It's still not found. Now this is an unrecoverable error.
29585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29586$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29587      has_space=`$ECHO "$complete" | $GREP " "`
29588      if test "x$has_space" != x; then
29589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29591      fi
29592      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29593    fi
29594  fi
29595
29596  # Now new_path has a complete unix path to the binary
29597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29598    # Keep paths in /bin as-is, but remove trailing .exe if any
29599    new_path="${new_path/%.exe/}"
29600    # Do not save /bin paths to all_fixpath_prefixes!
29601  else
29602    # Not in mixed or Windows style, start by that.
29603    new_path=`cmd //c echo $new_path`
29604
29605  input_path="$new_path"
29606  # Check if we need to convert this using DOS-style short mode. If the path
29607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29608  # take no chances and rewrite it.
29609  # Note: m4 eats our [], so we need to use [ and ] instead.
29610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29611  if test "x$has_forbidden_chars" != x; then
29612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29614  fi
29615
29616    # Output is in $new_path
29617
29618  windows_path="$new_path"
29619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29620    unix_path=`$CYGPATH -u "$windows_path"`
29621    new_path="$unix_path"
29622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29624    new_path="$unix_path"
29625  fi
29626
29627    # remove trailing .exe if any
29628    new_path="${new_path/%.exe/}"
29629
29630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29632  fi
29633
29634  else
29635    # We're on a posix platform. Hooray! :)
29636    # First separate the path from the arguments. This will split at the first
29637    # space.
29638    complete="$CXX"
29639    path="${complete%% *}"
29640    tmp="$complete EOL"
29641    arguments="${tmp#* }"
29642
29643    # Cannot rely on the command "which" here since it doesn't always work.
29644    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29645    if test -z "$is_absolute_path"; then
29646      # Path to executable is not absolute. Find it.
29647      IFS_save="$IFS"
29648      IFS=:
29649      for p in $PATH; do
29650        if test -f "$p/$path" && test -x "$p/$path"; then
29651          new_path="$p/$path"
29652          break
29653        fi
29654      done
29655      IFS="$IFS_save"
29656    else
29657      # This is an absolute path, we can use it without further modifications.
29658      new_path="$path"
29659    fi
29660
29661    if test "x$new_path" = x; then
29662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29663$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29664      has_space=`$ECHO "$complete" | $GREP " "`
29665      if test "x$has_space" != x; then
29666        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29668      fi
29669      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29670    fi
29671  fi
29672
29673  # Now join together the path and the arguments once again
29674  if test "x$arguments" != xEOL; then
29675    new_complete="$new_path ${arguments% *}"
29676  else
29677    new_complete="$new_path"
29678  fi
29679
29680  if test "x$complete" != "x$new_complete"; then
29681    CXX="$new_complete"
29682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29683$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29684  fi
29685
29686  TEST_COMPILER="$CXX"
29687  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29688  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29689  if test "x$OPENJDK_BUILD_OS" != xaix; then
29690    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29692$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29693
29694  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29695    # Follow a chain of symbolic links. Use readlink
29696    # where it exists, else fall back to horribly
29697    # complicated shell code.
29698    if test "x$READLINK_TESTED" != yes; then
29699      # On MacOSX there is a readlink tool with a different
29700      # purpose than the GNU readlink tool. Check the found readlink.
29701      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29702      if test "x$ISGNU" = x; then
29703        # A readlink that we do not know how to use.
29704        # Are there other non-GNU readlinks out there?
29705        READLINK_TESTED=yes
29706        READLINK=
29707      fi
29708    fi
29709
29710    if test "x$READLINK" != x; then
29711      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29712    else
29713      # Save the current directory for restoring afterwards
29714      STARTDIR=$PWD
29715      COUNTER=0
29716      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29717      sym_link_file=`$BASENAME $TEST_COMPILER`
29718      cd $sym_link_dir
29719      # Use -P flag to resolve symlinks in directories.
29720      cd `$THEPWDCMD -P`
29721      sym_link_dir=`$THEPWDCMD -P`
29722      # Resolve file symlinks
29723      while test $COUNTER -lt 20; do
29724        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29725        if test "x$ISLINK" == x; then
29726          # This is not a symbolic link! We are done!
29727          break
29728        fi
29729        # Again resolve directory symlinks since the target of the just found
29730        # link could be in a different directory
29731        cd `$DIRNAME $ISLINK`
29732        sym_link_dir=`$THEPWDCMD -P`
29733        sym_link_file=`$BASENAME $ISLINK`
29734        let COUNTER=COUNTER+1
29735      done
29736      cd $STARTDIR
29737      TEST_COMPILER=$sym_link_dir/$sym_link_file
29738    fi
29739  fi
29740
29741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29742$as_echo "$TEST_COMPILER" >&6; }
29743  fi
29744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29745$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29746
29747  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29748  if test "x$COMPILER_BASENAME" = "xccache"; then
29749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29750$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29751    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29752    # We want to control ccache invocation ourselves, so ignore this cc and try
29753    # searching again.
29754
29755    # Remove the path to the fake ccache cc from the PATH
29756    RETRY_COMPILER_SAVED_PATH="$PATH"
29757    COMPILER_DIRNAME=`$DIRNAME $CXX`
29758    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29759
29760    # Try again looking for our compiler
29761    if test -n "$ac_tool_prefix"; then
29762  for ac_prog in $TOOLCHAIN_CXX_BINARY
29763  do
29764    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29765set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29767$as_echo_n "checking for $ac_word... " >&6; }
29768if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29769  $as_echo_n "(cached) " >&6
29770else
29771  if test -n "$PROPER_COMPILER_CXX"; then
29772  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29773else
29774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29775for as_dir in $PATH
29776do
29777  IFS=$as_save_IFS
29778  test -z "$as_dir" && as_dir=.
29779    for ac_exec_ext in '' $ac_executable_extensions; do
29780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29781    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29783    break 2
29784  fi
29785done
29786  done
29787IFS=$as_save_IFS
29788
29789fi
29790fi
29791PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29792if test -n "$PROPER_COMPILER_CXX"; then
29793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29794$as_echo "$PROPER_COMPILER_CXX" >&6; }
29795else
29796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29797$as_echo "no" >&6; }
29798fi
29799
29800
29801    test -n "$PROPER_COMPILER_CXX" && break
29802  done
29803fi
29804if test -z "$PROPER_COMPILER_CXX"; then
29805  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29806  for ac_prog in $TOOLCHAIN_CXX_BINARY
29807do
29808  # Extract the first word of "$ac_prog", so it can be a program name with args.
29809set dummy $ac_prog; ac_word=$2
29810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29811$as_echo_n "checking for $ac_word... " >&6; }
29812if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29813  $as_echo_n "(cached) " >&6
29814else
29815  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29816  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29817else
29818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29819for as_dir in $PATH
29820do
29821  IFS=$as_save_IFS
29822  test -z "$as_dir" && as_dir=.
29823    for ac_exec_ext in '' $ac_executable_extensions; do
29824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29825    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29827    break 2
29828  fi
29829done
29830  done
29831IFS=$as_save_IFS
29832
29833fi
29834fi
29835ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29836if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29838$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29839else
29840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29841$as_echo "no" >&6; }
29842fi
29843
29844
29845  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29846done
29847
29848  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29849    PROPER_COMPILER_CXX=""
29850  else
29851    case $cross_compiling:$ac_tool_warned in
29852yes:)
29853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29855ac_tool_warned=yes ;;
29856esac
29857    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29858  fi
29859fi
29860
29861
29862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29863
29864  # First separate the path from the arguments. This will split at the first
29865  # space.
29866  complete="$PROPER_COMPILER_CXX"
29867  path="${complete%% *}"
29868  tmp="$complete EOL"
29869  arguments="${tmp#* }"
29870
29871  # Input might be given as Windows format, start by converting to
29872  # unix format.
29873  new_path=`$CYGPATH -u "$path"`
29874
29875  # Now try to locate executable using which
29876  new_path=`$WHICH "$new_path" 2> /dev/null`
29877  # bat and cmd files are not always considered executable in cygwin causing which
29878  # to not find them
29879  if test "x$new_path" = x \
29880      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29881      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29882    new_path=`$CYGPATH -u "$path"`
29883  fi
29884  if test "x$new_path" = x; then
29885    # Oops. Which didn't find the executable.
29886    # The splitting of arguments from the executable at a space might have been incorrect,
29887    # since paths with space are more likely in Windows. Give it another try with the whole
29888    # argument.
29889    path="$complete"
29890    arguments="EOL"
29891    new_path=`$CYGPATH -u "$path"`
29892    new_path=`$WHICH "$new_path" 2> /dev/null`
29893    # bat and cmd files are not always considered executable in cygwin causing which
29894    # to not find them
29895    if test "x$new_path" = x \
29896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29898      new_path=`$CYGPATH -u "$path"`
29899    fi
29900    if test "x$new_path" = x; then
29901      # It's still not found. Now this is an unrecoverable error.
29902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29903$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29904      has_space=`$ECHO "$complete" | $GREP " "`
29905      if test "x$has_space" != x; then
29906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29908      fi
29909      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29910    fi
29911  fi
29912
29913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29916  # "foo.exe" is OK but "foo" is an error.
29917  #
29918  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29919  # It is also a way to make sure we got the proper file name for the real test later on.
29920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29921  if test "x$test_shortpath" = x; then
29922    # Short path failed, file does not exist as specified.
29923    # Try adding .exe or .cmd
29924    if test -f "${new_path}.exe"; then
29925      input_to_shortpath="${new_path}.exe"
29926    elif test -f "${new_path}.cmd"; then
29927      input_to_shortpath="${new_path}.cmd"
29928    else
29929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29930$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29933      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29934    fi
29935  else
29936    input_to_shortpath="$new_path"
29937  fi
29938
29939  # Call helper function which possibly converts this using DOS-style short mode.
29940  # If so, the updated path is stored in $new_path.
29941  new_path="$input_to_shortpath"
29942
29943  input_path="$input_to_shortpath"
29944  # Check if we need to convert this using DOS-style short mode. If the path
29945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29946  # take no chances and rewrite it.
29947  # Note: m4 eats our [], so we need to use [ and ] instead.
29948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29949  if test "x$has_forbidden_chars" != x; then
29950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29954      # Going to short mode and back again did indeed matter. Since short mode is
29955      # case insensitive, let's make it lowercase to improve readability.
29956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29957      # Now convert it back to Unix-stile (cygpath)
29958      input_path=`$CYGPATH -u "$shortmode_path"`
29959      new_path="$input_path"
29960    fi
29961  fi
29962
29963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29964  if test "x$test_cygdrive_prefix" = x; then
29965    # As a simple fix, exclude /usr/bin since it's not a real path.
29966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29968      # a path prefixed by /cygdrive for fixpath to work.
29969      new_path="$CYGWIN_ROOT_PATH$input_path"
29970    fi
29971  fi
29972
29973  # remove trailing .exe if any
29974  new_path="${new_path/%.exe/}"
29975
29976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29977
29978  # First separate the path from the arguments. This will split at the first
29979  # space.
29980  complete="$PROPER_COMPILER_CXX"
29981  path="${complete%% *}"
29982  tmp="$complete EOL"
29983  arguments="${tmp#* }"
29984
29985  # Input might be given as Windows format, start by converting to
29986  # unix format.
29987  new_path="$path"
29988
29989  windows_path="$new_path"
29990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29991    unix_path=`$CYGPATH -u "$windows_path"`
29992    new_path="$unix_path"
29993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29995    new_path="$unix_path"
29996  fi
29997
29998
29999  # Now try to locate executable using which
30000  new_path=`$WHICH "$new_path" 2> /dev/null`
30001
30002  if test "x$new_path" = x; then
30003    # Oops. Which didn't find the executable.
30004    # The splitting of arguments from the executable at a space might have been incorrect,
30005    # since paths with space are more likely in Windows. Give it another try with the whole
30006    # argument.
30007    path="$complete"
30008    arguments="EOL"
30009    new_path="$path"
30010
30011  windows_path="$new_path"
30012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30013    unix_path=`$CYGPATH -u "$windows_path"`
30014    new_path="$unix_path"
30015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30017    new_path="$unix_path"
30018  fi
30019
30020
30021    new_path=`$WHICH "$new_path" 2> /dev/null`
30022
30023    if test "x$new_path" = x; then
30024      # It's still not found. Now this is an unrecoverable error.
30025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30026$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30027      has_space=`$ECHO "$complete" | $GREP " "`
30028      if test "x$has_space" != x; then
30029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30031      fi
30032      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30033    fi
30034  fi
30035
30036  # Now new_path has a complete unix path to the binary
30037  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30038    # Keep paths in /bin as-is, but remove trailing .exe if any
30039    new_path="${new_path/%.exe/}"
30040    # Do not save /bin paths to all_fixpath_prefixes!
30041  else
30042    # Not in mixed or Windows style, start by that.
30043    new_path=`cmd //c echo $new_path`
30044
30045  input_path="$new_path"
30046  # Check if we need to convert this using DOS-style short mode. If the path
30047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30048  # take no chances and rewrite it.
30049  # Note: m4 eats our [], so we need to use [ and ] instead.
30050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30051  if test "x$has_forbidden_chars" != x; then
30052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30054  fi
30055
30056    # Output is in $new_path
30057
30058  windows_path="$new_path"
30059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30060    unix_path=`$CYGPATH -u "$windows_path"`
30061    new_path="$unix_path"
30062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30064    new_path="$unix_path"
30065  fi
30066
30067    # remove trailing .exe if any
30068    new_path="${new_path/%.exe/}"
30069
30070    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30071    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30072  fi
30073
30074  else
30075    # We're on a posix platform. Hooray! :)
30076    # First separate the path from the arguments. This will split at the first
30077    # space.
30078    complete="$PROPER_COMPILER_CXX"
30079    path="${complete%% *}"
30080    tmp="$complete EOL"
30081    arguments="${tmp#* }"
30082
30083    # Cannot rely on the command "which" here since it doesn't always work.
30084    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30085    if test -z "$is_absolute_path"; then
30086      # Path to executable is not absolute. Find it.
30087      IFS_save="$IFS"
30088      IFS=:
30089      for p in $PATH; do
30090        if test -f "$p/$path" && test -x "$p/$path"; then
30091          new_path="$p/$path"
30092          break
30093        fi
30094      done
30095      IFS="$IFS_save"
30096    else
30097      # This is an absolute path, we can use it without further modifications.
30098      new_path="$path"
30099    fi
30100
30101    if test "x$new_path" = x; then
30102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30103$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30104      has_space=`$ECHO "$complete" | $GREP " "`
30105      if test "x$has_space" != x; then
30106        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30107$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30108      fi
30109      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30110    fi
30111  fi
30112
30113  # Now join together the path and the arguments once again
30114  if test "x$arguments" != xEOL; then
30115    new_complete="$new_path ${arguments% *}"
30116  else
30117    new_complete="$new_path"
30118  fi
30119
30120  if test "x$complete" != "x$new_complete"; then
30121    PROPER_COMPILER_CXX="$new_complete"
30122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30123$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30124  fi
30125
30126    PATH="$RETRY_COMPILER_SAVED_PATH"
30127
30128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30129$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30130
30131  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30132    # Follow a chain of symbolic links. Use readlink
30133    # where it exists, else fall back to horribly
30134    # complicated shell code.
30135    if test "x$READLINK_TESTED" != yes; then
30136      # On MacOSX there is a readlink tool with a different
30137      # purpose than the GNU readlink tool. Check the found readlink.
30138      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30139      if test "x$ISGNU" = x; then
30140        # A readlink that we do not know how to use.
30141        # Are there other non-GNU readlinks out there?
30142        READLINK_TESTED=yes
30143        READLINK=
30144      fi
30145    fi
30146
30147    if test "x$READLINK" != x; then
30148      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30149    else
30150      # Save the current directory for restoring afterwards
30151      STARTDIR=$PWD
30152      COUNTER=0
30153      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30154      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30155      cd $sym_link_dir
30156      # Use -P flag to resolve symlinks in directories.
30157      cd `$THEPWDCMD -P`
30158      sym_link_dir=`$THEPWDCMD -P`
30159      # Resolve file symlinks
30160      while test $COUNTER -lt 20; do
30161        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30162        if test "x$ISLINK" == x; then
30163          # This is not a symbolic link! We are done!
30164          break
30165        fi
30166        # Again resolve directory symlinks since the target of the just found
30167        # link could be in a different directory
30168        cd `$DIRNAME $ISLINK`
30169        sym_link_dir=`$THEPWDCMD -P`
30170        sym_link_file=`$BASENAME $ISLINK`
30171        let COUNTER=COUNTER+1
30172      done
30173      cd $STARTDIR
30174      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30175    fi
30176  fi
30177
30178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30179$as_echo "$PROPER_COMPILER_CXX" >&6; }
30180    CXX="$PROPER_COMPILER_CXX"
30181  else
30182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30183$as_echo "no, keeping CXX" >&6; }
30184  fi
30185
30186
30187  COMPILER=$CXX
30188  COMPILER_NAME=$COMPILER_NAME
30189
30190  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30191    # cc -V output typically looks like
30192    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30193    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30194    # Check that this is likely to be the Solaris Studio cc.
30195    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30196    if test $? -ne 0; then
30197      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30198      { $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
30199$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30200      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30201$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30202      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30203$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30204      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30205    fi
30206    # Remove usage instructions (if present), and
30207    # collapse compiler output into a single line
30208    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30209        $SED -e 's/ *[Uu]sage:.*//'`
30210    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30211        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30212  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30213    # xlc -qversion output typically looks like
30214    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30215    #     Version: 11.01.0000.0015
30216    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30217    # Check that this is likely to be the IBM XL C compiler.
30218    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30219    if test $? -ne 0; then
30220      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30221      { $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
30222$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30224$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30225      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30226$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30227      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30228    fi
30229    # Collapse compiler output into a single line
30230    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30231    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30232        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30233  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30234    # There is no specific version flag, but all output starts with a version string.
30235    # First line typically looks something like:
30236    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30237    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30238    # Check that this is likely to be Microsoft CL.EXE.
30239    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30240    if test $? -ne 0; then
30241      { $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
30242$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30243      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30244$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30245      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30246    fi
30247    # Collapse compiler output into a single line
30248    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30249    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30250        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30251  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30252    # gcc --version output typically looks like
30253    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30254    #     Copyright (C) 2013 Free Software Foundation, Inc.
30255    #     This is free software; see the source for copying conditions.  There is NO
30256    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30257    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30258    # Check that this is likely to be GCC.
30259    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30260    if test $? -ne 0; then
30261      { $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
30262$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30263      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30264$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30265      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30266    fi
30267    # Remove Copyright and legalese from version string, and
30268    # collapse into a single line
30269    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30270        $SED -e 's/ *Copyright .*//'`
30271    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30272        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30273  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30274    # clang --version output typically looks like
30275    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30276    #    clang version 3.3 (tags/RELEASE_33/final)
30277    # or
30278    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30279    #    Target: x86_64-pc-linux-gnu
30280    #    Thread model: posix
30281    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30282    # Check that this is likely to be clang
30283    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30284    if test $? -ne 0; then
30285      { $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
30286$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30287      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30288$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30289      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30290    fi
30291    # Collapse compiler output into a single line
30292    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30293    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30294        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30295  else
30296      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30297  fi
30298  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30299  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30300  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30301  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30302
30303  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30304$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30305
30306
30307  # Now that we have resolved CXX ourself, let autoconf have its go at it
30308  ac_ext=cpp
30309ac_cpp='$CXXCPP $CPPFLAGS'
30310ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30311ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30312ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30313if test -z "$CXX"; then
30314  if test -n "$CCC"; then
30315    CXX=$CCC
30316  else
30317    if test -n "$ac_tool_prefix"; then
30318  for ac_prog in $CXX
30319  do
30320    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30321set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30323$as_echo_n "checking for $ac_word... " >&6; }
30324if ${ac_cv_prog_CXX+:} false; then :
30325  $as_echo_n "(cached) " >&6
30326else
30327  if test -n "$CXX"; then
30328  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30329else
30330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30331for as_dir in $PATH
30332do
30333  IFS=$as_save_IFS
30334  test -z "$as_dir" && as_dir=.
30335    for ac_exec_ext in '' $ac_executable_extensions; do
30336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30337    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30339    break 2
30340  fi
30341done
30342  done
30343IFS=$as_save_IFS
30344
30345fi
30346fi
30347CXX=$ac_cv_prog_CXX
30348if test -n "$CXX"; then
30349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30350$as_echo "$CXX" >&6; }
30351else
30352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30353$as_echo "no" >&6; }
30354fi
30355
30356
30357    test -n "$CXX" && break
30358  done
30359fi
30360if test -z "$CXX"; then
30361  ac_ct_CXX=$CXX
30362  for ac_prog in $CXX
30363do
30364  # Extract the first word of "$ac_prog", so it can be a program name with args.
30365set dummy $ac_prog; ac_word=$2
30366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30367$as_echo_n "checking for $ac_word... " >&6; }
30368if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30369  $as_echo_n "(cached) " >&6
30370else
30371  if test -n "$ac_ct_CXX"; then
30372  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30373else
30374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30375for as_dir in $PATH
30376do
30377  IFS=$as_save_IFS
30378  test -z "$as_dir" && as_dir=.
30379    for ac_exec_ext in '' $ac_executable_extensions; do
30380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30381    ac_cv_prog_ac_ct_CXX="$ac_prog"
30382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30383    break 2
30384  fi
30385done
30386  done
30387IFS=$as_save_IFS
30388
30389fi
30390fi
30391ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30392if test -n "$ac_ct_CXX"; then
30393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30394$as_echo "$ac_ct_CXX" >&6; }
30395else
30396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30397$as_echo "no" >&6; }
30398fi
30399
30400
30401  test -n "$ac_ct_CXX" && break
30402done
30403
30404  if test "x$ac_ct_CXX" = x; then
30405    CXX="g++"
30406  else
30407    case $cross_compiling:$ac_tool_warned in
30408yes:)
30409{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30410$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30411ac_tool_warned=yes ;;
30412esac
30413    CXX=$ac_ct_CXX
30414  fi
30415fi
30416
30417  fi
30418fi
30419# Provide some information about the compiler.
30420$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30421set X $ac_compile
30422ac_compiler=$2
30423for ac_option in --version -v -V -qversion; do
30424  { { ac_try="$ac_compiler $ac_option >&5"
30425case "(($ac_try" in
30426  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30427  *) ac_try_echo=$ac_try;;
30428esac
30429eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30430$as_echo "$ac_try_echo"; } >&5
30431  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30432  ac_status=$?
30433  if test -s conftest.err; then
30434    sed '10a\
30435... rest of stderr output deleted ...
30436         10q' conftest.err >conftest.er1
30437    cat conftest.er1 >&5
30438  fi
30439  rm -f conftest.er1 conftest.err
30440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30441  test $ac_status = 0; }
30442done
30443
30444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30445$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30446if ${ac_cv_cxx_compiler_gnu+:} false; then :
30447  $as_echo_n "(cached) " >&6
30448else
30449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30450/* end confdefs.h.  */
30451
30452int
30453main ()
30454{
30455#ifndef __GNUC__
30456       choke me
30457#endif
30458
30459  ;
30460  return 0;
30461}
30462_ACEOF
30463if ac_fn_cxx_try_compile "$LINENO"; then :
30464  ac_compiler_gnu=yes
30465else
30466  ac_compiler_gnu=no
30467fi
30468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30469ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30470
30471fi
30472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30473$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30474if test $ac_compiler_gnu = yes; then
30475  GXX=yes
30476else
30477  GXX=
30478fi
30479ac_test_CXXFLAGS=${CXXFLAGS+set}
30480ac_save_CXXFLAGS=$CXXFLAGS
30481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30482$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30483if ${ac_cv_prog_cxx_g+:} false; then :
30484  $as_echo_n "(cached) " >&6
30485else
30486  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30487   ac_cxx_werror_flag=yes
30488   ac_cv_prog_cxx_g=no
30489   CXXFLAGS="-g"
30490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30491/* end confdefs.h.  */
30492
30493int
30494main ()
30495{
30496
30497  ;
30498  return 0;
30499}
30500_ACEOF
30501if ac_fn_cxx_try_compile "$LINENO"; then :
30502  ac_cv_prog_cxx_g=yes
30503else
30504  CXXFLAGS=""
30505      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30506/* end confdefs.h.  */
30507
30508int
30509main ()
30510{
30511
30512  ;
30513  return 0;
30514}
30515_ACEOF
30516if ac_fn_cxx_try_compile "$LINENO"; then :
30517
30518else
30519  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30520	 CXXFLAGS="-g"
30521	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30522/* end confdefs.h.  */
30523
30524int
30525main ()
30526{
30527
30528  ;
30529  return 0;
30530}
30531_ACEOF
30532if ac_fn_cxx_try_compile "$LINENO"; then :
30533  ac_cv_prog_cxx_g=yes
30534fi
30535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30536fi
30537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30538fi
30539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30540   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30541fi
30542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30543$as_echo "$ac_cv_prog_cxx_g" >&6; }
30544if test "$ac_test_CXXFLAGS" = set; then
30545  CXXFLAGS=$ac_save_CXXFLAGS
30546elif test $ac_cv_prog_cxx_g = yes; then
30547  if test "$GXX" = yes; then
30548    CXXFLAGS="-g -O2"
30549  else
30550    CXXFLAGS="-g"
30551  fi
30552else
30553  if test "$GXX" = yes; then
30554    CXXFLAGS="-O2"
30555  else
30556    CXXFLAGS=
30557  fi
30558fi
30559ac_ext=cpp
30560ac_cpp='$CXXCPP $CPPFLAGS'
30561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30564
30565
30566  #
30567  # Setup the preprocessor (CPP and CXXCPP)
30568  #
30569  ac_ext=c
30570ac_cpp='$CPP $CPPFLAGS'
30571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30573ac_compiler_gnu=$ac_cv_c_compiler_gnu
30574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30575$as_echo_n "checking how to run the C preprocessor... " >&6; }
30576# On Suns, sometimes $CPP names a directory.
30577if test -n "$CPP" && test -d "$CPP"; then
30578  CPP=
30579fi
30580if test -z "$CPP"; then
30581  if ${ac_cv_prog_CPP+:} false; then :
30582  $as_echo_n "(cached) " >&6
30583else
30584      # Double quotes because CPP needs to be expanded
30585    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30586    do
30587      ac_preproc_ok=false
30588for ac_c_preproc_warn_flag in '' yes
30589do
30590  # Use a header file that comes with gcc, so configuring glibc
30591  # with a fresh cross-compiler works.
30592  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30593  # <limits.h> exists even on freestanding compilers.
30594  # On the NeXT, cc -E runs the code through the compiler's parser,
30595  # not just through cpp. "Syntax error" is here to catch this case.
30596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30597/* end confdefs.h.  */
30598#ifdef __STDC__
30599# include <limits.h>
30600#else
30601# include <assert.h>
30602#endif
30603		     Syntax error
30604_ACEOF
30605if ac_fn_c_try_cpp "$LINENO"; then :
30606
30607else
30608  # Broken: fails on valid input.
30609continue
30610fi
30611rm -f conftest.err conftest.i conftest.$ac_ext
30612
30613  # OK, works on sane cases.  Now check whether nonexistent headers
30614  # can be detected and how.
30615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30616/* end confdefs.h.  */
30617#include <ac_nonexistent.h>
30618_ACEOF
30619if ac_fn_c_try_cpp "$LINENO"; then :
30620  # Broken: success on invalid input.
30621continue
30622else
30623  # Passes both tests.
30624ac_preproc_ok=:
30625break
30626fi
30627rm -f conftest.err conftest.i conftest.$ac_ext
30628
30629done
30630# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30631rm -f conftest.i conftest.err conftest.$ac_ext
30632if $ac_preproc_ok; then :
30633  break
30634fi
30635
30636    done
30637    ac_cv_prog_CPP=$CPP
30638
30639fi
30640  CPP=$ac_cv_prog_CPP
30641else
30642  ac_cv_prog_CPP=$CPP
30643fi
30644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30645$as_echo "$CPP" >&6; }
30646ac_preproc_ok=false
30647for ac_c_preproc_warn_flag in '' yes
30648do
30649  # Use a header file that comes with gcc, so configuring glibc
30650  # with a fresh cross-compiler works.
30651  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30652  # <limits.h> exists even on freestanding compilers.
30653  # On the NeXT, cc -E runs the code through the compiler's parser,
30654  # not just through cpp. "Syntax error" is here to catch this case.
30655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30656/* end confdefs.h.  */
30657#ifdef __STDC__
30658# include <limits.h>
30659#else
30660# include <assert.h>
30661#endif
30662		     Syntax error
30663_ACEOF
30664if ac_fn_c_try_cpp "$LINENO"; then :
30665
30666else
30667  # Broken: fails on valid input.
30668continue
30669fi
30670rm -f conftest.err conftest.i conftest.$ac_ext
30671
30672  # OK, works on sane cases.  Now check whether nonexistent headers
30673  # can be detected and how.
30674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30675/* end confdefs.h.  */
30676#include <ac_nonexistent.h>
30677_ACEOF
30678if ac_fn_c_try_cpp "$LINENO"; then :
30679  # Broken: success on invalid input.
30680continue
30681else
30682  # Passes both tests.
30683ac_preproc_ok=:
30684break
30685fi
30686rm -f conftest.err conftest.i conftest.$ac_ext
30687
30688done
30689# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30690rm -f conftest.i conftest.err conftest.$ac_ext
30691if $ac_preproc_ok; then :
30692
30693else
30694  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30696as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30697See \`config.log' for more details" "$LINENO" 5; }
30698fi
30699
30700ac_ext=cpp
30701ac_cpp='$CXXCPP $CPPFLAGS'
30702ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30703ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30704ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30705
30706
30707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30708
30709  # First separate the path from the arguments. This will split at the first
30710  # space.
30711  complete="$CPP"
30712  path="${complete%% *}"
30713  tmp="$complete EOL"
30714  arguments="${tmp#* }"
30715
30716  # Input might be given as Windows format, start by converting to
30717  # unix format.
30718  new_path=`$CYGPATH -u "$path"`
30719
30720  # Now try to locate executable using which
30721  new_path=`$WHICH "$new_path" 2> /dev/null`
30722  # bat and cmd files are not always considered executable in cygwin causing which
30723  # to not find them
30724  if test "x$new_path" = x \
30725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30727    new_path=`$CYGPATH -u "$path"`
30728  fi
30729  if test "x$new_path" = x; then
30730    # Oops. Which didn't find the executable.
30731    # The splitting of arguments from the executable at a space might have been incorrect,
30732    # since paths with space are more likely in Windows. Give it another try with the whole
30733    # argument.
30734    path="$complete"
30735    arguments="EOL"
30736    new_path=`$CYGPATH -u "$path"`
30737    new_path=`$WHICH "$new_path" 2> /dev/null`
30738    # bat and cmd files are not always considered executable in cygwin causing which
30739    # to not find them
30740    if test "x$new_path" = x \
30741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30743      new_path=`$CYGPATH -u "$path"`
30744    fi
30745    if test "x$new_path" = x; then
30746      # It's still not found. Now this is an unrecoverable error.
30747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30748$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30749      has_space=`$ECHO "$complete" | $GREP " "`
30750      if test "x$has_space" != x; then
30751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30753      fi
30754      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30755    fi
30756  fi
30757
30758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30761  # "foo.exe" is OK but "foo" is an error.
30762  #
30763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30764  # It is also a way to make sure we got the proper file name for the real test later on.
30765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30766  if test "x$test_shortpath" = x; then
30767    # Short path failed, file does not exist as specified.
30768    # Try adding .exe or .cmd
30769    if test -f "${new_path}.exe"; then
30770      input_to_shortpath="${new_path}.exe"
30771    elif test -f "${new_path}.cmd"; then
30772      input_to_shortpath="${new_path}.cmd"
30773    else
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30775$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30778      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30779    fi
30780  else
30781    input_to_shortpath="$new_path"
30782  fi
30783
30784  # Call helper function which possibly converts this using DOS-style short mode.
30785  # If so, the updated path is stored in $new_path.
30786  new_path="$input_to_shortpath"
30787
30788  input_path="$input_to_shortpath"
30789  # Check if we need to convert this using DOS-style short mode. If the path
30790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30791  # take no chances and rewrite it.
30792  # Note: m4 eats our [], so we need to use [ and ] instead.
30793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30794  if test "x$has_forbidden_chars" != x; then
30795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30799      # Going to short mode and back again did indeed matter. Since short mode is
30800      # case insensitive, let's make it lowercase to improve readability.
30801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30802      # Now convert it back to Unix-stile (cygpath)
30803      input_path=`$CYGPATH -u "$shortmode_path"`
30804      new_path="$input_path"
30805    fi
30806  fi
30807
30808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30809  if test "x$test_cygdrive_prefix" = x; then
30810    # As a simple fix, exclude /usr/bin since it's not a real path.
30811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30813      # a path prefixed by /cygdrive for fixpath to work.
30814      new_path="$CYGWIN_ROOT_PATH$input_path"
30815    fi
30816  fi
30817
30818  # remove trailing .exe if any
30819  new_path="${new_path/%.exe/}"
30820
30821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30822
30823  # First separate the path from the arguments. This will split at the first
30824  # space.
30825  complete="$CPP"
30826  path="${complete%% *}"
30827  tmp="$complete EOL"
30828  arguments="${tmp#* }"
30829
30830  # Input might be given as Windows format, start by converting to
30831  # unix format.
30832  new_path="$path"
30833
30834  windows_path="$new_path"
30835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30836    unix_path=`$CYGPATH -u "$windows_path"`
30837    new_path="$unix_path"
30838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30840    new_path="$unix_path"
30841  fi
30842
30843
30844  # Now try to locate executable using which
30845  new_path=`$WHICH "$new_path" 2> /dev/null`
30846
30847  if test "x$new_path" = x; then
30848    # Oops. Which didn't find the executable.
30849    # The splitting of arguments from the executable at a space might have been incorrect,
30850    # since paths with space are more likely in Windows. Give it another try with the whole
30851    # argument.
30852    path="$complete"
30853    arguments="EOL"
30854    new_path="$path"
30855
30856  windows_path="$new_path"
30857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30858    unix_path=`$CYGPATH -u "$windows_path"`
30859    new_path="$unix_path"
30860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30862    new_path="$unix_path"
30863  fi
30864
30865
30866    new_path=`$WHICH "$new_path" 2> /dev/null`
30867
30868    if test "x$new_path" = x; then
30869      # It's still not found. Now this is an unrecoverable error.
30870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30871$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30872      has_space=`$ECHO "$complete" | $GREP " "`
30873      if test "x$has_space" != x; then
30874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30876      fi
30877      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30878    fi
30879  fi
30880
30881  # Now new_path has a complete unix path to the binary
30882  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30883    # Keep paths in /bin as-is, but remove trailing .exe if any
30884    new_path="${new_path/%.exe/}"
30885    # Do not save /bin paths to all_fixpath_prefixes!
30886  else
30887    # Not in mixed or Windows style, start by that.
30888    new_path=`cmd //c echo $new_path`
30889
30890  input_path="$new_path"
30891  # Check if we need to convert this using DOS-style short mode. If the path
30892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30893  # take no chances and rewrite it.
30894  # Note: m4 eats our [], so we need to use [ and ] instead.
30895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30896  if test "x$has_forbidden_chars" != x; then
30897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30899  fi
30900
30901    # Output is in $new_path
30902
30903  windows_path="$new_path"
30904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30905    unix_path=`$CYGPATH -u "$windows_path"`
30906    new_path="$unix_path"
30907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30909    new_path="$unix_path"
30910  fi
30911
30912    # remove trailing .exe if any
30913    new_path="${new_path/%.exe/}"
30914
30915    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30916    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30917  fi
30918
30919  else
30920    # We're on a posix platform. Hooray! :)
30921    # First separate the path from the arguments. This will split at the first
30922    # space.
30923    complete="$CPP"
30924    path="${complete%% *}"
30925    tmp="$complete EOL"
30926    arguments="${tmp#* }"
30927
30928    # Cannot rely on the command "which" here since it doesn't always work.
30929    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30930    if test -z "$is_absolute_path"; then
30931      # Path to executable is not absolute. Find it.
30932      IFS_save="$IFS"
30933      IFS=:
30934      for p in $PATH; do
30935        if test -f "$p/$path" && test -x "$p/$path"; then
30936          new_path="$p/$path"
30937          break
30938        fi
30939      done
30940      IFS="$IFS_save"
30941    else
30942      # This is an absolute path, we can use it without further modifications.
30943      new_path="$path"
30944    fi
30945
30946    if test "x$new_path" = x; then
30947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30948$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30949      has_space=`$ECHO "$complete" | $GREP " "`
30950      if test "x$has_space" != x; then
30951        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30953      fi
30954      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30955    fi
30956  fi
30957
30958  # Now join together the path and the arguments once again
30959  if test "x$arguments" != xEOL; then
30960    new_complete="$new_path ${arguments% *}"
30961  else
30962    new_complete="$new_path"
30963  fi
30964
30965  if test "x$complete" != "x$new_complete"; then
30966    CPP="$new_complete"
30967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30968$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30969  fi
30970
30971  ac_ext=cpp
30972ac_cpp='$CXXCPP $CPPFLAGS'
30973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30977$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30978if test -z "$CXXCPP"; then
30979  if ${ac_cv_prog_CXXCPP+:} false; then :
30980  $as_echo_n "(cached) " >&6
30981else
30982      # Double quotes because CXXCPP needs to be expanded
30983    for CXXCPP in "$CXX -E" "/lib/cpp"
30984    do
30985      ac_preproc_ok=false
30986for ac_cxx_preproc_warn_flag in '' yes
30987do
30988  # Use a header file that comes with gcc, so configuring glibc
30989  # with a fresh cross-compiler works.
30990  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30991  # <limits.h> exists even on freestanding compilers.
30992  # On the NeXT, cc -E runs the code through the compiler's parser,
30993  # not just through cpp. "Syntax error" is here to catch this case.
30994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30995/* end confdefs.h.  */
30996#ifdef __STDC__
30997# include <limits.h>
30998#else
30999# include <assert.h>
31000#endif
31001		     Syntax error
31002_ACEOF
31003if ac_fn_cxx_try_cpp "$LINENO"; then :
31004
31005else
31006  # Broken: fails on valid input.
31007continue
31008fi
31009rm -f conftest.err conftest.i conftest.$ac_ext
31010
31011  # OK, works on sane cases.  Now check whether nonexistent headers
31012  # can be detected and how.
31013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31014/* end confdefs.h.  */
31015#include <ac_nonexistent.h>
31016_ACEOF
31017if ac_fn_cxx_try_cpp "$LINENO"; then :
31018  # Broken: success on invalid input.
31019continue
31020else
31021  # Passes both tests.
31022ac_preproc_ok=:
31023break
31024fi
31025rm -f conftest.err conftest.i conftest.$ac_ext
31026
31027done
31028# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31029rm -f conftest.i conftest.err conftest.$ac_ext
31030if $ac_preproc_ok; then :
31031  break
31032fi
31033
31034    done
31035    ac_cv_prog_CXXCPP=$CXXCPP
31036
31037fi
31038  CXXCPP=$ac_cv_prog_CXXCPP
31039else
31040  ac_cv_prog_CXXCPP=$CXXCPP
31041fi
31042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31043$as_echo "$CXXCPP" >&6; }
31044ac_preproc_ok=false
31045for ac_cxx_preproc_warn_flag in '' yes
31046do
31047  # Use a header file that comes with gcc, so configuring glibc
31048  # with a fresh cross-compiler works.
31049  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31050  # <limits.h> exists even on freestanding compilers.
31051  # On the NeXT, cc -E runs the code through the compiler's parser,
31052  # not just through cpp. "Syntax error" is here to catch this case.
31053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31054/* end confdefs.h.  */
31055#ifdef __STDC__
31056# include <limits.h>
31057#else
31058# include <assert.h>
31059#endif
31060		     Syntax error
31061_ACEOF
31062if ac_fn_cxx_try_cpp "$LINENO"; then :
31063
31064else
31065  # Broken: fails on valid input.
31066continue
31067fi
31068rm -f conftest.err conftest.i conftest.$ac_ext
31069
31070  # OK, works on sane cases.  Now check whether nonexistent headers
31071  # can be detected and how.
31072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31073/* end confdefs.h.  */
31074#include <ac_nonexistent.h>
31075_ACEOF
31076if ac_fn_cxx_try_cpp "$LINENO"; then :
31077  # Broken: success on invalid input.
31078continue
31079else
31080  # Passes both tests.
31081ac_preproc_ok=:
31082break
31083fi
31084rm -f conftest.err conftest.i conftest.$ac_ext
31085
31086done
31087# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31088rm -f conftest.i conftest.err conftest.$ac_ext
31089if $ac_preproc_ok; then :
31090
31091else
31092  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31094as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31095See \`config.log' for more details" "$LINENO" 5; }
31096fi
31097
31098ac_ext=cpp
31099ac_cpp='$CXXCPP $CPPFLAGS'
31100ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31101ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31102ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31103
31104
31105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31106
31107  # First separate the path from the arguments. This will split at the first
31108  # space.
31109  complete="$CXXCPP"
31110  path="${complete%% *}"
31111  tmp="$complete EOL"
31112  arguments="${tmp#* }"
31113
31114  # Input might be given as Windows format, start by converting to
31115  # unix format.
31116  new_path=`$CYGPATH -u "$path"`
31117
31118  # Now try to locate executable using which
31119  new_path=`$WHICH "$new_path" 2> /dev/null`
31120  # bat and cmd files are not always considered executable in cygwin causing which
31121  # to not find them
31122  if test "x$new_path" = x \
31123      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31124      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31125    new_path=`$CYGPATH -u "$path"`
31126  fi
31127  if test "x$new_path" = x; then
31128    # Oops. Which didn't find the executable.
31129    # The splitting of arguments from the executable at a space might have been incorrect,
31130    # since paths with space are more likely in Windows. Give it another try with the whole
31131    # argument.
31132    path="$complete"
31133    arguments="EOL"
31134    new_path=`$CYGPATH -u "$path"`
31135    new_path=`$WHICH "$new_path" 2> /dev/null`
31136    # bat and cmd files are not always considered executable in cygwin causing which
31137    # to not find them
31138    if test "x$new_path" = x \
31139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31141      new_path=`$CYGPATH -u "$path"`
31142    fi
31143    if test "x$new_path" = x; then
31144      # It's still not found. Now this is an unrecoverable error.
31145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31146$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31147      has_space=`$ECHO "$complete" | $GREP " "`
31148      if test "x$has_space" != x; then
31149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31151      fi
31152      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31153    fi
31154  fi
31155
31156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31159  # "foo.exe" is OK but "foo" is an error.
31160  #
31161  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31162  # It is also a way to make sure we got the proper file name for the real test later on.
31163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31164  if test "x$test_shortpath" = x; then
31165    # Short path failed, file does not exist as specified.
31166    # Try adding .exe or .cmd
31167    if test -f "${new_path}.exe"; then
31168      input_to_shortpath="${new_path}.exe"
31169    elif test -f "${new_path}.cmd"; then
31170      input_to_shortpath="${new_path}.cmd"
31171    else
31172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31173$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31174      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31175$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31176      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31177    fi
31178  else
31179    input_to_shortpath="$new_path"
31180  fi
31181
31182  # Call helper function which possibly converts this using DOS-style short mode.
31183  # If so, the updated path is stored in $new_path.
31184  new_path="$input_to_shortpath"
31185
31186  input_path="$input_to_shortpath"
31187  # Check if we need to convert this using DOS-style short mode. If the path
31188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31189  # take no chances and rewrite it.
31190  # Note: m4 eats our [], so we need to use [ and ] instead.
31191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31192  if test "x$has_forbidden_chars" != x; then
31193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31197      # Going to short mode and back again did indeed matter. Since short mode is
31198      # case insensitive, let's make it lowercase to improve readability.
31199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31200      # Now convert it back to Unix-stile (cygpath)
31201      input_path=`$CYGPATH -u "$shortmode_path"`
31202      new_path="$input_path"
31203    fi
31204  fi
31205
31206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31207  if test "x$test_cygdrive_prefix" = x; then
31208    # As a simple fix, exclude /usr/bin since it's not a real path.
31209    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31211      # a path prefixed by /cygdrive for fixpath to work.
31212      new_path="$CYGWIN_ROOT_PATH$input_path"
31213    fi
31214  fi
31215
31216  # remove trailing .exe if any
31217  new_path="${new_path/%.exe/}"
31218
31219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31220
31221  # First separate the path from the arguments. This will split at the first
31222  # space.
31223  complete="$CXXCPP"
31224  path="${complete%% *}"
31225  tmp="$complete EOL"
31226  arguments="${tmp#* }"
31227
31228  # Input might be given as Windows format, start by converting to
31229  # unix format.
31230  new_path="$path"
31231
31232  windows_path="$new_path"
31233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31234    unix_path=`$CYGPATH -u "$windows_path"`
31235    new_path="$unix_path"
31236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31238    new_path="$unix_path"
31239  fi
31240
31241
31242  # Now try to locate executable using which
31243  new_path=`$WHICH "$new_path" 2> /dev/null`
31244
31245  if test "x$new_path" = x; then
31246    # Oops. Which didn't find the executable.
31247    # The splitting of arguments from the executable at a space might have been incorrect,
31248    # since paths with space are more likely in Windows. Give it another try with the whole
31249    # argument.
31250    path="$complete"
31251    arguments="EOL"
31252    new_path="$path"
31253
31254  windows_path="$new_path"
31255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31256    unix_path=`$CYGPATH -u "$windows_path"`
31257    new_path="$unix_path"
31258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31260    new_path="$unix_path"
31261  fi
31262
31263
31264    new_path=`$WHICH "$new_path" 2> /dev/null`
31265
31266    if test "x$new_path" = x; then
31267      # It's still not found. Now this is an unrecoverable error.
31268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31269$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31270      has_space=`$ECHO "$complete" | $GREP " "`
31271      if test "x$has_space" != x; then
31272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31274      fi
31275      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31276    fi
31277  fi
31278
31279  # Now new_path has a complete unix path to the binary
31280  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31281    # Keep paths in /bin as-is, but remove trailing .exe if any
31282    new_path="${new_path/%.exe/}"
31283    # Do not save /bin paths to all_fixpath_prefixes!
31284  else
31285    # Not in mixed or Windows style, start by that.
31286    new_path=`cmd //c echo $new_path`
31287
31288  input_path="$new_path"
31289  # Check if we need to convert this using DOS-style short mode. If the path
31290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31291  # take no chances and rewrite it.
31292  # Note: m4 eats our [], so we need to use [ and ] instead.
31293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31294  if test "x$has_forbidden_chars" != x; then
31295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31297  fi
31298
31299    # Output is in $new_path
31300
31301  windows_path="$new_path"
31302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31303    unix_path=`$CYGPATH -u "$windows_path"`
31304    new_path="$unix_path"
31305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31307    new_path="$unix_path"
31308  fi
31309
31310    # remove trailing .exe if any
31311    new_path="${new_path/%.exe/}"
31312
31313    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31314    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31315  fi
31316
31317  else
31318    # We're on a posix platform. Hooray! :)
31319    # First separate the path from the arguments. This will split at the first
31320    # space.
31321    complete="$CXXCPP"
31322    path="${complete%% *}"
31323    tmp="$complete EOL"
31324    arguments="${tmp#* }"
31325
31326    # Cannot rely on the command "which" here since it doesn't always work.
31327    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31328    if test -z "$is_absolute_path"; then
31329      # Path to executable is not absolute. Find it.
31330      IFS_save="$IFS"
31331      IFS=:
31332      for p in $PATH; do
31333        if test -f "$p/$path" && test -x "$p/$path"; then
31334          new_path="$p/$path"
31335          break
31336        fi
31337      done
31338      IFS="$IFS_save"
31339    else
31340      # This is an absolute path, we can use it without further modifications.
31341      new_path="$path"
31342    fi
31343
31344    if test "x$new_path" = x; then
31345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31346$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31347      has_space=`$ECHO "$complete" | $GREP " "`
31348      if test "x$has_space" != x; then
31349        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31350$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31351      fi
31352      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31353    fi
31354  fi
31355
31356  # Now join together the path and the arguments once again
31357  if test "x$arguments" != xEOL; then
31358    new_complete="$new_path ${arguments% *}"
31359  else
31360    new_complete="$new_path"
31361  fi
31362
31363  if test "x$complete" != "x$new_complete"; then
31364    CXXCPP="$new_complete"
31365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31366$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31367  fi
31368
31369
31370  #
31371  # Setup the linker (LD)
31372  #
31373  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31374    # In the Microsoft toolchain we have a separate LD command "link".
31375    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31376    # a cygwin program for something completely different.
31377    # Extract the first word of "link", so it can be a program name with args.
31378set dummy link; ac_word=$2
31379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31380$as_echo_n "checking for $ac_word... " >&6; }
31381if ${ac_cv_prog_LD+:} false; then :
31382  $as_echo_n "(cached) " >&6
31383else
31384  if test -n "$LD"; then
31385  ac_cv_prog_LD="$LD" # Let the user override the test.
31386else
31387  ac_prog_rejected=no
31388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31389for as_dir in $PATH
31390do
31391  IFS=$as_save_IFS
31392  test -z "$as_dir" && as_dir=.
31393    for ac_exec_ext in '' $ac_executable_extensions; do
31394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31395    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31396       ac_prog_rejected=yes
31397       continue
31398     fi
31399    ac_cv_prog_LD="link"
31400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31401    break 2
31402  fi
31403done
31404  done
31405IFS=$as_save_IFS
31406
31407if test $ac_prog_rejected = yes; then
31408  # We found a bogon in the path, so make sure we never use it.
31409  set dummy $ac_cv_prog_LD
31410  shift
31411  if test $# != 0; then
31412    # We chose a different compiler from the bogus one.
31413    # However, it has the same basename, so the bogon will be chosen
31414    # first if we set LD to just the basename; use the full file name.
31415    shift
31416    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31417  fi
31418fi
31419fi
31420fi
31421LD=$ac_cv_prog_LD
31422if test -n "$LD"; then
31423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31424$as_echo "$LD" >&6; }
31425else
31426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31427$as_echo "no" >&6; }
31428fi
31429
31430
31431
31432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31433
31434  # First separate the path from the arguments. This will split at the first
31435  # space.
31436  complete="$LD"
31437  path="${complete%% *}"
31438  tmp="$complete EOL"
31439  arguments="${tmp#* }"
31440
31441  # Input might be given as Windows format, start by converting to
31442  # unix format.
31443  new_path=`$CYGPATH -u "$path"`
31444
31445  # Now try to locate executable using which
31446  new_path=`$WHICH "$new_path" 2> /dev/null`
31447  # bat and cmd files are not always considered executable in cygwin causing which
31448  # to not find them
31449  if test "x$new_path" = x \
31450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31452    new_path=`$CYGPATH -u "$path"`
31453  fi
31454  if test "x$new_path" = x; then
31455    # Oops. Which didn't find the executable.
31456    # The splitting of arguments from the executable at a space might have been incorrect,
31457    # since paths with space are more likely in Windows. Give it another try with the whole
31458    # argument.
31459    path="$complete"
31460    arguments="EOL"
31461    new_path=`$CYGPATH -u "$path"`
31462    new_path=`$WHICH "$new_path" 2> /dev/null`
31463    # bat and cmd files are not always considered executable in cygwin causing which
31464    # to not find them
31465    if test "x$new_path" = x \
31466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31468      new_path=`$CYGPATH -u "$path"`
31469    fi
31470    if test "x$new_path" = x; then
31471      # It's still not found. Now this is an unrecoverable error.
31472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31473$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31474      has_space=`$ECHO "$complete" | $GREP " "`
31475      if test "x$has_space" != x; then
31476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31478      fi
31479      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31480    fi
31481  fi
31482
31483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31486  # "foo.exe" is OK but "foo" is an error.
31487  #
31488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31489  # It is also a way to make sure we got the proper file name for the real test later on.
31490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31491  if test "x$test_shortpath" = x; then
31492    # Short path failed, file does not exist as specified.
31493    # Try adding .exe or .cmd
31494    if test -f "${new_path}.exe"; then
31495      input_to_shortpath="${new_path}.exe"
31496    elif test -f "${new_path}.cmd"; then
31497      input_to_shortpath="${new_path}.cmd"
31498    else
31499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31500$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31503      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31504    fi
31505  else
31506    input_to_shortpath="$new_path"
31507  fi
31508
31509  # Call helper function which possibly converts this using DOS-style short mode.
31510  # If so, the updated path is stored in $new_path.
31511  new_path="$input_to_shortpath"
31512
31513  input_path="$input_to_shortpath"
31514  # Check if we need to convert this using DOS-style short mode. If the path
31515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31516  # take no chances and rewrite it.
31517  # Note: m4 eats our [], so we need to use [ and ] instead.
31518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31519  if test "x$has_forbidden_chars" != x; then
31520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31524      # Going to short mode and back again did indeed matter. Since short mode is
31525      # case insensitive, let's make it lowercase to improve readability.
31526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31527      # Now convert it back to Unix-stile (cygpath)
31528      input_path=`$CYGPATH -u "$shortmode_path"`
31529      new_path="$input_path"
31530    fi
31531  fi
31532
31533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31534  if test "x$test_cygdrive_prefix" = x; then
31535    # As a simple fix, exclude /usr/bin since it's not a real path.
31536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31538      # a path prefixed by /cygdrive for fixpath to work.
31539      new_path="$CYGWIN_ROOT_PATH$input_path"
31540    fi
31541  fi
31542
31543  # remove trailing .exe if any
31544  new_path="${new_path/%.exe/}"
31545
31546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31547
31548  # First separate the path from the arguments. This will split at the first
31549  # space.
31550  complete="$LD"
31551  path="${complete%% *}"
31552  tmp="$complete EOL"
31553  arguments="${tmp#* }"
31554
31555  # Input might be given as Windows format, start by converting to
31556  # unix format.
31557  new_path="$path"
31558
31559  windows_path="$new_path"
31560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31561    unix_path=`$CYGPATH -u "$windows_path"`
31562    new_path="$unix_path"
31563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31565    new_path="$unix_path"
31566  fi
31567
31568
31569  # Now try to locate executable using which
31570  new_path=`$WHICH "$new_path" 2> /dev/null`
31571
31572  if test "x$new_path" = x; then
31573    # Oops. Which didn't find the executable.
31574    # The splitting of arguments from the executable at a space might have been incorrect,
31575    # since paths with space are more likely in Windows. Give it another try with the whole
31576    # argument.
31577    path="$complete"
31578    arguments="EOL"
31579    new_path="$path"
31580
31581  windows_path="$new_path"
31582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31583    unix_path=`$CYGPATH -u "$windows_path"`
31584    new_path="$unix_path"
31585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31587    new_path="$unix_path"
31588  fi
31589
31590
31591    new_path=`$WHICH "$new_path" 2> /dev/null`
31592
31593    if test "x$new_path" = x; then
31594      # It's still not found. Now this is an unrecoverable error.
31595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31596$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31597      has_space=`$ECHO "$complete" | $GREP " "`
31598      if test "x$has_space" != x; then
31599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31601      fi
31602      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31603    fi
31604  fi
31605
31606  # Now new_path has a complete unix path to the binary
31607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31608    # Keep paths in /bin as-is, but remove trailing .exe if any
31609    new_path="${new_path/%.exe/}"
31610    # Do not save /bin paths to all_fixpath_prefixes!
31611  else
31612    # Not in mixed or Windows style, start by that.
31613    new_path=`cmd //c echo $new_path`
31614
31615  input_path="$new_path"
31616  # Check if we need to convert this using DOS-style short mode. If the path
31617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31618  # take no chances and rewrite it.
31619  # Note: m4 eats our [], so we need to use [ and ] instead.
31620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31621  if test "x$has_forbidden_chars" != x; then
31622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31624  fi
31625
31626    # Output is in $new_path
31627
31628  windows_path="$new_path"
31629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31630    unix_path=`$CYGPATH -u "$windows_path"`
31631    new_path="$unix_path"
31632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31634    new_path="$unix_path"
31635  fi
31636
31637    # remove trailing .exe if any
31638    new_path="${new_path/%.exe/}"
31639
31640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31642  fi
31643
31644  else
31645    # We're on a posix platform. Hooray! :)
31646    # First separate the path from the arguments. This will split at the first
31647    # space.
31648    complete="$LD"
31649    path="${complete%% *}"
31650    tmp="$complete EOL"
31651    arguments="${tmp#* }"
31652
31653    # Cannot rely on the command "which" here since it doesn't always work.
31654    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31655    if test -z "$is_absolute_path"; then
31656      # Path to executable is not absolute. Find it.
31657      IFS_save="$IFS"
31658      IFS=:
31659      for p in $PATH; do
31660        if test -f "$p/$path" && test -x "$p/$path"; then
31661          new_path="$p/$path"
31662          break
31663        fi
31664      done
31665      IFS="$IFS_save"
31666    else
31667      # This is an absolute path, we can use it without further modifications.
31668      new_path="$path"
31669    fi
31670
31671    if test "x$new_path" = x; then
31672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31673$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31674      has_space=`$ECHO "$complete" | $GREP " "`
31675      if test "x$has_space" != x; then
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31678      fi
31679      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31680    fi
31681  fi
31682
31683  # Now join together the path and the arguments once again
31684  if test "x$arguments" != xEOL; then
31685    new_complete="$new_path ${arguments% *}"
31686  else
31687    new_complete="$new_path"
31688  fi
31689
31690  if test "x$complete" != "x$new_complete"; then
31691    LD="$new_complete"
31692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31693$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31694  fi
31695
31696    # Verify that we indeed succeeded with this trick.
31697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31698$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31699    "$LD" --version > /dev/null
31700    if test $? -eq 0 ; then
31701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31702$as_echo "no" >&6; }
31703      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31704    else
31705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31706$as_echo "yes" >&6; }
31707    fi
31708    LDCXX="$LD"
31709  else
31710    # All other toolchains use the compiler to link.
31711    LD="$CC"
31712    LDCXX="$CXX"
31713  fi
31714
31715  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31716
31717
31718  #
31719  # Setup the assembler (AS)
31720  #
31721  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31722    # FIXME: should this really be solaris, or solstudio?
31723
31724
31725  # Publish this variable in the help.
31726
31727
31728  if test "x$AS" = x; then
31729    # The variable is not set by user, try to locate tool using the code snippet
31730    for ac_prog in as
31731do
31732  # Extract the first word of "$ac_prog", so it can be a program name with args.
31733set dummy $ac_prog; ac_word=$2
31734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31735$as_echo_n "checking for $ac_word... " >&6; }
31736if ${ac_cv_path_AS+:} false; then :
31737  $as_echo_n "(cached) " >&6
31738else
31739  case $AS in
31740  [\\/]* | ?:[\\/]*)
31741  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31742  ;;
31743  *)
31744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31745for as_dir in $PATH
31746do
31747  IFS=$as_save_IFS
31748  test -z "$as_dir" && as_dir=.
31749    for ac_exec_ext in '' $ac_executable_extensions; do
31750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31751    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31753    break 2
31754  fi
31755done
31756  done
31757IFS=$as_save_IFS
31758
31759  ;;
31760esac
31761fi
31762AS=$ac_cv_path_AS
31763if test -n "$AS"; then
31764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31765$as_echo "$AS" >&6; }
31766else
31767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31768$as_echo "no" >&6; }
31769fi
31770
31771
31772  test -n "$AS" && break
31773done
31774
31775  else
31776    # The variable is set, but is it from the command line or the environment?
31777
31778    # Try to remove the string !AS! from our list.
31779    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31780    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31781      # If it failed, the variable was not from the command line. Ignore it,
31782      # but warn the user (except for BASH, which is always set by the calling BASH).
31783      if test "xAS" != xBASH; then
31784        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31785$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31786      fi
31787      # Try to locate tool using the code snippet
31788      for ac_prog in as
31789do
31790  # Extract the first word of "$ac_prog", so it can be a program name with args.
31791set dummy $ac_prog; ac_word=$2
31792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31793$as_echo_n "checking for $ac_word... " >&6; }
31794if ${ac_cv_path_AS+:} false; then :
31795  $as_echo_n "(cached) " >&6
31796else
31797  case $AS in
31798  [\\/]* | ?:[\\/]*)
31799  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31800  ;;
31801  *)
31802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31803for as_dir in $PATH
31804do
31805  IFS=$as_save_IFS
31806  test -z "$as_dir" && as_dir=.
31807    for ac_exec_ext in '' $ac_executable_extensions; do
31808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31809    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31811    break 2
31812  fi
31813done
31814  done
31815IFS=$as_save_IFS
31816
31817  ;;
31818esac
31819fi
31820AS=$ac_cv_path_AS
31821if test -n "$AS"; then
31822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31823$as_echo "$AS" >&6; }
31824else
31825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31826$as_echo "no" >&6; }
31827fi
31828
31829
31830  test -n "$AS" && break
31831done
31832
31833    else
31834      # If it succeeded, then it was overridden by the user. We will use it
31835      # for the tool.
31836
31837      # First remove it from the list of overridden variables, so we can test
31838      # for unknown variables in the end.
31839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31840
31841      # Check if the provided tool contains a complete path.
31842      tool_specified="$AS"
31843      tool_basename="${tool_specified##*/}"
31844      if test "x$tool_basename" = "x$tool_specified"; then
31845        # A command without a complete path is provided, search $PATH.
31846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31847$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31848        # Extract the first word of "$tool_basename", so it can be a program name with args.
31849set dummy $tool_basename; ac_word=$2
31850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31851$as_echo_n "checking for $ac_word... " >&6; }
31852if ${ac_cv_path_AS+:} false; then :
31853  $as_echo_n "(cached) " >&6
31854else
31855  case $AS in
31856  [\\/]* | ?:[\\/]*)
31857  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31858  ;;
31859  *)
31860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31861for as_dir in $PATH
31862do
31863  IFS=$as_save_IFS
31864  test -z "$as_dir" && as_dir=.
31865    for ac_exec_ext in '' $ac_executable_extensions; do
31866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31867    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31869    break 2
31870  fi
31871done
31872  done
31873IFS=$as_save_IFS
31874
31875  ;;
31876esac
31877fi
31878AS=$ac_cv_path_AS
31879if test -n "$AS"; then
31880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31881$as_echo "$AS" >&6; }
31882else
31883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31884$as_echo "no" >&6; }
31885fi
31886
31887
31888        if test "x$AS" = x; then
31889          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31890        fi
31891      else
31892        # Otherwise we believe it is a complete path. Use it as it is.
31893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31894$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31896$as_echo_n "checking for AS... " >&6; }
31897        if test ! -x "$tool_specified"; then
31898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31899$as_echo "not found" >&6; }
31900          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31901        fi
31902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31903$as_echo "$tool_specified" >&6; }
31904      fi
31905    fi
31906  fi
31907
31908
31909
31910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31911
31912  # First separate the path from the arguments. This will split at the first
31913  # space.
31914  complete="$AS"
31915  path="${complete%% *}"
31916  tmp="$complete EOL"
31917  arguments="${tmp#* }"
31918
31919  # Input might be given as Windows format, start by converting to
31920  # unix format.
31921  new_path=`$CYGPATH -u "$path"`
31922
31923  # Now try to locate executable using which
31924  new_path=`$WHICH "$new_path" 2> /dev/null`
31925  # bat and cmd files are not always considered executable in cygwin causing which
31926  # to not find them
31927  if test "x$new_path" = x \
31928      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31929      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31930    new_path=`$CYGPATH -u "$path"`
31931  fi
31932  if test "x$new_path" = x; then
31933    # Oops. Which didn't find the executable.
31934    # The splitting of arguments from the executable at a space might have been incorrect,
31935    # since paths with space are more likely in Windows. Give it another try with the whole
31936    # argument.
31937    path="$complete"
31938    arguments="EOL"
31939    new_path=`$CYGPATH -u "$path"`
31940    new_path=`$WHICH "$new_path" 2> /dev/null`
31941    # bat and cmd files are not always considered executable in cygwin causing which
31942    # to not find them
31943    if test "x$new_path" = x \
31944        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31945        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31946      new_path=`$CYGPATH -u "$path"`
31947    fi
31948    if test "x$new_path" = x; then
31949      # It's still not found. Now this is an unrecoverable error.
31950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31951$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31952      has_space=`$ECHO "$complete" | $GREP " "`
31953      if test "x$has_space" != x; then
31954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31956      fi
31957      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31958    fi
31959  fi
31960
31961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31964  # "foo.exe" is OK but "foo" is an error.
31965  #
31966  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31967  # It is also a way to make sure we got the proper file name for the real test later on.
31968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31969  if test "x$test_shortpath" = x; then
31970    # Short path failed, file does not exist as specified.
31971    # Try adding .exe or .cmd
31972    if test -f "${new_path}.exe"; then
31973      input_to_shortpath="${new_path}.exe"
31974    elif test -f "${new_path}.cmd"; then
31975      input_to_shortpath="${new_path}.cmd"
31976    else
31977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31978$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31979      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31980$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31981      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31982    fi
31983  else
31984    input_to_shortpath="$new_path"
31985  fi
31986
31987  # Call helper function which possibly converts this using DOS-style short mode.
31988  # If so, the updated path is stored in $new_path.
31989  new_path="$input_to_shortpath"
31990
31991  input_path="$input_to_shortpath"
31992  # Check if we need to convert this using DOS-style short mode. If the path
31993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31994  # take no chances and rewrite it.
31995  # Note: m4 eats our [], so we need to use [ and ] instead.
31996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31997  if test "x$has_forbidden_chars" != x; then
31998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32002      # Going to short mode and back again did indeed matter. Since short mode is
32003      # case insensitive, let's make it lowercase to improve readability.
32004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32005      # Now convert it back to Unix-stile (cygpath)
32006      input_path=`$CYGPATH -u "$shortmode_path"`
32007      new_path="$input_path"
32008    fi
32009  fi
32010
32011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32012  if test "x$test_cygdrive_prefix" = x; then
32013    # As a simple fix, exclude /usr/bin since it's not a real path.
32014    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32016      # a path prefixed by /cygdrive for fixpath to work.
32017      new_path="$CYGWIN_ROOT_PATH$input_path"
32018    fi
32019  fi
32020
32021  # remove trailing .exe if any
32022  new_path="${new_path/%.exe/}"
32023
32024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32025
32026  # First separate the path from the arguments. This will split at the first
32027  # space.
32028  complete="$AS"
32029  path="${complete%% *}"
32030  tmp="$complete EOL"
32031  arguments="${tmp#* }"
32032
32033  # Input might be given as Windows format, start by converting to
32034  # unix format.
32035  new_path="$path"
32036
32037  windows_path="$new_path"
32038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039    unix_path=`$CYGPATH -u "$windows_path"`
32040    new_path="$unix_path"
32041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32043    new_path="$unix_path"
32044  fi
32045
32046
32047  # Now try to locate executable using which
32048  new_path=`$WHICH "$new_path" 2> /dev/null`
32049
32050  if test "x$new_path" = x; then
32051    # Oops. Which didn't find the executable.
32052    # The splitting of arguments from the executable at a space might have been incorrect,
32053    # since paths with space are more likely in Windows. Give it another try with the whole
32054    # argument.
32055    path="$complete"
32056    arguments="EOL"
32057    new_path="$path"
32058
32059  windows_path="$new_path"
32060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32061    unix_path=`$CYGPATH -u "$windows_path"`
32062    new_path="$unix_path"
32063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32065    new_path="$unix_path"
32066  fi
32067
32068
32069    new_path=`$WHICH "$new_path" 2> /dev/null`
32070
32071    if test "x$new_path" = x; then
32072      # It's still not found. Now this is an unrecoverable error.
32073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32074$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32075      has_space=`$ECHO "$complete" | $GREP " "`
32076      if test "x$has_space" != x; then
32077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32079      fi
32080      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32081    fi
32082  fi
32083
32084  # Now new_path has a complete unix path to the binary
32085  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32086    # Keep paths in /bin as-is, but remove trailing .exe if any
32087    new_path="${new_path/%.exe/}"
32088    # Do not save /bin paths to all_fixpath_prefixes!
32089  else
32090    # Not in mixed or Windows style, start by that.
32091    new_path=`cmd //c echo $new_path`
32092
32093  input_path="$new_path"
32094  # Check if we need to convert this using DOS-style short mode. If the path
32095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32096  # take no chances and rewrite it.
32097  # Note: m4 eats our [], so we need to use [ and ] instead.
32098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32099  if test "x$has_forbidden_chars" != x; then
32100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32102  fi
32103
32104    # Output is in $new_path
32105
32106  windows_path="$new_path"
32107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32108    unix_path=`$CYGPATH -u "$windows_path"`
32109    new_path="$unix_path"
32110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32112    new_path="$unix_path"
32113  fi
32114
32115    # remove trailing .exe if any
32116    new_path="${new_path/%.exe/}"
32117
32118    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32119    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32120  fi
32121
32122  else
32123    # We're on a posix platform. Hooray! :)
32124    # First separate the path from the arguments. This will split at the first
32125    # space.
32126    complete="$AS"
32127    path="${complete%% *}"
32128    tmp="$complete EOL"
32129    arguments="${tmp#* }"
32130
32131    # Cannot rely on the command "which" here since it doesn't always work.
32132    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32133    if test -z "$is_absolute_path"; then
32134      # Path to executable is not absolute. Find it.
32135      IFS_save="$IFS"
32136      IFS=:
32137      for p in $PATH; do
32138        if test -f "$p/$path" && test -x "$p/$path"; then
32139          new_path="$p/$path"
32140          break
32141        fi
32142      done
32143      IFS="$IFS_save"
32144    else
32145      # This is an absolute path, we can use it without further modifications.
32146      new_path="$path"
32147    fi
32148
32149    if test "x$new_path" = x; then
32150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32151$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32152      has_space=`$ECHO "$complete" | $GREP " "`
32153      if test "x$has_space" != x; then
32154        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32155$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32156      fi
32157      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32158    fi
32159  fi
32160
32161  # Now join together the path and the arguments once again
32162  if test "x$arguments" != xEOL; then
32163    new_complete="$new_path ${arguments% *}"
32164  else
32165    new_complete="$new_path"
32166  fi
32167
32168  if test "x$complete" != "x$new_complete"; then
32169    AS="$new_complete"
32170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32171$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32172  fi
32173
32174  else
32175    # FIXME: is this correct for microsoft?
32176    AS="$CC -c"
32177  fi
32178
32179
32180  #
32181  # Setup the archiver (AR)
32182  #
32183  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32184    # The corresponding ar tool is lib.exe (used to create static libraries)
32185    # Extract the first word of "lib", so it can be a program name with args.
32186set dummy lib; ac_word=$2
32187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32188$as_echo_n "checking for $ac_word... " >&6; }
32189if ${ac_cv_prog_AR+:} false; then :
32190  $as_echo_n "(cached) " >&6
32191else
32192  if test -n "$AR"; then
32193  ac_cv_prog_AR="$AR" # Let the user override the test.
32194else
32195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32196for as_dir in $PATH
32197do
32198  IFS=$as_save_IFS
32199  test -z "$as_dir" && as_dir=.
32200    for ac_exec_ext in '' $ac_executable_extensions; do
32201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32202    ac_cv_prog_AR="lib"
32203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32204    break 2
32205  fi
32206done
32207  done
32208IFS=$as_save_IFS
32209
32210fi
32211fi
32212AR=$ac_cv_prog_AR
32213if test -n "$AR"; then
32214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32215$as_echo "$AR" >&6; }
32216else
32217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32218$as_echo "no" >&6; }
32219fi
32220
32221
32222  else
32223
32224
32225  # Publish this variable in the help.
32226
32227
32228  if test "x$AR" = x; then
32229    # The variable is not set by user, try to locate tool using the code snippet
32230    if test -n "$ac_tool_prefix"; then
32231  for ac_prog in ar
32232  do
32233    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32234set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32236$as_echo_n "checking for $ac_word... " >&6; }
32237if ${ac_cv_prog_AR+:} false; then :
32238  $as_echo_n "(cached) " >&6
32239else
32240  if test -n "$AR"; then
32241  ac_cv_prog_AR="$AR" # Let the user override the test.
32242else
32243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32244for as_dir in $PATH
32245do
32246  IFS=$as_save_IFS
32247  test -z "$as_dir" && as_dir=.
32248    for ac_exec_ext in '' $ac_executable_extensions; do
32249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32250    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32252    break 2
32253  fi
32254done
32255  done
32256IFS=$as_save_IFS
32257
32258fi
32259fi
32260AR=$ac_cv_prog_AR
32261if test -n "$AR"; then
32262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32263$as_echo "$AR" >&6; }
32264else
32265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32266$as_echo "no" >&6; }
32267fi
32268
32269
32270    test -n "$AR" && break
32271  done
32272fi
32273if test -z "$AR"; then
32274  ac_ct_AR=$AR
32275  for ac_prog in ar
32276do
32277  # Extract the first word of "$ac_prog", so it can be a program name with args.
32278set dummy $ac_prog; ac_word=$2
32279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32280$as_echo_n "checking for $ac_word... " >&6; }
32281if ${ac_cv_prog_ac_ct_AR+:} false; then :
32282  $as_echo_n "(cached) " >&6
32283else
32284  if test -n "$ac_ct_AR"; then
32285  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32286else
32287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32288for as_dir in $PATH
32289do
32290  IFS=$as_save_IFS
32291  test -z "$as_dir" && as_dir=.
32292    for ac_exec_ext in '' $ac_executable_extensions; do
32293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32294    ac_cv_prog_ac_ct_AR="$ac_prog"
32295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32296    break 2
32297  fi
32298done
32299  done
32300IFS=$as_save_IFS
32301
32302fi
32303fi
32304ac_ct_AR=$ac_cv_prog_ac_ct_AR
32305if test -n "$ac_ct_AR"; then
32306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32307$as_echo "$ac_ct_AR" >&6; }
32308else
32309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32310$as_echo "no" >&6; }
32311fi
32312
32313
32314  test -n "$ac_ct_AR" && break
32315done
32316
32317  if test "x$ac_ct_AR" = x; then
32318    AR=""
32319  else
32320    case $cross_compiling:$ac_tool_warned in
32321yes:)
32322{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32323$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32324ac_tool_warned=yes ;;
32325esac
32326    AR=$ac_ct_AR
32327  fi
32328fi
32329
32330  else
32331    # The variable is set, but is it from the command line or the environment?
32332
32333    # Try to remove the string !AR! from our list.
32334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32336      # If it failed, the variable was not from the command line. Ignore it,
32337      # but warn the user (except for BASH, which is always set by the calling BASH).
32338      if test "xAR" != xBASH; then
32339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32340$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32341      fi
32342      # Try to locate tool using the code snippet
32343      if test -n "$ac_tool_prefix"; then
32344  for ac_prog in ar
32345  do
32346    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32347set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32349$as_echo_n "checking for $ac_word... " >&6; }
32350if ${ac_cv_prog_AR+:} false; then :
32351  $as_echo_n "(cached) " >&6
32352else
32353  if test -n "$AR"; then
32354  ac_cv_prog_AR="$AR" # Let the user override the test.
32355else
32356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32357for as_dir in $PATH
32358do
32359  IFS=$as_save_IFS
32360  test -z "$as_dir" && as_dir=.
32361    for ac_exec_ext in '' $ac_executable_extensions; do
32362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32363    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32365    break 2
32366  fi
32367done
32368  done
32369IFS=$as_save_IFS
32370
32371fi
32372fi
32373AR=$ac_cv_prog_AR
32374if test -n "$AR"; then
32375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32376$as_echo "$AR" >&6; }
32377else
32378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32379$as_echo "no" >&6; }
32380fi
32381
32382
32383    test -n "$AR" && break
32384  done
32385fi
32386if test -z "$AR"; then
32387  ac_ct_AR=$AR
32388  for ac_prog in ar
32389do
32390  # Extract the first word of "$ac_prog", so it can be a program name with args.
32391set dummy $ac_prog; ac_word=$2
32392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32393$as_echo_n "checking for $ac_word... " >&6; }
32394if ${ac_cv_prog_ac_ct_AR+:} false; then :
32395  $as_echo_n "(cached) " >&6
32396else
32397  if test -n "$ac_ct_AR"; then
32398  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32399else
32400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32401for as_dir in $PATH
32402do
32403  IFS=$as_save_IFS
32404  test -z "$as_dir" && as_dir=.
32405    for ac_exec_ext in '' $ac_executable_extensions; do
32406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32407    ac_cv_prog_ac_ct_AR="$ac_prog"
32408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32409    break 2
32410  fi
32411done
32412  done
32413IFS=$as_save_IFS
32414
32415fi
32416fi
32417ac_ct_AR=$ac_cv_prog_ac_ct_AR
32418if test -n "$ac_ct_AR"; then
32419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32420$as_echo "$ac_ct_AR" >&6; }
32421else
32422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32423$as_echo "no" >&6; }
32424fi
32425
32426
32427  test -n "$ac_ct_AR" && break
32428done
32429
32430  if test "x$ac_ct_AR" = x; then
32431    AR=""
32432  else
32433    case $cross_compiling:$ac_tool_warned in
32434yes:)
32435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32437ac_tool_warned=yes ;;
32438esac
32439    AR=$ac_ct_AR
32440  fi
32441fi
32442
32443    else
32444      # If it succeeded, then it was overridden by the user. We will use it
32445      # for the tool.
32446
32447      # First remove it from the list of overridden variables, so we can test
32448      # for unknown variables in the end.
32449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32450
32451      # Check if the provided tool contains a complete path.
32452      tool_specified="$AR"
32453      tool_basename="${tool_specified##*/}"
32454      if test "x$tool_basename" = "x$tool_specified"; then
32455        # A command without a complete path is provided, search $PATH.
32456        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32457$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32458        # Extract the first word of "$tool_basename", so it can be a program name with args.
32459set dummy $tool_basename; ac_word=$2
32460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32461$as_echo_n "checking for $ac_word... " >&6; }
32462if ${ac_cv_path_AR+:} false; then :
32463  $as_echo_n "(cached) " >&6
32464else
32465  case $AR in
32466  [\\/]* | ?:[\\/]*)
32467  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32468  ;;
32469  *)
32470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32471for as_dir in $PATH
32472do
32473  IFS=$as_save_IFS
32474  test -z "$as_dir" && as_dir=.
32475    for ac_exec_ext in '' $ac_executable_extensions; do
32476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32477    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32479    break 2
32480  fi
32481done
32482  done
32483IFS=$as_save_IFS
32484
32485  ;;
32486esac
32487fi
32488AR=$ac_cv_path_AR
32489if test -n "$AR"; then
32490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32491$as_echo "$AR" >&6; }
32492else
32493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32494$as_echo "no" >&6; }
32495fi
32496
32497
32498        if test "x$AR" = x; then
32499          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32500        fi
32501      else
32502        # Otherwise we believe it is a complete path. Use it as it is.
32503        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32504$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32506$as_echo_n "checking for AR... " >&6; }
32507        if test ! -x "$tool_specified"; then
32508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32509$as_echo "not found" >&6; }
32510          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32511        fi
32512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32513$as_echo "$tool_specified" >&6; }
32514      fi
32515    fi
32516  fi
32517
32518
32519  fi
32520
32521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32522
32523  # First separate the path from the arguments. This will split at the first
32524  # space.
32525  complete="$AR"
32526  path="${complete%% *}"
32527  tmp="$complete EOL"
32528  arguments="${tmp#* }"
32529
32530  # Input might be given as Windows format, start by converting to
32531  # unix format.
32532  new_path=`$CYGPATH -u "$path"`
32533
32534  # Now try to locate executable using which
32535  new_path=`$WHICH "$new_path" 2> /dev/null`
32536  # bat and cmd files are not always considered executable in cygwin causing which
32537  # to not find them
32538  if test "x$new_path" = x \
32539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32541    new_path=`$CYGPATH -u "$path"`
32542  fi
32543  if test "x$new_path" = x; then
32544    # Oops. Which didn't find the executable.
32545    # The splitting of arguments from the executable at a space might have been incorrect,
32546    # since paths with space are more likely in Windows. Give it another try with the whole
32547    # argument.
32548    path="$complete"
32549    arguments="EOL"
32550    new_path=`$CYGPATH -u "$path"`
32551    new_path=`$WHICH "$new_path" 2> /dev/null`
32552    # bat and cmd files are not always considered executable in cygwin causing which
32553    # to not find them
32554    if test "x$new_path" = x \
32555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32557      new_path=`$CYGPATH -u "$path"`
32558    fi
32559    if test "x$new_path" = x; then
32560      # It's still not found. Now this is an unrecoverable error.
32561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32562$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32563      has_space=`$ECHO "$complete" | $GREP " "`
32564      if test "x$has_space" != x; then
32565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32567      fi
32568      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32569    fi
32570  fi
32571
32572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32575  # "foo.exe" is OK but "foo" is an error.
32576  #
32577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32578  # It is also a way to make sure we got the proper file name for the real test later on.
32579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32580  if test "x$test_shortpath" = x; then
32581    # Short path failed, file does not exist as specified.
32582    # Try adding .exe or .cmd
32583    if test -f "${new_path}.exe"; then
32584      input_to_shortpath="${new_path}.exe"
32585    elif test -f "${new_path}.cmd"; then
32586      input_to_shortpath="${new_path}.cmd"
32587    else
32588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32589$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32592      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32593    fi
32594  else
32595    input_to_shortpath="$new_path"
32596  fi
32597
32598  # Call helper function which possibly converts this using DOS-style short mode.
32599  # If so, the updated path is stored in $new_path.
32600  new_path="$input_to_shortpath"
32601
32602  input_path="$input_to_shortpath"
32603  # Check if we need to convert this using DOS-style short mode. If the path
32604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32605  # take no chances and rewrite it.
32606  # Note: m4 eats our [], so we need to use [ and ] instead.
32607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32608  if test "x$has_forbidden_chars" != x; then
32609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32613      # Going to short mode and back again did indeed matter. Since short mode is
32614      # case insensitive, let's make it lowercase to improve readability.
32615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32616      # Now convert it back to Unix-stile (cygpath)
32617      input_path=`$CYGPATH -u "$shortmode_path"`
32618      new_path="$input_path"
32619    fi
32620  fi
32621
32622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32623  if test "x$test_cygdrive_prefix" = x; then
32624    # As a simple fix, exclude /usr/bin since it's not a real path.
32625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32627      # a path prefixed by /cygdrive for fixpath to work.
32628      new_path="$CYGWIN_ROOT_PATH$input_path"
32629    fi
32630  fi
32631
32632  # remove trailing .exe if any
32633  new_path="${new_path/%.exe/}"
32634
32635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32636
32637  # First separate the path from the arguments. This will split at the first
32638  # space.
32639  complete="$AR"
32640  path="${complete%% *}"
32641  tmp="$complete EOL"
32642  arguments="${tmp#* }"
32643
32644  # Input might be given as Windows format, start by converting to
32645  # unix format.
32646  new_path="$path"
32647
32648  windows_path="$new_path"
32649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32650    unix_path=`$CYGPATH -u "$windows_path"`
32651    new_path="$unix_path"
32652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32654    new_path="$unix_path"
32655  fi
32656
32657
32658  # Now try to locate executable using which
32659  new_path=`$WHICH "$new_path" 2> /dev/null`
32660
32661  if test "x$new_path" = x; then
32662    # Oops. Which didn't find the executable.
32663    # The splitting of arguments from the executable at a space might have been incorrect,
32664    # since paths with space are more likely in Windows. Give it another try with the whole
32665    # argument.
32666    path="$complete"
32667    arguments="EOL"
32668    new_path="$path"
32669
32670  windows_path="$new_path"
32671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32672    unix_path=`$CYGPATH -u "$windows_path"`
32673    new_path="$unix_path"
32674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32676    new_path="$unix_path"
32677  fi
32678
32679
32680    new_path=`$WHICH "$new_path" 2> /dev/null`
32681
32682    if test "x$new_path" = x; then
32683      # It's still not found. Now this is an unrecoverable error.
32684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32685$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32686      has_space=`$ECHO "$complete" | $GREP " "`
32687      if test "x$has_space" != x; then
32688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32690      fi
32691      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32692    fi
32693  fi
32694
32695  # Now new_path has a complete unix path to the binary
32696  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32697    # Keep paths in /bin as-is, but remove trailing .exe if any
32698    new_path="${new_path/%.exe/}"
32699    # Do not save /bin paths to all_fixpath_prefixes!
32700  else
32701    # Not in mixed or Windows style, start by that.
32702    new_path=`cmd //c echo $new_path`
32703
32704  input_path="$new_path"
32705  # Check if we need to convert this using DOS-style short mode. If the path
32706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32707  # take no chances and rewrite it.
32708  # Note: m4 eats our [], so we need to use [ and ] instead.
32709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32710  if test "x$has_forbidden_chars" != x; then
32711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32713  fi
32714
32715    # Output is in $new_path
32716
32717  windows_path="$new_path"
32718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32719    unix_path=`$CYGPATH -u "$windows_path"`
32720    new_path="$unix_path"
32721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32723    new_path="$unix_path"
32724  fi
32725
32726    # remove trailing .exe if any
32727    new_path="${new_path/%.exe/}"
32728
32729    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32730    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32731  fi
32732
32733  else
32734    # We're on a posix platform. Hooray! :)
32735    # First separate the path from the arguments. This will split at the first
32736    # space.
32737    complete="$AR"
32738    path="${complete%% *}"
32739    tmp="$complete EOL"
32740    arguments="${tmp#* }"
32741
32742    # Cannot rely on the command "which" here since it doesn't always work.
32743    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32744    if test -z "$is_absolute_path"; then
32745      # Path to executable is not absolute. Find it.
32746      IFS_save="$IFS"
32747      IFS=:
32748      for p in $PATH; do
32749        if test -f "$p/$path" && test -x "$p/$path"; then
32750          new_path="$p/$path"
32751          break
32752        fi
32753      done
32754      IFS="$IFS_save"
32755    else
32756      # This is an absolute path, we can use it without further modifications.
32757      new_path="$path"
32758    fi
32759
32760    if test "x$new_path" = x; then
32761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32762$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32763      has_space=`$ECHO "$complete" | $GREP " "`
32764      if test "x$has_space" != x; then
32765        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32767      fi
32768      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32769    fi
32770  fi
32771
32772  # Now join together the path and the arguments once again
32773  if test "x$arguments" != xEOL; then
32774    new_complete="$new_path ${arguments% *}"
32775  else
32776    new_complete="$new_path"
32777  fi
32778
32779  if test "x$complete" != "x$new_complete"; then
32780    AR="$new_complete"
32781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32782$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32783  fi
32784
32785
32786
32787  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32788    ac_ext=m
32789ac_cpp='$OBJCPP $CPPFLAGS'
32790ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32791ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32792ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32793if test -n "$ac_tool_prefix"; then
32794  for ac_prog in gcc objcc objc cc CC
32795  do
32796    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32797set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32799$as_echo_n "checking for $ac_word... " >&6; }
32800if ${ac_cv_prog_OBJC+:} false; then :
32801  $as_echo_n "(cached) " >&6
32802else
32803  if test -n "$OBJC"; then
32804  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32805else
32806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32807for as_dir in $PATH
32808do
32809  IFS=$as_save_IFS
32810  test -z "$as_dir" && as_dir=.
32811    for ac_exec_ext in '' $ac_executable_extensions; do
32812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32813    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32815    break 2
32816  fi
32817done
32818  done
32819IFS=$as_save_IFS
32820
32821fi
32822fi
32823OBJC=$ac_cv_prog_OBJC
32824if test -n "$OBJC"; then
32825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32826$as_echo "$OBJC" >&6; }
32827else
32828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32829$as_echo "no" >&6; }
32830fi
32831
32832
32833    test -n "$OBJC" && break
32834  done
32835fi
32836if test -z "$OBJC"; then
32837  ac_ct_OBJC=$OBJC
32838  for ac_prog in gcc objcc objc cc CC
32839do
32840  # Extract the first word of "$ac_prog", so it can be a program name with args.
32841set dummy $ac_prog; ac_word=$2
32842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32843$as_echo_n "checking for $ac_word... " >&6; }
32844if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32845  $as_echo_n "(cached) " >&6
32846else
32847  if test -n "$ac_ct_OBJC"; then
32848  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32849else
32850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32851for as_dir in $PATH
32852do
32853  IFS=$as_save_IFS
32854  test -z "$as_dir" && as_dir=.
32855    for ac_exec_ext in '' $ac_executable_extensions; do
32856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32857    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32859    break 2
32860  fi
32861done
32862  done
32863IFS=$as_save_IFS
32864
32865fi
32866fi
32867ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32868if test -n "$ac_ct_OBJC"; then
32869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32870$as_echo "$ac_ct_OBJC" >&6; }
32871else
32872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32873$as_echo "no" >&6; }
32874fi
32875
32876
32877  test -n "$ac_ct_OBJC" && break
32878done
32879
32880  if test "x$ac_ct_OBJC" = x; then
32881    OBJC="gcc"
32882  else
32883    case $cross_compiling:$ac_tool_warned in
32884yes:)
32885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32887ac_tool_warned=yes ;;
32888esac
32889    OBJC=$ac_ct_OBJC
32890  fi
32891fi
32892
32893# Provide some information about the compiler.
32894$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32895set X $ac_compile
32896ac_compiler=$2
32897for ac_option in --version -v -V -qversion; do
32898  { { ac_try="$ac_compiler $ac_option >&5"
32899case "(($ac_try" in
32900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32901  *) ac_try_echo=$ac_try;;
32902esac
32903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32904$as_echo "$ac_try_echo"; } >&5
32905  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32906  ac_status=$?
32907  if test -s conftest.err; then
32908    sed '10a\
32909... rest of stderr output deleted ...
32910         10q' conftest.err >conftest.er1
32911    cat conftest.er1 >&5
32912  fi
32913  rm -f conftest.er1 conftest.err
32914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32915  test $ac_status = 0; }
32916done
32917
32918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32919$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32920if ${ac_cv_objc_compiler_gnu+:} false; then :
32921  $as_echo_n "(cached) " >&6
32922else
32923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32924/* end confdefs.h.  */
32925
32926int
32927main ()
32928{
32929#ifndef __GNUC__
32930       choke me
32931#endif
32932
32933  ;
32934  return 0;
32935}
32936_ACEOF
32937if ac_fn_objc_try_compile "$LINENO"; then :
32938  ac_compiler_gnu=yes
32939else
32940  ac_compiler_gnu=no
32941fi
32942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32943ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32944
32945fi
32946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32947$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32948if test $ac_compiler_gnu = yes; then
32949  GOBJC=yes
32950else
32951  GOBJC=
32952fi
32953ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32954ac_save_OBJCFLAGS=$OBJCFLAGS
32955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32956$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32957if ${ac_cv_prog_objc_g+:} false; then :
32958  $as_echo_n "(cached) " >&6
32959else
32960  ac_save_objc_werror_flag=$ac_objc_werror_flag
32961   ac_objc_werror_flag=yes
32962   ac_cv_prog_objc_g=no
32963   OBJCFLAGS="-g"
32964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32965/* end confdefs.h.  */
32966
32967int
32968main ()
32969{
32970
32971  ;
32972  return 0;
32973}
32974_ACEOF
32975if ac_fn_objc_try_compile "$LINENO"; then :
32976  ac_cv_prog_objc_g=yes
32977else
32978  OBJCFLAGS=""
32979      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32980/* end confdefs.h.  */
32981
32982int
32983main ()
32984{
32985
32986  ;
32987  return 0;
32988}
32989_ACEOF
32990if ac_fn_objc_try_compile "$LINENO"; then :
32991
32992else
32993  ac_objc_werror_flag=$ac_save_objc_werror_flag
32994	 OBJCFLAGS="-g"
32995	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32996/* end confdefs.h.  */
32997
32998int
32999main ()
33000{
33001
33002  ;
33003  return 0;
33004}
33005_ACEOF
33006if ac_fn_objc_try_compile "$LINENO"; then :
33007  ac_cv_prog_objc_g=yes
33008fi
33009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33010fi
33011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33012fi
33013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33014   ac_objc_werror_flag=$ac_save_objc_werror_flag
33015fi
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33017$as_echo "$ac_cv_prog_objc_g" >&6; }
33018if test "$ac_test_OBJCFLAGS" = set; then
33019  OBJCFLAGS=$ac_save_OBJCFLAGS
33020elif test $ac_cv_prog_objc_g = yes; then
33021  if test "$GOBJC" = yes; then
33022    OBJCFLAGS="-g -O2"
33023  else
33024    OBJCFLAGS="-g"
33025  fi
33026else
33027  if test "$GOBJC" = yes; then
33028    OBJCFLAGS="-O2"
33029  else
33030    OBJCFLAGS=
33031  fi
33032fi
33033ac_ext=cpp
33034ac_cpp='$CXXCPP $CPPFLAGS'
33035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33038
33039
33040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33041
33042  # First separate the path from the arguments. This will split at the first
33043  # space.
33044  complete="$OBJC"
33045  path="${complete%% *}"
33046  tmp="$complete EOL"
33047  arguments="${tmp#* }"
33048
33049  # Input might be given as Windows format, start by converting to
33050  # unix format.
33051  new_path=`$CYGPATH -u "$path"`
33052
33053  # Now try to locate executable using which
33054  new_path=`$WHICH "$new_path" 2> /dev/null`
33055  # bat and cmd files are not always considered executable in cygwin causing which
33056  # to not find them
33057  if test "x$new_path" = x \
33058      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33059      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33060    new_path=`$CYGPATH -u "$path"`
33061  fi
33062  if test "x$new_path" = x; then
33063    # Oops. Which didn't find the executable.
33064    # The splitting of arguments from the executable at a space might have been incorrect,
33065    # since paths with space are more likely in Windows. Give it another try with the whole
33066    # argument.
33067    path="$complete"
33068    arguments="EOL"
33069    new_path=`$CYGPATH -u "$path"`
33070    new_path=`$WHICH "$new_path" 2> /dev/null`
33071    # bat and cmd files are not always considered executable in cygwin causing which
33072    # to not find them
33073    if test "x$new_path" = x \
33074        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33075        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33076      new_path=`$CYGPATH -u "$path"`
33077    fi
33078    if test "x$new_path" = x; then
33079      # It's still not found. Now this is an unrecoverable error.
33080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33081$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33082      has_space=`$ECHO "$complete" | $GREP " "`
33083      if test "x$has_space" != x; then
33084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33086      fi
33087      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33088    fi
33089  fi
33090
33091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33094  # "foo.exe" is OK but "foo" is an error.
33095  #
33096  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33097  # It is also a way to make sure we got the proper file name for the real test later on.
33098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33099  if test "x$test_shortpath" = x; then
33100    # Short path failed, file does not exist as specified.
33101    # Try adding .exe or .cmd
33102    if test -f "${new_path}.exe"; then
33103      input_to_shortpath="${new_path}.exe"
33104    elif test -f "${new_path}.cmd"; then
33105      input_to_shortpath="${new_path}.cmd"
33106    else
33107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33108$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33109      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33110$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33111      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33112    fi
33113  else
33114    input_to_shortpath="$new_path"
33115  fi
33116
33117  # Call helper function which possibly converts this using DOS-style short mode.
33118  # If so, the updated path is stored in $new_path.
33119  new_path="$input_to_shortpath"
33120
33121  input_path="$input_to_shortpath"
33122  # Check if we need to convert this using DOS-style short mode. If the path
33123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33124  # take no chances and rewrite it.
33125  # Note: m4 eats our [], so we need to use [ and ] instead.
33126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33127  if test "x$has_forbidden_chars" != x; then
33128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33132      # Going to short mode and back again did indeed matter. Since short mode is
33133      # case insensitive, let's make it lowercase to improve readability.
33134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33135      # Now convert it back to Unix-stile (cygpath)
33136      input_path=`$CYGPATH -u "$shortmode_path"`
33137      new_path="$input_path"
33138    fi
33139  fi
33140
33141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33142  if test "x$test_cygdrive_prefix" = x; then
33143    # As a simple fix, exclude /usr/bin since it's not a real path.
33144    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33146      # a path prefixed by /cygdrive for fixpath to work.
33147      new_path="$CYGWIN_ROOT_PATH$input_path"
33148    fi
33149  fi
33150
33151  # remove trailing .exe if any
33152  new_path="${new_path/%.exe/}"
33153
33154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33155
33156  # First separate the path from the arguments. This will split at the first
33157  # space.
33158  complete="$OBJC"
33159  path="${complete%% *}"
33160  tmp="$complete EOL"
33161  arguments="${tmp#* }"
33162
33163  # Input might be given as Windows format, start by converting to
33164  # unix format.
33165  new_path="$path"
33166
33167  windows_path="$new_path"
33168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33169    unix_path=`$CYGPATH -u "$windows_path"`
33170    new_path="$unix_path"
33171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33173    new_path="$unix_path"
33174  fi
33175
33176
33177  # Now try to locate executable using which
33178  new_path=`$WHICH "$new_path" 2> /dev/null`
33179
33180  if test "x$new_path" = x; then
33181    # Oops. Which didn't find the executable.
33182    # The splitting of arguments from the executable at a space might have been incorrect,
33183    # since paths with space are more likely in Windows. Give it another try with the whole
33184    # argument.
33185    path="$complete"
33186    arguments="EOL"
33187    new_path="$path"
33188
33189  windows_path="$new_path"
33190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33191    unix_path=`$CYGPATH -u "$windows_path"`
33192    new_path="$unix_path"
33193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33195    new_path="$unix_path"
33196  fi
33197
33198
33199    new_path=`$WHICH "$new_path" 2> /dev/null`
33200
33201    if test "x$new_path" = x; then
33202      # It's still not found. Now this is an unrecoverable error.
33203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33204$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33205      has_space=`$ECHO "$complete" | $GREP " "`
33206      if test "x$has_space" != x; then
33207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33209      fi
33210      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33211    fi
33212  fi
33213
33214  # Now new_path has a complete unix path to the binary
33215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33216    # Keep paths in /bin as-is, but remove trailing .exe if any
33217    new_path="${new_path/%.exe/}"
33218    # Do not save /bin paths to all_fixpath_prefixes!
33219  else
33220    # Not in mixed or Windows style, start by that.
33221    new_path=`cmd //c echo $new_path`
33222
33223  input_path="$new_path"
33224  # Check if we need to convert this using DOS-style short mode. If the path
33225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33226  # take no chances and rewrite it.
33227  # Note: m4 eats our [], so we need to use [ and ] instead.
33228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33229  if test "x$has_forbidden_chars" != x; then
33230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33232  fi
33233
33234    # Output is in $new_path
33235
33236  windows_path="$new_path"
33237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33238    unix_path=`$CYGPATH -u "$windows_path"`
33239    new_path="$unix_path"
33240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33242    new_path="$unix_path"
33243  fi
33244
33245    # remove trailing .exe if any
33246    new_path="${new_path/%.exe/}"
33247
33248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33250  fi
33251
33252  else
33253    # We're on a posix platform. Hooray! :)
33254    # First separate the path from the arguments. This will split at the first
33255    # space.
33256    complete="$OBJC"
33257    path="${complete%% *}"
33258    tmp="$complete EOL"
33259    arguments="${tmp#* }"
33260
33261    # Cannot rely on the command "which" here since it doesn't always work.
33262    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33263    if test -z "$is_absolute_path"; then
33264      # Path to executable is not absolute. Find it.
33265      IFS_save="$IFS"
33266      IFS=:
33267      for p in $PATH; do
33268        if test -f "$p/$path" && test -x "$p/$path"; then
33269          new_path="$p/$path"
33270          break
33271        fi
33272      done
33273      IFS="$IFS_save"
33274    else
33275      # This is an absolute path, we can use it without further modifications.
33276      new_path="$path"
33277    fi
33278
33279    if test "x$new_path" = x; then
33280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33281$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33282      has_space=`$ECHO "$complete" | $GREP " "`
33283      if test "x$has_space" != x; then
33284        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33286      fi
33287      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33288    fi
33289  fi
33290
33291  # Now join together the path and the arguments once again
33292  if test "x$arguments" != xEOL; then
33293    new_complete="$new_path ${arguments% *}"
33294  else
33295    new_complete="$new_path"
33296  fi
33297
33298  if test "x$complete" != "x$new_complete"; then
33299    OBJC="$new_complete"
33300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33301$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33302  fi
33303
33304
33305
33306  # Publish this variable in the help.
33307
33308
33309  if test "x$LIPO" = x; then
33310    # The variable is not set by user, try to locate tool using the code snippet
33311    for ac_prog in lipo
33312do
33313  # Extract the first word of "$ac_prog", so it can be a program name with args.
33314set dummy $ac_prog; ac_word=$2
33315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33316$as_echo_n "checking for $ac_word... " >&6; }
33317if ${ac_cv_path_LIPO+:} false; then :
33318  $as_echo_n "(cached) " >&6
33319else
33320  case $LIPO in
33321  [\\/]* | ?:[\\/]*)
33322  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33323  ;;
33324  *)
33325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33326for as_dir in $PATH
33327do
33328  IFS=$as_save_IFS
33329  test -z "$as_dir" && as_dir=.
33330    for ac_exec_ext in '' $ac_executable_extensions; do
33331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33332    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33334    break 2
33335  fi
33336done
33337  done
33338IFS=$as_save_IFS
33339
33340  ;;
33341esac
33342fi
33343LIPO=$ac_cv_path_LIPO
33344if test -n "$LIPO"; then
33345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33346$as_echo "$LIPO" >&6; }
33347else
33348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33349$as_echo "no" >&6; }
33350fi
33351
33352
33353  test -n "$LIPO" && break
33354done
33355
33356  else
33357    # The variable is set, but is it from the command line or the environment?
33358
33359    # Try to remove the string !LIPO! from our list.
33360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33362      # If it failed, the variable was not from the command line. Ignore it,
33363      # but warn the user (except for BASH, which is always set by the calling BASH).
33364      if test "xLIPO" != xBASH; then
33365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33366$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33367      fi
33368      # Try to locate tool using the code snippet
33369      for ac_prog in lipo
33370do
33371  # Extract the first word of "$ac_prog", so it can be a program name with args.
33372set dummy $ac_prog; ac_word=$2
33373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33374$as_echo_n "checking for $ac_word... " >&6; }
33375if ${ac_cv_path_LIPO+:} false; then :
33376  $as_echo_n "(cached) " >&6
33377else
33378  case $LIPO in
33379  [\\/]* | ?:[\\/]*)
33380  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33381  ;;
33382  *)
33383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33384for as_dir in $PATH
33385do
33386  IFS=$as_save_IFS
33387  test -z "$as_dir" && as_dir=.
33388    for ac_exec_ext in '' $ac_executable_extensions; do
33389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33390    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33392    break 2
33393  fi
33394done
33395  done
33396IFS=$as_save_IFS
33397
33398  ;;
33399esac
33400fi
33401LIPO=$ac_cv_path_LIPO
33402if test -n "$LIPO"; then
33403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33404$as_echo "$LIPO" >&6; }
33405else
33406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33407$as_echo "no" >&6; }
33408fi
33409
33410
33411  test -n "$LIPO" && break
33412done
33413
33414    else
33415      # If it succeeded, then it was overridden by the user. We will use it
33416      # for the tool.
33417
33418      # First remove it from the list of overridden variables, so we can test
33419      # for unknown variables in the end.
33420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33421
33422      # Check if the provided tool contains a complete path.
33423      tool_specified="$LIPO"
33424      tool_basename="${tool_specified##*/}"
33425      if test "x$tool_basename" = "x$tool_specified"; then
33426        # A command without a complete path is provided, search $PATH.
33427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33428$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33429        # Extract the first word of "$tool_basename", so it can be a program name with args.
33430set dummy $tool_basename; ac_word=$2
33431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33432$as_echo_n "checking for $ac_word... " >&6; }
33433if ${ac_cv_path_LIPO+:} false; then :
33434  $as_echo_n "(cached) " >&6
33435else
33436  case $LIPO in
33437  [\\/]* | ?:[\\/]*)
33438  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33439  ;;
33440  *)
33441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33442for as_dir in $PATH
33443do
33444  IFS=$as_save_IFS
33445  test -z "$as_dir" && as_dir=.
33446    for ac_exec_ext in '' $ac_executable_extensions; do
33447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33448    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33450    break 2
33451  fi
33452done
33453  done
33454IFS=$as_save_IFS
33455
33456  ;;
33457esac
33458fi
33459LIPO=$ac_cv_path_LIPO
33460if test -n "$LIPO"; then
33461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33462$as_echo "$LIPO" >&6; }
33463else
33464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33465$as_echo "no" >&6; }
33466fi
33467
33468
33469        if test "x$LIPO" = x; then
33470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33471        fi
33472      else
33473        # Otherwise we believe it is a complete path. Use it as it is.
33474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33475$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33477$as_echo_n "checking for LIPO... " >&6; }
33478        if test ! -x "$tool_specified"; then
33479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33480$as_echo "not found" >&6; }
33481          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33482        fi
33483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33484$as_echo "$tool_specified" >&6; }
33485      fi
33486    fi
33487  fi
33488
33489
33490
33491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33492
33493  # First separate the path from the arguments. This will split at the first
33494  # space.
33495  complete="$LIPO"
33496  path="${complete%% *}"
33497  tmp="$complete EOL"
33498  arguments="${tmp#* }"
33499
33500  # Input might be given as Windows format, start by converting to
33501  # unix format.
33502  new_path=`$CYGPATH -u "$path"`
33503
33504  # Now try to locate executable using which
33505  new_path=`$WHICH "$new_path" 2> /dev/null`
33506  # bat and cmd files are not always considered executable in cygwin causing which
33507  # to not find them
33508  if test "x$new_path" = x \
33509      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33510      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33511    new_path=`$CYGPATH -u "$path"`
33512  fi
33513  if test "x$new_path" = x; then
33514    # Oops. Which didn't find the executable.
33515    # The splitting of arguments from the executable at a space might have been incorrect,
33516    # since paths with space are more likely in Windows. Give it another try with the whole
33517    # argument.
33518    path="$complete"
33519    arguments="EOL"
33520    new_path=`$CYGPATH -u "$path"`
33521    new_path=`$WHICH "$new_path" 2> /dev/null`
33522    # bat and cmd files are not always considered executable in cygwin causing which
33523    # to not find them
33524    if test "x$new_path" = x \
33525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33527      new_path=`$CYGPATH -u "$path"`
33528    fi
33529    if test "x$new_path" = x; then
33530      # It's still not found. Now this is an unrecoverable error.
33531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33532$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33533      has_space=`$ECHO "$complete" | $GREP " "`
33534      if test "x$has_space" != x; then
33535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33537      fi
33538      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33539    fi
33540  fi
33541
33542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33545  # "foo.exe" is OK but "foo" is an error.
33546  #
33547  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33548  # It is also a way to make sure we got the proper file name for the real test later on.
33549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33550  if test "x$test_shortpath" = x; then
33551    # Short path failed, file does not exist as specified.
33552    # Try adding .exe or .cmd
33553    if test -f "${new_path}.exe"; then
33554      input_to_shortpath="${new_path}.exe"
33555    elif test -f "${new_path}.cmd"; then
33556      input_to_shortpath="${new_path}.cmd"
33557    else
33558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33559$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33562      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33563    fi
33564  else
33565    input_to_shortpath="$new_path"
33566  fi
33567
33568  # Call helper function which possibly converts this using DOS-style short mode.
33569  # If so, the updated path is stored in $new_path.
33570  new_path="$input_to_shortpath"
33571
33572  input_path="$input_to_shortpath"
33573  # Check if we need to convert this using DOS-style short mode. If the path
33574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33575  # take no chances and rewrite it.
33576  # Note: m4 eats our [], so we need to use [ and ] instead.
33577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33578  if test "x$has_forbidden_chars" != x; then
33579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33583      # Going to short mode and back again did indeed matter. Since short mode is
33584      # case insensitive, let's make it lowercase to improve readability.
33585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33586      # Now convert it back to Unix-stile (cygpath)
33587      input_path=`$CYGPATH -u "$shortmode_path"`
33588      new_path="$input_path"
33589    fi
33590  fi
33591
33592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33593  if test "x$test_cygdrive_prefix" = x; then
33594    # As a simple fix, exclude /usr/bin since it's not a real path.
33595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33597      # a path prefixed by /cygdrive for fixpath to work.
33598      new_path="$CYGWIN_ROOT_PATH$input_path"
33599    fi
33600  fi
33601
33602  # remove trailing .exe if any
33603  new_path="${new_path/%.exe/}"
33604
33605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33606
33607  # First separate the path from the arguments. This will split at the first
33608  # space.
33609  complete="$LIPO"
33610  path="${complete%% *}"
33611  tmp="$complete EOL"
33612  arguments="${tmp#* }"
33613
33614  # Input might be given as Windows format, start by converting to
33615  # unix format.
33616  new_path="$path"
33617
33618  windows_path="$new_path"
33619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33620    unix_path=`$CYGPATH -u "$windows_path"`
33621    new_path="$unix_path"
33622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33624    new_path="$unix_path"
33625  fi
33626
33627
33628  # Now try to locate executable using which
33629  new_path=`$WHICH "$new_path" 2> /dev/null`
33630
33631  if test "x$new_path" = x; then
33632    # Oops. Which didn't find the executable.
33633    # The splitting of arguments from the executable at a space might have been incorrect,
33634    # since paths with space are more likely in Windows. Give it another try with the whole
33635    # argument.
33636    path="$complete"
33637    arguments="EOL"
33638    new_path="$path"
33639
33640  windows_path="$new_path"
33641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33642    unix_path=`$CYGPATH -u "$windows_path"`
33643    new_path="$unix_path"
33644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33646    new_path="$unix_path"
33647  fi
33648
33649
33650    new_path=`$WHICH "$new_path" 2> /dev/null`
33651
33652    if test "x$new_path" = x; then
33653      # It's still not found. Now this is an unrecoverable error.
33654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33655$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33656      has_space=`$ECHO "$complete" | $GREP " "`
33657      if test "x$has_space" != x; then
33658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33660      fi
33661      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33662    fi
33663  fi
33664
33665  # Now new_path has a complete unix path to the binary
33666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33667    # Keep paths in /bin as-is, but remove trailing .exe if any
33668    new_path="${new_path/%.exe/}"
33669    # Do not save /bin paths to all_fixpath_prefixes!
33670  else
33671    # Not in mixed or Windows style, start by that.
33672    new_path=`cmd //c echo $new_path`
33673
33674  input_path="$new_path"
33675  # Check if we need to convert this using DOS-style short mode. If the path
33676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33677  # take no chances and rewrite it.
33678  # Note: m4 eats our [], so we need to use [ and ] instead.
33679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33680  if test "x$has_forbidden_chars" != x; then
33681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33683  fi
33684
33685    # Output is in $new_path
33686
33687  windows_path="$new_path"
33688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33689    unix_path=`$CYGPATH -u "$windows_path"`
33690    new_path="$unix_path"
33691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33693    new_path="$unix_path"
33694  fi
33695
33696    # remove trailing .exe if any
33697    new_path="${new_path/%.exe/}"
33698
33699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33701  fi
33702
33703  else
33704    # We're on a posix platform. Hooray! :)
33705    # First separate the path from the arguments. This will split at the first
33706    # space.
33707    complete="$LIPO"
33708    path="${complete%% *}"
33709    tmp="$complete EOL"
33710    arguments="${tmp#* }"
33711
33712    # Cannot rely on the command "which" here since it doesn't always work.
33713    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33714    if test -z "$is_absolute_path"; then
33715      # Path to executable is not absolute. Find it.
33716      IFS_save="$IFS"
33717      IFS=:
33718      for p in $PATH; do
33719        if test -f "$p/$path" && test -x "$p/$path"; then
33720          new_path="$p/$path"
33721          break
33722        fi
33723      done
33724      IFS="$IFS_save"
33725    else
33726      # This is an absolute path, we can use it without further modifications.
33727      new_path="$path"
33728    fi
33729
33730    if test "x$new_path" = x; then
33731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33732$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33733      has_space=`$ECHO "$complete" | $GREP " "`
33734      if test "x$has_space" != x; then
33735        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33737      fi
33738      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33739    fi
33740  fi
33741
33742  # Now join together the path and the arguments once again
33743  if test "x$arguments" != xEOL; then
33744    new_complete="$new_path ${arguments% *}"
33745  else
33746    new_complete="$new_path"
33747  fi
33748
33749  if test "x$complete" != "x$new_complete"; then
33750    LIPO="$new_complete"
33751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33752$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33753  fi
33754
33755  else
33756    OBJC=
33757  fi
33758
33759  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33760    # Extract the first word of "mt", so it can be a program name with args.
33761set dummy mt; ac_word=$2
33762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33763$as_echo_n "checking for $ac_word... " >&6; }
33764if ${ac_cv_prog_MT+:} false; then :
33765  $as_echo_n "(cached) " >&6
33766else
33767  if test -n "$MT"; then
33768  ac_cv_prog_MT="$MT" # Let the user override the test.
33769else
33770  ac_prog_rejected=no
33771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33772for as_dir in $PATH
33773do
33774  IFS=$as_save_IFS
33775  test -z "$as_dir" && as_dir=.
33776    for ac_exec_ext in '' $ac_executable_extensions; do
33777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33778    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33779       ac_prog_rejected=yes
33780       continue
33781     fi
33782    ac_cv_prog_MT="mt"
33783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33784    break 2
33785  fi
33786done
33787  done
33788IFS=$as_save_IFS
33789
33790if test $ac_prog_rejected = yes; then
33791  # We found a bogon in the path, so make sure we never use it.
33792  set dummy $ac_cv_prog_MT
33793  shift
33794  if test $# != 0; then
33795    # We chose a different compiler from the bogus one.
33796    # However, it has the same basename, so the bogon will be chosen
33797    # first if we set MT to just the basename; use the full file name.
33798    shift
33799    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33800  fi
33801fi
33802fi
33803fi
33804MT=$ac_cv_prog_MT
33805if test -n "$MT"; then
33806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33807$as_echo "$MT" >&6; }
33808else
33809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33810$as_echo "no" >&6; }
33811fi
33812
33813
33814
33815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33816
33817  # First separate the path from the arguments. This will split at the first
33818  # space.
33819  complete="$MT"
33820  path="${complete%% *}"
33821  tmp="$complete EOL"
33822  arguments="${tmp#* }"
33823
33824  # Input might be given as Windows format, start by converting to
33825  # unix format.
33826  new_path=`$CYGPATH -u "$path"`
33827
33828  # Now try to locate executable using which
33829  new_path=`$WHICH "$new_path" 2> /dev/null`
33830  # bat and cmd files are not always considered executable in cygwin causing which
33831  # to not find them
33832  if test "x$new_path" = x \
33833      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33834      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33835    new_path=`$CYGPATH -u "$path"`
33836  fi
33837  if test "x$new_path" = x; then
33838    # Oops. Which didn't find the executable.
33839    # The splitting of arguments from the executable at a space might have been incorrect,
33840    # since paths with space are more likely in Windows. Give it another try with the whole
33841    # argument.
33842    path="$complete"
33843    arguments="EOL"
33844    new_path=`$CYGPATH -u "$path"`
33845    new_path=`$WHICH "$new_path" 2> /dev/null`
33846    # bat and cmd files are not always considered executable in cygwin causing which
33847    # to not find them
33848    if test "x$new_path" = x \
33849        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33850        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33851      new_path=`$CYGPATH -u "$path"`
33852    fi
33853    if test "x$new_path" = x; then
33854      # It's still not found. Now this is an unrecoverable error.
33855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33856$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33857      has_space=`$ECHO "$complete" | $GREP " "`
33858      if test "x$has_space" != x; then
33859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33861      fi
33862      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33863    fi
33864  fi
33865
33866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33869  # "foo.exe" is OK but "foo" is an error.
33870  #
33871  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33872  # It is also a way to make sure we got the proper file name for the real test later on.
33873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33874  if test "x$test_shortpath" = x; then
33875    # Short path failed, file does not exist as specified.
33876    # Try adding .exe or .cmd
33877    if test -f "${new_path}.exe"; then
33878      input_to_shortpath="${new_path}.exe"
33879    elif test -f "${new_path}.cmd"; then
33880      input_to_shortpath="${new_path}.cmd"
33881    else
33882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33883$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33884      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33885$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33886      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33887    fi
33888  else
33889    input_to_shortpath="$new_path"
33890  fi
33891
33892  # Call helper function which possibly converts this using DOS-style short mode.
33893  # If so, the updated path is stored in $new_path.
33894  new_path="$input_to_shortpath"
33895
33896  input_path="$input_to_shortpath"
33897  # Check if we need to convert this using DOS-style short mode. If the path
33898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33899  # take no chances and rewrite it.
33900  # Note: m4 eats our [], so we need to use [ and ] instead.
33901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33902  if test "x$has_forbidden_chars" != x; then
33903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33907      # Going to short mode and back again did indeed matter. Since short mode is
33908      # case insensitive, let's make it lowercase to improve readability.
33909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33910      # Now convert it back to Unix-stile (cygpath)
33911      input_path=`$CYGPATH -u "$shortmode_path"`
33912      new_path="$input_path"
33913    fi
33914  fi
33915
33916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33917  if test "x$test_cygdrive_prefix" = x; then
33918    # As a simple fix, exclude /usr/bin since it's not a real path.
33919    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33921      # a path prefixed by /cygdrive for fixpath to work.
33922      new_path="$CYGWIN_ROOT_PATH$input_path"
33923    fi
33924  fi
33925
33926  # remove trailing .exe if any
33927  new_path="${new_path/%.exe/}"
33928
33929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33930
33931  # First separate the path from the arguments. This will split at the first
33932  # space.
33933  complete="$MT"
33934  path="${complete%% *}"
33935  tmp="$complete EOL"
33936  arguments="${tmp#* }"
33937
33938  # Input might be given as Windows format, start by converting to
33939  # unix format.
33940  new_path="$path"
33941
33942  windows_path="$new_path"
33943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33944    unix_path=`$CYGPATH -u "$windows_path"`
33945    new_path="$unix_path"
33946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33948    new_path="$unix_path"
33949  fi
33950
33951
33952  # Now try to locate executable using which
33953  new_path=`$WHICH "$new_path" 2> /dev/null`
33954
33955  if test "x$new_path" = x; then
33956    # Oops. Which didn't find the executable.
33957    # The splitting of arguments from the executable at a space might have been incorrect,
33958    # since paths with space are more likely in Windows. Give it another try with the whole
33959    # argument.
33960    path="$complete"
33961    arguments="EOL"
33962    new_path="$path"
33963
33964  windows_path="$new_path"
33965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33966    unix_path=`$CYGPATH -u "$windows_path"`
33967    new_path="$unix_path"
33968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33970    new_path="$unix_path"
33971  fi
33972
33973
33974    new_path=`$WHICH "$new_path" 2> /dev/null`
33975
33976    if test "x$new_path" = x; then
33977      # It's still not found. Now this is an unrecoverable error.
33978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33979$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33980      has_space=`$ECHO "$complete" | $GREP " "`
33981      if test "x$has_space" != x; then
33982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33984      fi
33985      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33986    fi
33987  fi
33988
33989  # Now new_path has a complete unix path to the binary
33990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33991    # Keep paths in /bin as-is, but remove trailing .exe if any
33992    new_path="${new_path/%.exe/}"
33993    # Do not save /bin paths to all_fixpath_prefixes!
33994  else
33995    # Not in mixed or Windows style, start by that.
33996    new_path=`cmd //c echo $new_path`
33997
33998  input_path="$new_path"
33999  # Check if we need to convert this using DOS-style short mode. If the path
34000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34001  # take no chances and rewrite it.
34002  # Note: m4 eats our [], so we need to use [ and ] instead.
34003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34004  if test "x$has_forbidden_chars" != x; then
34005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34007  fi
34008
34009    # Output is in $new_path
34010
34011  windows_path="$new_path"
34012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34013    unix_path=`$CYGPATH -u "$windows_path"`
34014    new_path="$unix_path"
34015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34017    new_path="$unix_path"
34018  fi
34019
34020    # remove trailing .exe if any
34021    new_path="${new_path/%.exe/}"
34022
34023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34025  fi
34026
34027  else
34028    # We're on a posix platform. Hooray! :)
34029    # First separate the path from the arguments. This will split at the first
34030    # space.
34031    complete="$MT"
34032    path="${complete%% *}"
34033    tmp="$complete EOL"
34034    arguments="${tmp#* }"
34035
34036    # Cannot rely on the command "which" here since it doesn't always work.
34037    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34038    if test -z "$is_absolute_path"; then
34039      # Path to executable is not absolute. Find it.
34040      IFS_save="$IFS"
34041      IFS=:
34042      for p in $PATH; do
34043        if test -f "$p/$path" && test -x "$p/$path"; then
34044          new_path="$p/$path"
34045          break
34046        fi
34047      done
34048      IFS="$IFS_save"
34049    else
34050      # This is an absolute path, we can use it without further modifications.
34051      new_path="$path"
34052    fi
34053
34054    if test "x$new_path" = x; then
34055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34056$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34057      has_space=`$ECHO "$complete" | $GREP " "`
34058      if test "x$has_space" != x; then
34059        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34061      fi
34062      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34063    fi
34064  fi
34065
34066  # Now join together the path and the arguments once again
34067  if test "x$arguments" != xEOL; then
34068    new_complete="$new_path ${arguments% *}"
34069  else
34070    new_complete="$new_path"
34071  fi
34072
34073  if test "x$complete" != "x$new_complete"; then
34074    MT="$new_complete"
34075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34076$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34077  fi
34078
34079    # Setup the resource compiler (RC)
34080    # Extract the first word of "rc", so it can be a program name with args.
34081set dummy rc; ac_word=$2
34082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34083$as_echo_n "checking for $ac_word... " >&6; }
34084if ${ac_cv_prog_RC+:} false; then :
34085  $as_echo_n "(cached) " >&6
34086else
34087  if test -n "$RC"; then
34088  ac_cv_prog_RC="$RC" # Let the user override the test.
34089else
34090  ac_prog_rejected=no
34091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34092for as_dir in $PATH
34093do
34094  IFS=$as_save_IFS
34095  test -z "$as_dir" && as_dir=.
34096    for ac_exec_ext in '' $ac_executable_extensions; do
34097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34098    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34099       ac_prog_rejected=yes
34100       continue
34101     fi
34102    ac_cv_prog_RC="rc"
34103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34104    break 2
34105  fi
34106done
34107  done
34108IFS=$as_save_IFS
34109
34110if test $ac_prog_rejected = yes; then
34111  # We found a bogon in the path, so make sure we never use it.
34112  set dummy $ac_cv_prog_RC
34113  shift
34114  if test $# != 0; then
34115    # We chose a different compiler from the bogus one.
34116    # However, it has the same basename, so the bogon will be chosen
34117    # first if we set RC to just the basename; use the full file name.
34118    shift
34119    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34120  fi
34121fi
34122fi
34123fi
34124RC=$ac_cv_prog_RC
34125if test -n "$RC"; then
34126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34127$as_echo "$RC" >&6; }
34128else
34129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34130$as_echo "no" >&6; }
34131fi
34132
34133
34134
34135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34136
34137  # First separate the path from the arguments. This will split at the first
34138  # space.
34139  complete="$RC"
34140  path="${complete%% *}"
34141  tmp="$complete EOL"
34142  arguments="${tmp#* }"
34143
34144  # Input might be given as Windows format, start by converting to
34145  # unix format.
34146  new_path=`$CYGPATH -u "$path"`
34147
34148  # Now try to locate executable using which
34149  new_path=`$WHICH "$new_path" 2> /dev/null`
34150  # bat and cmd files are not always considered executable in cygwin causing which
34151  # to not find them
34152  if test "x$new_path" = x \
34153      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34154      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34155    new_path=`$CYGPATH -u "$path"`
34156  fi
34157  if test "x$new_path" = x; then
34158    # Oops. Which didn't find the executable.
34159    # The splitting of arguments from the executable at a space might have been incorrect,
34160    # since paths with space are more likely in Windows. Give it another try with the whole
34161    # argument.
34162    path="$complete"
34163    arguments="EOL"
34164    new_path=`$CYGPATH -u "$path"`
34165    new_path=`$WHICH "$new_path" 2> /dev/null`
34166    # bat and cmd files are not always considered executable in cygwin causing which
34167    # to not find them
34168    if test "x$new_path" = x \
34169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34171      new_path=`$CYGPATH -u "$path"`
34172    fi
34173    if test "x$new_path" = x; then
34174      # It's still not found. Now this is an unrecoverable error.
34175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34176$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34177      has_space=`$ECHO "$complete" | $GREP " "`
34178      if test "x$has_space" != x; then
34179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34181      fi
34182      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34183    fi
34184  fi
34185
34186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34189  # "foo.exe" is OK but "foo" is an error.
34190  #
34191  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34192  # It is also a way to make sure we got the proper file name for the real test later on.
34193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34194  if test "x$test_shortpath" = x; then
34195    # Short path failed, file does not exist as specified.
34196    # Try adding .exe or .cmd
34197    if test -f "${new_path}.exe"; then
34198      input_to_shortpath="${new_path}.exe"
34199    elif test -f "${new_path}.cmd"; then
34200      input_to_shortpath="${new_path}.cmd"
34201    else
34202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34203$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34206      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34207    fi
34208  else
34209    input_to_shortpath="$new_path"
34210  fi
34211
34212  # Call helper function which possibly converts this using DOS-style short mode.
34213  # If so, the updated path is stored in $new_path.
34214  new_path="$input_to_shortpath"
34215
34216  input_path="$input_to_shortpath"
34217  # Check if we need to convert this using DOS-style short mode. If the path
34218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34219  # take no chances and rewrite it.
34220  # Note: m4 eats our [], so we need to use [ and ] instead.
34221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34222  if test "x$has_forbidden_chars" != x; then
34223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34227      # Going to short mode and back again did indeed matter. Since short mode is
34228      # case insensitive, let's make it lowercase to improve readability.
34229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34230      # Now convert it back to Unix-stile (cygpath)
34231      input_path=`$CYGPATH -u "$shortmode_path"`
34232      new_path="$input_path"
34233    fi
34234  fi
34235
34236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34237  if test "x$test_cygdrive_prefix" = x; then
34238    # As a simple fix, exclude /usr/bin since it's not a real path.
34239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34241      # a path prefixed by /cygdrive for fixpath to work.
34242      new_path="$CYGWIN_ROOT_PATH$input_path"
34243    fi
34244  fi
34245
34246  # remove trailing .exe if any
34247  new_path="${new_path/%.exe/}"
34248
34249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34250
34251  # First separate the path from the arguments. This will split at the first
34252  # space.
34253  complete="$RC"
34254  path="${complete%% *}"
34255  tmp="$complete EOL"
34256  arguments="${tmp#* }"
34257
34258  # Input might be given as Windows format, start by converting to
34259  # unix format.
34260  new_path="$path"
34261
34262  windows_path="$new_path"
34263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34264    unix_path=`$CYGPATH -u "$windows_path"`
34265    new_path="$unix_path"
34266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34268    new_path="$unix_path"
34269  fi
34270
34271
34272  # Now try to locate executable using which
34273  new_path=`$WHICH "$new_path" 2> /dev/null`
34274
34275  if test "x$new_path" = x; then
34276    # Oops. Which didn't find the executable.
34277    # The splitting of arguments from the executable at a space might have been incorrect,
34278    # since paths with space are more likely in Windows. Give it another try with the whole
34279    # argument.
34280    path="$complete"
34281    arguments="EOL"
34282    new_path="$path"
34283
34284  windows_path="$new_path"
34285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34286    unix_path=`$CYGPATH -u "$windows_path"`
34287    new_path="$unix_path"
34288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34290    new_path="$unix_path"
34291  fi
34292
34293
34294    new_path=`$WHICH "$new_path" 2> /dev/null`
34295
34296    if test "x$new_path" = x; then
34297      # It's still not found. Now this is an unrecoverable error.
34298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34299$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34300      has_space=`$ECHO "$complete" | $GREP " "`
34301      if test "x$has_space" != x; then
34302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34304      fi
34305      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34306    fi
34307  fi
34308
34309  # Now new_path has a complete unix path to the binary
34310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34311    # Keep paths in /bin as-is, but remove trailing .exe if any
34312    new_path="${new_path/%.exe/}"
34313    # Do not save /bin paths to all_fixpath_prefixes!
34314  else
34315    # Not in mixed or Windows style, start by that.
34316    new_path=`cmd //c echo $new_path`
34317
34318  input_path="$new_path"
34319  # Check if we need to convert this using DOS-style short mode. If the path
34320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34321  # take no chances and rewrite it.
34322  # Note: m4 eats our [], so we need to use [ and ] instead.
34323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34324  if test "x$has_forbidden_chars" != x; then
34325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34327  fi
34328
34329    # Output is in $new_path
34330
34331  windows_path="$new_path"
34332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34333    unix_path=`$CYGPATH -u "$windows_path"`
34334    new_path="$unix_path"
34335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34337    new_path="$unix_path"
34338  fi
34339
34340    # remove trailing .exe if any
34341    new_path="${new_path/%.exe/}"
34342
34343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34345  fi
34346
34347  else
34348    # We're on a posix platform. Hooray! :)
34349    # First separate the path from the arguments. This will split at the first
34350    # space.
34351    complete="$RC"
34352    path="${complete%% *}"
34353    tmp="$complete EOL"
34354    arguments="${tmp#* }"
34355
34356    # Cannot rely on the command "which" here since it doesn't always work.
34357    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34358    if test -z "$is_absolute_path"; then
34359      # Path to executable is not absolute. Find it.
34360      IFS_save="$IFS"
34361      IFS=:
34362      for p in $PATH; do
34363        if test -f "$p/$path" && test -x "$p/$path"; then
34364          new_path="$p/$path"
34365          break
34366        fi
34367      done
34368      IFS="$IFS_save"
34369    else
34370      # This is an absolute path, we can use it without further modifications.
34371      new_path="$path"
34372    fi
34373
34374    if test "x$new_path" = x; then
34375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34376$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34377      has_space=`$ECHO "$complete" | $GREP " "`
34378      if test "x$has_space" != x; then
34379        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34380$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34381      fi
34382      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34383    fi
34384  fi
34385
34386  # Now join together the path and the arguments once again
34387  if test "x$arguments" != xEOL; then
34388    new_complete="$new_path ${arguments% *}"
34389  else
34390    new_complete="$new_path"
34391  fi
34392
34393  if test "x$complete" != "x$new_complete"; then
34394    RC="$new_complete"
34395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34396$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34397  fi
34398
34399    # Extract the first word of "dumpbin", so it can be a program name with args.
34400set dummy dumpbin; ac_word=$2
34401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34402$as_echo_n "checking for $ac_word... " >&6; }
34403if ${ac_cv_prog_DUMPBIN+:} false; then :
34404  $as_echo_n "(cached) " >&6
34405else
34406  if test -n "$DUMPBIN"; then
34407  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34408else
34409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34410for as_dir in $PATH
34411do
34412  IFS=$as_save_IFS
34413  test -z "$as_dir" && as_dir=.
34414    for ac_exec_ext in '' $ac_executable_extensions; do
34415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34416    ac_cv_prog_DUMPBIN="dumpbin"
34417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34418    break 2
34419  fi
34420done
34421  done
34422IFS=$as_save_IFS
34423
34424fi
34425fi
34426DUMPBIN=$ac_cv_prog_DUMPBIN
34427if test -n "$DUMPBIN"; then
34428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34429$as_echo "$DUMPBIN" >&6; }
34430else
34431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34432$as_echo "no" >&6; }
34433fi
34434
34435
34436
34437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34438
34439  # First separate the path from the arguments. This will split at the first
34440  # space.
34441  complete="$DUMPBIN"
34442  path="${complete%% *}"
34443  tmp="$complete EOL"
34444  arguments="${tmp#* }"
34445
34446  # Input might be given as Windows format, start by converting to
34447  # unix format.
34448  new_path=`$CYGPATH -u "$path"`
34449
34450  # Now try to locate executable using which
34451  new_path=`$WHICH "$new_path" 2> /dev/null`
34452  # bat and cmd files are not always considered executable in cygwin causing which
34453  # to not find them
34454  if test "x$new_path" = x \
34455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34457    new_path=`$CYGPATH -u "$path"`
34458  fi
34459  if test "x$new_path" = x; then
34460    # Oops. Which didn't find the executable.
34461    # The splitting of arguments from the executable at a space might have been incorrect,
34462    # since paths with space are more likely in Windows. Give it another try with the whole
34463    # argument.
34464    path="$complete"
34465    arguments="EOL"
34466    new_path=`$CYGPATH -u "$path"`
34467    new_path=`$WHICH "$new_path" 2> /dev/null`
34468    # bat and cmd files are not always considered executable in cygwin causing which
34469    # to not find them
34470    if test "x$new_path" = x \
34471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34473      new_path=`$CYGPATH -u "$path"`
34474    fi
34475    if test "x$new_path" = x; then
34476      # It's still not found. Now this is an unrecoverable error.
34477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34478$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34479      has_space=`$ECHO "$complete" | $GREP " "`
34480      if test "x$has_space" != x; then
34481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34483      fi
34484      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34485    fi
34486  fi
34487
34488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34491  # "foo.exe" is OK but "foo" is an error.
34492  #
34493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34494  # It is also a way to make sure we got the proper file name for the real test later on.
34495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34496  if test "x$test_shortpath" = x; then
34497    # Short path failed, file does not exist as specified.
34498    # Try adding .exe or .cmd
34499    if test -f "${new_path}.exe"; then
34500      input_to_shortpath="${new_path}.exe"
34501    elif test -f "${new_path}.cmd"; then
34502      input_to_shortpath="${new_path}.cmd"
34503    else
34504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34505$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34508      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34509    fi
34510  else
34511    input_to_shortpath="$new_path"
34512  fi
34513
34514  # Call helper function which possibly converts this using DOS-style short mode.
34515  # If so, the updated path is stored in $new_path.
34516  new_path="$input_to_shortpath"
34517
34518  input_path="$input_to_shortpath"
34519  # Check if we need to convert this using DOS-style short mode. If the path
34520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34521  # take no chances and rewrite it.
34522  # Note: m4 eats our [], so we need to use [ and ] instead.
34523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34524  if test "x$has_forbidden_chars" != x; then
34525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34529      # Going to short mode and back again did indeed matter. Since short mode is
34530      # case insensitive, let's make it lowercase to improve readability.
34531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34532      # Now convert it back to Unix-stile (cygpath)
34533      input_path=`$CYGPATH -u "$shortmode_path"`
34534      new_path="$input_path"
34535    fi
34536  fi
34537
34538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34539  if test "x$test_cygdrive_prefix" = x; then
34540    # As a simple fix, exclude /usr/bin since it's not a real path.
34541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34543      # a path prefixed by /cygdrive for fixpath to work.
34544      new_path="$CYGWIN_ROOT_PATH$input_path"
34545    fi
34546  fi
34547
34548  # remove trailing .exe if any
34549  new_path="${new_path/%.exe/}"
34550
34551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34552
34553  # First separate the path from the arguments. This will split at the first
34554  # space.
34555  complete="$DUMPBIN"
34556  path="${complete%% *}"
34557  tmp="$complete EOL"
34558  arguments="${tmp#* }"
34559
34560  # Input might be given as Windows format, start by converting to
34561  # unix format.
34562  new_path="$path"
34563
34564  windows_path="$new_path"
34565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34566    unix_path=`$CYGPATH -u "$windows_path"`
34567    new_path="$unix_path"
34568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34570    new_path="$unix_path"
34571  fi
34572
34573
34574  # Now try to locate executable using which
34575  new_path=`$WHICH "$new_path" 2> /dev/null`
34576
34577  if test "x$new_path" = x; then
34578    # Oops. Which didn't find the executable.
34579    # The splitting of arguments from the executable at a space might have been incorrect,
34580    # since paths with space are more likely in Windows. Give it another try with the whole
34581    # argument.
34582    path="$complete"
34583    arguments="EOL"
34584    new_path="$path"
34585
34586  windows_path="$new_path"
34587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34588    unix_path=`$CYGPATH -u "$windows_path"`
34589    new_path="$unix_path"
34590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34592    new_path="$unix_path"
34593  fi
34594
34595
34596    new_path=`$WHICH "$new_path" 2> /dev/null`
34597
34598    if test "x$new_path" = x; then
34599      # It's still not found. Now this is an unrecoverable error.
34600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34601$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34602      has_space=`$ECHO "$complete" | $GREP " "`
34603      if test "x$has_space" != x; then
34604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34606      fi
34607      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34608    fi
34609  fi
34610
34611  # Now new_path has a complete unix path to the binary
34612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34613    # Keep paths in /bin as-is, but remove trailing .exe if any
34614    new_path="${new_path/%.exe/}"
34615    # Do not save /bin paths to all_fixpath_prefixes!
34616  else
34617    # Not in mixed or Windows style, start by that.
34618    new_path=`cmd //c echo $new_path`
34619
34620  input_path="$new_path"
34621  # Check if we need to convert this using DOS-style short mode. If the path
34622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34623  # take no chances and rewrite it.
34624  # Note: m4 eats our [], so we need to use [ and ] instead.
34625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34626  if test "x$has_forbidden_chars" != x; then
34627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34629  fi
34630
34631    # Output is in $new_path
34632
34633  windows_path="$new_path"
34634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34635    unix_path=`$CYGPATH -u "$windows_path"`
34636    new_path="$unix_path"
34637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34639    new_path="$unix_path"
34640  fi
34641
34642    # remove trailing .exe if any
34643    new_path="${new_path/%.exe/}"
34644
34645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34647  fi
34648
34649  else
34650    # We're on a posix platform. Hooray! :)
34651    # First separate the path from the arguments. This will split at the first
34652    # space.
34653    complete="$DUMPBIN"
34654    path="${complete%% *}"
34655    tmp="$complete EOL"
34656    arguments="${tmp#* }"
34657
34658    # Cannot rely on the command "which" here since it doesn't always work.
34659    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34660    if test -z "$is_absolute_path"; then
34661      # Path to executable is not absolute. Find it.
34662      IFS_save="$IFS"
34663      IFS=:
34664      for p in $PATH; do
34665        if test -f "$p/$path" && test -x "$p/$path"; then
34666          new_path="$p/$path"
34667          break
34668        fi
34669      done
34670      IFS="$IFS_save"
34671    else
34672      # This is an absolute path, we can use it without further modifications.
34673      new_path="$path"
34674    fi
34675
34676    if test "x$new_path" = x; then
34677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34678$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34679      has_space=`$ECHO "$complete" | $GREP " "`
34680      if test "x$has_space" != x; then
34681        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34683      fi
34684      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34685    fi
34686  fi
34687
34688  # Now join together the path and the arguments once again
34689  if test "x$arguments" != xEOL; then
34690    new_complete="$new_path ${arguments% *}"
34691  else
34692    new_complete="$new_path"
34693  fi
34694
34695  if test "x$complete" != "x$new_complete"; then
34696    DUMPBIN="$new_complete"
34697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34698$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34699  fi
34700
34701  fi
34702
34703  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34704
34705
34706  # Publish this variable in the help.
34707
34708
34709  if test "x$STRIP" = x; then
34710    # The variable is not set by user, try to locate tool using the code snippet
34711    for ac_prog in strip
34712do
34713  # Extract the first word of "$ac_prog", so it can be a program name with args.
34714set dummy $ac_prog; ac_word=$2
34715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34716$as_echo_n "checking for $ac_word... " >&6; }
34717if ${ac_cv_path_STRIP+:} false; then :
34718  $as_echo_n "(cached) " >&6
34719else
34720  case $STRIP in
34721  [\\/]* | ?:[\\/]*)
34722  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34723  ;;
34724  *)
34725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34726for as_dir in $PATH
34727do
34728  IFS=$as_save_IFS
34729  test -z "$as_dir" && as_dir=.
34730    for ac_exec_ext in '' $ac_executable_extensions; do
34731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34732    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34734    break 2
34735  fi
34736done
34737  done
34738IFS=$as_save_IFS
34739
34740  ;;
34741esac
34742fi
34743STRIP=$ac_cv_path_STRIP
34744if test -n "$STRIP"; then
34745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34746$as_echo "$STRIP" >&6; }
34747else
34748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34749$as_echo "no" >&6; }
34750fi
34751
34752
34753  test -n "$STRIP" && break
34754done
34755
34756  else
34757    # The variable is set, but is it from the command line or the environment?
34758
34759    # Try to remove the string !STRIP! from our list.
34760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34762      # If it failed, the variable was not from the command line. Ignore it,
34763      # but warn the user (except for BASH, which is always set by the calling BASH).
34764      if test "xSTRIP" != xBASH; then
34765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34766$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34767      fi
34768      # Try to locate tool using the code snippet
34769      for ac_prog in strip
34770do
34771  # Extract the first word of "$ac_prog", so it can be a program name with args.
34772set dummy $ac_prog; ac_word=$2
34773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34774$as_echo_n "checking for $ac_word... " >&6; }
34775if ${ac_cv_path_STRIP+:} false; then :
34776  $as_echo_n "(cached) " >&6
34777else
34778  case $STRIP in
34779  [\\/]* | ?:[\\/]*)
34780  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34781  ;;
34782  *)
34783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34784for as_dir in $PATH
34785do
34786  IFS=$as_save_IFS
34787  test -z "$as_dir" && as_dir=.
34788    for ac_exec_ext in '' $ac_executable_extensions; do
34789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34790    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34792    break 2
34793  fi
34794done
34795  done
34796IFS=$as_save_IFS
34797
34798  ;;
34799esac
34800fi
34801STRIP=$ac_cv_path_STRIP
34802if test -n "$STRIP"; then
34803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34804$as_echo "$STRIP" >&6; }
34805else
34806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34807$as_echo "no" >&6; }
34808fi
34809
34810
34811  test -n "$STRIP" && break
34812done
34813
34814    else
34815      # If it succeeded, then it was overridden by the user. We will use it
34816      # for the tool.
34817
34818      # First remove it from the list of overridden variables, so we can test
34819      # for unknown variables in the end.
34820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34821
34822      # Check if the provided tool contains a complete path.
34823      tool_specified="$STRIP"
34824      tool_basename="${tool_specified##*/}"
34825      if test "x$tool_basename" = "x$tool_specified"; then
34826        # A command without a complete path is provided, search $PATH.
34827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34828$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34829        # Extract the first word of "$tool_basename", so it can be a program name with args.
34830set dummy $tool_basename; ac_word=$2
34831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34832$as_echo_n "checking for $ac_word... " >&6; }
34833if ${ac_cv_path_STRIP+:} false; then :
34834  $as_echo_n "(cached) " >&6
34835else
34836  case $STRIP in
34837  [\\/]* | ?:[\\/]*)
34838  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34839  ;;
34840  *)
34841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34842for as_dir in $PATH
34843do
34844  IFS=$as_save_IFS
34845  test -z "$as_dir" && as_dir=.
34846    for ac_exec_ext in '' $ac_executable_extensions; do
34847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34848    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34850    break 2
34851  fi
34852done
34853  done
34854IFS=$as_save_IFS
34855
34856  ;;
34857esac
34858fi
34859STRIP=$ac_cv_path_STRIP
34860if test -n "$STRIP"; then
34861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34862$as_echo "$STRIP" >&6; }
34863else
34864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34865$as_echo "no" >&6; }
34866fi
34867
34868
34869        if test "x$STRIP" = x; then
34870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34871        fi
34872      else
34873        # Otherwise we believe it is a complete path. Use it as it is.
34874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34875$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34877$as_echo_n "checking for STRIP... " >&6; }
34878        if test ! -x "$tool_specified"; then
34879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34880$as_echo "not found" >&6; }
34881          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34882        fi
34883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34884$as_echo "$tool_specified" >&6; }
34885      fi
34886    fi
34887  fi
34888
34889
34890
34891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34892
34893  # First separate the path from the arguments. This will split at the first
34894  # space.
34895  complete="$STRIP"
34896  path="${complete%% *}"
34897  tmp="$complete EOL"
34898  arguments="${tmp#* }"
34899
34900  # Input might be given as Windows format, start by converting to
34901  # unix format.
34902  new_path=`$CYGPATH -u "$path"`
34903
34904  # Now try to locate executable using which
34905  new_path=`$WHICH "$new_path" 2> /dev/null`
34906  # bat and cmd files are not always considered executable in cygwin causing which
34907  # to not find them
34908  if test "x$new_path" = x \
34909      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34910      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34911    new_path=`$CYGPATH -u "$path"`
34912  fi
34913  if test "x$new_path" = x; then
34914    # Oops. Which didn't find the executable.
34915    # The splitting of arguments from the executable at a space might have been incorrect,
34916    # since paths with space are more likely in Windows. Give it another try with the whole
34917    # argument.
34918    path="$complete"
34919    arguments="EOL"
34920    new_path=`$CYGPATH -u "$path"`
34921    new_path=`$WHICH "$new_path" 2> /dev/null`
34922    # bat and cmd files are not always considered executable in cygwin causing which
34923    # to not find them
34924    if test "x$new_path" = x \
34925        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34926        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34927      new_path=`$CYGPATH -u "$path"`
34928    fi
34929    if test "x$new_path" = x; then
34930      # It's still not found. Now this is an unrecoverable error.
34931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34932$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34933      has_space=`$ECHO "$complete" | $GREP " "`
34934      if test "x$has_space" != x; then
34935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34937      fi
34938      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34939    fi
34940  fi
34941
34942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34945  # "foo.exe" is OK but "foo" is an error.
34946  #
34947  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34948  # It is also a way to make sure we got the proper file name for the real test later on.
34949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34950  if test "x$test_shortpath" = x; then
34951    # Short path failed, file does not exist as specified.
34952    # Try adding .exe or .cmd
34953    if test -f "${new_path}.exe"; then
34954      input_to_shortpath="${new_path}.exe"
34955    elif test -f "${new_path}.cmd"; then
34956      input_to_shortpath="${new_path}.cmd"
34957    else
34958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34959$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34960      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34961$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34962      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34963    fi
34964  else
34965    input_to_shortpath="$new_path"
34966  fi
34967
34968  # Call helper function which possibly converts this using DOS-style short mode.
34969  # If so, the updated path is stored in $new_path.
34970  new_path="$input_to_shortpath"
34971
34972  input_path="$input_to_shortpath"
34973  # Check if we need to convert this using DOS-style short mode. If the path
34974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34975  # take no chances and rewrite it.
34976  # Note: m4 eats our [], so we need to use [ and ] instead.
34977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34978  if test "x$has_forbidden_chars" != x; then
34979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34983      # Going to short mode and back again did indeed matter. Since short mode is
34984      # case insensitive, let's make it lowercase to improve readability.
34985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34986      # Now convert it back to Unix-stile (cygpath)
34987      input_path=`$CYGPATH -u "$shortmode_path"`
34988      new_path="$input_path"
34989    fi
34990  fi
34991
34992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34993  if test "x$test_cygdrive_prefix" = x; then
34994    # As a simple fix, exclude /usr/bin since it's not a real path.
34995    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34997      # a path prefixed by /cygdrive for fixpath to work.
34998      new_path="$CYGWIN_ROOT_PATH$input_path"
34999    fi
35000  fi
35001
35002  # remove trailing .exe if any
35003  new_path="${new_path/%.exe/}"
35004
35005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35006
35007  # First separate the path from the arguments. This will split at the first
35008  # space.
35009  complete="$STRIP"
35010  path="${complete%% *}"
35011  tmp="$complete EOL"
35012  arguments="${tmp#* }"
35013
35014  # Input might be given as Windows format, start by converting to
35015  # unix format.
35016  new_path="$path"
35017
35018  windows_path="$new_path"
35019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35020    unix_path=`$CYGPATH -u "$windows_path"`
35021    new_path="$unix_path"
35022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35024    new_path="$unix_path"
35025  fi
35026
35027
35028  # Now try to locate executable using which
35029  new_path=`$WHICH "$new_path" 2> /dev/null`
35030
35031  if test "x$new_path" = x; then
35032    # Oops. Which didn't find the executable.
35033    # The splitting of arguments from the executable at a space might have been incorrect,
35034    # since paths with space are more likely in Windows. Give it another try with the whole
35035    # argument.
35036    path="$complete"
35037    arguments="EOL"
35038    new_path="$path"
35039
35040  windows_path="$new_path"
35041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35042    unix_path=`$CYGPATH -u "$windows_path"`
35043    new_path="$unix_path"
35044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35046    new_path="$unix_path"
35047  fi
35048
35049
35050    new_path=`$WHICH "$new_path" 2> /dev/null`
35051
35052    if test "x$new_path" = x; then
35053      # It's still not found. Now this is an unrecoverable error.
35054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35055$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35056      has_space=`$ECHO "$complete" | $GREP " "`
35057      if test "x$has_space" != x; then
35058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35060      fi
35061      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35062    fi
35063  fi
35064
35065  # Now new_path has a complete unix path to the binary
35066  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35067    # Keep paths in /bin as-is, but remove trailing .exe if any
35068    new_path="${new_path/%.exe/}"
35069    # Do not save /bin paths to all_fixpath_prefixes!
35070  else
35071    # Not in mixed or Windows style, start by that.
35072    new_path=`cmd //c echo $new_path`
35073
35074  input_path="$new_path"
35075  # Check if we need to convert this using DOS-style short mode. If the path
35076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35077  # take no chances and rewrite it.
35078  # Note: m4 eats our [], so we need to use [ and ] instead.
35079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35080  if test "x$has_forbidden_chars" != x; then
35081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35083  fi
35084
35085    # Output is in $new_path
35086
35087  windows_path="$new_path"
35088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35089    unix_path=`$CYGPATH -u "$windows_path"`
35090    new_path="$unix_path"
35091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35093    new_path="$unix_path"
35094  fi
35095
35096    # remove trailing .exe if any
35097    new_path="${new_path/%.exe/}"
35098
35099    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35100    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35101  fi
35102
35103  else
35104    # We're on a posix platform. Hooray! :)
35105    # First separate the path from the arguments. This will split at the first
35106    # space.
35107    complete="$STRIP"
35108    path="${complete%% *}"
35109    tmp="$complete EOL"
35110    arguments="${tmp#* }"
35111
35112    # Cannot rely on the command "which" here since it doesn't always work.
35113    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35114    if test -z "$is_absolute_path"; then
35115      # Path to executable is not absolute. Find it.
35116      IFS_save="$IFS"
35117      IFS=:
35118      for p in $PATH; do
35119        if test -f "$p/$path" && test -x "$p/$path"; then
35120          new_path="$p/$path"
35121          break
35122        fi
35123      done
35124      IFS="$IFS_save"
35125    else
35126      # This is an absolute path, we can use it without further modifications.
35127      new_path="$path"
35128    fi
35129
35130    if test "x$new_path" = x; then
35131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35132$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35133      has_space=`$ECHO "$complete" | $GREP " "`
35134      if test "x$has_space" != x; then
35135        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35137      fi
35138      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35139    fi
35140  fi
35141
35142  # Now join together the path and the arguments once again
35143  if test "x$arguments" != xEOL; then
35144    new_complete="$new_path ${arguments% *}"
35145  else
35146    new_complete="$new_path"
35147  fi
35148
35149  if test "x$complete" != "x$new_complete"; then
35150    STRIP="$new_complete"
35151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35152$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35153  fi
35154
35155
35156
35157  # Publish this variable in the help.
35158
35159
35160  if test "x$NM" = x; then
35161    # The variable is not set by user, try to locate tool using the code snippet
35162    for ac_prog in nm
35163do
35164  # Extract the first word of "$ac_prog", so it can be a program name with args.
35165set dummy $ac_prog; ac_word=$2
35166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35167$as_echo_n "checking for $ac_word... " >&6; }
35168if ${ac_cv_path_NM+:} false; then :
35169  $as_echo_n "(cached) " >&6
35170else
35171  case $NM in
35172  [\\/]* | ?:[\\/]*)
35173  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35174  ;;
35175  *)
35176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35177for as_dir in $PATH
35178do
35179  IFS=$as_save_IFS
35180  test -z "$as_dir" && as_dir=.
35181    for ac_exec_ext in '' $ac_executable_extensions; do
35182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35183    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35185    break 2
35186  fi
35187done
35188  done
35189IFS=$as_save_IFS
35190
35191  ;;
35192esac
35193fi
35194NM=$ac_cv_path_NM
35195if test -n "$NM"; then
35196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35197$as_echo "$NM" >&6; }
35198else
35199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35200$as_echo "no" >&6; }
35201fi
35202
35203
35204  test -n "$NM" && break
35205done
35206
35207  else
35208    # The variable is set, but is it from the command line or the environment?
35209
35210    # Try to remove the string !NM! from our list.
35211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35213      # If it failed, the variable was not from the command line. Ignore it,
35214      # but warn the user (except for BASH, which is always set by the calling BASH).
35215      if test "xNM" != xBASH; then
35216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35217$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35218      fi
35219      # Try to locate tool using the code snippet
35220      for ac_prog in nm
35221do
35222  # Extract the first word of "$ac_prog", so it can be a program name with args.
35223set dummy $ac_prog; ac_word=$2
35224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35225$as_echo_n "checking for $ac_word... " >&6; }
35226if ${ac_cv_path_NM+:} false; then :
35227  $as_echo_n "(cached) " >&6
35228else
35229  case $NM in
35230  [\\/]* | ?:[\\/]*)
35231  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35232  ;;
35233  *)
35234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35235for as_dir in $PATH
35236do
35237  IFS=$as_save_IFS
35238  test -z "$as_dir" && as_dir=.
35239    for ac_exec_ext in '' $ac_executable_extensions; do
35240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35241    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35243    break 2
35244  fi
35245done
35246  done
35247IFS=$as_save_IFS
35248
35249  ;;
35250esac
35251fi
35252NM=$ac_cv_path_NM
35253if test -n "$NM"; then
35254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35255$as_echo "$NM" >&6; }
35256else
35257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35258$as_echo "no" >&6; }
35259fi
35260
35261
35262  test -n "$NM" && break
35263done
35264
35265    else
35266      # If it succeeded, then it was overridden by the user. We will use it
35267      # for the tool.
35268
35269      # First remove it from the list of overridden variables, so we can test
35270      # for unknown variables in the end.
35271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35272
35273      # Check if the provided tool contains a complete path.
35274      tool_specified="$NM"
35275      tool_basename="${tool_specified##*/}"
35276      if test "x$tool_basename" = "x$tool_specified"; then
35277        # A command without a complete path is provided, search $PATH.
35278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35279$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35280        # Extract the first word of "$tool_basename", so it can be a program name with args.
35281set dummy $tool_basename; ac_word=$2
35282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35283$as_echo_n "checking for $ac_word... " >&6; }
35284if ${ac_cv_path_NM+:} false; then :
35285  $as_echo_n "(cached) " >&6
35286else
35287  case $NM in
35288  [\\/]* | ?:[\\/]*)
35289  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35290  ;;
35291  *)
35292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35293for as_dir in $PATH
35294do
35295  IFS=$as_save_IFS
35296  test -z "$as_dir" && as_dir=.
35297    for ac_exec_ext in '' $ac_executable_extensions; do
35298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35299    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35301    break 2
35302  fi
35303done
35304  done
35305IFS=$as_save_IFS
35306
35307  ;;
35308esac
35309fi
35310NM=$ac_cv_path_NM
35311if test -n "$NM"; then
35312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35313$as_echo "$NM" >&6; }
35314else
35315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35316$as_echo "no" >&6; }
35317fi
35318
35319
35320        if test "x$NM" = x; then
35321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35322        fi
35323      else
35324        # Otherwise we believe it is a complete path. Use it as it is.
35325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35326$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35328$as_echo_n "checking for NM... " >&6; }
35329        if test ! -x "$tool_specified"; then
35330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35331$as_echo "not found" >&6; }
35332          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35333        fi
35334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35335$as_echo "$tool_specified" >&6; }
35336      fi
35337    fi
35338  fi
35339
35340
35341
35342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35343
35344  # First separate the path from the arguments. This will split at the first
35345  # space.
35346  complete="$NM"
35347  path="${complete%% *}"
35348  tmp="$complete EOL"
35349  arguments="${tmp#* }"
35350
35351  # Input might be given as Windows format, start by converting to
35352  # unix format.
35353  new_path=`$CYGPATH -u "$path"`
35354
35355  # Now try to locate executable using which
35356  new_path=`$WHICH "$new_path" 2> /dev/null`
35357  # bat and cmd files are not always considered executable in cygwin causing which
35358  # to not find them
35359  if test "x$new_path" = x \
35360      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35361      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35362    new_path=`$CYGPATH -u "$path"`
35363  fi
35364  if test "x$new_path" = x; then
35365    # Oops. Which didn't find the executable.
35366    # The splitting of arguments from the executable at a space might have been incorrect,
35367    # since paths with space are more likely in Windows. Give it another try with the whole
35368    # argument.
35369    path="$complete"
35370    arguments="EOL"
35371    new_path=`$CYGPATH -u "$path"`
35372    new_path=`$WHICH "$new_path" 2> /dev/null`
35373    # bat and cmd files are not always considered executable in cygwin causing which
35374    # to not find them
35375    if test "x$new_path" = x \
35376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35378      new_path=`$CYGPATH -u "$path"`
35379    fi
35380    if test "x$new_path" = x; then
35381      # It's still not found. Now this is an unrecoverable error.
35382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35383$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35384      has_space=`$ECHO "$complete" | $GREP " "`
35385      if test "x$has_space" != x; then
35386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35388      fi
35389      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35390    fi
35391  fi
35392
35393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35396  # "foo.exe" is OK but "foo" is an error.
35397  #
35398  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35399  # It is also a way to make sure we got the proper file name for the real test later on.
35400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35401  if test "x$test_shortpath" = x; then
35402    # Short path failed, file does not exist as specified.
35403    # Try adding .exe or .cmd
35404    if test -f "${new_path}.exe"; then
35405      input_to_shortpath="${new_path}.exe"
35406    elif test -f "${new_path}.cmd"; then
35407      input_to_shortpath="${new_path}.cmd"
35408    else
35409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35410$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35413      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35414    fi
35415  else
35416    input_to_shortpath="$new_path"
35417  fi
35418
35419  # Call helper function which possibly converts this using DOS-style short mode.
35420  # If so, the updated path is stored in $new_path.
35421  new_path="$input_to_shortpath"
35422
35423  input_path="$input_to_shortpath"
35424  # Check if we need to convert this using DOS-style short mode. If the path
35425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35426  # take no chances and rewrite it.
35427  # Note: m4 eats our [], so we need to use [ and ] instead.
35428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35429  if test "x$has_forbidden_chars" != x; then
35430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35434      # Going to short mode and back again did indeed matter. Since short mode is
35435      # case insensitive, let's make it lowercase to improve readability.
35436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35437      # Now convert it back to Unix-stile (cygpath)
35438      input_path=`$CYGPATH -u "$shortmode_path"`
35439      new_path="$input_path"
35440    fi
35441  fi
35442
35443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35444  if test "x$test_cygdrive_prefix" = x; then
35445    # As a simple fix, exclude /usr/bin since it's not a real path.
35446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35448      # a path prefixed by /cygdrive for fixpath to work.
35449      new_path="$CYGWIN_ROOT_PATH$input_path"
35450    fi
35451  fi
35452
35453  # remove trailing .exe if any
35454  new_path="${new_path/%.exe/}"
35455
35456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35457
35458  # First separate the path from the arguments. This will split at the first
35459  # space.
35460  complete="$NM"
35461  path="${complete%% *}"
35462  tmp="$complete EOL"
35463  arguments="${tmp#* }"
35464
35465  # Input might be given as Windows format, start by converting to
35466  # unix format.
35467  new_path="$path"
35468
35469  windows_path="$new_path"
35470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35471    unix_path=`$CYGPATH -u "$windows_path"`
35472    new_path="$unix_path"
35473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35475    new_path="$unix_path"
35476  fi
35477
35478
35479  # Now try to locate executable using which
35480  new_path=`$WHICH "$new_path" 2> /dev/null`
35481
35482  if test "x$new_path" = x; then
35483    # Oops. Which didn't find the executable.
35484    # The splitting of arguments from the executable at a space might have been incorrect,
35485    # since paths with space are more likely in Windows. Give it another try with the whole
35486    # argument.
35487    path="$complete"
35488    arguments="EOL"
35489    new_path="$path"
35490
35491  windows_path="$new_path"
35492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35493    unix_path=`$CYGPATH -u "$windows_path"`
35494    new_path="$unix_path"
35495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35497    new_path="$unix_path"
35498  fi
35499
35500
35501    new_path=`$WHICH "$new_path" 2> /dev/null`
35502
35503    if test "x$new_path" = x; then
35504      # It's still not found. Now this is an unrecoverable error.
35505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35506$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35507      has_space=`$ECHO "$complete" | $GREP " "`
35508      if test "x$has_space" != x; then
35509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35511      fi
35512      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35513    fi
35514  fi
35515
35516  # Now new_path has a complete unix path to the binary
35517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35518    # Keep paths in /bin as-is, but remove trailing .exe if any
35519    new_path="${new_path/%.exe/}"
35520    # Do not save /bin paths to all_fixpath_prefixes!
35521  else
35522    # Not in mixed or Windows style, start by that.
35523    new_path=`cmd //c echo $new_path`
35524
35525  input_path="$new_path"
35526  # Check if we need to convert this using DOS-style short mode. If the path
35527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35528  # take no chances and rewrite it.
35529  # Note: m4 eats our [], so we need to use [ and ] instead.
35530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35531  if test "x$has_forbidden_chars" != x; then
35532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35534  fi
35535
35536    # Output is in $new_path
35537
35538  windows_path="$new_path"
35539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35540    unix_path=`$CYGPATH -u "$windows_path"`
35541    new_path="$unix_path"
35542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35544    new_path="$unix_path"
35545  fi
35546
35547    # remove trailing .exe if any
35548    new_path="${new_path/%.exe/}"
35549
35550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35552  fi
35553
35554  else
35555    # We're on a posix platform. Hooray! :)
35556    # First separate the path from the arguments. This will split at the first
35557    # space.
35558    complete="$NM"
35559    path="${complete%% *}"
35560    tmp="$complete EOL"
35561    arguments="${tmp#* }"
35562
35563    # Cannot rely on the command "which" here since it doesn't always work.
35564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35565    if test -z "$is_absolute_path"; then
35566      # Path to executable is not absolute. Find it.
35567      IFS_save="$IFS"
35568      IFS=:
35569      for p in $PATH; do
35570        if test -f "$p/$path" && test -x "$p/$path"; then
35571          new_path="$p/$path"
35572          break
35573        fi
35574      done
35575      IFS="$IFS_save"
35576    else
35577      # This is an absolute path, we can use it without further modifications.
35578      new_path="$path"
35579    fi
35580
35581    if test "x$new_path" = x; then
35582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35583$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35584      has_space=`$ECHO "$complete" | $GREP " "`
35585      if test "x$has_space" != x; then
35586        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35588      fi
35589      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35590    fi
35591  fi
35592
35593  # Now join together the path and the arguments once again
35594  if test "x$arguments" != xEOL; then
35595    new_complete="$new_path ${arguments% *}"
35596  else
35597    new_complete="$new_path"
35598  fi
35599
35600  if test "x$complete" != "x$new_complete"; then
35601    NM="$new_complete"
35602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35603$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35604  fi
35605
35606
35607
35608  # Publish this variable in the help.
35609
35610
35611  if test "x$GNM" = x; then
35612    # The variable is not set by user, try to locate tool using the code snippet
35613    for ac_prog in gnm
35614do
35615  # Extract the first word of "$ac_prog", so it can be a program name with args.
35616set dummy $ac_prog; ac_word=$2
35617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35618$as_echo_n "checking for $ac_word... " >&6; }
35619if ${ac_cv_path_GNM+:} false; then :
35620  $as_echo_n "(cached) " >&6
35621else
35622  case $GNM in
35623  [\\/]* | ?:[\\/]*)
35624  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35625  ;;
35626  *)
35627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35628for as_dir in $PATH
35629do
35630  IFS=$as_save_IFS
35631  test -z "$as_dir" && as_dir=.
35632    for ac_exec_ext in '' $ac_executable_extensions; do
35633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35634    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35636    break 2
35637  fi
35638done
35639  done
35640IFS=$as_save_IFS
35641
35642  ;;
35643esac
35644fi
35645GNM=$ac_cv_path_GNM
35646if test -n "$GNM"; then
35647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35648$as_echo "$GNM" >&6; }
35649else
35650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35651$as_echo "no" >&6; }
35652fi
35653
35654
35655  test -n "$GNM" && break
35656done
35657
35658  else
35659    # The variable is set, but is it from the command line or the environment?
35660
35661    # Try to remove the string !GNM! from our list.
35662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35664      # If it failed, the variable was not from the command line. Ignore it,
35665      # but warn the user (except for BASH, which is always set by the calling BASH).
35666      if test "xGNM" != xBASH; then
35667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35668$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35669      fi
35670      # Try to locate tool using the code snippet
35671      for ac_prog in gnm
35672do
35673  # Extract the first word of "$ac_prog", so it can be a program name with args.
35674set dummy $ac_prog; ac_word=$2
35675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35676$as_echo_n "checking for $ac_word... " >&6; }
35677if ${ac_cv_path_GNM+:} false; then :
35678  $as_echo_n "(cached) " >&6
35679else
35680  case $GNM in
35681  [\\/]* | ?:[\\/]*)
35682  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35683  ;;
35684  *)
35685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35686for as_dir in $PATH
35687do
35688  IFS=$as_save_IFS
35689  test -z "$as_dir" && as_dir=.
35690    for ac_exec_ext in '' $ac_executable_extensions; do
35691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35692    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35694    break 2
35695  fi
35696done
35697  done
35698IFS=$as_save_IFS
35699
35700  ;;
35701esac
35702fi
35703GNM=$ac_cv_path_GNM
35704if test -n "$GNM"; then
35705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35706$as_echo "$GNM" >&6; }
35707else
35708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35709$as_echo "no" >&6; }
35710fi
35711
35712
35713  test -n "$GNM" && break
35714done
35715
35716    else
35717      # If it succeeded, then it was overridden by the user. We will use it
35718      # for the tool.
35719
35720      # First remove it from the list of overridden variables, so we can test
35721      # for unknown variables in the end.
35722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35723
35724      # Check if the provided tool contains a complete path.
35725      tool_specified="$GNM"
35726      tool_basename="${tool_specified##*/}"
35727      if test "x$tool_basename" = "x$tool_specified"; then
35728        # A command without a complete path is provided, search $PATH.
35729        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35730$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35731        # Extract the first word of "$tool_basename", so it can be a program name with args.
35732set dummy $tool_basename; ac_word=$2
35733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35734$as_echo_n "checking for $ac_word... " >&6; }
35735if ${ac_cv_path_GNM+:} false; then :
35736  $as_echo_n "(cached) " >&6
35737else
35738  case $GNM in
35739  [\\/]* | ?:[\\/]*)
35740  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35741  ;;
35742  *)
35743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35744for as_dir in $PATH
35745do
35746  IFS=$as_save_IFS
35747  test -z "$as_dir" && as_dir=.
35748    for ac_exec_ext in '' $ac_executable_extensions; do
35749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35750    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35752    break 2
35753  fi
35754done
35755  done
35756IFS=$as_save_IFS
35757
35758  ;;
35759esac
35760fi
35761GNM=$ac_cv_path_GNM
35762if test -n "$GNM"; then
35763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35764$as_echo "$GNM" >&6; }
35765else
35766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35767$as_echo "no" >&6; }
35768fi
35769
35770
35771        if test "x$GNM" = x; then
35772          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35773        fi
35774      else
35775        # Otherwise we believe it is a complete path. Use it as it is.
35776        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35777$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35779$as_echo_n "checking for GNM... " >&6; }
35780        if test ! -x "$tool_specified"; then
35781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35782$as_echo "not found" >&6; }
35783          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35784        fi
35785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35786$as_echo "$tool_specified" >&6; }
35787      fi
35788    fi
35789  fi
35790
35791
35792
35793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35794
35795  # First separate the path from the arguments. This will split at the first
35796  # space.
35797  complete="$GNM"
35798  path="${complete%% *}"
35799  tmp="$complete EOL"
35800  arguments="${tmp#* }"
35801
35802  # Input might be given as Windows format, start by converting to
35803  # unix format.
35804  new_path=`$CYGPATH -u "$path"`
35805
35806  # Now try to locate executable using which
35807  new_path=`$WHICH "$new_path" 2> /dev/null`
35808  # bat and cmd files are not always considered executable in cygwin causing which
35809  # to not find them
35810  if test "x$new_path" = x \
35811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35813    new_path=`$CYGPATH -u "$path"`
35814  fi
35815  if test "x$new_path" = x; then
35816    # Oops. Which didn't find the executable.
35817    # The splitting of arguments from the executable at a space might have been incorrect,
35818    # since paths with space are more likely in Windows. Give it another try with the whole
35819    # argument.
35820    path="$complete"
35821    arguments="EOL"
35822    new_path=`$CYGPATH -u "$path"`
35823    new_path=`$WHICH "$new_path" 2> /dev/null`
35824    # bat and cmd files are not always considered executable in cygwin causing which
35825    # to not find them
35826    if test "x$new_path" = x \
35827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35829      new_path=`$CYGPATH -u "$path"`
35830    fi
35831    if test "x$new_path" = x; then
35832      # It's still not found. Now this is an unrecoverable error.
35833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35834$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35835      has_space=`$ECHO "$complete" | $GREP " "`
35836      if test "x$has_space" != x; then
35837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35839      fi
35840      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35841    fi
35842  fi
35843
35844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35847  # "foo.exe" is OK but "foo" is an error.
35848  #
35849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35850  # It is also a way to make sure we got the proper file name for the real test later on.
35851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35852  if test "x$test_shortpath" = x; then
35853    # Short path failed, file does not exist as specified.
35854    # Try adding .exe or .cmd
35855    if test -f "${new_path}.exe"; then
35856      input_to_shortpath="${new_path}.exe"
35857    elif test -f "${new_path}.cmd"; then
35858      input_to_shortpath="${new_path}.cmd"
35859    else
35860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35861$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35864      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35865    fi
35866  else
35867    input_to_shortpath="$new_path"
35868  fi
35869
35870  # Call helper function which possibly converts this using DOS-style short mode.
35871  # If so, the updated path is stored in $new_path.
35872  new_path="$input_to_shortpath"
35873
35874  input_path="$input_to_shortpath"
35875  # Check if we need to convert this using DOS-style short mode. If the path
35876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35877  # take no chances and rewrite it.
35878  # Note: m4 eats our [], so we need to use [ and ] instead.
35879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35880  if test "x$has_forbidden_chars" != x; then
35881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35885      # Going to short mode and back again did indeed matter. Since short mode is
35886      # case insensitive, let's make it lowercase to improve readability.
35887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35888      # Now convert it back to Unix-stile (cygpath)
35889      input_path=`$CYGPATH -u "$shortmode_path"`
35890      new_path="$input_path"
35891    fi
35892  fi
35893
35894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35895  if test "x$test_cygdrive_prefix" = x; then
35896    # As a simple fix, exclude /usr/bin since it's not a real path.
35897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35899      # a path prefixed by /cygdrive for fixpath to work.
35900      new_path="$CYGWIN_ROOT_PATH$input_path"
35901    fi
35902  fi
35903
35904  # remove trailing .exe if any
35905  new_path="${new_path/%.exe/}"
35906
35907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35908
35909  # First separate the path from the arguments. This will split at the first
35910  # space.
35911  complete="$GNM"
35912  path="${complete%% *}"
35913  tmp="$complete EOL"
35914  arguments="${tmp#* }"
35915
35916  # Input might be given as Windows format, start by converting to
35917  # unix format.
35918  new_path="$path"
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929
35930  # Now try to locate executable using which
35931  new_path=`$WHICH "$new_path" 2> /dev/null`
35932
35933  if test "x$new_path" = x; then
35934    # Oops. Which didn't find the executable.
35935    # The splitting of arguments from the executable at a space might have been incorrect,
35936    # since paths with space are more likely in Windows. Give it another try with the whole
35937    # argument.
35938    path="$complete"
35939    arguments="EOL"
35940    new_path="$path"
35941
35942  windows_path="$new_path"
35943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35944    unix_path=`$CYGPATH -u "$windows_path"`
35945    new_path="$unix_path"
35946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35948    new_path="$unix_path"
35949  fi
35950
35951
35952    new_path=`$WHICH "$new_path" 2> /dev/null`
35953
35954    if test "x$new_path" = x; then
35955      # It's still not found. Now this is an unrecoverable error.
35956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35957$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35958      has_space=`$ECHO "$complete" | $GREP " "`
35959      if test "x$has_space" != x; then
35960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35962      fi
35963      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35964    fi
35965  fi
35966
35967  # Now new_path has a complete unix path to the binary
35968  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35969    # Keep paths in /bin as-is, but remove trailing .exe if any
35970    new_path="${new_path/%.exe/}"
35971    # Do not save /bin paths to all_fixpath_prefixes!
35972  else
35973    # Not in mixed or Windows style, start by that.
35974    new_path=`cmd //c echo $new_path`
35975
35976  input_path="$new_path"
35977  # Check if we need to convert this using DOS-style short mode. If the path
35978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35979  # take no chances and rewrite it.
35980  # Note: m4 eats our [], so we need to use [ and ] instead.
35981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35982  if test "x$has_forbidden_chars" != x; then
35983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35985  fi
35986
35987    # Output is in $new_path
35988
35989  windows_path="$new_path"
35990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35991    unix_path=`$CYGPATH -u "$windows_path"`
35992    new_path="$unix_path"
35993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35995    new_path="$unix_path"
35996  fi
35997
35998    # remove trailing .exe if any
35999    new_path="${new_path/%.exe/}"
36000
36001    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36002    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36003  fi
36004
36005  else
36006    # We're on a posix platform. Hooray! :)
36007    # First separate the path from the arguments. This will split at the first
36008    # space.
36009    complete="$GNM"
36010    path="${complete%% *}"
36011    tmp="$complete EOL"
36012    arguments="${tmp#* }"
36013
36014    # Cannot rely on the command "which" here since it doesn't always work.
36015    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36016    if test -z "$is_absolute_path"; then
36017      # Path to executable is not absolute. Find it.
36018      IFS_save="$IFS"
36019      IFS=:
36020      for p in $PATH; do
36021        if test -f "$p/$path" && test -x "$p/$path"; then
36022          new_path="$p/$path"
36023          break
36024        fi
36025      done
36026      IFS="$IFS_save"
36027    else
36028      # This is an absolute path, we can use it without further modifications.
36029      new_path="$path"
36030    fi
36031
36032    if test "x$new_path" = x; then
36033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36034$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36035      has_space=`$ECHO "$complete" | $GREP " "`
36036      if test "x$has_space" != x; then
36037        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36038$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36039      fi
36040      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36041    fi
36042  fi
36043
36044  # Now join together the path and the arguments once again
36045  if test "x$arguments" != xEOL; then
36046    new_complete="$new_path ${arguments% *}"
36047  else
36048    new_complete="$new_path"
36049  fi
36050
36051  if test "x$complete" != "x$new_complete"; then
36052    GNM="$new_complete"
36053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36054$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36055  fi
36056
36057
36058
36059
36060  # Publish this variable in the help.
36061
36062
36063  if test "x$MCS" = x; then
36064    # The variable is not set by user, try to locate tool using the code snippet
36065    for ac_prog in mcs
36066do
36067  # Extract the first word of "$ac_prog", so it can be a program name with args.
36068set dummy $ac_prog; ac_word=$2
36069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36070$as_echo_n "checking for $ac_word... " >&6; }
36071if ${ac_cv_path_MCS+:} false; then :
36072  $as_echo_n "(cached) " >&6
36073else
36074  case $MCS in
36075  [\\/]* | ?:[\\/]*)
36076  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36077  ;;
36078  *)
36079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36080for as_dir in $PATH
36081do
36082  IFS=$as_save_IFS
36083  test -z "$as_dir" && as_dir=.
36084    for ac_exec_ext in '' $ac_executable_extensions; do
36085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36086    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36088    break 2
36089  fi
36090done
36091  done
36092IFS=$as_save_IFS
36093
36094  ;;
36095esac
36096fi
36097MCS=$ac_cv_path_MCS
36098if test -n "$MCS"; then
36099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36100$as_echo "$MCS" >&6; }
36101else
36102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36103$as_echo "no" >&6; }
36104fi
36105
36106
36107  test -n "$MCS" && break
36108done
36109
36110  else
36111    # The variable is set, but is it from the command line or the environment?
36112
36113    # Try to remove the string !MCS! from our list.
36114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36116      # If it failed, the variable was not from the command line. Ignore it,
36117      # but warn the user (except for BASH, which is always set by the calling BASH).
36118      if test "xMCS" != xBASH; then
36119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36120$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36121      fi
36122      # Try to locate tool using the code snippet
36123      for ac_prog in mcs
36124do
36125  # Extract the first word of "$ac_prog", so it can be a program name with args.
36126set dummy $ac_prog; ac_word=$2
36127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36128$as_echo_n "checking for $ac_word... " >&6; }
36129if ${ac_cv_path_MCS+:} false; then :
36130  $as_echo_n "(cached) " >&6
36131else
36132  case $MCS in
36133  [\\/]* | ?:[\\/]*)
36134  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36135  ;;
36136  *)
36137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36138for as_dir in $PATH
36139do
36140  IFS=$as_save_IFS
36141  test -z "$as_dir" && as_dir=.
36142    for ac_exec_ext in '' $ac_executable_extensions; do
36143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36144    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36146    break 2
36147  fi
36148done
36149  done
36150IFS=$as_save_IFS
36151
36152  ;;
36153esac
36154fi
36155MCS=$ac_cv_path_MCS
36156if test -n "$MCS"; then
36157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36158$as_echo "$MCS" >&6; }
36159else
36160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36161$as_echo "no" >&6; }
36162fi
36163
36164
36165  test -n "$MCS" && break
36166done
36167
36168    else
36169      # If it succeeded, then it was overridden by the user. We will use it
36170      # for the tool.
36171
36172      # First remove it from the list of overridden variables, so we can test
36173      # for unknown variables in the end.
36174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36175
36176      # Check if the provided tool contains a complete path.
36177      tool_specified="$MCS"
36178      tool_basename="${tool_specified##*/}"
36179      if test "x$tool_basename" = "x$tool_specified"; then
36180        # A command without a complete path is provided, search $PATH.
36181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36182$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36183        # Extract the first word of "$tool_basename", so it can be a program name with args.
36184set dummy $tool_basename; ac_word=$2
36185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36186$as_echo_n "checking for $ac_word... " >&6; }
36187if ${ac_cv_path_MCS+:} false; then :
36188  $as_echo_n "(cached) " >&6
36189else
36190  case $MCS in
36191  [\\/]* | ?:[\\/]*)
36192  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36193  ;;
36194  *)
36195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36196for as_dir in $PATH
36197do
36198  IFS=$as_save_IFS
36199  test -z "$as_dir" && as_dir=.
36200    for ac_exec_ext in '' $ac_executable_extensions; do
36201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36202    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36204    break 2
36205  fi
36206done
36207  done
36208IFS=$as_save_IFS
36209
36210  ;;
36211esac
36212fi
36213MCS=$ac_cv_path_MCS
36214if test -n "$MCS"; then
36215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36216$as_echo "$MCS" >&6; }
36217else
36218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36219$as_echo "no" >&6; }
36220fi
36221
36222
36223        if test "x$MCS" = x; then
36224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36225        fi
36226      else
36227        # Otherwise we believe it is a complete path. Use it as it is.
36228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36229$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36231$as_echo_n "checking for MCS... " >&6; }
36232        if test ! -x "$tool_specified"; then
36233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36234$as_echo "not found" >&6; }
36235          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36236        fi
36237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36238$as_echo "$tool_specified" >&6; }
36239      fi
36240    fi
36241  fi
36242
36243
36244
36245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36246
36247  # First separate the path from the arguments. This will split at the first
36248  # space.
36249  complete="$MCS"
36250  path="${complete%% *}"
36251  tmp="$complete EOL"
36252  arguments="${tmp#* }"
36253
36254  # Input might be given as Windows format, start by converting to
36255  # unix format.
36256  new_path=`$CYGPATH -u "$path"`
36257
36258  # Now try to locate executable using which
36259  new_path=`$WHICH "$new_path" 2> /dev/null`
36260  # bat and cmd files are not always considered executable in cygwin causing which
36261  # to not find them
36262  if test "x$new_path" = x \
36263      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36264      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36265    new_path=`$CYGPATH -u "$path"`
36266  fi
36267  if test "x$new_path" = x; then
36268    # Oops. Which didn't find the executable.
36269    # The splitting of arguments from the executable at a space might have been incorrect,
36270    # since paths with space are more likely in Windows. Give it another try with the whole
36271    # argument.
36272    path="$complete"
36273    arguments="EOL"
36274    new_path=`$CYGPATH -u "$path"`
36275    new_path=`$WHICH "$new_path" 2> /dev/null`
36276    # bat and cmd files are not always considered executable in cygwin causing which
36277    # to not find them
36278    if test "x$new_path" = x \
36279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36281      new_path=`$CYGPATH -u "$path"`
36282    fi
36283    if test "x$new_path" = x; then
36284      # It's still not found. Now this is an unrecoverable error.
36285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36286$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36287      has_space=`$ECHO "$complete" | $GREP " "`
36288      if test "x$has_space" != x; then
36289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36291      fi
36292      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36293    fi
36294  fi
36295
36296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36299  # "foo.exe" is OK but "foo" is an error.
36300  #
36301  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36302  # It is also a way to make sure we got the proper file name for the real test later on.
36303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36304  if test "x$test_shortpath" = x; then
36305    # Short path failed, file does not exist as specified.
36306    # Try adding .exe or .cmd
36307    if test -f "${new_path}.exe"; then
36308      input_to_shortpath="${new_path}.exe"
36309    elif test -f "${new_path}.cmd"; then
36310      input_to_shortpath="${new_path}.cmd"
36311    else
36312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36313$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36316      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36317    fi
36318  else
36319    input_to_shortpath="$new_path"
36320  fi
36321
36322  # Call helper function which possibly converts this using DOS-style short mode.
36323  # If so, the updated path is stored in $new_path.
36324  new_path="$input_to_shortpath"
36325
36326  input_path="$input_to_shortpath"
36327  # Check if we need to convert this using DOS-style short mode. If the path
36328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36329  # take no chances and rewrite it.
36330  # Note: m4 eats our [], so we need to use [ and ] instead.
36331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36332  if test "x$has_forbidden_chars" != x; then
36333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36337      # Going to short mode and back again did indeed matter. Since short mode is
36338      # case insensitive, let's make it lowercase to improve readability.
36339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36340      # Now convert it back to Unix-stile (cygpath)
36341      input_path=`$CYGPATH -u "$shortmode_path"`
36342      new_path="$input_path"
36343    fi
36344  fi
36345
36346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36347  if test "x$test_cygdrive_prefix" = x; then
36348    # As a simple fix, exclude /usr/bin since it's not a real path.
36349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36351      # a path prefixed by /cygdrive for fixpath to work.
36352      new_path="$CYGWIN_ROOT_PATH$input_path"
36353    fi
36354  fi
36355
36356  # remove trailing .exe if any
36357  new_path="${new_path/%.exe/}"
36358
36359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36360
36361  # First separate the path from the arguments. This will split at the first
36362  # space.
36363  complete="$MCS"
36364  path="${complete%% *}"
36365  tmp="$complete EOL"
36366  arguments="${tmp#* }"
36367
36368  # Input might be given as Windows format, start by converting to
36369  # unix format.
36370  new_path="$path"
36371
36372  windows_path="$new_path"
36373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36374    unix_path=`$CYGPATH -u "$windows_path"`
36375    new_path="$unix_path"
36376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36378    new_path="$unix_path"
36379  fi
36380
36381
36382  # Now try to locate executable using which
36383  new_path=`$WHICH "$new_path" 2> /dev/null`
36384
36385  if test "x$new_path" = x; then
36386    # Oops. Which didn't find the executable.
36387    # The splitting of arguments from the executable at a space might have been incorrect,
36388    # since paths with space are more likely in Windows. Give it another try with the whole
36389    # argument.
36390    path="$complete"
36391    arguments="EOL"
36392    new_path="$path"
36393
36394  windows_path="$new_path"
36395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36396    unix_path=`$CYGPATH -u "$windows_path"`
36397    new_path="$unix_path"
36398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36400    new_path="$unix_path"
36401  fi
36402
36403
36404    new_path=`$WHICH "$new_path" 2> /dev/null`
36405
36406    if test "x$new_path" = x; then
36407      # It's still not found. Now this is an unrecoverable error.
36408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36409$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36410      has_space=`$ECHO "$complete" | $GREP " "`
36411      if test "x$has_space" != x; then
36412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36414      fi
36415      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36416    fi
36417  fi
36418
36419  # Now new_path has a complete unix path to the binary
36420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36421    # Keep paths in /bin as-is, but remove trailing .exe if any
36422    new_path="${new_path/%.exe/}"
36423    # Do not save /bin paths to all_fixpath_prefixes!
36424  else
36425    # Not in mixed or Windows style, start by that.
36426    new_path=`cmd //c echo $new_path`
36427
36428  input_path="$new_path"
36429  # Check if we need to convert this using DOS-style short mode. If the path
36430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36431  # take no chances and rewrite it.
36432  # Note: m4 eats our [], so we need to use [ and ] instead.
36433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36434  if test "x$has_forbidden_chars" != x; then
36435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36437  fi
36438
36439    # Output is in $new_path
36440
36441  windows_path="$new_path"
36442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36443    unix_path=`$CYGPATH -u "$windows_path"`
36444    new_path="$unix_path"
36445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36447    new_path="$unix_path"
36448  fi
36449
36450    # remove trailing .exe if any
36451    new_path="${new_path/%.exe/}"
36452
36453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36455  fi
36456
36457  else
36458    # We're on a posix platform. Hooray! :)
36459    # First separate the path from the arguments. This will split at the first
36460    # space.
36461    complete="$MCS"
36462    path="${complete%% *}"
36463    tmp="$complete EOL"
36464    arguments="${tmp#* }"
36465
36466    # Cannot rely on the command "which" here since it doesn't always work.
36467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36468    if test -z "$is_absolute_path"; then
36469      # Path to executable is not absolute. Find it.
36470      IFS_save="$IFS"
36471      IFS=:
36472      for p in $PATH; do
36473        if test -f "$p/$path" && test -x "$p/$path"; then
36474          new_path="$p/$path"
36475          break
36476        fi
36477      done
36478      IFS="$IFS_save"
36479    else
36480      # This is an absolute path, we can use it without further modifications.
36481      new_path="$path"
36482    fi
36483
36484    if test "x$new_path" = x; then
36485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36486$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36487      has_space=`$ECHO "$complete" | $GREP " "`
36488      if test "x$has_space" != x; then
36489        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36491      fi
36492      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36493    fi
36494  fi
36495
36496  # Now join together the path and the arguments once again
36497  if test "x$arguments" != xEOL; then
36498    new_complete="$new_path ${arguments% *}"
36499  else
36500    new_complete="$new_path"
36501  fi
36502
36503  if test "x$complete" != "x$new_complete"; then
36504    MCS="$new_complete"
36505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36506$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36507  fi
36508
36509  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36510    # FIXME: we should unify this with the solaris case above.
36511
36512
36513  # Publish this variable in the help.
36514
36515
36516  if test "x$STRIP" = x; then
36517    # The variable is not set by user, try to locate tool using the code snippet
36518    if test -n "$ac_tool_prefix"; then
36519  for ac_prog in strip
36520  do
36521    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36522set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36524$as_echo_n "checking for $ac_word... " >&6; }
36525if ${ac_cv_prog_STRIP+:} false; then :
36526  $as_echo_n "(cached) " >&6
36527else
36528  if test -n "$STRIP"; then
36529  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36530else
36531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36532for as_dir in $PATH
36533do
36534  IFS=$as_save_IFS
36535  test -z "$as_dir" && as_dir=.
36536    for ac_exec_ext in '' $ac_executable_extensions; do
36537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36538    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36540    break 2
36541  fi
36542done
36543  done
36544IFS=$as_save_IFS
36545
36546fi
36547fi
36548STRIP=$ac_cv_prog_STRIP
36549if test -n "$STRIP"; then
36550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36551$as_echo "$STRIP" >&6; }
36552else
36553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36554$as_echo "no" >&6; }
36555fi
36556
36557
36558    test -n "$STRIP" && break
36559  done
36560fi
36561if test -z "$STRIP"; then
36562  ac_ct_STRIP=$STRIP
36563  for ac_prog in strip
36564do
36565  # Extract the first word of "$ac_prog", so it can be a program name with args.
36566set dummy $ac_prog; ac_word=$2
36567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36568$as_echo_n "checking for $ac_word... " >&6; }
36569if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36570  $as_echo_n "(cached) " >&6
36571else
36572  if test -n "$ac_ct_STRIP"; then
36573  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36574else
36575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36576for as_dir in $PATH
36577do
36578  IFS=$as_save_IFS
36579  test -z "$as_dir" && as_dir=.
36580    for ac_exec_ext in '' $ac_executable_extensions; do
36581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36582    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36584    break 2
36585  fi
36586done
36587  done
36588IFS=$as_save_IFS
36589
36590fi
36591fi
36592ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36593if test -n "$ac_ct_STRIP"; then
36594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36595$as_echo "$ac_ct_STRIP" >&6; }
36596else
36597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36598$as_echo "no" >&6; }
36599fi
36600
36601
36602  test -n "$ac_ct_STRIP" && break
36603done
36604
36605  if test "x$ac_ct_STRIP" = x; then
36606    STRIP=""
36607  else
36608    case $cross_compiling:$ac_tool_warned in
36609yes:)
36610{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36611$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36612ac_tool_warned=yes ;;
36613esac
36614    STRIP=$ac_ct_STRIP
36615  fi
36616fi
36617
36618  else
36619    # The variable is set, but is it from the command line or the environment?
36620
36621    # Try to remove the string !STRIP! from our list.
36622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36624      # If it failed, the variable was not from the command line. Ignore it,
36625      # but warn the user (except for BASH, which is always set by the calling BASH).
36626      if test "xSTRIP" != xBASH; then
36627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36628$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36629      fi
36630      # Try to locate tool using the code snippet
36631      if test -n "$ac_tool_prefix"; then
36632  for ac_prog in strip
36633  do
36634    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36635set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36637$as_echo_n "checking for $ac_word... " >&6; }
36638if ${ac_cv_prog_STRIP+:} false; then :
36639  $as_echo_n "(cached) " >&6
36640else
36641  if test -n "$STRIP"; then
36642  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36643else
36644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36645for as_dir in $PATH
36646do
36647  IFS=$as_save_IFS
36648  test -z "$as_dir" && as_dir=.
36649    for ac_exec_ext in '' $ac_executable_extensions; do
36650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36651    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36653    break 2
36654  fi
36655done
36656  done
36657IFS=$as_save_IFS
36658
36659fi
36660fi
36661STRIP=$ac_cv_prog_STRIP
36662if test -n "$STRIP"; then
36663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36664$as_echo "$STRIP" >&6; }
36665else
36666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36667$as_echo "no" >&6; }
36668fi
36669
36670
36671    test -n "$STRIP" && break
36672  done
36673fi
36674if test -z "$STRIP"; then
36675  ac_ct_STRIP=$STRIP
36676  for ac_prog in strip
36677do
36678  # Extract the first word of "$ac_prog", so it can be a program name with args.
36679set dummy $ac_prog; ac_word=$2
36680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36681$as_echo_n "checking for $ac_word... " >&6; }
36682if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36683  $as_echo_n "(cached) " >&6
36684else
36685  if test -n "$ac_ct_STRIP"; then
36686  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36687else
36688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36689for as_dir in $PATH
36690do
36691  IFS=$as_save_IFS
36692  test -z "$as_dir" && as_dir=.
36693    for ac_exec_ext in '' $ac_executable_extensions; do
36694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36695    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36697    break 2
36698  fi
36699done
36700  done
36701IFS=$as_save_IFS
36702
36703fi
36704fi
36705ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36706if test -n "$ac_ct_STRIP"; then
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36708$as_echo "$ac_ct_STRIP" >&6; }
36709else
36710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36711$as_echo "no" >&6; }
36712fi
36713
36714
36715  test -n "$ac_ct_STRIP" && break
36716done
36717
36718  if test "x$ac_ct_STRIP" = x; then
36719    STRIP=""
36720  else
36721    case $cross_compiling:$ac_tool_warned in
36722yes:)
36723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36725ac_tool_warned=yes ;;
36726esac
36727    STRIP=$ac_ct_STRIP
36728  fi
36729fi
36730
36731    else
36732      # If it succeeded, then it was overridden by the user. We will use it
36733      # for the tool.
36734
36735      # First remove it from the list of overridden variables, so we can test
36736      # for unknown variables in the end.
36737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36738
36739      # Check if the provided tool contains a complete path.
36740      tool_specified="$STRIP"
36741      tool_basename="${tool_specified##*/}"
36742      if test "x$tool_basename" = "x$tool_specified"; then
36743        # A command without a complete path is provided, search $PATH.
36744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36745$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36746        # Extract the first word of "$tool_basename", so it can be a program name with args.
36747set dummy $tool_basename; ac_word=$2
36748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36749$as_echo_n "checking for $ac_word... " >&6; }
36750if ${ac_cv_path_STRIP+:} false; then :
36751  $as_echo_n "(cached) " >&6
36752else
36753  case $STRIP in
36754  [\\/]* | ?:[\\/]*)
36755  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36756  ;;
36757  *)
36758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36759for as_dir in $PATH
36760do
36761  IFS=$as_save_IFS
36762  test -z "$as_dir" && as_dir=.
36763    for ac_exec_ext in '' $ac_executable_extensions; do
36764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36765    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36767    break 2
36768  fi
36769done
36770  done
36771IFS=$as_save_IFS
36772
36773  ;;
36774esac
36775fi
36776STRIP=$ac_cv_path_STRIP
36777if test -n "$STRIP"; then
36778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36779$as_echo "$STRIP" >&6; }
36780else
36781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36782$as_echo "no" >&6; }
36783fi
36784
36785
36786        if test "x$STRIP" = x; then
36787          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36788        fi
36789      else
36790        # Otherwise we believe it is a complete path. Use it as it is.
36791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36792$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36794$as_echo_n "checking for STRIP... " >&6; }
36795        if test ! -x "$tool_specified"; then
36796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36797$as_echo "not found" >&6; }
36798          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36799        fi
36800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36801$as_echo "$tool_specified" >&6; }
36802      fi
36803    fi
36804  fi
36805
36806
36807
36808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36809
36810  # First separate the path from the arguments. This will split at the first
36811  # space.
36812  complete="$STRIP"
36813  path="${complete%% *}"
36814  tmp="$complete EOL"
36815  arguments="${tmp#* }"
36816
36817  # Input might be given as Windows format, start by converting to
36818  # unix format.
36819  new_path=`$CYGPATH -u "$path"`
36820
36821  # Now try to locate executable using which
36822  new_path=`$WHICH "$new_path" 2> /dev/null`
36823  # bat and cmd files are not always considered executable in cygwin causing which
36824  # to not find them
36825  if test "x$new_path" = x \
36826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36828    new_path=`$CYGPATH -u "$path"`
36829  fi
36830  if test "x$new_path" = x; then
36831    # Oops. Which didn't find the executable.
36832    # The splitting of arguments from the executable at a space might have been incorrect,
36833    # since paths with space are more likely in Windows. Give it another try with the whole
36834    # argument.
36835    path="$complete"
36836    arguments="EOL"
36837    new_path=`$CYGPATH -u "$path"`
36838    new_path=`$WHICH "$new_path" 2> /dev/null`
36839    # bat and cmd files are not always considered executable in cygwin causing which
36840    # to not find them
36841    if test "x$new_path" = x \
36842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36844      new_path=`$CYGPATH -u "$path"`
36845    fi
36846    if test "x$new_path" = x; then
36847      # It's still not found. Now this is an unrecoverable error.
36848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36849$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36850      has_space=`$ECHO "$complete" | $GREP " "`
36851      if test "x$has_space" != x; then
36852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36854      fi
36855      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36856    fi
36857  fi
36858
36859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36862  # "foo.exe" is OK but "foo" is an error.
36863  #
36864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36865  # It is also a way to make sure we got the proper file name for the real test later on.
36866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36867  if test "x$test_shortpath" = x; then
36868    # Short path failed, file does not exist as specified.
36869    # Try adding .exe or .cmd
36870    if test -f "${new_path}.exe"; then
36871      input_to_shortpath="${new_path}.exe"
36872    elif test -f "${new_path}.cmd"; then
36873      input_to_shortpath="${new_path}.cmd"
36874    else
36875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36876$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36879      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36880    fi
36881  else
36882    input_to_shortpath="$new_path"
36883  fi
36884
36885  # Call helper function which possibly converts this using DOS-style short mode.
36886  # If so, the updated path is stored in $new_path.
36887  new_path="$input_to_shortpath"
36888
36889  input_path="$input_to_shortpath"
36890  # Check if we need to convert this using DOS-style short mode. If the path
36891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36892  # take no chances and rewrite it.
36893  # Note: m4 eats our [], so we need to use [ and ] instead.
36894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36895  if test "x$has_forbidden_chars" != x; then
36896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36900      # Going to short mode and back again did indeed matter. Since short mode is
36901      # case insensitive, let's make it lowercase to improve readability.
36902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36903      # Now convert it back to Unix-stile (cygpath)
36904      input_path=`$CYGPATH -u "$shortmode_path"`
36905      new_path="$input_path"
36906    fi
36907  fi
36908
36909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36910  if test "x$test_cygdrive_prefix" = x; then
36911    # As a simple fix, exclude /usr/bin since it's not a real path.
36912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36914      # a path prefixed by /cygdrive for fixpath to work.
36915      new_path="$CYGWIN_ROOT_PATH$input_path"
36916    fi
36917  fi
36918
36919  # remove trailing .exe if any
36920  new_path="${new_path/%.exe/}"
36921
36922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36923
36924  # First separate the path from the arguments. This will split at the first
36925  # space.
36926  complete="$STRIP"
36927  path="${complete%% *}"
36928  tmp="$complete EOL"
36929  arguments="${tmp#* }"
36930
36931  # Input might be given as Windows format, start by converting to
36932  # unix format.
36933  new_path="$path"
36934
36935  windows_path="$new_path"
36936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36937    unix_path=`$CYGPATH -u "$windows_path"`
36938    new_path="$unix_path"
36939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36941    new_path="$unix_path"
36942  fi
36943
36944
36945  # Now try to locate executable using which
36946  new_path=`$WHICH "$new_path" 2> /dev/null`
36947
36948  if test "x$new_path" = x; then
36949    # Oops. Which didn't find the executable.
36950    # The splitting of arguments from the executable at a space might have been incorrect,
36951    # since paths with space are more likely in Windows. Give it another try with the whole
36952    # argument.
36953    path="$complete"
36954    arguments="EOL"
36955    new_path="$path"
36956
36957  windows_path="$new_path"
36958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36959    unix_path=`$CYGPATH -u "$windows_path"`
36960    new_path="$unix_path"
36961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36963    new_path="$unix_path"
36964  fi
36965
36966
36967    new_path=`$WHICH "$new_path" 2> /dev/null`
36968
36969    if test "x$new_path" = x; then
36970      # It's still not found. Now this is an unrecoverable error.
36971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36972$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36973      has_space=`$ECHO "$complete" | $GREP " "`
36974      if test "x$has_space" != x; then
36975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36977      fi
36978      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36979    fi
36980  fi
36981
36982  # Now new_path has a complete unix path to the binary
36983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36984    # Keep paths in /bin as-is, but remove trailing .exe if any
36985    new_path="${new_path/%.exe/}"
36986    # Do not save /bin paths to all_fixpath_prefixes!
36987  else
36988    # Not in mixed or Windows style, start by that.
36989    new_path=`cmd //c echo $new_path`
36990
36991  input_path="$new_path"
36992  # Check if we need to convert this using DOS-style short mode. If the path
36993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36994  # take no chances and rewrite it.
36995  # Note: m4 eats our [], so we need to use [ and ] instead.
36996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36997  if test "x$has_forbidden_chars" != x; then
36998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37000  fi
37001
37002    # Output is in $new_path
37003
37004  windows_path="$new_path"
37005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006    unix_path=`$CYGPATH -u "$windows_path"`
37007    new_path="$unix_path"
37008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37010    new_path="$unix_path"
37011  fi
37012
37013    # remove trailing .exe if any
37014    new_path="${new_path/%.exe/}"
37015
37016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37018  fi
37019
37020  else
37021    # We're on a posix platform. Hooray! :)
37022    # First separate the path from the arguments. This will split at the first
37023    # space.
37024    complete="$STRIP"
37025    path="${complete%% *}"
37026    tmp="$complete EOL"
37027    arguments="${tmp#* }"
37028
37029    # Cannot rely on the command "which" here since it doesn't always work.
37030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37031    if test -z "$is_absolute_path"; then
37032      # Path to executable is not absolute. Find it.
37033      IFS_save="$IFS"
37034      IFS=:
37035      for p in $PATH; do
37036        if test -f "$p/$path" && test -x "$p/$path"; then
37037          new_path="$p/$path"
37038          break
37039        fi
37040      done
37041      IFS="$IFS_save"
37042    else
37043      # This is an absolute path, we can use it without further modifications.
37044      new_path="$path"
37045    fi
37046
37047    if test "x$new_path" = x; then
37048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37049$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37050      has_space=`$ECHO "$complete" | $GREP " "`
37051      if test "x$has_space" != x; then
37052        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37054      fi
37055      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37056    fi
37057  fi
37058
37059  # Now join together the path and the arguments once again
37060  if test "x$arguments" != xEOL; then
37061    new_complete="$new_path ${arguments% *}"
37062  else
37063    new_complete="$new_path"
37064  fi
37065
37066  if test "x$complete" != "x$new_complete"; then
37067    STRIP="$new_complete"
37068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37069$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37070  fi
37071
37072
37073
37074  # Publish this variable in the help.
37075
37076
37077  if test "x$NM" = x; then
37078    # The variable is not set by user, try to locate tool using the code snippet
37079    if test -n "$ac_tool_prefix"; then
37080  for ac_prog in nm
37081  do
37082    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37085$as_echo_n "checking for $ac_word... " >&6; }
37086if ${ac_cv_prog_NM+:} false; then :
37087  $as_echo_n "(cached) " >&6
37088else
37089  if test -n "$NM"; then
37090  ac_cv_prog_NM="$NM" # Let the user override the test.
37091else
37092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37093for as_dir in $PATH
37094do
37095  IFS=$as_save_IFS
37096  test -z "$as_dir" && as_dir=.
37097    for ac_exec_ext in '' $ac_executable_extensions; do
37098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37099    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37101    break 2
37102  fi
37103done
37104  done
37105IFS=$as_save_IFS
37106
37107fi
37108fi
37109NM=$ac_cv_prog_NM
37110if test -n "$NM"; then
37111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37112$as_echo "$NM" >&6; }
37113else
37114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37115$as_echo "no" >&6; }
37116fi
37117
37118
37119    test -n "$NM" && break
37120  done
37121fi
37122if test -z "$NM"; then
37123  ac_ct_NM=$NM
37124  for ac_prog in nm
37125do
37126  # Extract the first word of "$ac_prog", so it can be a program name with args.
37127set dummy $ac_prog; ac_word=$2
37128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37129$as_echo_n "checking for $ac_word... " >&6; }
37130if ${ac_cv_prog_ac_ct_NM+:} false; then :
37131  $as_echo_n "(cached) " >&6
37132else
37133  if test -n "$ac_ct_NM"; then
37134  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37135else
37136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37137for as_dir in $PATH
37138do
37139  IFS=$as_save_IFS
37140  test -z "$as_dir" && as_dir=.
37141    for ac_exec_ext in '' $ac_executable_extensions; do
37142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37143    ac_cv_prog_ac_ct_NM="$ac_prog"
37144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37145    break 2
37146  fi
37147done
37148  done
37149IFS=$as_save_IFS
37150
37151fi
37152fi
37153ac_ct_NM=$ac_cv_prog_ac_ct_NM
37154if test -n "$ac_ct_NM"; then
37155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37156$as_echo "$ac_ct_NM" >&6; }
37157else
37158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37159$as_echo "no" >&6; }
37160fi
37161
37162
37163  test -n "$ac_ct_NM" && break
37164done
37165
37166  if test "x$ac_ct_NM" = x; then
37167    NM=""
37168  else
37169    case $cross_compiling:$ac_tool_warned in
37170yes:)
37171{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37172$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37173ac_tool_warned=yes ;;
37174esac
37175    NM=$ac_ct_NM
37176  fi
37177fi
37178
37179  else
37180    # The variable is set, but is it from the command line or the environment?
37181
37182    # Try to remove the string !NM! from our list.
37183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37185      # If it failed, the variable was not from the command line. Ignore it,
37186      # but warn the user (except for BASH, which is always set by the calling BASH).
37187      if test "xNM" != xBASH; then
37188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37189$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37190      fi
37191      # Try to locate tool using the code snippet
37192      if test -n "$ac_tool_prefix"; then
37193  for ac_prog in nm
37194  do
37195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37198$as_echo_n "checking for $ac_word... " >&6; }
37199if ${ac_cv_prog_NM+:} false; then :
37200  $as_echo_n "(cached) " >&6
37201else
37202  if test -n "$NM"; then
37203  ac_cv_prog_NM="$NM" # Let the user override the test.
37204else
37205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37206for as_dir in $PATH
37207do
37208  IFS=$as_save_IFS
37209  test -z "$as_dir" && as_dir=.
37210    for ac_exec_ext in '' $ac_executable_extensions; do
37211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37212    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37214    break 2
37215  fi
37216done
37217  done
37218IFS=$as_save_IFS
37219
37220fi
37221fi
37222NM=$ac_cv_prog_NM
37223if test -n "$NM"; then
37224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37225$as_echo "$NM" >&6; }
37226else
37227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37228$as_echo "no" >&6; }
37229fi
37230
37231
37232    test -n "$NM" && break
37233  done
37234fi
37235if test -z "$NM"; then
37236  ac_ct_NM=$NM
37237  for ac_prog in nm
37238do
37239  # Extract the first word of "$ac_prog", so it can be a program name with args.
37240set dummy $ac_prog; ac_word=$2
37241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37242$as_echo_n "checking for $ac_word... " >&6; }
37243if ${ac_cv_prog_ac_ct_NM+:} false; then :
37244  $as_echo_n "(cached) " >&6
37245else
37246  if test -n "$ac_ct_NM"; then
37247  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37248else
37249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37250for as_dir in $PATH
37251do
37252  IFS=$as_save_IFS
37253  test -z "$as_dir" && as_dir=.
37254    for ac_exec_ext in '' $ac_executable_extensions; do
37255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37256    ac_cv_prog_ac_ct_NM="$ac_prog"
37257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37258    break 2
37259  fi
37260done
37261  done
37262IFS=$as_save_IFS
37263
37264fi
37265fi
37266ac_ct_NM=$ac_cv_prog_ac_ct_NM
37267if test -n "$ac_ct_NM"; then
37268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37269$as_echo "$ac_ct_NM" >&6; }
37270else
37271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37272$as_echo "no" >&6; }
37273fi
37274
37275
37276  test -n "$ac_ct_NM" && break
37277done
37278
37279  if test "x$ac_ct_NM" = x; then
37280    NM=""
37281  else
37282    case $cross_compiling:$ac_tool_warned in
37283yes:)
37284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37286ac_tool_warned=yes ;;
37287esac
37288    NM=$ac_ct_NM
37289  fi
37290fi
37291
37292    else
37293      # If it succeeded, then it was overridden by the user. We will use it
37294      # for the tool.
37295
37296      # First remove it from the list of overridden variables, so we can test
37297      # for unknown variables in the end.
37298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37299
37300      # Check if the provided tool contains a complete path.
37301      tool_specified="$NM"
37302      tool_basename="${tool_specified##*/}"
37303      if test "x$tool_basename" = "x$tool_specified"; then
37304        # A command without a complete path is provided, search $PATH.
37305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37306$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37307        # Extract the first word of "$tool_basename", so it can be a program name with args.
37308set dummy $tool_basename; ac_word=$2
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37310$as_echo_n "checking for $ac_word... " >&6; }
37311if ${ac_cv_path_NM+:} false; then :
37312  $as_echo_n "(cached) " >&6
37313else
37314  case $NM in
37315  [\\/]* | ?:[\\/]*)
37316  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37317  ;;
37318  *)
37319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37320for as_dir in $PATH
37321do
37322  IFS=$as_save_IFS
37323  test -z "$as_dir" && as_dir=.
37324    for ac_exec_ext in '' $ac_executable_extensions; do
37325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37326    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37328    break 2
37329  fi
37330done
37331  done
37332IFS=$as_save_IFS
37333
37334  ;;
37335esac
37336fi
37337NM=$ac_cv_path_NM
37338if test -n "$NM"; then
37339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37340$as_echo "$NM" >&6; }
37341else
37342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37343$as_echo "no" >&6; }
37344fi
37345
37346
37347        if test "x$NM" = x; then
37348          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37349        fi
37350      else
37351        # Otherwise we believe it is a complete path. Use it as it is.
37352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37353$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37355$as_echo_n "checking for NM... " >&6; }
37356        if test ! -x "$tool_specified"; then
37357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37358$as_echo "not found" >&6; }
37359          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37360        fi
37361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37362$as_echo "$tool_specified" >&6; }
37363      fi
37364    fi
37365  fi
37366
37367
37368
37369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37370
37371  # First separate the path from the arguments. This will split at the first
37372  # space.
37373  complete="$NM"
37374  path="${complete%% *}"
37375  tmp="$complete EOL"
37376  arguments="${tmp#* }"
37377
37378  # Input might be given as Windows format, start by converting to
37379  # unix format.
37380  new_path=`$CYGPATH -u "$path"`
37381
37382  # Now try to locate executable using which
37383  new_path=`$WHICH "$new_path" 2> /dev/null`
37384  # bat and cmd files are not always considered executable in cygwin causing which
37385  # to not find them
37386  if test "x$new_path" = x \
37387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37389    new_path=`$CYGPATH -u "$path"`
37390  fi
37391  if test "x$new_path" = x; then
37392    # Oops. Which didn't find the executable.
37393    # The splitting of arguments from the executable at a space might have been incorrect,
37394    # since paths with space are more likely in Windows. Give it another try with the whole
37395    # argument.
37396    path="$complete"
37397    arguments="EOL"
37398    new_path=`$CYGPATH -u "$path"`
37399    new_path=`$WHICH "$new_path" 2> /dev/null`
37400    # bat and cmd files are not always considered executable in cygwin causing which
37401    # to not find them
37402    if test "x$new_path" = x \
37403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37405      new_path=`$CYGPATH -u "$path"`
37406    fi
37407    if test "x$new_path" = x; then
37408      # It's still not found. Now this is an unrecoverable error.
37409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37410$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37411      has_space=`$ECHO "$complete" | $GREP " "`
37412      if test "x$has_space" != x; then
37413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37415      fi
37416      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37417    fi
37418  fi
37419
37420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37423  # "foo.exe" is OK but "foo" is an error.
37424  #
37425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37426  # It is also a way to make sure we got the proper file name for the real test later on.
37427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37428  if test "x$test_shortpath" = x; then
37429    # Short path failed, file does not exist as specified.
37430    # Try adding .exe or .cmd
37431    if test -f "${new_path}.exe"; then
37432      input_to_shortpath="${new_path}.exe"
37433    elif test -f "${new_path}.cmd"; then
37434      input_to_shortpath="${new_path}.cmd"
37435    else
37436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37437$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37440      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37441    fi
37442  else
37443    input_to_shortpath="$new_path"
37444  fi
37445
37446  # Call helper function which possibly converts this using DOS-style short mode.
37447  # If so, the updated path is stored in $new_path.
37448  new_path="$input_to_shortpath"
37449
37450  input_path="$input_to_shortpath"
37451  # Check if we need to convert this using DOS-style short mode. If the path
37452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37453  # take no chances and rewrite it.
37454  # Note: m4 eats our [], so we need to use [ and ] instead.
37455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37456  if test "x$has_forbidden_chars" != x; then
37457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37461      # Going to short mode and back again did indeed matter. Since short mode is
37462      # case insensitive, let's make it lowercase to improve readability.
37463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37464      # Now convert it back to Unix-stile (cygpath)
37465      input_path=`$CYGPATH -u "$shortmode_path"`
37466      new_path="$input_path"
37467    fi
37468  fi
37469
37470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37471  if test "x$test_cygdrive_prefix" = x; then
37472    # As a simple fix, exclude /usr/bin since it's not a real path.
37473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37475      # a path prefixed by /cygdrive for fixpath to work.
37476      new_path="$CYGWIN_ROOT_PATH$input_path"
37477    fi
37478  fi
37479
37480  # remove trailing .exe if any
37481  new_path="${new_path/%.exe/}"
37482
37483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37484
37485  # First separate the path from the arguments. This will split at the first
37486  # space.
37487  complete="$NM"
37488  path="${complete%% *}"
37489  tmp="$complete EOL"
37490  arguments="${tmp#* }"
37491
37492  # Input might be given as Windows format, start by converting to
37493  # unix format.
37494  new_path="$path"
37495
37496  windows_path="$new_path"
37497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37498    unix_path=`$CYGPATH -u "$windows_path"`
37499    new_path="$unix_path"
37500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37502    new_path="$unix_path"
37503  fi
37504
37505
37506  # Now try to locate executable using which
37507  new_path=`$WHICH "$new_path" 2> /dev/null`
37508
37509  if test "x$new_path" = x; then
37510    # Oops. Which didn't find the executable.
37511    # The splitting of arguments from the executable at a space might have been incorrect,
37512    # since paths with space are more likely in Windows. Give it another try with the whole
37513    # argument.
37514    path="$complete"
37515    arguments="EOL"
37516    new_path="$path"
37517
37518  windows_path="$new_path"
37519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37520    unix_path=`$CYGPATH -u "$windows_path"`
37521    new_path="$unix_path"
37522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37524    new_path="$unix_path"
37525  fi
37526
37527
37528    new_path=`$WHICH "$new_path" 2> /dev/null`
37529
37530    if test "x$new_path" = x; then
37531      # It's still not found. Now this is an unrecoverable error.
37532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37533$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37534      has_space=`$ECHO "$complete" | $GREP " "`
37535      if test "x$has_space" != x; then
37536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37538      fi
37539      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37540    fi
37541  fi
37542
37543  # Now new_path has a complete unix path to the binary
37544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37545    # Keep paths in /bin as-is, but remove trailing .exe if any
37546    new_path="${new_path/%.exe/}"
37547    # Do not save /bin paths to all_fixpath_prefixes!
37548  else
37549    # Not in mixed or Windows style, start by that.
37550    new_path=`cmd //c echo $new_path`
37551
37552  input_path="$new_path"
37553  # Check if we need to convert this using DOS-style short mode. If the path
37554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37555  # take no chances and rewrite it.
37556  # Note: m4 eats our [], so we need to use [ and ] instead.
37557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37558  if test "x$has_forbidden_chars" != x; then
37559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37561  fi
37562
37563    # Output is in $new_path
37564
37565  windows_path="$new_path"
37566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37567    unix_path=`$CYGPATH -u "$windows_path"`
37568    new_path="$unix_path"
37569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37571    new_path="$unix_path"
37572  fi
37573
37574    # remove trailing .exe if any
37575    new_path="${new_path/%.exe/}"
37576
37577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37579  fi
37580
37581  else
37582    # We're on a posix platform. Hooray! :)
37583    # First separate the path from the arguments. This will split at the first
37584    # space.
37585    complete="$NM"
37586    path="${complete%% *}"
37587    tmp="$complete EOL"
37588    arguments="${tmp#* }"
37589
37590    # Cannot rely on the command "which" here since it doesn't always work.
37591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37592    if test -z "$is_absolute_path"; then
37593      # Path to executable is not absolute. Find it.
37594      IFS_save="$IFS"
37595      IFS=:
37596      for p in $PATH; do
37597        if test -f "$p/$path" && test -x "$p/$path"; then
37598          new_path="$p/$path"
37599          break
37600        fi
37601      done
37602      IFS="$IFS_save"
37603    else
37604      # This is an absolute path, we can use it without further modifications.
37605      new_path="$path"
37606    fi
37607
37608    if test "x$new_path" = x; then
37609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37610$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37611      has_space=`$ECHO "$complete" | $GREP " "`
37612      if test "x$has_space" != x; then
37613        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37615      fi
37616      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37617    fi
37618  fi
37619
37620  # Now join together the path and the arguments once again
37621  if test "x$arguments" != xEOL; then
37622    new_complete="$new_path ${arguments% *}"
37623  else
37624    new_complete="$new_path"
37625  fi
37626
37627  if test "x$complete" != "x$new_complete"; then
37628    NM="$new_complete"
37629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37630$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37631  fi
37632
37633    GNM="$NM"
37634
37635  fi
37636
37637  # objcopy is used for moving debug symbols to separate files when
37638  # full debug symbols are enabled.
37639  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37640
37641
37642  # Publish this variable in the help.
37643
37644
37645  if test "x$OBJCOPY" = x; then
37646    # The variable is not set by user, try to locate tool using the code snippet
37647    if test -n "$ac_tool_prefix"; then
37648  for ac_prog in gobjcopy objcopy
37649  do
37650    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37651set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37653$as_echo_n "checking for $ac_word... " >&6; }
37654if ${ac_cv_prog_OBJCOPY+:} false; then :
37655  $as_echo_n "(cached) " >&6
37656else
37657  if test -n "$OBJCOPY"; then
37658  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37659else
37660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37661for as_dir in $PATH
37662do
37663  IFS=$as_save_IFS
37664  test -z "$as_dir" && as_dir=.
37665    for ac_exec_ext in '' $ac_executable_extensions; do
37666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37667    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37669    break 2
37670  fi
37671done
37672  done
37673IFS=$as_save_IFS
37674
37675fi
37676fi
37677OBJCOPY=$ac_cv_prog_OBJCOPY
37678if test -n "$OBJCOPY"; then
37679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37680$as_echo "$OBJCOPY" >&6; }
37681else
37682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37683$as_echo "no" >&6; }
37684fi
37685
37686
37687    test -n "$OBJCOPY" && break
37688  done
37689fi
37690if test -z "$OBJCOPY"; then
37691  ac_ct_OBJCOPY=$OBJCOPY
37692  for ac_prog in gobjcopy objcopy
37693do
37694  # Extract the first word of "$ac_prog", so it can be a program name with args.
37695set dummy $ac_prog; ac_word=$2
37696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37697$as_echo_n "checking for $ac_word... " >&6; }
37698if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37699  $as_echo_n "(cached) " >&6
37700else
37701  if test -n "$ac_ct_OBJCOPY"; then
37702  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37703else
37704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705for as_dir in $PATH
37706do
37707  IFS=$as_save_IFS
37708  test -z "$as_dir" && as_dir=.
37709    for ac_exec_ext in '' $ac_executable_extensions; do
37710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713    break 2
37714  fi
37715done
37716  done
37717IFS=$as_save_IFS
37718
37719fi
37720fi
37721ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37722if test -n "$ac_ct_OBJCOPY"; then
37723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37724$as_echo "$ac_ct_OBJCOPY" >&6; }
37725else
37726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37727$as_echo "no" >&6; }
37728fi
37729
37730
37731  test -n "$ac_ct_OBJCOPY" && break
37732done
37733
37734  if test "x$ac_ct_OBJCOPY" = x; then
37735    OBJCOPY=""
37736  else
37737    case $cross_compiling:$ac_tool_warned in
37738yes:)
37739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37741ac_tool_warned=yes ;;
37742esac
37743    OBJCOPY=$ac_ct_OBJCOPY
37744  fi
37745fi
37746
37747  else
37748    # The variable is set, but is it from the command line or the environment?
37749
37750    # Try to remove the string !OBJCOPY! from our list.
37751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37753      # If it failed, the variable was not from the command line. Ignore it,
37754      # but warn the user (except for BASH, which is always set by the calling BASH).
37755      if test "xOBJCOPY" != xBASH; then
37756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37757$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37758      fi
37759      # Try to locate tool using the code snippet
37760      if test -n "$ac_tool_prefix"; then
37761  for ac_prog in gobjcopy objcopy
37762  do
37763    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37764set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37766$as_echo_n "checking for $ac_word... " >&6; }
37767if ${ac_cv_prog_OBJCOPY+:} false; then :
37768  $as_echo_n "(cached) " >&6
37769else
37770  if test -n "$OBJCOPY"; then
37771  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37772else
37773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37774for as_dir in $PATH
37775do
37776  IFS=$as_save_IFS
37777  test -z "$as_dir" && as_dir=.
37778    for ac_exec_ext in '' $ac_executable_extensions; do
37779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37780    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37782    break 2
37783  fi
37784done
37785  done
37786IFS=$as_save_IFS
37787
37788fi
37789fi
37790OBJCOPY=$ac_cv_prog_OBJCOPY
37791if test -n "$OBJCOPY"; then
37792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37793$as_echo "$OBJCOPY" >&6; }
37794else
37795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37796$as_echo "no" >&6; }
37797fi
37798
37799
37800    test -n "$OBJCOPY" && break
37801  done
37802fi
37803if test -z "$OBJCOPY"; then
37804  ac_ct_OBJCOPY=$OBJCOPY
37805  for ac_prog in gobjcopy objcopy
37806do
37807  # Extract the first word of "$ac_prog", so it can be a program name with args.
37808set dummy $ac_prog; ac_word=$2
37809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37810$as_echo_n "checking for $ac_word... " >&6; }
37811if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37812  $as_echo_n "(cached) " >&6
37813else
37814  if test -n "$ac_ct_OBJCOPY"; then
37815  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37816else
37817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37818for as_dir in $PATH
37819do
37820  IFS=$as_save_IFS
37821  test -z "$as_dir" && as_dir=.
37822    for ac_exec_ext in '' $ac_executable_extensions; do
37823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37824    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37826    break 2
37827  fi
37828done
37829  done
37830IFS=$as_save_IFS
37831
37832fi
37833fi
37834ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37835if test -n "$ac_ct_OBJCOPY"; then
37836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37837$as_echo "$ac_ct_OBJCOPY" >&6; }
37838else
37839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37840$as_echo "no" >&6; }
37841fi
37842
37843
37844  test -n "$ac_ct_OBJCOPY" && break
37845done
37846
37847  if test "x$ac_ct_OBJCOPY" = x; then
37848    OBJCOPY=""
37849  else
37850    case $cross_compiling:$ac_tool_warned in
37851yes:)
37852{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37853$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37854ac_tool_warned=yes ;;
37855esac
37856    OBJCOPY=$ac_ct_OBJCOPY
37857  fi
37858fi
37859
37860    else
37861      # If it succeeded, then it was overridden by the user. We will use it
37862      # for the tool.
37863
37864      # First remove it from the list of overridden variables, so we can test
37865      # for unknown variables in the end.
37866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37867
37868      # Check if the provided tool contains a complete path.
37869      tool_specified="$OBJCOPY"
37870      tool_basename="${tool_specified##*/}"
37871      if test "x$tool_basename" = "x$tool_specified"; then
37872        # A command without a complete path is provided, search $PATH.
37873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37874$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37875        # Extract the first word of "$tool_basename", so it can be a program name with args.
37876set dummy $tool_basename; ac_word=$2
37877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37878$as_echo_n "checking for $ac_word... " >&6; }
37879if ${ac_cv_path_OBJCOPY+:} false; then :
37880  $as_echo_n "(cached) " >&6
37881else
37882  case $OBJCOPY in
37883  [\\/]* | ?:[\\/]*)
37884  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37885  ;;
37886  *)
37887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37888for as_dir in $PATH
37889do
37890  IFS=$as_save_IFS
37891  test -z "$as_dir" && as_dir=.
37892    for ac_exec_ext in '' $ac_executable_extensions; do
37893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37894    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37896    break 2
37897  fi
37898done
37899  done
37900IFS=$as_save_IFS
37901
37902  ;;
37903esac
37904fi
37905OBJCOPY=$ac_cv_path_OBJCOPY
37906if test -n "$OBJCOPY"; then
37907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37908$as_echo "$OBJCOPY" >&6; }
37909else
37910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37911$as_echo "no" >&6; }
37912fi
37913
37914
37915        if test "x$OBJCOPY" = x; then
37916          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37917        fi
37918      else
37919        # Otherwise we believe it is a complete path. Use it as it is.
37920        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37921$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37923$as_echo_n "checking for OBJCOPY... " >&6; }
37924        if test ! -x "$tool_specified"; then
37925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37926$as_echo "not found" >&6; }
37927          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37928        fi
37929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37930$as_echo "$tool_specified" >&6; }
37931      fi
37932    fi
37933  fi
37934
37935
37936    # Only call fixup if objcopy was found.
37937    if test -n "$OBJCOPY"; then
37938
37939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37940
37941  # First separate the path from the arguments. This will split at the first
37942  # space.
37943  complete="$OBJCOPY"
37944  path="${complete%% *}"
37945  tmp="$complete EOL"
37946  arguments="${tmp#* }"
37947
37948  # Input might be given as Windows format, start by converting to
37949  # unix format.
37950  new_path=`$CYGPATH -u "$path"`
37951
37952  # Now try to locate executable using which
37953  new_path=`$WHICH "$new_path" 2> /dev/null`
37954  # bat and cmd files are not always considered executable in cygwin causing which
37955  # to not find them
37956  if test "x$new_path" = x \
37957      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37958      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37959    new_path=`$CYGPATH -u "$path"`
37960  fi
37961  if test "x$new_path" = x; then
37962    # Oops. Which didn't find the executable.
37963    # The splitting of arguments from the executable at a space might have been incorrect,
37964    # since paths with space are more likely in Windows. Give it another try with the whole
37965    # argument.
37966    path="$complete"
37967    arguments="EOL"
37968    new_path=`$CYGPATH -u "$path"`
37969    new_path=`$WHICH "$new_path" 2> /dev/null`
37970    # bat and cmd files are not always considered executable in cygwin causing which
37971    # to not find them
37972    if test "x$new_path" = x \
37973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37975      new_path=`$CYGPATH -u "$path"`
37976    fi
37977    if test "x$new_path" = x; then
37978      # It's still not found. Now this is an unrecoverable error.
37979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37980$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37981      has_space=`$ECHO "$complete" | $GREP " "`
37982      if test "x$has_space" != x; then
37983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37985      fi
37986      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37987    fi
37988  fi
37989
37990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37993  # "foo.exe" is OK but "foo" is an error.
37994  #
37995  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37996  # It is also a way to make sure we got the proper file name for the real test later on.
37997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37998  if test "x$test_shortpath" = x; then
37999    # Short path failed, file does not exist as specified.
38000    # Try adding .exe or .cmd
38001    if test -f "${new_path}.exe"; then
38002      input_to_shortpath="${new_path}.exe"
38003    elif test -f "${new_path}.cmd"; then
38004      input_to_shortpath="${new_path}.cmd"
38005    else
38006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38007$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38010      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38011    fi
38012  else
38013    input_to_shortpath="$new_path"
38014  fi
38015
38016  # Call helper function which possibly converts this using DOS-style short mode.
38017  # If so, the updated path is stored in $new_path.
38018  new_path="$input_to_shortpath"
38019
38020  input_path="$input_to_shortpath"
38021  # Check if we need to convert this using DOS-style short mode. If the path
38022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38023  # take no chances and rewrite it.
38024  # Note: m4 eats our [], so we need to use [ and ] instead.
38025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38026  if test "x$has_forbidden_chars" != x; then
38027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38031      # Going to short mode and back again did indeed matter. Since short mode is
38032      # case insensitive, let's make it lowercase to improve readability.
38033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38034      # Now convert it back to Unix-stile (cygpath)
38035      input_path=`$CYGPATH -u "$shortmode_path"`
38036      new_path="$input_path"
38037    fi
38038  fi
38039
38040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38041  if test "x$test_cygdrive_prefix" = x; then
38042    # As a simple fix, exclude /usr/bin since it's not a real path.
38043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38045      # a path prefixed by /cygdrive for fixpath to work.
38046      new_path="$CYGWIN_ROOT_PATH$input_path"
38047    fi
38048  fi
38049
38050  # remove trailing .exe if any
38051  new_path="${new_path/%.exe/}"
38052
38053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38054
38055  # First separate the path from the arguments. This will split at the first
38056  # space.
38057  complete="$OBJCOPY"
38058  path="${complete%% *}"
38059  tmp="$complete EOL"
38060  arguments="${tmp#* }"
38061
38062  # Input might be given as Windows format, start by converting to
38063  # unix format.
38064  new_path="$path"
38065
38066  windows_path="$new_path"
38067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38068    unix_path=`$CYGPATH -u "$windows_path"`
38069    new_path="$unix_path"
38070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38072    new_path="$unix_path"
38073  fi
38074
38075
38076  # Now try to locate executable using which
38077  new_path=`$WHICH "$new_path" 2> /dev/null`
38078
38079  if test "x$new_path" = x; then
38080    # Oops. Which didn't find the executable.
38081    # The splitting of arguments from the executable at a space might have been incorrect,
38082    # since paths with space are more likely in Windows. Give it another try with the whole
38083    # argument.
38084    path="$complete"
38085    arguments="EOL"
38086    new_path="$path"
38087
38088  windows_path="$new_path"
38089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38090    unix_path=`$CYGPATH -u "$windows_path"`
38091    new_path="$unix_path"
38092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38094    new_path="$unix_path"
38095  fi
38096
38097
38098    new_path=`$WHICH "$new_path" 2> /dev/null`
38099
38100    if test "x$new_path" = x; then
38101      # It's still not found. Now this is an unrecoverable error.
38102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38103$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38104      has_space=`$ECHO "$complete" | $GREP " "`
38105      if test "x$has_space" != x; then
38106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38108      fi
38109      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38110    fi
38111  fi
38112
38113  # Now new_path has a complete unix path to the binary
38114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38115    # Keep paths in /bin as-is, but remove trailing .exe if any
38116    new_path="${new_path/%.exe/}"
38117    # Do not save /bin paths to all_fixpath_prefixes!
38118  else
38119    # Not in mixed or Windows style, start by that.
38120    new_path=`cmd //c echo $new_path`
38121
38122  input_path="$new_path"
38123  # Check if we need to convert this using DOS-style short mode. If the path
38124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38125  # take no chances and rewrite it.
38126  # Note: m4 eats our [], so we need to use [ and ] instead.
38127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38128  if test "x$has_forbidden_chars" != x; then
38129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38131  fi
38132
38133    # Output is in $new_path
38134
38135  windows_path="$new_path"
38136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38137    unix_path=`$CYGPATH -u "$windows_path"`
38138    new_path="$unix_path"
38139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38141    new_path="$unix_path"
38142  fi
38143
38144    # remove trailing .exe if any
38145    new_path="${new_path/%.exe/}"
38146
38147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38149  fi
38150
38151  else
38152    # We're on a posix platform. Hooray! :)
38153    # First separate the path from the arguments. This will split at the first
38154    # space.
38155    complete="$OBJCOPY"
38156    path="${complete%% *}"
38157    tmp="$complete EOL"
38158    arguments="${tmp#* }"
38159
38160    # Cannot rely on the command "which" here since it doesn't always work.
38161    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38162    if test -z "$is_absolute_path"; then
38163      # Path to executable is not absolute. Find it.
38164      IFS_save="$IFS"
38165      IFS=:
38166      for p in $PATH; do
38167        if test -f "$p/$path" && test -x "$p/$path"; then
38168          new_path="$p/$path"
38169          break
38170        fi
38171      done
38172      IFS="$IFS_save"
38173    else
38174      # This is an absolute path, we can use it without further modifications.
38175      new_path="$path"
38176    fi
38177
38178    if test "x$new_path" = x; then
38179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38180$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38181      has_space=`$ECHO "$complete" | $GREP " "`
38182      if test "x$has_space" != x; then
38183        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38185      fi
38186      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38187    fi
38188  fi
38189
38190  # Now join together the path and the arguments once again
38191  if test "x$arguments" != xEOL; then
38192    new_complete="$new_path ${arguments% *}"
38193  else
38194    new_complete="$new_path"
38195  fi
38196
38197  if test "x$complete" != "x$new_complete"; then
38198    OBJCOPY="$new_complete"
38199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38200$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38201  fi
38202
38203    fi
38204  fi
38205
38206
38207
38208  # Publish this variable in the help.
38209
38210
38211  if test "x$OBJDUMP" = x; then
38212    # The variable is not set by user, try to locate tool using the code snippet
38213    if test -n "$ac_tool_prefix"; then
38214  for ac_prog in gobjdump objdump
38215  do
38216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38219$as_echo_n "checking for $ac_word... " >&6; }
38220if ${ac_cv_prog_OBJDUMP+:} false; then :
38221  $as_echo_n "(cached) " >&6
38222else
38223  if test -n "$OBJDUMP"; then
38224  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38225else
38226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38227for as_dir in $PATH
38228do
38229  IFS=$as_save_IFS
38230  test -z "$as_dir" && as_dir=.
38231    for ac_exec_ext in '' $ac_executable_extensions; do
38232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38233    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38235    break 2
38236  fi
38237done
38238  done
38239IFS=$as_save_IFS
38240
38241fi
38242fi
38243OBJDUMP=$ac_cv_prog_OBJDUMP
38244if test -n "$OBJDUMP"; then
38245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38246$as_echo "$OBJDUMP" >&6; }
38247else
38248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38249$as_echo "no" >&6; }
38250fi
38251
38252
38253    test -n "$OBJDUMP" && break
38254  done
38255fi
38256if test -z "$OBJDUMP"; then
38257  ac_ct_OBJDUMP=$OBJDUMP
38258  for ac_prog in gobjdump objdump
38259do
38260  # Extract the first word of "$ac_prog", so it can be a program name with args.
38261set dummy $ac_prog; ac_word=$2
38262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38263$as_echo_n "checking for $ac_word... " >&6; }
38264if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38265  $as_echo_n "(cached) " >&6
38266else
38267  if test -n "$ac_ct_OBJDUMP"; then
38268  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38269else
38270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38271for as_dir in $PATH
38272do
38273  IFS=$as_save_IFS
38274  test -z "$as_dir" && as_dir=.
38275    for ac_exec_ext in '' $ac_executable_extensions; do
38276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38277    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38279    break 2
38280  fi
38281done
38282  done
38283IFS=$as_save_IFS
38284
38285fi
38286fi
38287ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38288if test -n "$ac_ct_OBJDUMP"; then
38289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38290$as_echo "$ac_ct_OBJDUMP" >&6; }
38291else
38292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38293$as_echo "no" >&6; }
38294fi
38295
38296
38297  test -n "$ac_ct_OBJDUMP" && break
38298done
38299
38300  if test "x$ac_ct_OBJDUMP" = x; then
38301    OBJDUMP=""
38302  else
38303    case $cross_compiling:$ac_tool_warned in
38304yes:)
38305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38307ac_tool_warned=yes ;;
38308esac
38309    OBJDUMP=$ac_ct_OBJDUMP
38310  fi
38311fi
38312
38313  else
38314    # The variable is set, but is it from the command line or the environment?
38315
38316    # Try to remove the string !OBJDUMP! from our list.
38317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38319      # If it failed, the variable was not from the command line. Ignore it,
38320      # but warn the user (except for BASH, which is always set by the calling BASH).
38321      if test "xOBJDUMP" != xBASH; then
38322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38323$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38324      fi
38325      # Try to locate tool using the code snippet
38326      if test -n "$ac_tool_prefix"; then
38327  for ac_prog in gobjdump objdump
38328  do
38329    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38330set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38332$as_echo_n "checking for $ac_word... " >&6; }
38333if ${ac_cv_prog_OBJDUMP+:} false; then :
38334  $as_echo_n "(cached) " >&6
38335else
38336  if test -n "$OBJDUMP"; then
38337  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38338else
38339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38340for as_dir in $PATH
38341do
38342  IFS=$as_save_IFS
38343  test -z "$as_dir" && as_dir=.
38344    for ac_exec_ext in '' $ac_executable_extensions; do
38345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38346    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38348    break 2
38349  fi
38350done
38351  done
38352IFS=$as_save_IFS
38353
38354fi
38355fi
38356OBJDUMP=$ac_cv_prog_OBJDUMP
38357if test -n "$OBJDUMP"; then
38358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38359$as_echo "$OBJDUMP" >&6; }
38360else
38361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38362$as_echo "no" >&6; }
38363fi
38364
38365
38366    test -n "$OBJDUMP" && break
38367  done
38368fi
38369if test -z "$OBJDUMP"; then
38370  ac_ct_OBJDUMP=$OBJDUMP
38371  for ac_prog in gobjdump objdump
38372do
38373  # Extract the first word of "$ac_prog", so it can be a program name with args.
38374set dummy $ac_prog; ac_word=$2
38375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38376$as_echo_n "checking for $ac_word... " >&6; }
38377if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38378  $as_echo_n "(cached) " >&6
38379else
38380  if test -n "$ac_ct_OBJDUMP"; then
38381  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38382else
38383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38384for as_dir in $PATH
38385do
38386  IFS=$as_save_IFS
38387  test -z "$as_dir" && as_dir=.
38388    for ac_exec_ext in '' $ac_executable_extensions; do
38389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38390    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38392    break 2
38393  fi
38394done
38395  done
38396IFS=$as_save_IFS
38397
38398fi
38399fi
38400ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38401if test -n "$ac_ct_OBJDUMP"; then
38402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38403$as_echo "$ac_ct_OBJDUMP" >&6; }
38404else
38405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38406$as_echo "no" >&6; }
38407fi
38408
38409
38410  test -n "$ac_ct_OBJDUMP" && break
38411done
38412
38413  if test "x$ac_ct_OBJDUMP" = x; then
38414    OBJDUMP=""
38415  else
38416    case $cross_compiling:$ac_tool_warned in
38417yes:)
38418{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38419$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38420ac_tool_warned=yes ;;
38421esac
38422    OBJDUMP=$ac_ct_OBJDUMP
38423  fi
38424fi
38425
38426    else
38427      # If it succeeded, then it was overridden by the user. We will use it
38428      # for the tool.
38429
38430      # First remove it from the list of overridden variables, so we can test
38431      # for unknown variables in the end.
38432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38433
38434      # Check if the provided tool contains a complete path.
38435      tool_specified="$OBJDUMP"
38436      tool_basename="${tool_specified##*/}"
38437      if test "x$tool_basename" = "x$tool_specified"; then
38438        # A command without a complete path is provided, search $PATH.
38439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38440$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38441        # Extract the first word of "$tool_basename", so it can be a program name with args.
38442set dummy $tool_basename; ac_word=$2
38443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38444$as_echo_n "checking for $ac_word... " >&6; }
38445if ${ac_cv_path_OBJDUMP+:} false; then :
38446  $as_echo_n "(cached) " >&6
38447else
38448  case $OBJDUMP in
38449  [\\/]* | ?:[\\/]*)
38450  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38451  ;;
38452  *)
38453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38454for as_dir in $PATH
38455do
38456  IFS=$as_save_IFS
38457  test -z "$as_dir" && as_dir=.
38458    for ac_exec_ext in '' $ac_executable_extensions; do
38459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38460    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38462    break 2
38463  fi
38464done
38465  done
38466IFS=$as_save_IFS
38467
38468  ;;
38469esac
38470fi
38471OBJDUMP=$ac_cv_path_OBJDUMP
38472if test -n "$OBJDUMP"; then
38473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38474$as_echo "$OBJDUMP" >&6; }
38475else
38476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38477$as_echo "no" >&6; }
38478fi
38479
38480
38481        if test "x$OBJDUMP" = x; then
38482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38483        fi
38484      else
38485        # Otherwise we believe it is a complete path. Use it as it is.
38486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38487$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38489$as_echo_n "checking for OBJDUMP... " >&6; }
38490        if test ! -x "$tool_specified"; then
38491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38492$as_echo "not found" >&6; }
38493          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38494        fi
38495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38496$as_echo "$tool_specified" >&6; }
38497      fi
38498    fi
38499  fi
38500
38501
38502  if test "x$OBJDUMP" != x; then
38503    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38504    # bails if argument is missing.
38505
38506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38507
38508  # First separate the path from the arguments. This will split at the first
38509  # space.
38510  complete="$OBJDUMP"
38511  path="${complete%% *}"
38512  tmp="$complete EOL"
38513  arguments="${tmp#* }"
38514
38515  # Input might be given as Windows format, start by converting to
38516  # unix format.
38517  new_path=`$CYGPATH -u "$path"`
38518
38519  # Now try to locate executable using which
38520  new_path=`$WHICH "$new_path" 2> /dev/null`
38521  # bat and cmd files are not always considered executable in cygwin causing which
38522  # to not find them
38523  if test "x$new_path" = x \
38524      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38525      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38526    new_path=`$CYGPATH -u "$path"`
38527  fi
38528  if test "x$new_path" = x; then
38529    # Oops. Which didn't find the executable.
38530    # The splitting of arguments from the executable at a space might have been incorrect,
38531    # since paths with space are more likely in Windows. Give it another try with the whole
38532    # argument.
38533    path="$complete"
38534    arguments="EOL"
38535    new_path=`$CYGPATH -u "$path"`
38536    new_path=`$WHICH "$new_path" 2> /dev/null`
38537    # bat and cmd files are not always considered executable in cygwin causing which
38538    # to not find them
38539    if test "x$new_path" = x \
38540        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38541        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38542      new_path=`$CYGPATH -u "$path"`
38543    fi
38544    if test "x$new_path" = x; then
38545      # It's still not found. Now this is an unrecoverable error.
38546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38547$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38548      has_space=`$ECHO "$complete" | $GREP " "`
38549      if test "x$has_space" != x; then
38550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38552      fi
38553      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38554    fi
38555  fi
38556
38557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38560  # "foo.exe" is OK but "foo" is an error.
38561  #
38562  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38563  # It is also a way to make sure we got the proper file name for the real test later on.
38564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38565  if test "x$test_shortpath" = x; then
38566    # Short path failed, file does not exist as specified.
38567    # Try adding .exe or .cmd
38568    if test -f "${new_path}.exe"; then
38569      input_to_shortpath="${new_path}.exe"
38570    elif test -f "${new_path}.cmd"; then
38571      input_to_shortpath="${new_path}.cmd"
38572    else
38573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38574$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38577      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38578    fi
38579  else
38580    input_to_shortpath="$new_path"
38581  fi
38582
38583  # Call helper function which possibly converts this using DOS-style short mode.
38584  # If so, the updated path is stored in $new_path.
38585  new_path="$input_to_shortpath"
38586
38587  input_path="$input_to_shortpath"
38588  # Check if we need to convert this using DOS-style short mode. If the path
38589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38590  # take no chances and rewrite it.
38591  # Note: m4 eats our [], so we need to use [ and ] instead.
38592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38593  if test "x$has_forbidden_chars" != x; then
38594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38598      # Going to short mode and back again did indeed matter. Since short mode is
38599      # case insensitive, let's make it lowercase to improve readability.
38600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38601      # Now convert it back to Unix-stile (cygpath)
38602      input_path=`$CYGPATH -u "$shortmode_path"`
38603      new_path="$input_path"
38604    fi
38605  fi
38606
38607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38608  if test "x$test_cygdrive_prefix" = x; then
38609    # As a simple fix, exclude /usr/bin since it's not a real path.
38610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38612      # a path prefixed by /cygdrive for fixpath to work.
38613      new_path="$CYGWIN_ROOT_PATH$input_path"
38614    fi
38615  fi
38616
38617  # remove trailing .exe if any
38618  new_path="${new_path/%.exe/}"
38619
38620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38621
38622  # First separate the path from the arguments. This will split at the first
38623  # space.
38624  complete="$OBJDUMP"
38625  path="${complete%% *}"
38626  tmp="$complete EOL"
38627  arguments="${tmp#* }"
38628
38629  # Input might be given as Windows format, start by converting to
38630  # unix format.
38631  new_path="$path"
38632
38633  windows_path="$new_path"
38634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38635    unix_path=`$CYGPATH -u "$windows_path"`
38636    new_path="$unix_path"
38637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38639    new_path="$unix_path"
38640  fi
38641
38642
38643  # Now try to locate executable using which
38644  new_path=`$WHICH "$new_path" 2> /dev/null`
38645
38646  if test "x$new_path" = x; then
38647    # Oops. Which didn't find the executable.
38648    # The splitting of arguments from the executable at a space might have been incorrect,
38649    # since paths with space are more likely in Windows. Give it another try with the whole
38650    # argument.
38651    path="$complete"
38652    arguments="EOL"
38653    new_path="$path"
38654
38655  windows_path="$new_path"
38656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38657    unix_path=`$CYGPATH -u "$windows_path"`
38658    new_path="$unix_path"
38659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38661    new_path="$unix_path"
38662  fi
38663
38664
38665    new_path=`$WHICH "$new_path" 2> /dev/null`
38666
38667    if test "x$new_path" = x; then
38668      # It's still not found. Now this is an unrecoverable error.
38669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38670$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38671      has_space=`$ECHO "$complete" | $GREP " "`
38672      if test "x$has_space" != x; then
38673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38675      fi
38676      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38677    fi
38678  fi
38679
38680  # Now new_path has a complete unix path to the binary
38681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38682    # Keep paths in /bin as-is, but remove trailing .exe if any
38683    new_path="${new_path/%.exe/}"
38684    # Do not save /bin paths to all_fixpath_prefixes!
38685  else
38686    # Not in mixed or Windows style, start by that.
38687    new_path=`cmd //c echo $new_path`
38688
38689  input_path="$new_path"
38690  # Check if we need to convert this using DOS-style short mode. If the path
38691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38692  # take no chances and rewrite it.
38693  # Note: m4 eats our [], so we need to use [ and ] instead.
38694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38695  if test "x$has_forbidden_chars" != x; then
38696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38698  fi
38699
38700    # Output is in $new_path
38701
38702  windows_path="$new_path"
38703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38704    unix_path=`$CYGPATH -u "$windows_path"`
38705    new_path="$unix_path"
38706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38708    new_path="$unix_path"
38709  fi
38710
38711    # remove trailing .exe if any
38712    new_path="${new_path/%.exe/}"
38713
38714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38716  fi
38717
38718  else
38719    # We're on a posix platform. Hooray! :)
38720    # First separate the path from the arguments. This will split at the first
38721    # space.
38722    complete="$OBJDUMP"
38723    path="${complete%% *}"
38724    tmp="$complete EOL"
38725    arguments="${tmp#* }"
38726
38727    # Cannot rely on the command "which" here since it doesn't always work.
38728    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38729    if test -z "$is_absolute_path"; then
38730      # Path to executable is not absolute. Find it.
38731      IFS_save="$IFS"
38732      IFS=:
38733      for p in $PATH; do
38734        if test -f "$p/$path" && test -x "$p/$path"; then
38735          new_path="$p/$path"
38736          break
38737        fi
38738      done
38739      IFS="$IFS_save"
38740    else
38741      # This is an absolute path, we can use it without further modifications.
38742      new_path="$path"
38743    fi
38744
38745    if test "x$new_path" = x; then
38746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38747$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38748      has_space=`$ECHO "$complete" | $GREP " "`
38749      if test "x$has_space" != x; then
38750        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38751$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38752      fi
38753      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38754    fi
38755  fi
38756
38757  # Now join together the path and the arguments once again
38758  if test "x$arguments" != xEOL; then
38759    new_complete="$new_path ${arguments% *}"
38760  else
38761    new_complete="$new_path"
38762  fi
38763
38764  if test "x$complete" != "x$new_complete"; then
38765    OBJDUMP="$new_complete"
38766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38767$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38768  fi
38769
38770  fi
38771
38772
38773  # Restore old path.
38774  PATH="$OLD_PATH"
38775
38776  # Restore the flags to the user specified values.
38777  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38778  CFLAGS="$ORG_CFLAGS"
38779  CXXFLAGS="$ORG_CXXFLAGS"
38780  OBJCFLAGS="$ORG_OBJCFLAGS"
38781
38782
38783# Finally do some processing after the detection phase
38784
38785  if test "x$COMPILE_TYPE" = "xcross"; then
38786    # Now we need to find a C/C++ compiler that can build executables for the
38787    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38788    # used once. Also, we need to do this without adding a tools dir to the
38789    # path, otherwise we might pick up cross-compilers which don't use standard
38790    # naming.
38791
38792    # FIXME: we should list the discovered compilers as an exclude pattern!
38793    # If we do that, we can do this detection before POST_DETECTION, and still
38794    # find the build compilers in the tools dir, if needed.
38795
38796
38797  # Publish this variable in the help.
38798
38799
38800  if test "x$BUILD_CC" = x; then
38801    # The variable is not set by user, try to locate tool using the code snippet
38802    for ac_prog in cl cc gcc
38803do
38804  # Extract the first word of "$ac_prog", so it can be a program name with args.
38805set dummy $ac_prog; ac_word=$2
38806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38807$as_echo_n "checking for $ac_word... " >&6; }
38808if ${ac_cv_path_BUILD_CC+:} false; then :
38809  $as_echo_n "(cached) " >&6
38810else
38811  case $BUILD_CC in
38812  [\\/]* | ?:[\\/]*)
38813  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38814  ;;
38815  *)
38816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38817for as_dir in $PATH
38818do
38819  IFS=$as_save_IFS
38820  test -z "$as_dir" && as_dir=.
38821    for ac_exec_ext in '' $ac_executable_extensions; do
38822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38823    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38825    break 2
38826  fi
38827done
38828  done
38829IFS=$as_save_IFS
38830
38831  ;;
38832esac
38833fi
38834BUILD_CC=$ac_cv_path_BUILD_CC
38835if test -n "$BUILD_CC"; then
38836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38837$as_echo "$BUILD_CC" >&6; }
38838else
38839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38840$as_echo "no" >&6; }
38841fi
38842
38843
38844  test -n "$BUILD_CC" && break
38845done
38846
38847  else
38848    # The variable is set, but is it from the command line or the environment?
38849
38850    # Try to remove the string !BUILD_CC! from our list.
38851    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38852    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38853      # If it failed, the variable was not from the command line. Ignore it,
38854      # but warn the user (except for BASH, which is always set by the calling BASH).
38855      if test "xBUILD_CC" != xBASH; then
38856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38857$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38858      fi
38859      # Try to locate tool using the code snippet
38860      for ac_prog in cl cc gcc
38861do
38862  # Extract the first word of "$ac_prog", so it can be a program name with args.
38863set dummy $ac_prog; ac_word=$2
38864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38865$as_echo_n "checking for $ac_word... " >&6; }
38866if ${ac_cv_path_BUILD_CC+:} false; then :
38867  $as_echo_n "(cached) " >&6
38868else
38869  case $BUILD_CC in
38870  [\\/]* | ?:[\\/]*)
38871  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38872  ;;
38873  *)
38874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38875for as_dir in $PATH
38876do
38877  IFS=$as_save_IFS
38878  test -z "$as_dir" && as_dir=.
38879    for ac_exec_ext in '' $ac_executable_extensions; do
38880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38881    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38883    break 2
38884  fi
38885done
38886  done
38887IFS=$as_save_IFS
38888
38889  ;;
38890esac
38891fi
38892BUILD_CC=$ac_cv_path_BUILD_CC
38893if test -n "$BUILD_CC"; then
38894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38895$as_echo "$BUILD_CC" >&6; }
38896else
38897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38898$as_echo "no" >&6; }
38899fi
38900
38901
38902  test -n "$BUILD_CC" && break
38903done
38904
38905    else
38906      # If it succeeded, then it was overridden by the user. We will use it
38907      # for the tool.
38908
38909      # First remove it from the list of overridden variables, so we can test
38910      # for unknown variables in the end.
38911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38912
38913      # Check if the provided tool contains a complete path.
38914      tool_specified="$BUILD_CC"
38915      tool_basename="${tool_specified##*/}"
38916      if test "x$tool_basename" = "x$tool_specified"; then
38917        # A command without a complete path is provided, search $PATH.
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38919$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38920        # Extract the first word of "$tool_basename", so it can be a program name with args.
38921set dummy $tool_basename; ac_word=$2
38922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38923$as_echo_n "checking for $ac_word... " >&6; }
38924if ${ac_cv_path_BUILD_CC+:} false; then :
38925  $as_echo_n "(cached) " >&6
38926else
38927  case $BUILD_CC in
38928  [\\/]* | ?:[\\/]*)
38929  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38930  ;;
38931  *)
38932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38933for as_dir in $PATH
38934do
38935  IFS=$as_save_IFS
38936  test -z "$as_dir" && as_dir=.
38937    for ac_exec_ext in '' $ac_executable_extensions; do
38938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38939    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38941    break 2
38942  fi
38943done
38944  done
38945IFS=$as_save_IFS
38946
38947  ;;
38948esac
38949fi
38950BUILD_CC=$ac_cv_path_BUILD_CC
38951if test -n "$BUILD_CC"; then
38952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38953$as_echo "$BUILD_CC" >&6; }
38954else
38955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38956$as_echo "no" >&6; }
38957fi
38958
38959
38960        if test "x$BUILD_CC" = x; then
38961          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38962        fi
38963      else
38964        # Otherwise we believe it is a complete path. Use it as it is.
38965        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38966$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38968$as_echo_n "checking for BUILD_CC... " >&6; }
38969        if test ! -x "$tool_specified"; then
38970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38971$as_echo "not found" >&6; }
38972          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38973        fi
38974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38975$as_echo "$tool_specified" >&6; }
38976      fi
38977    fi
38978  fi
38979
38980
38981
38982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38983
38984  # First separate the path from the arguments. This will split at the first
38985  # space.
38986  complete="$BUILD_CC"
38987  path="${complete%% *}"
38988  tmp="$complete EOL"
38989  arguments="${tmp#* }"
38990
38991  # Input might be given as Windows format, start by converting to
38992  # unix format.
38993  new_path=`$CYGPATH -u "$path"`
38994
38995  # Now try to locate executable using which
38996  new_path=`$WHICH "$new_path" 2> /dev/null`
38997  # bat and cmd files are not always considered executable in cygwin causing which
38998  # to not find them
38999  if test "x$new_path" = x \
39000      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39001      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39002    new_path=`$CYGPATH -u "$path"`
39003  fi
39004  if test "x$new_path" = x; then
39005    # Oops. Which didn't find the executable.
39006    # The splitting of arguments from the executable at a space might have been incorrect,
39007    # since paths with space are more likely in Windows. Give it another try with the whole
39008    # argument.
39009    path="$complete"
39010    arguments="EOL"
39011    new_path=`$CYGPATH -u "$path"`
39012    new_path=`$WHICH "$new_path" 2> /dev/null`
39013    # bat and cmd files are not always considered executable in cygwin causing which
39014    # to not find them
39015    if test "x$new_path" = x \
39016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39018      new_path=`$CYGPATH -u "$path"`
39019    fi
39020    if test "x$new_path" = x; then
39021      # It's still not found. Now this is an unrecoverable error.
39022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39023$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39024      has_space=`$ECHO "$complete" | $GREP " "`
39025      if test "x$has_space" != x; then
39026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39028      fi
39029      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39030    fi
39031  fi
39032
39033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39036  # "foo.exe" is OK but "foo" is an error.
39037  #
39038  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39039  # It is also a way to make sure we got the proper file name for the real test later on.
39040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39041  if test "x$test_shortpath" = x; then
39042    # Short path failed, file does not exist as specified.
39043    # Try adding .exe or .cmd
39044    if test -f "${new_path}.exe"; then
39045      input_to_shortpath="${new_path}.exe"
39046    elif test -f "${new_path}.cmd"; then
39047      input_to_shortpath="${new_path}.cmd"
39048    else
39049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39050$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39053      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39054    fi
39055  else
39056    input_to_shortpath="$new_path"
39057  fi
39058
39059  # Call helper function which possibly converts this using DOS-style short mode.
39060  # If so, the updated path is stored in $new_path.
39061  new_path="$input_to_shortpath"
39062
39063  input_path="$input_to_shortpath"
39064  # Check if we need to convert this using DOS-style short mode. If the path
39065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39066  # take no chances and rewrite it.
39067  # Note: m4 eats our [], so we need to use [ and ] instead.
39068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39069  if test "x$has_forbidden_chars" != x; then
39070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39074      # Going to short mode and back again did indeed matter. Since short mode is
39075      # case insensitive, let's make it lowercase to improve readability.
39076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39077      # Now convert it back to Unix-stile (cygpath)
39078      input_path=`$CYGPATH -u "$shortmode_path"`
39079      new_path="$input_path"
39080    fi
39081  fi
39082
39083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39084  if test "x$test_cygdrive_prefix" = x; then
39085    # As a simple fix, exclude /usr/bin since it's not a real path.
39086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39088      # a path prefixed by /cygdrive for fixpath to work.
39089      new_path="$CYGWIN_ROOT_PATH$input_path"
39090    fi
39091  fi
39092
39093  # remove trailing .exe if any
39094  new_path="${new_path/%.exe/}"
39095
39096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39097
39098  # First separate the path from the arguments. This will split at the first
39099  # space.
39100  complete="$BUILD_CC"
39101  path="${complete%% *}"
39102  tmp="$complete EOL"
39103  arguments="${tmp#* }"
39104
39105  # Input might be given as Windows format, start by converting to
39106  # unix format.
39107  new_path="$path"
39108
39109  windows_path="$new_path"
39110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39111    unix_path=`$CYGPATH -u "$windows_path"`
39112    new_path="$unix_path"
39113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39115    new_path="$unix_path"
39116  fi
39117
39118
39119  # Now try to locate executable using which
39120  new_path=`$WHICH "$new_path" 2> /dev/null`
39121
39122  if test "x$new_path" = x; then
39123    # Oops. Which didn't find the executable.
39124    # The splitting of arguments from the executable at a space might have been incorrect,
39125    # since paths with space are more likely in Windows. Give it another try with the whole
39126    # argument.
39127    path="$complete"
39128    arguments="EOL"
39129    new_path="$path"
39130
39131  windows_path="$new_path"
39132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39133    unix_path=`$CYGPATH -u "$windows_path"`
39134    new_path="$unix_path"
39135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39137    new_path="$unix_path"
39138  fi
39139
39140
39141    new_path=`$WHICH "$new_path" 2> /dev/null`
39142
39143    if test "x$new_path" = x; then
39144      # It's still not found. Now this is an unrecoverable error.
39145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39146$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39147      has_space=`$ECHO "$complete" | $GREP " "`
39148      if test "x$has_space" != x; then
39149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39151      fi
39152      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39153    fi
39154  fi
39155
39156  # Now new_path has a complete unix path to the binary
39157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39158    # Keep paths in /bin as-is, but remove trailing .exe if any
39159    new_path="${new_path/%.exe/}"
39160    # Do not save /bin paths to all_fixpath_prefixes!
39161  else
39162    # Not in mixed or Windows style, start by that.
39163    new_path=`cmd //c echo $new_path`
39164
39165  input_path="$new_path"
39166  # Check if we need to convert this using DOS-style short mode. If the path
39167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39168  # take no chances and rewrite it.
39169  # Note: m4 eats our [], so we need to use [ and ] instead.
39170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39171  if test "x$has_forbidden_chars" != x; then
39172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39174  fi
39175
39176    # Output is in $new_path
39177
39178  windows_path="$new_path"
39179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39180    unix_path=`$CYGPATH -u "$windows_path"`
39181    new_path="$unix_path"
39182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39184    new_path="$unix_path"
39185  fi
39186
39187    # remove trailing .exe if any
39188    new_path="${new_path/%.exe/}"
39189
39190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39192  fi
39193
39194  else
39195    # We're on a posix platform. Hooray! :)
39196    # First separate the path from the arguments. This will split at the first
39197    # space.
39198    complete="$BUILD_CC"
39199    path="${complete%% *}"
39200    tmp="$complete EOL"
39201    arguments="${tmp#* }"
39202
39203    # Cannot rely on the command "which" here since it doesn't always work.
39204    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39205    if test -z "$is_absolute_path"; then
39206      # Path to executable is not absolute. Find it.
39207      IFS_save="$IFS"
39208      IFS=:
39209      for p in $PATH; do
39210        if test -f "$p/$path" && test -x "$p/$path"; then
39211          new_path="$p/$path"
39212          break
39213        fi
39214      done
39215      IFS="$IFS_save"
39216    else
39217      # This is an absolute path, we can use it without further modifications.
39218      new_path="$path"
39219    fi
39220
39221    if test "x$new_path" = x; then
39222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39223$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39224      has_space=`$ECHO "$complete" | $GREP " "`
39225      if test "x$has_space" != x; then
39226        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39228      fi
39229      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39230    fi
39231  fi
39232
39233  # Now join together the path and the arguments once again
39234  if test "x$arguments" != xEOL; then
39235    new_complete="$new_path ${arguments% *}"
39236  else
39237    new_complete="$new_path"
39238  fi
39239
39240  if test "x$complete" != "x$new_complete"; then
39241    BUILD_CC="$new_complete"
39242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39243$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39244  fi
39245
39246
39247
39248  # Publish this variable in the help.
39249
39250
39251  if test "x$BUILD_CXX" = x; then
39252    # The variable is not set by user, try to locate tool using the code snippet
39253    for ac_prog in cl CC g++
39254do
39255  # Extract the first word of "$ac_prog", so it can be a program name with args.
39256set dummy $ac_prog; ac_word=$2
39257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39258$as_echo_n "checking for $ac_word... " >&6; }
39259if ${ac_cv_path_BUILD_CXX+:} false; then :
39260  $as_echo_n "(cached) " >&6
39261else
39262  case $BUILD_CXX in
39263  [\\/]* | ?:[\\/]*)
39264  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39265  ;;
39266  *)
39267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39268for as_dir in $PATH
39269do
39270  IFS=$as_save_IFS
39271  test -z "$as_dir" && as_dir=.
39272    for ac_exec_ext in '' $ac_executable_extensions; do
39273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39274    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39276    break 2
39277  fi
39278done
39279  done
39280IFS=$as_save_IFS
39281
39282  ;;
39283esac
39284fi
39285BUILD_CXX=$ac_cv_path_BUILD_CXX
39286if test -n "$BUILD_CXX"; then
39287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39288$as_echo "$BUILD_CXX" >&6; }
39289else
39290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39291$as_echo "no" >&6; }
39292fi
39293
39294
39295  test -n "$BUILD_CXX" && break
39296done
39297
39298  else
39299    # The variable is set, but is it from the command line or the environment?
39300
39301    # Try to remove the string !BUILD_CXX! from our list.
39302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39304      # If it failed, the variable was not from the command line. Ignore it,
39305      # but warn the user (except for BASH, which is always set by the calling BASH).
39306      if test "xBUILD_CXX" != xBASH; then
39307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39308$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39309      fi
39310      # Try to locate tool using the code snippet
39311      for ac_prog in cl CC g++
39312do
39313  # Extract the first word of "$ac_prog", so it can be a program name with args.
39314set dummy $ac_prog; ac_word=$2
39315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39316$as_echo_n "checking for $ac_word... " >&6; }
39317if ${ac_cv_path_BUILD_CXX+:} false; then :
39318  $as_echo_n "(cached) " >&6
39319else
39320  case $BUILD_CXX in
39321  [\\/]* | ?:[\\/]*)
39322  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39323  ;;
39324  *)
39325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39326for as_dir in $PATH
39327do
39328  IFS=$as_save_IFS
39329  test -z "$as_dir" && as_dir=.
39330    for ac_exec_ext in '' $ac_executable_extensions; do
39331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39332    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39334    break 2
39335  fi
39336done
39337  done
39338IFS=$as_save_IFS
39339
39340  ;;
39341esac
39342fi
39343BUILD_CXX=$ac_cv_path_BUILD_CXX
39344if test -n "$BUILD_CXX"; then
39345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39346$as_echo "$BUILD_CXX" >&6; }
39347else
39348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39349$as_echo "no" >&6; }
39350fi
39351
39352
39353  test -n "$BUILD_CXX" && break
39354done
39355
39356    else
39357      # If it succeeded, then it was overridden by the user. We will use it
39358      # for the tool.
39359
39360      # First remove it from the list of overridden variables, so we can test
39361      # for unknown variables in the end.
39362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39363
39364      # Check if the provided tool contains a complete path.
39365      tool_specified="$BUILD_CXX"
39366      tool_basename="${tool_specified##*/}"
39367      if test "x$tool_basename" = "x$tool_specified"; then
39368        # A command without a complete path is provided, search $PATH.
39369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39370$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39371        # Extract the first word of "$tool_basename", so it can be a program name with args.
39372set dummy $tool_basename; ac_word=$2
39373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39374$as_echo_n "checking for $ac_word... " >&6; }
39375if ${ac_cv_path_BUILD_CXX+:} false; then :
39376  $as_echo_n "(cached) " >&6
39377else
39378  case $BUILD_CXX in
39379  [\\/]* | ?:[\\/]*)
39380  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39381  ;;
39382  *)
39383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39384for as_dir in $PATH
39385do
39386  IFS=$as_save_IFS
39387  test -z "$as_dir" && as_dir=.
39388    for ac_exec_ext in '' $ac_executable_extensions; do
39389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39390    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39392    break 2
39393  fi
39394done
39395  done
39396IFS=$as_save_IFS
39397
39398  ;;
39399esac
39400fi
39401BUILD_CXX=$ac_cv_path_BUILD_CXX
39402if test -n "$BUILD_CXX"; then
39403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39404$as_echo "$BUILD_CXX" >&6; }
39405else
39406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39407$as_echo "no" >&6; }
39408fi
39409
39410
39411        if test "x$BUILD_CXX" = x; then
39412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39413        fi
39414      else
39415        # Otherwise we believe it is a complete path. Use it as it is.
39416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39417$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39419$as_echo_n "checking for BUILD_CXX... " >&6; }
39420        if test ! -x "$tool_specified"; then
39421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39422$as_echo "not found" >&6; }
39423          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39424        fi
39425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39426$as_echo "$tool_specified" >&6; }
39427      fi
39428    fi
39429  fi
39430
39431
39432
39433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39434
39435  # First separate the path from the arguments. This will split at the first
39436  # space.
39437  complete="$BUILD_CXX"
39438  path="${complete%% *}"
39439  tmp="$complete EOL"
39440  arguments="${tmp#* }"
39441
39442  # Input might be given as Windows format, start by converting to
39443  # unix format.
39444  new_path=`$CYGPATH -u "$path"`
39445
39446  # Now try to locate executable using which
39447  new_path=`$WHICH "$new_path" 2> /dev/null`
39448  # bat and cmd files are not always considered executable in cygwin causing which
39449  # to not find them
39450  if test "x$new_path" = x \
39451      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39452      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39453    new_path=`$CYGPATH -u "$path"`
39454  fi
39455  if test "x$new_path" = x; then
39456    # Oops. Which didn't find the executable.
39457    # The splitting of arguments from the executable at a space might have been incorrect,
39458    # since paths with space are more likely in Windows. Give it another try with the whole
39459    # argument.
39460    path="$complete"
39461    arguments="EOL"
39462    new_path=`$CYGPATH -u "$path"`
39463    new_path=`$WHICH "$new_path" 2> /dev/null`
39464    # bat and cmd files are not always considered executable in cygwin causing which
39465    # to not find them
39466    if test "x$new_path" = x \
39467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39469      new_path=`$CYGPATH -u "$path"`
39470    fi
39471    if test "x$new_path" = x; then
39472      # It's still not found. Now this is an unrecoverable error.
39473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39474$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39475      has_space=`$ECHO "$complete" | $GREP " "`
39476      if test "x$has_space" != x; then
39477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39479      fi
39480      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39481    fi
39482  fi
39483
39484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39487  # "foo.exe" is OK but "foo" is an error.
39488  #
39489  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39490  # It is also a way to make sure we got the proper file name for the real test later on.
39491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39492  if test "x$test_shortpath" = x; then
39493    # Short path failed, file does not exist as specified.
39494    # Try adding .exe or .cmd
39495    if test -f "${new_path}.exe"; then
39496      input_to_shortpath="${new_path}.exe"
39497    elif test -f "${new_path}.cmd"; then
39498      input_to_shortpath="${new_path}.cmd"
39499    else
39500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39501$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39504      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39505    fi
39506  else
39507    input_to_shortpath="$new_path"
39508  fi
39509
39510  # Call helper function which possibly converts this using DOS-style short mode.
39511  # If so, the updated path is stored in $new_path.
39512  new_path="$input_to_shortpath"
39513
39514  input_path="$input_to_shortpath"
39515  # Check if we need to convert this using DOS-style short mode. If the path
39516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39517  # take no chances and rewrite it.
39518  # Note: m4 eats our [], so we need to use [ and ] instead.
39519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39520  if test "x$has_forbidden_chars" != x; then
39521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39525      # Going to short mode and back again did indeed matter. Since short mode is
39526      # case insensitive, let's make it lowercase to improve readability.
39527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39528      # Now convert it back to Unix-stile (cygpath)
39529      input_path=`$CYGPATH -u "$shortmode_path"`
39530      new_path="$input_path"
39531    fi
39532  fi
39533
39534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39535  if test "x$test_cygdrive_prefix" = x; then
39536    # As a simple fix, exclude /usr/bin since it's not a real path.
39537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39539      # a path prefixed by /cygdrive for fixpath to work.
39540      new_path="$CYGWIN_ROOT_PATH$input_path"
39541    fi
39542  fi
39543
39544  # remove trailing .exe if any
39545  new_path="${new_path/%.exe/}"
39546
39547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39548
39549  # First separate the path from the arguments. This will split at the first
39550  # space.
39551  complete="$BUILD_CXX"
39552  path="${complete%% *}"
39553  tmp="$complete EOL"
39554  arguments="${tmp#* }"
39555
39556  # Input might be given as Windows format, start by converting to
39557  # unix format.
39558  new_path="$path"
39559
39560  windows_path="$new_path"
39561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39562    unix_path=`$CYGPATH -u "$windows_path"`
39563    new_path="$unix_path"
39564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39566    new_path="$unix_path"
39567  fi
39568
39569
39570  # Now try to locate executable using which
39571  new_path=`$WHICH "$new_path" 2> /dev/null`
39572
39573  if test "x$new_path" = x; then
39574    # Oops. Which didn't find the executable.
39575    # The splitting of arguments from the executable at a space might have been incorrect,
39576    # since paths with space are more likely in Windows. Give it another try with the whole
39577    # argument.
39578    path="$complete"
39579    arguments="EOL"
39580    new_path="$path"
39581
39582  windows_path="$new_path"
39583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39584    unix_path=`$CYGPATH -u "$windows_path"`
39585    new_path="$unix_path"
39586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39588    new_path="$unix_path"
39589  fi
39590
39591
39592    new_path=`$WHICH "$new_path" 2> /dev/null`
39593
39594    if test "x$new_path" = x; then
39595      # It's still not found. Now this is an unrecoverable error.
39596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39597$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39598      has_space=`$ECHO "$complete" | $GREP " "`
39599      if test "x$has_space" != x; then
39600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39602      fi
39603      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39604    fi
39605  fi
39606
39607  # Now new_path has a complete unix path to the binary
39608  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39609    # Keep paths in /bin as-is, but remove trailing .exe if any
39610    new_path="${new_path/%.exe/}"
39611    # Do not save /bin paths to all_fixpath_prefixes!
39612  else
39613    # Not in mixed or Windows style, start by that.
39614    new_path=`cmd //c echo $new_path`
39615
39616  input_path="$new_path"
39617  # Check if we need to convert this using DOS-style short mode. If the path
39618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39619  # take no chances and rewrite it.
39620  # Note: m4 eats our [], so we need to use [ and ] instead.
39621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39622  if test "x$has_forbidden_chars" != x; then
39623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39625  fi
39626
39627    # Output is in $new_path
39628
39629  windows_path="$new_path"
39630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39631    unix_path=`$CYGPATH -u "$windows_path"`
39632    new_path="$unix_path"
39633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39635    new_path="$unix_path"
39636  fi
39637
39638    # remove trailing .exe if any
39639    new_path="${new_path/%.exe/}"
39640
39641    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39642    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39643  fi
39644
39645  else
39646    # We're on a posix platform. Hooray! :)
39647    # First separate the path from the arguments. This will split at the first
39648    # space.
39649    complete="$BUILD_CXX"
39650    path="${complete%% *}"
39651    tmp="$complete EOL"
39652    arguments="${tmp#* }"
39653
39654    # Cannot rely on the command "which" here since it doesn't always work.
39655    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39656    if test -z "$is_absolute_path"; then
39657      # Path to executable is not absolute. Find it.
39658      IFS_save="$IFS"
39659      IFS=:
39660      for p in $PATH; do
39661        if test -f "$p/$path" && test -x "$p/$path"; then
39662          new_path="$p/$path"
39663          break
39664        fi
39665      done
39666      IFS="$IFS_save"
39667    else
39668      # This is an absolute path, we can use it without further modifications.
39669      new_path="$path"
39670    fi
39671
39672    if test "x$new_path" = x; then
39673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39674$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39675      has_space=`$ECHO "$complete" | $GREP " "`
39676      if test "x$has_space" != x; then
39677        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39678$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39679      fi
39680      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39681    fi
39682  fi
39683
39684  # Now join together the path and the arguments once again
39685  if test "x$arguments" != xEOL; then
39686    new_complete="$new_path ${arguments% *}"
39687  else
39688    new_complete="$new_path"
39689  fi
39690
39691  if test "x$complete" != "x$new_complete"; then
39692    BUILD_CXX="$new_complete"
39693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39694$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39695  fi
39696
39697
39698
39699  # Publish this variable in the help.
39700
39701
39702  if test "x$BUILD_LD" = x; then
39703    # The variable is not set by user, try to locate tool using the code snippet
39704    for ac_prog in ld
39705do
39706  # Extract the first word of "$ac_prog", so it can be a program name with args.
39707set dummy $ac_prog; ac_word=$2
39708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39709$as_echo_n "checking for $ac_word... " >&6; }
39710if ${ac_cv_path_BUILD_LD+:} false; then :
39711  $as_echo_n "(cached) " >&6
39712else
39713  case $BUILD_LD in
39714  [\\/]* | ?:[\\/]*)
39715  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39716  ;;
39717  *)
39718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39719for as_dir in $PATH
39720do
39721  IFS=$as_save_IFS
39722  test -z "$as_dir" && as_dir=.
39723    for ac_exec_ext in '' $ac_executable_extensions; do
39724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39725    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39727    break 2
39728  fi
39729done
39730  done
39731IFS=$as_save_IFS
39732
39733  ;;
39734esac
39735fi
39736BUILD_LD=$ac_cv_path_BUILD_LD
39737if test -n "$BUILD_LD"; then
39738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39739$as_echo "$BUILD_LD" >&6; }
39740else
39741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39742$as_echo "no" >&6; }
39743fi
39744
39745
39746  test -n "$BUILD_LD" && break
39747done
39748
39749  else
39750    # The variable is set, but is it from the command line or the environment?
39751
39752    # Try to remove the string !BUILD_LD! from our list.
39753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39755      # If it failed, the variable was not from the command line. Ignore it,
39756      # but warn the user (except for BASH, which is always set by the calling BASH).
39757      if test "xBUILD_LD" != xBASH; then
39758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39759$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39760      fi
39761      # Try to locate tool using the code snippet
39762      for ac_prog in ld
39763do
39764  # Extract the first word of "$ac_prog", so it can be a program name with args.
39765set dummy $ac_prog; ac_word=$2
39766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39767$as_echo_n "checking for $ac_word... " >&6; }
39768if ${ac_cv_path_BUILD_LD+:} false; then :
39769  $as_echo_n "(cached) " >&6
39770else
39771  case $BUILD_LD in
39772  [\\/]* | ?:[\\/]*)
39773  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39774  ;;
39775  *)
39776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39777for as_dir in $PATH
39778do
39779  IFS=$as_save_IFS
39780  test -z "$as_dir" && as_dir=.
39781    for ac_exec_ext in '' $ac_executable_extensions; do
39782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39783    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39785    break 2
39786  fi
39787done
39788  done
39789IFS=$as_save_IFS
39790
39791  ;;
39792esac
39793fi
39794BUILD_LD=$ac_cv_path_BUILD_LD
39795if test -n "$BUILD_LD"; then
39796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39797$as_echo "$BUILD_LD" >&6; }
39798else
39799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39800$as_echo "no" >&6; }
39801fi
39802
39803
39804  test -n "$BUILD_LD" && break
39805done
39806
39807    else
39808      # If it succeeded, then it was overridden by the user. We will use it
39809      # for the tool.
39810
39811      # First remove it from the list of overridden variables, so we can test
39812      # for unknown variables in the end.
39813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39814
39815      # Check if the provided tool contains a complete path.
39816      tool_specified="$BUILD_LD"
39817      tool_basename="${tool_specified##*/}"
39818      if test "x$tool_basename" = "x$tool_specified"; then
39819        # A command without a complete path is provided, search $PATH.
39820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39821$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39822        # Extract the first word of "$tool_basename", so it can be a program name with args.
39823set dummy $tool_basename; ac_word=$2
39824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39825$as_echo_n "checking for $ac_word... " >&6; }
39826if ${ac_cv_path_BUILD_LD+:} false; then :
39827  $as_echo_n "(cached) " >&6
39828else
39829  case $BUILD_LD in
39830  [\\/]* | ?:[\\/]*)
39831  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39832  ;;
39833  *)
39834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39835for as_dir in $PATH
39836do
39837  IFS=$as_save_IFS
39838  test -z "$as_dir" && as_dir=.
39839    for ac_exec_ext in '' $ac_executable_extensions; do
39840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39841    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39843    break 2
39844  fi
39845done
39846  done
39847IFS=$as_save_IFS
39848
39849  ;;
39850esac
39851fi
39852BUILD_LD=$ac_cv_path_BUILD_LD
39853if test -n "$BUILD_LD"; then
39854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39855$as_echo "$BUILD_LD" >&6; }
39856else
39857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39858$as_echo "no" >&6; }
39859fi
39860
39861
39862        if test "x$BUILD_LD" = x; then
39863          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39864        fi
39865      else
39866        # Otherwise we believe it is a complete path. Use it as it is.
39867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39868$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39870$as_echo_n "checking for BUILD_LD... " >&6; }
39871        if test ! -x "$tool_specified"; then
39872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39873$as_echo "not found" >&6; }
39874          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39875        fi
39876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39877$as_echo "$tool_specified" >&6; }
39878      fi
39879    fi
39880  fi
39881
39882
39883
39884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39885
39886  # First separate the path from the arguments. This will split at the first
39887  # space.
39888  complete="$BUILD_LD"
39889  path="${complete%% *}"
39890  tmp="$complete EOL"
39891  arguments="${tmp#* }"
39892
39893  # Input might be given as Windows format, start by converting to
39894  # unix format.
39895  new_path=`$CYGPATH -u "$path"`
39896
39897  # Now try to locate executable using which
39898  new_path=`$WHICH "$new_path" 2> /dev/null`
39899  # bat and cmd files are not always considered executable in cygwin causing which
39900  # to not find them
39901  if test "x$new_path" = x \
39902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39904    new_path=`$CYGPATH -u "$path"`
39905  fi
39906  if test "x$new_path" = x; then
39907    # Oops. Which didn't find the executable.
39908    # The splitting of arguments from the executable at a space might have been incorrect,
39909    # since paths with space are more likely in Windows. Give it another try with the whole
39910    # argument.
39911    path="$complete"
39912    arguments="EOL"
39913    new_path=`$CYGPATH -u "$path"`
39914    new_path=`$WHICH "$new_path" 2> /dev/null`
39915    # bat and cmd files are not always considered executable in cygwin causing which
39916    # to not find them
39917    if test "x$new_path" = x \
39918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39920      new_path=`$CYGPATH -u "$path"`
39921    fi
39922    if test "x$new_path" = x; then
39923      # It's still not found. Now this is an unrecoverable error.
39924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39925$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39926      has_space=`$ECHO "$complete" | $GREP " "`
39927      if test "x$has_space" != x; then
39928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39930      fi
39931      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39932    fi
39933  fi
39934
39935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39938  # "foo.exe" is OK but "foo" is an error.
39939  #
39940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39941  # It is also a way to make sure we got the proper file name for the real test later on.
39942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39943  if test "x$test_shortpath" = x; then
39944    # Short path failed, file does not exist as specified.
39945    # Try adding .exe or .cmd
39946    if test -f "${new_path}.exe"; then
39947      input_to_shortpath="${new_path}.exe"
39948    elif test -f "${new_path}.cmd"; then
39949      input_to_shortpath="${new_path}.cmd"
39950    else
39951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39952$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39955      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39956    fi
39957  else
39958    input_to_shortpath="$new_path"
39959  fi
39960
39961  # Call helper function which possibly converts this using DOS-style short mode.
39962  # If so, the updated path is stored in $new_path.
39963  new_path="$input_to_shortpath"
39964
39965  input_path="$input_to_shortpath"
39966  # Check if we need to convert this using DOS-style short mode. If the path
39967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39968  # take no chances and rewrite it.
39969  # Note: m4 eats our [], so we need to use [ and ] instead.
39970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39971  if test "x$has_forbidden_chars" != x; then
39972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39976      # Going to short mode and back again did indeed matter. Since short mode is
39977      # case insensitive, let's make it lowercase to improve readability.
39978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39979      # Now convert it back to Unix-stile (cygpath)
39980      input_path=`$CYGPATH -u "$shortmode_path"`
39981      new_path="$input_path"
39982    fi
39983  fi
39984
39985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39986  if test "x$test_cygdrive_prefix" = x; then
39987    # As a simple fix, exclude /usr/bin since it's not a real path.
39988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39990      # a path prefixed by /cygdrive for fixpath to work.
39991      new_path="$CYGWIN_ROOT_PATH$input_path"
39992    fi
39993  fi
39994
39995  # remove trailing .exe if any
39996  new_path="${new_path/%.exe/}"
39997
39998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39999
40000  # First separate the path from the arguments. This will split at the first
40001  # space.
40002  complete="$BUILD_LD"
40003  path="${complete%% *}"
40004  tmp="$complete EOL"
40005  arguments="${tmp#* }"
40006
40007  # Input might be given as Windows format, start by converting to
40008  # unix format.
40009  new_path="$path"
40010
40011  windows_path="$new_path"
40012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40013    unix_path=`$CYGPATH -u "$windows_path"`
40014    new_path="$unix_path"
40015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40017    new_path="$unix_path"
40018  fi
40019
40020
40021  # Now try to locate executable using which
40022  new_path=`$WHICH "$new_path" 2> /dev/null`
40023
40024  if test "x$new_path" = x; then
40025    # Oops. Which didn't find the executable.
40026    # The splitting of arguments from the executable at a space might have been incorrect,
40027    # since paths with space are more likely in Windows. Give it another try with the whole
40028    # argument.
40029    path="$complete"
40030    arguments="EOL"
40031    new_path="$path"
40032
40033  windows_path="$new_path"
40034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40035    unix_path=`$CYGPATH -u "$windows_path"`
40036    new_path="$unix_path"
40037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40039    new_path="$unix_path"
40040  fi
40041
40042
40043    new_path=`$WHICH "$new_path" 2> /dev/null`
40044
40045    if test "x$new_path" = x; then
40046      # It's still not found. Now this is an unrecoverable error.
40047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40048$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40049      has_space=`$ECHO "$complete" | $GREP " "`
40050      if test "x$has_space" != x; then
40051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40053      fi
40054      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40055    fi
40056  fi
40057
40058  # Now new_path has a complete unix path to the binary
40059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40060    # Keep paths in /bin as-is, but remove trailing .exe if any
40061    new_path="${new_path/%.exe/}"
40062    # Do not save /bin paths to all_fixpath_prefixes!
40063  else
40064    # Not in mixed or Windows style, start by that.
40065    new_path=`cmd //c echo $new_path`
40066
40067  input_path="$new_path"
40068  # Check if we need to convert this using DOS-style short mode. If the path
40069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40070  # take no chances and rewrite it.
40071  # Note: m4 eats our [], so we need to use [ and ] instead.
40072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40073  if test "x$has_forbidden_chars" != x; then
40074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40076  fi
40077
40078    # Output is in $new_path
40079
40080  windows_path="$new_path"
40081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40082    unix_path=`$CYGPATH -u "$windows_path"`
40083    new_path="$unix_path"
40084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40086    new_path="$unix_path"
40087  fi
40088
40089    # remove trailing .exe if any
40090    new_path="${new_path/%.exe/}"
40091
40092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40094  fi
40095
40096  else
40097    # We're on a posix platform. Hooray! :)
40098    # First separate the path from the arguments. This will split at the first
40099    # space.
40100    complete="$BUILD_LD"
40101    path="${complete%% *}"
40102    tmp="$complete EOL"
40103    arguments="${tmp#* }"
40104
40105    # Cannot rely on the command "which" here since it doesn't always work.
40106    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40107    if test -z "$is_absolute_path"; then
40108      # Path to executable is not absolute. Find it.
40109      IFS_save="$IFS"
40110      IFS=:
40111      for p in $PATH; do
40112        if test -f "$p/$path" && test -x "$p/$path"; then
40113          new_path="$p/$path"
40114          break
40115        fi
40116      done
40117      IFS="$IFS_save"
40118    else
40119      # This is an absolute path, we can use it without further modifications.
40120      new_path="$path"
40121    fi
40122
40123    if test "x$new_path" = x; then
40124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40125$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40126      has_space=`$ECHO "$complete" | $GREP " "`
40127      if test "x$has_space" != x; then
40128        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40130      fi
40131      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40132    fi
40133  fi
40134
40135  # Now join together the path and the arguments once again
40136  if test "x$arguments" != xEOL; then
40137    new_complete="$new_path ${arguments% *}"
40138  else
40139    new_complete="$new_path"
40140  fi
40141
40142  if test "x$complete" != "x$new_complete"; then
40143    BUILD_LD="$new_complete"
40144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40145$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40146  fi
40147
40148  else
40149    # If we are not cross compiling, use the normal target compilers for
40150    # building the build platform executables.
40151    BUILD_CC="$CC"
40152    BUILD_CXX="$CXX"
40153    BUILD_LD="$LD"
40154  fi
40155
40156
40157
40158
40159
40160
40161  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40162    # For hotspot, we need these in Windows mixed path,
40163    # so rewrite them all. Need added .exe suffix.
40164    HOTSPOT_CXX="$CXX.exe"
40165    HOTSPOT_LD="$LD.exe"
40166    HOTSPOT_MT="$MT.exe"
40167    HOTSPOT_RC="$RC.exe"
40168
40169  unix_path="$HOTSPOT_CXX"
40170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40171    windows_path=`$CYGPATH -m "$unix_path"`
40172    HOTSPOT_CXX="$windows_path"
40173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40174    windows_path=`cmd //c echo $unix_path`
40175    HOTSPOT_CXX="$windows_path"
40176  fi
40177
40178
40179  unix_path="$HOTSPOT_LD"
40180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40181    windows_path=`$CYGPATH -m "$unix_path"`
40182    HOTSPOT_LD="$windows_path"
40183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40184    windows_path=`cmd //c echo $unix_path`
40185    HOTSPOT_LD="$windows_path"
40186  fi
40187
40188
40189  unix_path="$HOTSPOT_MT"
40190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40191    windows_path=`$CYGPATH -m "$unix_path"`
40192    HOTSPOT_MT="$windows_path"
40193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40194    windows_path=`cmd //c echo $unix_path`
40195    HOTSPOT_MT="$windows_path"
40196  fi
40197
40198
40199  unix_path="$HOTSPOT_RC"
40200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40201    windows_path=`$CYGPATH -m "$unix_path"`
40202    HOTSPOT_RC="$windows_path"
40203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40204    windows_path=`cmd //c echo $unix_path`
40205    HOTSPOT_RC="$windows_path"
40206  fi
40207
40208
40209
40210  else
40211    HOTSPOT_CXX="$CXX"
40212    HOTSPOT_LD="$LD"
40213  fi
40214
40215
40216
40217  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40218    USE_CLANG=true
40219  fi
40220
40221
40222  # LDEXE is the linker to use, when creating executables. Not really used.
40223  # FIXME: These should just be removed!
40224  LDEXE="$LD"
40225  LDEXECXX="$LDCXX"
40226
40227
40228
40229
40230  # The package path is used only on macosx?
40231  # FIXME: clean this up, and/or move it elsewhere.
40232  PACKAGE_PATH=/opt/local
40233
40234
40235  # Check for extra potential brokenness.
40236  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40237    # On Windows, double-check that we got the right compiler.
40238    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40239    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40240    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40241      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40242        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40243      fi
40244    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40245      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40246        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40247      fi
40248    fi
40249  fi
40250
40251  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40252    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40253    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40254    # This is later checked when setting flags.
40255  fi
40256
40257  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40258  # in executable.'
40259  USING_BROKEN_SUSE_LD=no
40260  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40262$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40263    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40264    echo "int main() { }" > main.c
40265    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40267$as_echo "no" >&6; }
40268      USING_BROKEN_SUSE_LD=no
40269    else
40270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40271$as_echo "yes" >&6; }
40272      USING_BROKEN_SUSE_LD=yes
40273    fi
40274    rm -rf version-script.map main.c a.out
40275  fi
40276
40277
40278
40279# Setup the JTReg Regression Test Harness.
40280
40281
40282# Check whether --with-jtreg was given.
40283if test "${with_jtreg+set}" = set; then :
40284  withval=$with_jtreg;
40285else
40286  with_jtreg=no
40287fi
40288
40289
40290  if test "x$with_jtreg" = xno; then
40291    # jtreg disabled
40292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40293$as_echo_n "checking for jtreg... " >&6; }
40294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40295$as_echo "no" >&6; }
40296  else
40297    if test "x$with_jtreg" != xyes; then
40298      # with path specified.
40299      JT_HOME="$with_jtreg"
40300    fi
40301
40302    if test "x$JT_HOME" != x; then
40303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40304$as_echo_n "checking for jtreg... " >&6; }
40305
40306      # use JT_HOME enviroment var.
40307
40308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40309
40310  # Input might be given as Windows format, start by converting to
40311  # unix format.
40312  path="$JT_HOME"
40313  new_path=`$CYGPATH -u "$path"`
40314
40315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40318  # "foo.exe" is OK but "foo" is an error.
40319  #
40320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40321  # It is also a way to make sure we got the proper file name for the real test later on.
40322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40323  if test "x$test_shortpath" = x; then
40324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40325$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40326    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40327  fi
40328
40329  # Call helper function which possibly converts this using DOS-style short mode.
40330  # If so, the updated path is stored in $new_path.
40331
40332  input_path="$new_path"
40333  # Check if we need to convert this using DOS-style short mode. If the path
40334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40335  # take no chances and rewrite it.
40336  # Note: m4 eats our [], so we need to use [ and ] instead.
40337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40338  if test "x$has_forbidden_chars" != x; then
40339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40343      # Going to short mode and back again did indeed matter. Since short mode is
40344      # case insensitive, let's make it lowercase to improve readability.
40345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40346      # Now convert it back to Unix-stile (cygpath)
40347      input_path=`$CYGPATH -u "$shortmode_path"`
40348      new_path="$input_path"
40349    fi
40350  fi
40351
40352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40353  if test "x$test_cygdrive_prefix" = x; then
40354    # As a simple fix, exclude /usr/bin since it's not a real path.
40355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40357      # a path prefixed by /cygdrive for fixpath to work.
40358      new_path="$CYGWIN_ROOT_PATH$input_path"
40359    fi
40360  fi
40361
40362
40363  if test "x$path" != "x$new_path"; then
40364    JT_HOME="$new_path"
40365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40366$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40367  fi
40368
40369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40370
40371  path="$JT_HOME"
40372  has_colon=`$ECHO $path | $GREP ^.:`
40373  new_path="$path"
40374  if test "x$has_colon" = x; then
40375    # Not in mixed or Windows style, start by that.
40376    new_path=`cmd //c echo $path`
40377  fi
40378
40379
40380  input_path="$new_path"
40381  # Check if we need to convert this using DOS-style short mode. If the path
40382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40383  # take no chances and rewrite it.
40384  # Note: m4 eats our [], so we need to use [ and ] instead.
40385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40386  if test "x$has_forbidden_chars" != x; then
40387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40389  fi
40390
40391
40392  windows_path="$new_path"
40393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40394    unix_path=`$CYGPATH -u "$windows_path"`
40395    new_path="$unix_path"
40396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40398    new_path="$unix_path"
40399  fi
40400
40401  if test "x$path" != "x$new_path"; then
40402    JT_HOME="$new_path"
40403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40404$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40405  fi
40406
40407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40409
40410  else
40411    # We're on a posix platform. Hooray! :)
40412    path="$JT_HOME"
40413    has_space=`$ECHO "$path" | $GREP " "`
40414    if test "x$has_space" != x; then
40415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40416$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40417      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40418    fi
40419
40420    # Use eval to expand a potential ~
40421    eval path="$path"
40422    if test ! -f "$path" && test ! -d "$path"; then
40423      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40424    fi
40425
40426    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40427  fi
40428
40429
40430      # jtreg win32 script works for everybody
40431      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40432
40433      if test ! -f "$JTREGEXE"; then
40434        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40435      fi
40436
40437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40438$as_echo "$JTREGEXE" >&6; }
40439    else
40440      # try to find jtreg on path
40441
40442
40443
40444  # Publish this variable in the help.
40445
40446
40447  if test "x$JTREGEXE" = x; then
40448    # The variable is not set by user, try to locate tool using the code snippet
40449    for ac_prog in jtreg
40450do
40451  # Extract the first word of "$ac_prog", so it can be a program name with args.
40452set dummy $ac_prog; ac_word=$2
40453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40454$as_echo_n "checking for $ac_word... " >&6; }
40455if ${ac_cv_path_JTREGEXE+:} false; then :
40456  $as_echo_n "(cached) " >&6
40457else
40458  case $JTREGEXE in
40459  [\\/]* | ?:[\\/]*)
40460  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40461  ;;
40462  *)
40463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40464for as_dir in $PATH
40465do
40466  IFS=$as_save_IFS
40467  test -z "$as_dir" && as_dir=.
40468    for ac_exec_ext in '' $ac_executable_extensions; do
40469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40470    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40472    break 2
40473  fi
40474done
40475  done
40476IFS=$as_save_IFS
40477
40478  ;;
40479esac
40480fi
40481JTREGEXE=$ac_cv_path_JTREGEXE
40482if test -n "$JTREGEXE"; then
40483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40484$as_echo "$JTREGEXE" >&6; }
40485else
40486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40487$as_echo "no" >&6; }
40488fi
40489
40490
40491  test -n "$JTREGEXE" && break
40492done
40493
40494  else
40495    # The variable is set, but is it from the command line or the environment?
40496
40497    # Try to remove the string !JTREGEXE! from our list.
40498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40500      # If it failed, the variable was not from the command line. Ignore it,
40501      # but warn the user (except for BASH, which is always set by the calling BASH).
40502      if test "xJTREGEXE" != xBASH; then
40503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40504$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40505      fi
40506      # Try to locate tool using the code snippet
40507      for ac_prog in jtreg
40508do
40509  # Extract the first word of "$ac_prog", so it can be a program name with args.
40510set dummy $ac_prog; ac_word=$2
40511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40512$as_echo_n "checking for $ac_word... " >&6; }
40513if ${ac_cv_path_JTREGEXE+:} false; then :
40514  $as_echo_n "(cached) " >&6
40515else
40516  case $JTREGEXE in
40517  [\\/]* | ?:[\\/]*)
40518  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40519  ;;
40520  *)
40521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40522for as_dir in $PATH
40523do
40524  IFS=$as_save_IFS
40525  test -z "$as_dir" && as_dir=.
40526    for ac_exec_ext in '' $ac_executable_extensions; do
40527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40528    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40530    break 2
40531  fi
40532done
40533  done
40534IFS=$as_save_IFS
40535
40536  ;;
40537esac
40538fi
40539JTREGEXE=$ac_cv_path_JTREGEXE
40540if test -n "$JTREGEXE"; then
40541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40542$as_echo "$JTREGEXE" >&6; }
40543else
40544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40545$as_echo "no" >&6; }
40546fi
40547
40548
40549  test -n "$JTREGEXE" && break
40550done
40551
40552    else
40553      # If it succeeded, then it was overridden by the user. We will use it
40554      # for the tool.
40555
40556      # First remove it from the list of overridden variables, so we can test
40557      # for unknown variables in the end.
40558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40559
40560      # Check if the provided tool contains a complete path.
40561      tool_specified="$JTREGEXE"
40562      tool_basename="${tool_specified##*/}"
40563      if test "x$tool_basename" = "x$tool_specified"; then
40564        # A command without a complete path is provided, search $PATH.
40565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40566$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40567        # Extract the first word of "$tool_basename", so it can be a program name with args.
40568set dummy $tool_basename; ac_word=$2
40569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40570$as_echo_n "checking for $ac_word... " >&6; }
40571if ${ac_cv_path_JTREGEXE+:} false; then :
40572  $as_echo_n "(cached) " >&6
40573else
40574  case $JTREGEXE in
40575  [\\/]* | ?:[\\/]*)
40576  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40577  ;;
40578  *)
40579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40580for as_dir in $PATH
40581do
40582  IFS=$as_save_IFS
40583  test -z "$as_dir" && as_dir=.
40584    for ac_exec_ext in '' $ac_executable_extensions; do
40585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40586    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40588    break 2
40589  fi
40590done
40591  done
40592IFS=$as_save_IFS
40593
40594  ;;
40595esac
40596fi
40597JTREGEXE=$ac_cv_path_JTREGEXE
40598if test -n "$JTREGEXE"; then
40599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40600$as_echo "$JTREGEXE" >&6; }
40601else
40602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40603$as_echo "no" >&6; }
40604fi
40605
40606
40607        if test "x$JTREGEXE" = x; then
40608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40609        fi
40610      else
40611        # Otherwise we believe it is a complete path. Use it as it is.
40612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40613$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40615$as_echo_n "checking for JTREGEXE... " >&6; }
40616        if test ! -x "$tool_specified"; then
40617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40618$as_echo "not found" >&6; }
40619          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40620        fi
40621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40622$as_echo "$tool_specified" >&6; }
40623      fi
40624    fi
40625  fi
40626
40627
40628
40629  if test "x$JTREGEXE" = x; then
40630    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40631  fi
40632
40633
40634      JT_HOME="`$DIRNAME $JTREGEXE`"
40635    fi
40636  fi
40637
40638
40639
40640
40641
40642
40643  # Option used to tell the compiler whether to create 32- or 64-bit executables
40644  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40645    COMPILER_TARGET_BITS_FLAG="-q"
40646  else
40647    COMPILER_TARGET_BITS_FLAG="-m"
40648  fi
40649
40650
40651  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40652  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40653    ARFLAGS="-r"
40654  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40655    ARFLAGS="-X64"
40656  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40657    # lib.exe is used as AR to create static libraries.
40658    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40659  else
40660    ARFLAGS=""
40661  fi
40662
40663
40664  ## Setup strip.
40665  # FIXME: should this really be per platform, or should it be per toolchain type?
40666  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40667  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40668  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40669    STRIPFLAGS="-g"
40670  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40671    STRIPFLAGS="-x"
40672  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40673    STRIPFLAGS="-S"
40674  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40675    STRIPFLAGS="-X32_64"
40676  fi
40677
40678  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40679    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40680  fi
40681
40682
40683  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40684    # FIXME: break out into MCSFLAGS
40685    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40686  fi
40687
40688
40689  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40690    CC_OUT_OPTION=-Fo
40691    EXE_OUT_OPTION=-out:
40692    LD_OUT_OPTION=-out:
40693    AR_OUT_OPTION=-out:
40694  else
40695    # The option used to specify the target .o,.a or .so file.
40696    # When compiling, how to specify the to be created object file.
40697    CC_OUT_OPTION='-o$(SPACE)'
40698    # When linking, how to specify the to be created executable.
40699    EXE_OUT_OPTION='-o$(SPACE)'
40700    # When linking, how to specify the to be created dynamically linkable library.
40701    LD_OUT_OPTION='-o$(SPACE)'
40702    # When archiving, how to specify the to be create static archive for object files.
40703    AR_OUT_OPTION='rcs$(SPACE)'
40704  fi
40705
40706
40707
40708
40709
40710  # On Windows, we need to set RC flags.
40711  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40712    RC_FLAGS="-nologo -l 0x409 -r"
40713    if test "x$VARIANT" = xOPT; then
40714      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40715    fi
40716
40717    # The version variables used to create RC_FLAGS may be overridden
40718    # in a custom configure script, or possibly the command line.
40719    # Let those variables be expanded at make time in spec.gmk.
40720    # The \$ are escaped to the shell, and the $(...) variables
40721    # are evaluated by make.
40722    RC_FLAGS="$RC_FLAGS \
40723        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40724        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40725        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40726        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40727        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40728        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40729        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40730  fi
40731
40732
40733  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40734    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40735    CCXXFLAGS="$CCXXFLAGS -nologo"
40736  fi
40737
40738
40739# FIXME: Currently we must test this after toolchain but before flags. Fix!
40740
40741# Now we can test some aspects on the target using configure macros.
40742
40743
40744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40745$as_echo_n "checking for ANSI C header files... " >&6; }
40746if ${ac_cv_header_stdc+:} false; then :
40747  $as_echo_n "(cached) " >&6
40748else
40749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40750/* end confdefs.h.  */
40751#include <stdlib.h>
40752#include <stdarg.h>
40753#include <string.h>
40754#include <float.h>
40755
40756int
40757main ()
40758{
40759
40760  ;
40761  return 0;
40762}
40763_ACEOF
40764if ac_fn_cxx_try_compile "$LINENO"; then :
40765  ac_cv_header_stdc=yes
40766else
40767  ac_cv_header_stdc=no
40768fi
40769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40770
40771if test $ac_cv_header_stdc = yes; then
40772  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40774/* end confdefs.h.  */
40775#include <string.h>
40776
40777_ACEOF
40778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40779  $EGREP "memchr" >/dev/null 2>&1; then :
40780
40781else
40782  ac_cv_header_stdc=no
40783fi
40784rm -f conftest*
40785
40786fi
40787
40788if test $ac_cv_header_stdc = yes; then
40789  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40791/* end confdefs.h.  */
40792#include <stdlib.h>
40793
40794_ACEOF
40795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40796  $EGREP "free" >/dev/null 2>&1; then :
40797
40798else
40799  ac_cv_header_stdc=no
40800fi
40801rm -f conftest*
40802
40803fi
40804
40805if test $ac_cv_header_stdc = yes; then
40806  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40807  if test "$cross_compiling" = yes; then :
40808  :
40809else
40810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40811/* end confdefs.h.  */
40812#include <ctype.h>
40813#include <stdlib.h>
40814#if ((' ' & 0x0FF) == 0x020)
40815# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40816# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40817#else
40818# define ISLOWER(c) \
40819		   (('a' <= (c) && (c) <= 'i') \
40820		     || ('j' <= (c) && (c) <= 'r') \
40821		     || ('s' <= (c) && (c) <= 'z'))
40822# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40823#endif
40824
40825#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40826int
40827main ()
40828{
40829  int i;
40830  for (i = 0; i < 256; i++)
40831    if (XOR (islower (i), ISLOWER (i))
40832	|| toupper (i) != TOUPPER (i))
40833      return 2;
40834  return 0;
40835}
40836_ACEOF
40837if ac_fn_cxx_try_run "$LINENO"; then :
40838
40839else
40840  ac_cv_header_stdc=no
40841fi
40842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40843  conftest.$ac_objext conftest.beam conftest.$ac_ext
40844fi
40845
40846fi
40847fi
40848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40849$as_echo "$ac_cv_header_stdc" >&6; }
40850if test $ac_cv_header_stdc = yes; then
40851
40852$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40853
40854fi
40855
40856# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40857for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40858		  inttypes.h stdint.h unistd.h
40859do :
40860  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40861ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40862"
40863if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40864  cat >>confdefs.h <<_ACEOF
40865#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40866_ACEOF
40867
40868fi
40869
40870done
40871
40872
40873
40874  ###############################################################################
40875  #
40876  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40877  # (The JVM can use 32 or 64 bit Java pointers but that decision
40878  # is made at runtime.)
40879  #
40880
40881  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40882    # Always specify -m flag on Solaris
40883    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40884
40885  # When we add flags to the "official" CFLAGS etc, we need to
40886  # keep track of these additions in ADDED_CFLAGS etc. These
40887  # will later be checked to make sure only controlled additions
40888  # have been made to CFLAGS etc.
40889  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40890  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40891  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40892
40893  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40894  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40895  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40896
40897  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40898  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40899  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40900
40901  elif test "x$COMPILE_TYPE" = xreduced; then
40902    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40903      # Specify -m if running reduced on other Posix platforms
40904
40905  # When we add flags to the "official" CFLAGS etc, we need to
40906  # keep track of these additions in ADDED_CFLAGS etc. These
40907  # will later be checked to make sure only controlled additions
40908  # have been made to CFLAGS etc.
40909  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40910  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40911  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40912
40913  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40914  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40915  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40916
40917  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40918  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40919  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40920
40921    fi
40922  fi
40923
40924  # Make compilation sanity check
40925  for ac_header in stdio.h
40926do :
40927  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40928if test "x$ac_cv_header_stdio_h" = xyes; then :
40929  cat >>confdefs.h <<_ACEOF
40930#define HAVE_STDIO_H 1
40931_ACEOF
40932
40933else
40934
40935    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40936$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40937    if test "x$COMPILE_TYPE" = xreduced; then
40938      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40939$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40940    elif test "x$COMPILE_TYPE" = xcross; then
40941      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40942$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40943    fi
40944    as_fn_error $? "Cannot continue." "$LINENO" 5
40945
40946fi
40947
40948done
40949
40950
40951  # The cast to long int works around a bug in the HP C Compiler
40952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40954# This bug is HP SR number 8606223364.
40955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40956$as_echo_n "checking size of int *... " >&6; }
40957if ${ac_cv_sizeof_int_p+:} false; then :
40958  $as_echo_n "(cached) " >&6
40959else
40960  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40961
40962else
40963  if test "$ac_cv_type_int_p" = yes; then
40964     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40966as_fn_error 77 "cannot compute sizeof (int *)
40967See \`config.log' for more details" "$LINENO" 5; }
40968   else
40969     ac_cv_sizeof_int_p=0
40970   fi
40971fi
40972
40973fi
40974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40975$as_echo "$ac_cv_sizeof_int_p" >&6; }
40976
40977
40978
40979cat >>confdefs.h <<_ACEOF
40980#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40981_ACEOF
40982
40983
40984
40985  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40986  if test "x$ac_cv_sizeof_int_p" = x; then
40987    # The test failed, lets stick to the assumed value.
40988    { $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
40989$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40990  else
40991    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40992
40993    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40994      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40995      # Let's try to implicitely set the compilers target architecture and retry the test
40996      { $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
40997$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;}
40998      { $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
40999$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;}
41000
41001  # When we add flags to the "official" CFLAGS etc, we need to
41002  # keep track of these additions in ADDED_CFLAGS etc. These
41003  # will later be checked to make sure only controlled additions
41004  # have been made to CFLAGS etc.
41005  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41006  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41007  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41008
41009  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41010  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41011  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41012
41013  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41014  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41015  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41016
41017
41018      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41019      unset ac_cv_sizeof_int_p
41020      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41021      cat >>confdefs.h <<_ACEOF
41022#undef SIZEOF_INT_P
41023_ACEOF
41024
41025      # The cast to long int works around a bug in the HP C Compiler
41026# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41027# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41028# This bug is HP SR number 8606223364.
41029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41030$as_echo_n "checking size of int *... " >&6; }
41031if ${ac_cv_sizeof_int_p+:} false; then :
41032  $as_echo_n "(cached) " >&6
41033else
41034  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41035
41036else
41037  if test "$ac_cv_type_int_p" = yes; then
41038     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41040as_fn_error 77 "cannot compute sizeof (int *)
41041See \`config.log' for more details" "$LINENO" 5; }
41042   else
41043     ac_cv_sizeof_int_p=0
41044   fi
41045fi
41046
41047fi
41048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41049$as_echo "$ac_cv_sizeof_int_p" >&6; }
41050
41051
41052
41053cat >>confdefs.h <<_ACEOF
41054#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41055_ACEOF
41056
41057
41058
41059      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41060
41061      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41062        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
41063      fi
41064    fi
41065  fi
41066
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41068$as_echo_n "checking for target address size... " >&6; }
41069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41070$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41071
41072
41073  ###############################################################################
41074  #
41075  # Is the target little of big endian?
41076  #
41077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41078$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41079if ${ac_cv_c_bigendian+:} false; then :
41080  $as_echo_n "(cached) " >&6
41081else
41082  ac_cv_c_bigendian=unknown
41083    # See if we're dealing with a universal compiler.
41084    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41085/* end confdefs.h.  */
41086#ifndef __APPLE_CC__
41087	       not a universal capable compiler
41088	     #endif
41089	     typedef int dummy;
41090
41091_ACEOF
41092if ac_fn_cxx_try_compile "$LINENO"; then :
41093
41094	# Check for potential -arch flags.  It is not universal unless
41095	# there are at least two -arch flags with different values.
41096	ac_arch=
41097	ac_prev=
41098	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41099	 if test -n "$ac_prev"; then
41100	   case $ac_word in
41101	     i?86 | x86_64 | ppc | ppc64)
41102	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41103		 ac_arch=$ac_word
41104	       else
41105		 ac_cv_c_bigendian=universal
41106		 break
41107	       fi
41108	       ;;
41109	   esac
41110	   ac_prev=
41111	 elif test "x$ac_word" = "x-arch"; then
41112	   ac_prev=arch
41113	 fi
41114       done
41115fi
41116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41117    if test $ac_cv_c_bigendian = unknown; then
41118      # See if sys/param.h defines the BYTE_ORDER macro.
41119      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41120/* end confdefs.h.  */
41121#include <sys/types.h>
41122	     #include <sys/param.h>
41123
41124int
41125main ()
41126{
41127#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41128		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41129		     && LITTLE_ENDIAN)
41130	      bogus endian macros
41131	     #endif
41132
41133  ;
41134  return 0;
41135}
41136_ACEOF
41137if ac_fn_cxx_try_compile "$LINENO"; then :
41138  # It does; now see whether it defined to BIG_ENDIAN or not.
41139	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41140/* end confdefs.h.  */
41141#include <sys/types.h>
41142		#include <sys/param.h>
41143
41144int
41145main ()
41146{
41147#if BYTE_ORDER != BIG_ENDIAN
41148		 not big endian
41149		#endif
41150
41151  ;
41152  return 0;
41153}
41154_ACEOF
41155if ac_fn_cxx_try_compile "$LINENO"; then :
41156  ac_cv_c_bigendian=yes
41157else
41158  ac_cv_c_bigendian=no
41159fi
41160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41161fi
41162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41163    fi
41164    if test $ac_cv_c_bigendian = unknown; then
41165      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41166      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41167/* end confdefs.h.  */
41168#include <limits.h>
41169
41170int
41171main ()
41172{
41173#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41174	      bogus endian macros
41175	     #endif
41176
41177  ;
41178  return 0;
41179}
41180_ACEOF
41181if ac_fn_cxx_try_compile "$LINENO"; then :
41182  # It does; now see whether it defined to _BIG_ENDIAN or not.
41183	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41184/* end confdefs.h.  */
41185#include <limits.h>
41186
41187int
41188main ()
41189{
41190#ifndef _BIG_ENDIAN
41191		 not big endian
41192		#endif
41193
41194  ;
41195  return 0;
41196}
41197_ACEOF
41198if ac_fn_cxx_try_compile "$LINENO"; then :
41199  ac_cv_c_bigendian=yes
41200else
41201  ac_cv_c_bigendian=no
41202fi
41203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41204fi
41205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41206    fi
41207    if test $ac_cv_c_bigendian = unknown; then
41208      # Compile a test program.
41209      if test "$cross_compiling" = yes; then :
41210  # Try to guess by grepping values from an object file.
41211	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41212/* end confdefs.h.  */
41213short int ascii_mm[] =
41214		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41215		short int ascii_ii[] =
41216		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41217		int use_ascii (int i) {
41218		  return ascii_mm[i] + ascii_ii[i];
41219		}
41220		short int ebcdic_ii[] =
41221		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41222		short int ebcdic_mm[] =
41223		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41224		int use_ebcdic (int i) {
41225		  return ebcdic_mm[i] + ebcdic_ii[i];
41226		}
41227		extern int foo;
41228
41229int
41230main ()
41231{
41232return use_ascii (foo) == use_ebcdic (foo);
41233  ;
41234  return 0;
41235}
41236_ACEOF
41237if ac_fn_cxx_try_compile "$LINENO"; then :
41238  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41239	      ac_cv_c_bigendian=yes
41240	    fi
41241	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41242	      if test "$ac_cv_c_bigendian" = unknown; then
41243		ac_cv_c_bigendian=no
41244	      else
41245		# finding both strings is unlikely to happen, but who knows?
41246		ac_cv_c_bigendian=unknown
41247	      fi
41248	    fi
41249fi
41250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41251else
41252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41253/* end confdefs.h.  */
41254$ac_includes_default
41255int
41256main ()
41257{
41258
41259	     /* Are we little or big endian?  From Harbison&Steele.  */
41260	     union
41261	     {
41262	       long int l;
41263	       char c[sizeof (long int)];
41264	     } u;
41265	     u.l = 1;
41266	     return u.c[sizeof (long int) - 1] == 1;
41267
41268  ;
41269  return 0;
41270}
41271_ACEOF
41272if ac_fn_cxx_try_run "$LINENO"; then :
41273  ac_cv_c_bigendian=no
41274else
41275  ac_cv_c_bigendian=yes
41276fi
41277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41278  conftest.$ac_objext conftest.beam conftest.$ac_ext
41279fi
41280
41281    fi
41282fi
41283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41284$as_echo "$ac_cv_c_bigendian" >&6; }
41285 case $ac_cv_c_bigendian in #(
41286   yes)
41287     ENDIAN="big";; #(
41288   no)
41289     ENDIAN="little" ;; #(
41290   universal)
41291     ENDIAN="universal_endianness"
41292     ;; #(
41293   *)
41294     ENDIAN="unknown" ;;
41295 esac
41296
41297
41298  if test "x$ENDIAN" = xuniversal_endianness; then
41299    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41300  fi
41301  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41302    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
41303  fi
41304
41305
41306# Configure flags for the tools
41307
41308  ###############################################################################
41309  #
41310  # How to compile shared libraries.
41311  #
41312
41313  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41314    PICFLAG="-fPIC"
41315    C_FLAG_REORDER=''
41316    CXX_FLAG_REORDER=''
41317
41318    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41319      # Linking is different on MacOSX
41320      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41321      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41322      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41323      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41324      SET_SHARED_LIBRARY_MAPFILE=''
41325    else
41326      # Default works for linux, might work on other platforms as well.
41327      SHARED_LIBRARY_FLAGS='-shared'
41328      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41329      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41330      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41331      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41332    fi
41333  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41334    PICFLAG=''
41335    C_FLAG_REORDER=''
41336    CXX_FLAG_REORDER=''
41337
41338    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41339      # Linking is different on MacOSX
41340      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41341      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41342      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41343      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41344      SET_SHARED_LIBRARY_MAPFILE=''
41345    else
41346      # Default works for linux, might work on other platforms as well.
41347      SHARED_LIBRARY_FLAGS='-shared'
41348      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41349      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41350      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41351      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41352    fi
41353  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41354    PICFLAG="-KPIC"
41355    C_FLAG_REORDER='-xF'
41356    CXX_FLAG_REORDER='-xF'
41357    SHARED_LIBRARY_FLAGS="-G"
41358    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41359    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41360    SET_SHARED_LIBRARY_NAME=''
41361    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41362  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41363    PICFLAG="-qpic=large"
41364    C_FLAG_REORDER=''
41365    CXX_FLAG_REORDER=''
41366    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41367    SET_EXECUTABLE_ORIGIN=""
41368    SET_SHARED_LIBRARY_ORIGIN=''
41369    SET_SHARED_LIBRARY_NAME=''
41370    SET_SHARED_LIBRARY_MAPFILE=''
41371  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41372    PICFLAG=""
41373    C_FLAG_REORDER=''
41374    CXX_FLAG_REORDER=''
41375    SHARED_LIBRARY_FLAGS="-LD"
41376    SET_EXECUTABLE_ORIGIN=''
41377    SET_SHARED_LIBRARY_ORIGIN=''
41378    SET_SHARED_LIBRARY_NAME=''
41379    SET_SHARED_LIBRARY_MAPFILE=''
41380  fi
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41391    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41392    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41393    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41394  fi
41395  # The (cross) compiler is now configured, we can now test capabilities
41396  # of the target platform.
41397
41398
41399
41400  ###############################################################################
41401  #
41402  # Setup the opt flags for different compilers
41403  # and different operating systems.
41404  #
41405
41406  # FIXME: this was indirectly the old default, but just inherited.
41407  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41408  #   C_FLAG_DEPS="-MMD -MF"
41409  # fi
41410
41411  # Generate make dependency files
41412  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41413    C_FLAG_DEPS="-MMD -MF"
41414  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41415    C_FLAG_DEPS="-MMD -MF"
41416  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41417    C_FLAG_DEPS="-xMMD -xMF"
41418  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41419    C_FLAG_DEPS="-qmakedep=gcc -MF"
41420  fi
41421  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41422
41423
41424
41425  # Debug symbols
41426  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41427    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41428      CFLAGS_DEBUG_SYMBOLS="-g1"
41429      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41430    else
41431      CFLAGS_DEBUG_SYMBOLS="-g"
41432      CXXFLAGS_DEBUG_SYMBOLS="-g"
41433    fi
41434  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41435    CFLAGS_DEBUG_SYMBOLS="-g"
41436    CXXFLAGS_DEBUG_SYMBOLS="-g"
41437  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41438    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41439    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41440  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41441    CFLAGS_DEBUG_SYMBOLS="-g"
41442    CXXFLAGS_DEBUG_SYMBOLS="-g"
41443  fi
41444
41445
41446
41447  # Optimization levels
41448  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41449    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41450
41451    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41452      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41453      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41454      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41455      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41456      C_O_FLAG_NONE="-xregs=no%frameptr"
41457      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41458      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41459      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41460      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41461      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41462        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41463        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41464      fi
41465    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41466      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41467      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41468      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41469      C_O_FLAG_NONE=""
41470      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41471      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41472      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41473      CXX_O_FLAG_NONE=""
41474    fi
41475  else
41476    # The remaining toolchains share opt flags between CC and CXX;
41477    # setup for C and duplicate afterwards.
41478    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41479      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41480        # On MacOSX we optimize for size, something
41481        # we should do for all platforms?
41482        C_O_FLAG_HIGHEST="-Os"
41483        C_O_FLAG_HI="-Os"
41484        C_O_FLAG_NORM="-Os"
41485        C_O_FLAG_NONE=""
41486      else
41487        C_O_FLAG_HIGHEST="-O3"
41488        C_O_FLAG_HI="-O3"
41489        C_O_FLAG_NORM="-O2"
41490        C_O_FLAG_NONE="-O0"
41491      fi
41492    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41493      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41494        # On MacOSX we optimize for size, something
41495        # we should do for all platforms?
41496        C_O_FLAG_HIGHEST="-Os"
41497        C_O_FLAG_HI="-Os"
41498        C_O_FLAG_NORM="-Os"
41499        C_O_FLAG_NONE=""
41500      else
41501        C_O_FLAG_HIGHEST="-O3"
41502        C_O_FLAG_HI="-O3"
41503        C_O_FLAG_NORM="-O2"
41504        C_O_FLAG_NONE="-O0"
41505      fi
41506    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41507      C_O_FLAG_HIGHEST="-O3"
41508      C_O_FLAG_HI="-O3 -qstrict"
41509      C_O_FLAG_NORM="-O2"
41510      C_O_FLAG_NONE=""
41511    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41512      C_O_FLAG_HIGHEST="-O2"
41513      C_O_FLAG_HI="-O1"
41514      C_O_FLAG_NORM="-O1"
41515      C_O_FLAG_NONE="-Od"
41516    fi
41517    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41518    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41519    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41520    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41521  fi
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533  # Special extras...
41534  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41535    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41536      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41537      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41538    fi
41539  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41540    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41541    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41542    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41543  fi
41544
41545  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41546    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41547$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41548  fi
41549
41550  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41551    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41552$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41553  fi
41554
41555  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41556    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41557$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41558  fi
41559
41560
41561# Check whether --with-extra-cflags was given.
41562if test "${with_extra_cflags+set}" = set; then :
41563  withval=$with_extra_cflags;
41564fi
41565
41566
41567
41568# Check whether --with-extra-cxxflags was given.
41569if test "${with_extra_cxxflags+set}" = set; then :
41570  withval=$with_extra_cxxflags;
41571fi
41572
41573
41574
41575# Check whether --with-extra-ldflags was given.
41576if test "${with_extra_ldflags+set}" = set; then :
41577  withval=$with_extra_ldflags;
41578fi
41579
41580
41581  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41582  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41583  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41584
41585  # Hotspot needs these set in their legacy form
41586  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41587  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41588  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41589
41590
41591
41592
41593
41594  ###############################################################################
41595  #
41596  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41597  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41598  #
41599
41600  # Setup compiler/platform specific flags to CFLAGS_JDK,
41601  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41602  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41603    # these options are used for both C and C++ compiles
41604    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41605        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41606    case $OPENJDK_TARGET_CPU_ARCH in
41607      arm )
41608        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41609        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41610        ;;
41611      ppc )
41612        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41613        ;;
41614      * )
41615        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41616        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41617        ;;
41618    esac
41619  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41620    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41621    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41622      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41623      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41624    fi
41625
41626    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41627    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41628  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41629    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41630    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41631  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41632    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41633    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41634    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41635    -DWIN32 -DIAL"
41636    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41637      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41638    else
41639      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41640    fi
41641  fi
41642
41643  ###############################################################################
41644
41645  # Adjust flags according to debug level.
41646  case $DEBUG_LEVEL in
41647    fastdebug )
41648      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41649      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41650      C_O_FLAG_HI="$C_O_FLAG_NORM"
41651      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41652      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41653      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41654      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41655      ;;
41656    slowdebug )
41657      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41658      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41659      C_O_FLAG_HI="$C_O_FLAG_NONE"
41660      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41661      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41662      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41663      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41664      ;;
41665  esac
41666
41667  # Setup LP64
41668  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41669
41670  # Set some common defines. These works for all compilers, but assume
41671  # -D is universally accepted.
41672
41673  # Setup endianness
41674  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41675    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41676    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41677    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41678    #   Note: -Dmacro         is the same as    #define macro 1
41679    #         -Dmacro=        is the same as    #define macro
41680    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41681      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41682    else
41683      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41684    fi
41685  else
41686    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41687  fi
41688
41689  # Setup target OS define. Use OS target name but in upper case.
41690  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41691  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41692
41693  # Setup target CPU
41694  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41695
41696  # Setup debug/release defines
41697  if test "x$DEBUG_LEVEL" = xrelease; then
41698    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41699    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41700      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41701    fi
41702  else
41703    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41704  fi
41705
41706  # Setup release name
41707  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41708
41709
41710  # Set some additional per-OS defines.
41711  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41712    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41713  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41714    # FIXME: PPC64 should not be here.
41715    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41716  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41717    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41718  fi
41719
41720  # Additional macosx handling
41721  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41722    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41723      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41724      # FIXME: clean this up, and/or move it elsewhere.
41725
41726      # Setting these parameters makes it an error to link to macosx APIs that are
41727      # newer than the given OS version and makes the linked binaries compatible
41728      # even if built on a newer version of the OS.
41729      # The expected format is X.Y.Z
41730      MACOSX_VERSION_MIN=10.7.0
41731
41732
41733      # The macro takes the version with no dots, ex: 1070
41734      # Let the flags variables get resolved in make for easier override on make
41735      # command line.
41736      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41737      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41738    fi
41739  fi
41740
41741  # Setup some hard coded includes
41742  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41743      -I${JDK_OUTPUTDIR}/include \
41744      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41745      -I${JDK_TOPDIR}/src/share/javavm/export \
41746      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41747      -I${JDK_TOPDIR}/src/share/native/common \
41748      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41749
41750  # The shared libraries are compiled using the picflag.
41751  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41752  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41753
41754  # Executable flags
41755  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41756  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41757
41758
41759
41760
41761
41762
41763  # Setup LDFLAGS et al.
41764  #
41765  # Now this is odd. The JDK native libraries have to link against libjvm.so
41766  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41767  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41768  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41769  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41770  # libraries will link to whatever is in memory. Yuck.
41771  #
41772  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41773  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41774    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41775    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41776      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41777    fi
41778    # TODO: make -debug optional "--disable-full-debug-symbols"
41779    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41780    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41781    LDFLAGS_JDKLIB_SUFFIX=""
41782    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41783      LDFLAGS_STACK_SIZE=1048576
41784    else
41785      LDFLAGS_STACK_SIZE=327680
41786    fi
41787    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41788  else
41789    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41790      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41791      # We have previously set HAS_GNU_HASH if this is the case
41792      if test -n "$HAS_GNU_HASH"; then
41793        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41794      fi
41795      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41796        # And since we now know that the linker is gnu, then add -z defs, to forbid
41797        # undefined symbols in object files.
41798        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41799        if test "x$DEBUG_LEVEL" = "xrelease"; then
41800          # When building release libraries, tell the linker optimize them.
41801          # Should this be supplied to the OSS linker as well?
41802          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41803        fi
41804      fi
41805    fi
41806
41807    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41808      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41809      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41810    fi
41811
41812    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41813        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41814
41815    # On some platforms (mac) the linker warns about non existing -L dirs.
41816    # Add server first if available. Linking aginst client does not always produce the same results.
41817    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41818    # Default to server for other variants.
41819    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41820      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41821    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41822      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41823    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41824      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41825    else
41826      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41827    fi
41828
41829    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41830    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41831      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41832    fi
41833
41834    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41835    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41836      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41837    fi
41838  fi
41839
41840
41841
41842
41843
41844
41845
41846
41847  # Some Zero and Shark settings.
41848  # ZERO_ARCHFLAG tells the compiler which mode to build for
41849  case "${OPENJDK_TARGET_CPU}" in
41850    s390)
41851      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41852      ;;
41853    *)
41854      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41855  esac
41856
41857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41858$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41859  supports=yes
41860
41861  saved_cflags="$CFLAGS"
41862  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41863  ac_ext=c
41864ac_cpp='$CPP $CPPFLAGS'
41865ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41866ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41867ac_compiler_gnu=$ac_cv_c_compiler_gnu
41868
41869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41870/* end confdefs.h.  */
41871int i;
41872_ACEOF
41873if ac_fn_c_try_compile "$LINENO"; then :
41874
41875else
41876  supports=no
41877fi
41878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41879  ac_ext=cpp
41880ac_cpp='$CXXCPP $CPPFLAGS'
41881ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41882ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41883ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41884
41885  CFLAGS="$saved_cflags"
41886
41887  saved_cxxflags="$CXXFLAGS"
41888  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41889  ac_ext=cpp
41890ac_cpp='$CXXCPP $CPPFLAGS'
41891ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41892ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41893ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41894
41895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41896/* end confdefs.h.  */
41897int i;
41898_ACEOF
41899if ac_fn_cxx_try_compile "$LINENO"; then :
41900
41901else
41902  supports=no
41903fi
41904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41905  ac_ext=cpp
41906ac_cpp='$CXXCPP $CPPFLAGS'
41907ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41908ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41909ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41910
41911  CXXFLAGS="$saved_cxxflags"
41912
41913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41914$as_echo "$supports" >&6; }
41915  if test "x$supports" = "xyes" ; then
41916    :
41917  else
41918    ZERO_ARCHFLAG=""
41919  fi
41920
41921
41922
41923  # Check that the compiler supports -mX (or -qX on AIX) flags
41924  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41925
41926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41927$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41928  supports=yes
41929
41930  saved_cflags="$CFLAGS"
41931  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41932  ac_ext=c
41933ac_cpp='$CPP $CPPFLAGS'
41934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41936ac_compiler_gnu=$ac_cv_c_compiler_gnu
41937
41938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41939/* end confdefs.h.  */
41940int i;
41941_ACEOF
41942if ac_fn_c_try_compile "$LINENO"; then :
41943
41944else
41945  supports=no
41946fi
41947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41948  ac_ext=cpp
41949ac_cpp='$CXXCPP $CPPFLAGS'
41950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41953
41954  CFLAGS="$saved_cflags"
41955
41956  saved_cxxflags="$CXXFLAGS"
41957  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41958  ac_ext=cpp
41959ac_cpp='$CXXCPP $CPPFLAGS'
41960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41963
41964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41965/* end confdefs.h.  */
41966int i;
41967_ACEOF
41968if ac_fn_cxx_try_compile "$LINENO"; then :
41969
41970else
41971  supports=no
41972fi
41973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41974  ac_ext=cpp
41975ac_cpp='$CXXCPP $CPPFLAGS'
41976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41979
41980  CXXFLAGS="$saved_cxxflags"
41981
41982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41983$as_echo "$supports" >&6; }
41984  if test "x$supports" = "xyes" ; then
41985    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41986  else
41987    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41988  fi
41989
41990
41991
41992
41993# Setup debug symbols (need objcopy from the toolchain for that)
41994
41995  #
41996  # ENABLE_DEBUG_SYMBOLS
41997  # This must be done after the toolchain is setup, since we're looking at objcopy.
41998  #
41999  # Check whether --enable-debug-symbols was given.
42000if test "${enable_debug_symbols+set}" = set; then :
42001  enableval=$enable_debug_symbols;
42002fi
42003
42004
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42006$as_echo_n "checking if we should generate debug symbols... " >&6; }
42007
42008  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42009    # explicit enabling of enable-debug-symbols and can't find objcopy
42010    #   this is an error
42011    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42012  fi
42013
42014  if test "x$enable_debug_symbols" = "xyes"; then
42015    ENABLE_DEBUG_SYMBOLS=true
42016  elif test "x$enable_debug_symbols" = "xno"; then
42017    ENABLE_DEBUG_SYMBOLS=false
42018  else
42019    # Default is on if objcopy is found
42020    if test "x$OBJCOPY" != x; then
42021      ENABLE_DEBUG_SYMBOLS=true
42022    # MacOS X and Windows don't use objcopy but default is on for those OSes
42023    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42024      ENABLE_DEBUG_SYMBOLS=true
42025    else
42026      ENABLE_DEBUG_SYMBOLS=false
42027    fi
42028  fi
42029
42030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42031$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42032
42033  #
42034  # ZIP_DEBUGINFO_FILES
42035  #
42036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42037$as_echo_n "checking if we should zip debug-info files... " >&6; }
42038  # Check whether --enable-zip-debug-info was given.
42039if test "${enable_zip_debug_info+set}" = set; then :
42040  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42041else
42042  enable_zip_debug_info="yes"
42043fi
42044
42045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42046$as_echo "${enable_zip_debug_info}" >&6; }
42047
42048  if test "x${enable_zip_debug_info}" = "xno"; then
42049    ZIP_DEBUGINFO_FILES=false
42050  else
42051    ZIP_DEBUGINFO_FILES=true
42052  fi
42053
42054
42055
42056
42057
42058###############################################################################
42059#
42060# Check dependencies for external and internal libraries.
42061#
42062###############################################################################
42063
42064# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42065
42066  # When using cygwin or msys, we need a wrapper binary that renames
42067  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42068  # @files and rewrites these too! This wrapper binary is
42069  # called fixpath.
42070  FIXPATH=
42071  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42073$as_echo_n "checking if fixpath can be created... " >&6; }
42074    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42075    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42076    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42077      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42078      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42079      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42080      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42081    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42082      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42083      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42084
42085      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42086      # @ was chosen as separator to minimize risk of other tools messing around with it
42087      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42088      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42089
42090      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42091    fi
42092    rm -f $OUTPUT_ROOT/fixpath*
42093    cd $OUTPUT_ROOT
42094    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42095    cd $CURDIR
42096
42097    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42099$as_echo "no" >&6; }
42100      cat $OUTPUT_ROOT/fixpath1.log
42101      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42102    fi
42103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42104$as_echo "yes" >&6; }
42105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42106$as_echo_n "checking if fixpath.exe works... " >&6; }
42107    cd $OUTPUT_ROOT
42108    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42109    cd $CURDIR
42110    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42112$as_echo "no" >&6; }
42113      cat $OUTPUT_ROOT/fixpath2.log
42114      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42115    fi
42116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42117$as_echo "yes" >&6; }
42118    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42119  fi
42120
42121
42122
42123
42124
42125
42126  ###############################################################################
42127  #
42128  # OS specific settings that we never will need to probe.
42129  #
42130  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42132$as_echo_n "checking what is not needed on Linux?... " >&6; }
42133    PULSE_NOT_NEEDED=yes
42134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42135$as_echo "pulse" >&6; }
42136  fi
42137
42138  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42140$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42141    ALSA_NOT_NEEDED=yes
42142    PULSE_NOT_NEEDED=yes
42143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42144$as_echo "alsa pulse" >&6; }
42145  fi
42146
42147  if test "x$OPENJDK_TARGET_OS" = xaix; then
42148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42149$as_echo_n "checking what is not needed on AIX?... " >&6; }
42150    ALSA_NOT_NEEDED=yes
42151    PULSE_NOT_NEEDED=yes
42152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42153$as_echo "alsa pulse" >&6; }
42154  fi
42155
42156
42157  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42159$as_echo_n "checking what is not needed on Windows?... " >&6; }
42160    CUPS_NOT_NEEDED=yes
42161    ALSA_NOT_NEEDED=yes
42162    PULSE_NOT_NEEDED=yes
42163    X11_NOT_NEEDED=yes
42164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42165$as_echo "alsa cups pulse x11" >&6; }
42166  fi
42167
42168  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42170$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42171    ALSA_NOT_NEEDED=yes
42172    PULSE_NOT_NEEDED=yes
42173    X11_NOT_NEEDED=yes
42174    # If the java runtime framework is disabled, then we need X11.
42175    # This will be adjusted below.
42176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42177$as_echo "alsa pulse x11" >&6; }
42178  fi
42179
42180  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42182$as_echo_n "checking what is not needed on bsd?... " >&6; }
42183    ALSA_NOT_NEEDED=yes
42184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42185$as_echo "alsa" >&6; }
42186  fi
42187
42188  if test "x$OPENJDK" = "xfalse"; then
42189    FREETYPE_NOT_NEEDED=yes
42190  fi
42191
42192  if test "x$SUPPORT_HEADFUL" = xno; then
42193    X11_NOT_NEEDED=yes
42194  fi
42195
42196  ###############################################################################
42197  #
42198  # Check for MacOSX support for OpenJDK.
42199  #
42200
42201
42202  # Check whether --enable-macosx-runtime-support was given.
42203if test "${enable_macosx_runtime_support+set}" = set; then :
42204  enableval=$enable_macosx_runtime_support;
42205fi
42206
42207  if test "x$enable_macosx_runtime_support" != x; then
42208    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42209$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42210  fi
42211
42212
42213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42214$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42215  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42217$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42218  else
42219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42220$as_echo "no" >&6; }
42221  fi
42222
42223
42224
42225  ###############################################################################
42226  #
42227  # Check for X Windows
42228  #
42229
42230  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42231  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42232  # --x-libraries for the sysroot, if that seems to be correct.
42233  if test "x$SYS_ROOT" != "x/"; then
42234    if test "x$x_includes" = xNONE; then
42235      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42236        x_includes="$SYS_ROOT/usr/X11R6/include"
42237      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42238        x_includes="$SYS_ROOT/usr/include"
42239      fi
42240    fi
42241    if test "x$x_libraries" = xNONE; then
42242      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42243        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42244      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42245        x_libraries="$SYS_ROOT/usr/lib64"
42246      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42247        x_libraries="$SYS_ROOT/usr/lib"
42248      fi
42249    fi
42250  fi
42251
42252  # Now let autoconf do it's magic
42253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42254$as_echo_n "checking for X... " >&6; }
42255
42256
42257# Check whether --with-x was given.
42258if test "${with_x+set}" = set; then :
42259  withval=$with_x;
42260fi
42261
42262# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42263if test "x$with_x" = xno; then
42264  # The user explicitly disabled X.
42265  have_x=disabled
42266else
42267  case $x_includes,$x_libraries in #(
42268    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42269    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42270  $as_echo_n "(cached) " >&6
42271else
42272  # One or both of the vars are not set, and there is no cached value.
42273ac_x_includes=no ac_x_libraries=no
42274rm -f -r conftest.dir
42275if mkdir conftest.dir; then
42276  cd conftest.dir
42277  cat >Imakefile <<'_ACEOF'
42278incroot:
42279	@echo incroot='${INCROOT}'
42280usrlibdir:
42281	@echo usrlibdir='${USRLIBDIR}'
42282libdir:
42283	@echo libdir='${LIBDIR}'
42284_ACEOF
42285  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42286    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42287    for ac_var in incroot usrlibdir libdir; do
42288      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42289    done
42290    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42291    for ac_extension in a so sl dylib la dll; do
42292      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42293	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42294	ac_im_usrlibdir=$ac_im_libdir; break
42295      fi
42296    done
42297    # Screen out bogus values from the imake configuration.  They are
42298    # bogus both because they are the default anyway, and because
42299    # using them would break gcc on systems where it needs fixed includes.
42300    case $ac_im_incroot in
42301	/usr/include) ac_x_includes= ;;
42302	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42303    esac
42304    case $ac_im_usrlibdir in
42305	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42306	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42307    esac
42308  fi
42309  cd ..
42310  rm -f -r conftest.dir
42311fi
42312
42313# Standard set of common directories for X headers.
42314# Check X11 before X11Rn because it is often a symlink to the current release.
42315ac_x_header_dirs='
42316/usr/X11/include
42317/usr/X11R7/include
42318/usr/X11R6/include
42319/usr/X11R5/include
42320/usr/X11R4/include
42321
42322/usr/include/X11
42323/usr/include/X11R7
42324/usr/include/X11R6
42325/usr/include/X11R5
42326/usr/include/X11R4
42327
42328/usr/local/X11/include
42329/usr/local/X11R7/include
42330/usr/local/X11R6/include
42331/usr/local/X11R5/include
42332/usr/local/X11R4/include
42333
42334/usr/local/include/X11
42335/usr/local/include/X11R7
42336/usr/local/include/X11R6
42337/usr/local/include/X11R5
42338/usr/local/include/X11R4
42339
42340/usr/X386/include
42341/usr/x386/include
42342/usr/XFree86/include/X11
42343
42344/usr/include
42345/usr/local/include
42346/usr/unsupported/include
42347/usr/athena/include
42348/usr/local/x11r5/include
42349/usr/lpp/Xamples/include
42350
42351/usr/openwin/include
42352/usr/openwin/share/include'
42353
42354if test "$ac_x_includes" = no; then
42355  # Guess where to find include files, by looking for Xlib.h.
42356  # First, try using that file with no special directory specified.
42357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42358/* end confdefs.h.  */
42359#include <X11/Xlib.h>
42360_ACEOF
42361if ac_fn_cxx_try_cpp "$LINENO"; then :
42362  # We can compile using X headers with no special include directory.
42363ac_x_includes=
42364else
42365  for ac_dir in $ac_x_header_dirs; do
42366  if test -r "$ac_dir/X11/Xlib.h"; then
42367    ac_x_includes=$ac_dir
42368    break
42369  fi
42370done
42371fi
42372rm -f conftest.err conftest.i conftest.$ac_ext
42373fi # $ac_x_includes = no
42374
42375if test "$ac_x_libraries" = no; then
42376  # Check for the libraries.
42377  # See if we find them without any special options.
42378  # Don't add to $LIBS permanently.
42379  ac_save_LIBS=$LIBS
42380  LIBS="-lX11 $LIBS"
42381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42382/* end confdefs.h.  */
42383#include <X11/Xlib.h>
42384int
42385main ()
42386{
42387XrmInitialize ()
42388  ;
42389  return 0;
42390}
42391_ACEOF
42392if ac_fn_cxx_try_link "$LINENO"; then :
42393  LIBS=$ac_save_LIBS
42394# We can link X programs with no special library path.
42395ac_x_libraries=
42396else
42397  LIBS=$ac_save_LIBS
42398for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42399do
42400  # Don't even attempt the hair of trying to link an X program!
42401  for ac_extension in a so sl dylib la dll; do
42402    if test -r "$ac_dir/libX11.$ac_extension"; then
42403      ac_x_libraries=$ac_dir
42404      break 2
42405    fi
42406  done
42407done
42408fi
42409rm -f core conftest.err conftest.$ac_objext \
42410    conftest$ac_exeext conftest.$ac_ext
42411fi # $ac_x_libraries = no
42412
42413case $ac_x_includes,$ac_x_libraries in #(
42414  no,* | *,no | *\'*)
42415    # Didn't find X, or a directory has "'" in its name.
42416    ac_cv_have_x="have_x=no";; #(
42417  *)
42418    # Record where we found X for the cache.
42419    ac_cv_have_x="have_x=yes\
42420	ac_x_includes='$ac_x_includes'\
42421	ac_x_libraries='$ac_x_libraries'"
42422esac
42423fi
42424;; #(
42425    *) have_x=yes;;
42426  esac
42427  eval "$ac_cv_have_x"
42428fi # $with_x != no
42429
42430if test "$have_x" != yes; then
42431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42432$as_echo "$have_x" >&6; }
42433  no_x=yes
42434else
42435  # If each of the values was on the command line, it overrides each guess.
42436  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42437  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42438  # Update the cache value to reflect the command line values.
42439  ac_cv_have_x="have_x=yes\
42440	ac_x_includes='$x_includes'\
42441	ac_x_libraries='$x_libraries'"
42442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42443$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42444fi
42445
42446  if test "$no_x" = yes; then
42447  # Not all programs may use this symbol, but it does not hurt to define it.
42448
42449$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42450
42451  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42452else
42453  if test -n "$x_includes"; then
42454    X_CFLAGS="$X_CFLAGS -I$x_includes"
42455  fi
42456
42457  # It would also be nice to do this for all -L options, not just this one.
42458  if test -n "$x_libraries"; then
42459    X_LIBS="$X_LIBS -L$x_libraries"
42460    # For Solaris; some versions of Sun CC require a space after -R and
42461    # others require no space.  Words are not sufficient . . . .
42462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42463$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42464    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42465    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42466    ac_cxx_werror_flag=yes
42467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42468/* end confdefs.h.  */
42469
42470int
42471main ()
42472{
42473
42474  ;
42475  return 0;
42476}
42477_ACEOF
42478if ac_fn_cxx_try_link "$LINENO"; then :
42479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42480$as_echo "no" >&6; }
42481       X_LIBS="$X_LIBS -R$x_libraries"
42482else
42483  LIBS="$ac_xsave_LIBS -R $x_libraries"
42484       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42485/* end confdefs.h.  */
42486
42487int
42488main ()
42489{
42490
42491  ;
42492  return 0;
42493}
42494_ACEOF
42495if ac_fn_cxx_try_link "$LINENO"; then :
42496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42497$as_echo "yes" >&6; }
42498	  X_LIBS="$X_LIBS -R $x_libraries"
42499else
42500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42501$as_echo "neither works" >&6; }
42502fi
42503rm -f core conftest.err conftest.$ac_objext \
42504    conftest$ac_exeext conftest.$ac_ext
42505fi
42506rm -f core conftest.err conftest.$ac_objext \
42507    conftest$ac_exeext conftest.$ac_ext
42508    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42509    LIBS=$ac_xsave_LIBS
42510  fi
42511
42512  # Check for system-dependent libraries X programs must link with.
42513  # Do this before checking for the system-independent R6 libraries
42514  # (-lICE), since we may need -lsocket or whatever for X linking.
42515
42516  if test "$ISC" = yes; then
42517    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42518  else
42519    # Martyn Johnson says this is needed for Ultrix, if the X
42520    # libraries were built with DECnet support.  And Karl Berry says
42521    # the Alpha needs dnet_stub (dnet does not exist).
42522    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42523    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42524/* end confdefs.h.  */
42525
42526/* Override any GCC internal prototype to avoid an error.
42527   Use char because int might match the return type of a GCC
42528   builtin and then its argument prototype would still apply.  */
42529#ifdef __cplusplus
42530extern "C"
42531#endif
42532char XOpenDisplay ();
42533int
42534main ()
42535{
42536return XOpenDisplay ();
42537  ;
42538  return 0;
42539}
42540_ACEOF
42541if ac_fn_cxx_try_link "$LINENO"; then :
42542
42543else
42544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42545$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42546if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42547  $as_echo_n "(cached) " >&6
42548else
42549  ac_check_lib_save_LIBS=$LIBS
42550LIBS="-ldnet  $LIBS"
42551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42552/* end confdefs.h.  */
42553
42554/* Override any GCC internal prototype to avoid an error.
42555   Use char because int might match the return type of a GCC
42556   builtin and then its argument prototype would still apply.  */
42557#ifdef __cplusplus
42558extern "C"
42559#endif
42560char dnet_ntoa ();
42561int
42562main ()
42563{
42564return dnet_ntoa ();
42565  ;
42566  return 0;
42567}
42568_ACEOF
42569if ac_fn_cxx_try_link "$LINENO"; then :
42570  ac_cv_lib_dnet_dnet_ntoa=yes
42571else
42572  ac_cv_lib_dnet_dnet_ntoa=no
42573fi
42574rm -f core conftest.err conftest.$ac_objext \
42575    conftest$ac_exeext conftest.$ac_ext
42576LIBS=$ac_check_lib_save_LIBS
42577fi
42578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42579$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42580if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42581  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42582fi
42583
42584    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42586$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42587if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42588  $as_echo_n "(cached) " >&6
42589else
42590  ac_check_lib_save_LIBS=$LIBS
42591LIBS="-ldnet_stub  $LIBS"
42592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42593/* end confdefs.h.  */
42594
42595/* Override any GCC internal prototype to avoid an error.
42596   Use char because int might match the return type of a GCC
42597   builtin and then its argument prototype would still apply.  */
42598#ifdef __cplusplus
42599extern "C"
42600#endif
42601char dnet_ntoa ();
42602int
42603main ()
42604{
42605return dnet_ntoa ();
42606  ;
42607  return 0;
42608}
42609_ACEOF
42610if ac_fn_cxx_try_link "$LINENO"; then :
42611  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42612else
42613  ac_cv_lib_dnet_stub_dnet_ntoa=no
42614fi
42615rm -f core conftest.err conftest.$ac_objext \
42616    conftest$ac_exeext conftest.$ac_ext
42617LIBS=$ac_check_lib_save_LIBS
42618fi
42619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42620$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42621if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42622  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42623fi
42624
42625    fi
42626fi
42627rm -f core conftest.err conftest.$ac_objext \
42628    conftest$ac_exeext conftest.$ac_ext
42629    LIBS="$ac_xsave_LIBS"
42630
42631    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42632    # to get the SysV transport functions.
42633    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42634    # needs -lnsl.
42635    # The nsl library prevents programs from opening the X display
42636    # on Irix 5.2, according to T.E. Dickey.
42637    # The functions gethostbyname, getservbyname, and inet_addr are
42638    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42639    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42640if test "x$ac_cv_func_gethostbyname" = xyes; then :
42641
42642fi
42643
42644    if test $ac_cv_func_gethostbyname = no; then
42645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42646$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42647if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42648  $as_echo_n "(cached) " >&6
42649else
42650  ac_check_lib_save_LIBS=$LIBS
42651LIBS="-lnsl  $LIBS"
42652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42653/* end confdefs.h.  */
42654
42655/* Override any GCC internal prototype to avoid an error.
42656   Use char because int might match the return type of a GCC
42657   builtin and then its argument prototype would still apply.  */
42658#ifdef __cplusplus
42659extern "C"
42660#endif
42661char gethostbyname ();
42662int
42663main ()
42664{
42665return gethostbyname ();
42666  ;
42667  return 0;
42668}
42669_ACEOF
42670if ac_fn_cxx_try_link "$LINENO"; then :
42671  ac_cv_lib_nsl_gethostbyname=yes
42672else
42673  ac_cv_lib_nsl_gethostbyname=no
42674fi
42675rm -f core conftest.err conftest.$ac_objext \
42676    conftest$ac_exeext conftest.$ac_ext
42677LIBS=$ac_check_lib_save_LIBS
42678fi
42679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42680$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42681if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42682  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42683fi
42684
42685      if test $ac_cv_lib_nsl_gethostbyname = no; then
42686	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42687$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42688if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42689  $as_echo_n "(cached) " >&6
42690else
42691  ac_check_lib_save_LIBS=$LIBS
42692LIBS="-lbsd  $LIBS"
42693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42694/* end confdefs.h.  */
42695
42696/* Override any GCC internal prototype to avoid an error.
42697   Use char because int might match the return type of a GCC
42698   builtin and then its argument prototype would still apply.  */
42699#ifdef __cplusplus
42700extern "C"
42701#endif
42702char gethostbyname ();
42703int
42704main ()
42705{
42706return gethostbyname ();
42707  ;
42708  return 0;
42709}
42710_ACEOF
42711if ac_fn_cxx_try_link "$LINENO"; then :
42712  ac_cv_lib_bsd_gethostbyname=yes
42713else
42714  ac_cv_lib_bsd_gethostbyname=no
42715fi
42716rm -f core conftest.err conftest.$ac_objext \
42717    conftest$ac_exeext conftest.$ac_ext
42718LIBS=$ac_check_lib_save_LIBS
42719fi
42720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42721$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42722if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42723  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42724fi
42725
42726      fi
42727    fi
42728
42729    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42730    # socket/setsockopt and other routines are undefined under SCO ODT
42731    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42732    # on later versions), says Simon Leinen: it contains gethostby*
42733    # variants that don't use the name server (or something).  -lsocket
42734    # must be given before -lnsl if both are needed.  We assume that
42735    # if connect needs -lnsl, so does gethostbyname.
42736    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42737if test "x$ac_cv_func_connect" = xyes; then :
42738
42739fi
42740
42741    if test $ac_cv_func_connect = no; then
42742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42743$as_echo_n "checking for connect in -lsocket... " >&6; }
42744if ${ac_cv_lib_socket_connect+:} false; then :
42745  $as_echo_n "(cached) " >&6
42746else
42747  ac_check_lib_save_LIBS=$LIBS
42748LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42750/* end confdefs.h.  */
42751
42752/* Override any GCC internal prototype to avoid an error.
42753   Use char because int might match the return type of a GCC
42754   builtin and then its argument prototype would still apply.  */
42755#ifdef __cplusplus
42756extern "C"
42757#endif
42758char connect ();
42759int
42760main ()
42761{
42762return connect ();
42763  ;
42764  return 0;
42765}
42766_ACEOF
42767if ac_fn_cxx_try_link "$LINENO"; then :
42768  ac_cv_lib_socket_connect=yes
42769else
42770  ac_cv_lib_socket_connect=no
42771fi
42772rm -f core conftest.err conftest.$ac_objext \
42773    conftest$ac_exeext conftest.$ac_ext
42774LIBS=$ac_check_lib_save_LIBS
42775fi
42776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42777$as_echo "$ac_cv_lib_socket_connect" >&6; }
42778if test "x$ac_cv_lib_socket_connect" = xyes; then :
42779  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42780fi
42781
42782    fi
42783
42784    # Guillermo Gomez says -lposix is necessary on A/UX.
42785    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42786if test "x$ac_cv_func_remove" = xyes; then :
42787
42788fi
42789
42790    if test $ac_cv_func_remove = no; then
42791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42792$as_echo_n "checking for remove in -lposix... " >&6; }
42793if ${ac_cv_lib_posix_remove+:} false; then :
42794  $as_echo_n "(cached) " >&6
42795else
42796  ac_check_lib_save_LIBS=$LIBS
42797LIBS="-lposix  $LIBS"
42798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42799/* end confdefs.h.  */
42800
42801/* Override any GCC internal prototype to avoid an error.
42802   Use char because int might match the return type of a GCC
42803   builtin and then its argument prototype would still apply.  */
42804#ifdef __cplusplus
42805extern "C"
42806#endif
42807char remove ();
42808int
42809main ()
42810{
42811return remove ();
42812  ;
42813  return 0;
42814}
42815_ACEOF
42816if ac_fn_cxx_try_link "$LINENO"; then :
42817  ac_cv_lib_posix_remove=yes
42818else
42819  ac_cv_lib_posix_remove=no
42820fi
42821rm -f core conftest.err conftest.$ac_objext \
42822    conftest$ac_exeext conftest.$ac_ext
42823LIBS=$ac_check_lib_save_LIBS
42824fi
42825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42826$as_echo "$ac_cv_lib_posix_remove" >&6; }
42827if test "x$ac_cv_lib_posix_remove" = xyes; then :
42828  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42829fi
42830
42831    fi
42832
42833    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42834    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42835if test "x$ac_cv_func_shmat" = xyes; then :
42836
42837fi
42838
42839    if test $ac_cv_func_shmat = no; then
42840      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42841$as_echo_n "checking for shmat in -lipc... " >&6; }
42842if ${ac_cv_lib_ipc_shmat+:} false; then :
42843  $as_echo_n "(cached) " >&6
42844else
42845  ac_check_lib_save_LIBS=$LIBS
42846LIBS="-lipc  $LIBS"
42847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42848/* end confdefs.h.  */
42849
42850/* Override any GCC internal prototype to avoid an error.
42851   Use char because int might match the return type of a GCC
42852   builtin and then its argument prototype would still apply.  */
42853#ifdef __cplusplus
42854extern "C"
42855#endif
42856char shmat ();
42857int
42858main ()
42859{
42860return shmat ();
42861  ;
42862  return 0;
42863}
42864_ACEOF
42865if ac_fn_cxx_try_link "$LINENO"; then :
42866  ac_cv_lib_ipc_shmat=yes
42867else
42868  ac_cv_lib_ipc_shmat=no
42869fi
42870rm -f core conftest.err conftest.$ac_objext \
42871    conftest$ac_exeext conftest.$ac_ext
42872LIBS=$ac_check_lib_save_LIBS
42873fi
42874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42875$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42876if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42877  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42878fi
42879
42880    fi
42881  fi
42882
42883  # Check for libraries that X11R6 Xt/Xaw programs need.
42884  ac_save_LDFLAGS=$LDFLAGS
42885  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42886  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42887  # check for ICE first), but we must link in the order -lSM -lICE or
42888  # we get undefined symbols.  So assume we have SM if we have ICE.
42889  # These have to be linked with before -lX11, unlike the other
42890  # libraries we check for below, so use a different variable.
42891  # John Interrante, Karl Berry
42892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42893$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42894if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42895  $as_echo_n "(cached) " >&6
42896else
42897  ac_check_lib_save_LIBS=$LIBS
42898LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42900/* end confdefs.h.  */
42901
42902/* Override any GCC internal prototype to avoid an error.
42903   Use char because int might match the return type of a GCC
42904   builtin and then its argument prototype would still apply.  */
42905#ifdef __cplusplus
42906extern "C"
42907#endif
42908char IceConnectionNumber ();
42909int
42910main ()
42911{
42912return IceConnectionNumber ();
42913  ;
42914  return 0;
42915}
42916_ACEOF
42917if ac_fn_cxx_try_link "$LINENO"; then :
42918  ac_cv_lib_ICE_IceConnectionNumber=yes
42919else
42920  ac_cv_lib_ICE_IceConnectionNumber=no
42921fi
42922rm -f core conftest.err conftest.$ac_objext \
42923    conftest$ac_exeext conftest.$ac_ext
42924LIBS=$ac_check_lib_save_LIBS
42925fi
42926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42927$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42928if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42929  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42930fi
42931
42932  LDFLAGS=$ac_save_LDFLAGS
42933
42934fi
42935
42936
42937  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42938  # this doesn't make sense so we remove it.
42939  if test "x$COMPILE_TYPE" = xcross; then
42940    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42941  fi
42942
42943  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42944
42945  # Print a helpful message on how to acquire the necessary build dependency.
42946  # x11 is the help tag: freetype, cups, pulse, alsa etc
42947  MISSING_DEPENDENCY=x11
42948
42949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42950    cygwin_help $MISSING_DEPENDENCY
42951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42952    msys_help $MISSING_DEPENDENCY
42953  else
42954    PKGHANDLER_COMMAND=
42955
42956    case $PKGHANDLER in
42957      apt-get)
42958        apt_help     $MISSING_DEPENDENCY ;;
42959      yum)
42960        yum_help     $MISSING_DEPENDENCY ;;
42961      port)
42962        port_help    $MISSING_DEPENDENCY ;;
42963      pkgutil)
42964        pkgutil_help $MISSING_DEPENDENCY ;;
42965      pkgadd)
42966        pkgadd_help  $MISSING_DEPENDENCY ;;
42967    esac
42968
42969    if test "x$PKGHANDLER_COMMAND" != x; then
42970      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42971    fi
42972  fi
42973
42974    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42975  fi
42976
42977  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42978    OPENWIN_HOME="/usr/openwin"
42979  fi
42980
42981
42982
42983  #
42984  # Weird Sol10 something check...TODO change to try compile
42985  #
42986  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42987    if test "`uname -r`" = "5.10"; then
42988      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42989        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42990      fi
42991    fi
42992  fi
42993
42994  ac_ext=c
42995ac_cpp='$CPP $CPPFLAGS'
42996ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42997ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42998ac_compiler_gnu=$ac_cv_c_compiler_gnu
42999
43000  OLD_CFLAGS="$CFLAGS"
43001  CFLAGS="$CFLAGS $X_CFLAGS"
43002
43003  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43004  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43005do :
43006  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43007ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43008        # include <X11/Xlib.h>
43009        # include <X11/Xutil.h>
43010
43011
43012"
43013if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43014  cat >>confdefs.h <<_ACEOF
43015#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43016_ACEOF
43017 X11_A_OK=yes
43018else
43019  X11_A_OK=no; break
43020fi
43021
43022done
43023
43024
43025  CFLAGS="$OLD_CFLAGS"
43026  ac_ext=cpp
43027ac_cpp='$CXXCPP $CPPFLAGS'
43028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43031
43032
43033  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43034
43035  # Print a helpful message on how to acquire the necessary build dependency.
43036  # x11 is the help tag: freetype, cups, pulse, alsa etc
43037  MISSING_DEPENDENCY=x11
43038
43039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43040    cygwin_help $MISSING_DEPENDENCY
43041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43042    msys_help $MISSING_DEPENDENCY
43043  else
43044    PKGHANDLER_COMMAND=
43045
43046    case $PKGHANDLER in
43047      apt-get)
43048        apt_help     $MISSING_DEPENDENCY ;;
43049      yum)
43050        yum_help     $MISSING_DEPENDENCY ;;
43051      port)
43052        port_help    $MISSING_DEPENDENCY ;;
43053      pkgutil)
43054        pkgutil_help $MISSING_DEPENDENCY ;;
43055      pkgadd)
43056        pkgadd_help  $MISSING_DEPENDENCY ;;
43057    esac
43058
43059    if test "x$PKGHANDLER_COMMAND" != x; then
43060      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43061    fi
43062  fi
43063
43064    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43065  fi
43066
43067
43068
43069
43070
43071
43072  ###############################################################################
43073  #
43074  # The common unix printing system cups is used to print from java.
43075  #
43076
43077# Check whether --with-cups was given.
43078if test "${with_cups+set}" = set; then :
43079  withval=$with_cups;
43080fi
43081
43082
43083# Check whether --with-cups-include was given.
43084if test "${with_cups_include+set}" = set; then :
43085  withval=$with_cups_include;
43086fi
43087
43088
43089  if test "x$CUPS_NOT_NEEDED" = xyes; then
43090    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43091      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43092$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43093    fi
43094    CUPS_CFLAGS=
43095  else
43096    CUPS_FOUND=no
43097
43098    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43099      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43100    fi
43101
43102    if test "x${with_cups}" != x; then
43103      CUPS_CFLAGS="-I${with_cups}/include"
43104      CUPS_FOUND=yes
43105    fi
43106    if test "x${with_cups_include}" != x; then
43107      CUPS_CFLAGS="-I${with_cups_include}"
43108      CUPS_FOUND=yes
43109    fi
43110    if test "x$CUPS_FOUND" = xno; then
43111
43112
43113  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43114    # Source the builddeps file again, to make sure it uses the latest variables!
43115    . $builddepsfile
43116    # Look for a target and build machine specific resource!
43117    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43118    if test "x$resource" = x; then
43119      # Ok, lets instead look for a target specific resource
43120      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43121    fi
43122    if test "x$resource" = x; then
43123      # Ok, lets instead look for a build specific resource
43124      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43125    fi
43126    if test "x$resource" = x; then
43127      # Ok, lets instead look for a generic resource
43128      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43129      resource=${builddep_cups}
43130    fi
43131    if test "x$resource" != x; then
43132      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43133$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43134      # If the resource in the builddeps.conf file is an existing directory,
43135      # for example /java/linux/cups
43136      if test -d ${resource}; then
43137        depdir=${resource}
43138      else
43139
43140  # cups is for example mymodule
43141  # $resource is for example libs/general/libmymod_1_2_3.zip
43142  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43143  # $with_builddeps_dir is for example /localhome/builddeps
43144  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43145  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43146  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43147  filename=`basename $resource`
43148  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43149  filebase=${filename%%.*}
43150  extension=${filename#*.}
43151  installdir=$with_builddeps_dir/$filebase
43152  if test ! -f $installdir/$filename.unpacked; then
43153    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43154$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43155    if test ! -d $installdir; then
43156      mkdir -p $installdir
43157    fi
43158    if test ! -d $installdir; then
43159      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43160    fi
43161    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43162    touch $tmpfile
43163    if test ! -f $tmpfile; then
43164      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43165    fi
43166
43167  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43168  # $tmpfile is the local file name for the downloaded file.
43169  VALID_TOOL=no
43170  if test "x$BDEPS_FTP" = xwget; then
43171    VALID_TOOL=yes
43172    wget -O $tmpfile $with_builddeps_server/$resource
43173  fi
43174  if test "x$BDEPS_FTP" = xlftp; then
43175    VALID_TOOL=yes
43176    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43177  fi
43178  if test "x$BDEPS_FTP" = xftp; then
43179    VALID_TOOL=yes
43180    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43181    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43182    FTPUSERPWD=${FTPSERVER%%@*}
43183    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43184      FTPUSER=${userpwd%%:*}
43185      FTPPWD=${userpwd#*@}
43186      FTPSERVER=${FTPSERVER#*@}
43187    else
43188      FTPUSER=ftp
43189      FTPPWD=ftp
43190    fi
43191    # the "pass" command does not work on some
43192    # ftp clients (read ftp.exe) but if it works,
43193    # passive mode is better!
43194    ( \
43195        echo "user $FTPUSER $FTPPWD"        ; \
43196        echo "pass"                         ; \
43197        echo "bin"                          ; \
43198        echo "get $FTPPATH $tmpfile"              ; \
43199    ) | ftp -in $FTPSERVER
43200  fi
43201  if test "x$VALID_TOOL" != xyes; then
43202    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43203  fi
43204
43205    mv $tmpfile $installdir/$filename
43206    if test ! -s $installdir/$filename; then
43207      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43208    fi
43209    case "$extension" in
43210      zip)  echo "Unzipping $installdir/$filename..."
43211        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43212        ;;
43213      tar.gz) echo "Untaring $installdir/$filename..."
43214        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43215        ;;
43216      tgz) echo "Untaring $installdir/$filename..."
43217        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43218        ;;
43219      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43220        ;;
43221    esac
43222  fi
43223  if test -f $installdir/$filename.unpacked; then
43224    depdir=$installdir
43225  fi
43226
43227      fi
43228      # Source the builddeps file again, because in the previous command, the depdir
43229      # was updated to point at the current build dependency install directory.
43230      . $builddepsfile
43231      # Now extract variables from the builddeps.conf files.
43232      theroot=${builddep_cups_ROOT}
43233      thecflags=${builddep_cups_CFLAGS}
43234      thelibs=${builddep_cups_LIBS}
43235      if test "x$depdir" = x; then
43236        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43237      fi
43238      CUPS=$depdir
43239      if test "x$theroot" != x; then
43240        CUPS="$theroot"
43241      fi
43242      if test "x$thecflags" != x; then
43243        CUPS_CFLAGS="$thecflags"
43244      fi
43245      if test "x$thelibs" != x; then
43246        CUPS_LIBS="$thelibs"
43247      fi
43248      CUPS_FOUND=yes
43249
43250    fi
43251
43252  fi
43253
43254    fi
43255    if test "x$CUPS_FOUND" = xno; then
43256      # Are the cups headers installed in the default /usr/include location?
43257      for ac_header in cups/cups.h cups/ppd.h
43258do :
43259  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43260ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43262  cat >>confdefs.h <<_ACEOF
43263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43264_ACEOF
43265
43266            CUPS_FOUND=yes
43267            CUPS_CFLAGS=
43268            DEFAULT_CUPS=yes
43269
43270
43271fi
43272
43273done
43274
43275    fi
43276    if test "x$CUPS_FOUND" = xno; then
43277      # Getting nervous now? Lets poke around for standard Solaris third-party
43278      # package installation locations.
43279      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43280$as_echo_n "checking for cups headers... " >&6; }
43281      if test -s /opt/sfw/cups/include/cups/cups.h; then
43282        # An SFW package seems to be installed!
43283        CUPS_FOUND=yes
43284        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43285      elif test -s /opt/csw/include/cups/cups.h; then
43286        # A CSW package seems to be installed!
43287        CUPS_FOUND=yes
43288        CUPS_CFLAGS="-I/opt/csw/include"
43289      fi
43290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43291$as_echo "$CUPS_FOUND" >&6; }
43292    fi
43293    if test "x$CUPS_FOUND" = xno; then
43294
43295  # Print a helpful message on how to acquire the necessary build dependency.
43296  # cups is the help tag: freetype, cups, pulse, alsa etc
43297  MISSING_DEPENDENCY=cups
43298
43299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43300    cygwin_help $MISSING_DEPENDENCY
43301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43302    msys_help $MISSING_DEPENDENCY
43303  else
43304    PKGHANDLER_COMMAND=
43305
43306    case $PKGHANDLER in
43307      apt-get)
43308        apt_help     $MISSING_DEPENDENCY ;;
43309      yum)
43310        yum_help     $MISSING_DEPENDENCY ;;
43311      port)
43312        port_help    $MISSING_DEPENDENCY ;;
43313      pkgutil)
43314        pkgutil_help $MISSING_DEPENDENCY ;;
43315      pkgadd)
43316        pkgadd_help  $MISSING_DEPENDENCY ;;
43317    esac
43318
43319    if test "x$PKGHANDLER_COMMAND" != x; then
43320      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43321    fi
43322  fi
43323
43324      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43325    fi
43326  fi
43327
43328
43329
43330
43331
43332
43333  ###############################################################################
43334  #
43335  # The ubiquitous freetype library is used to render fonts.
43336  #
43337
43338# Check whether --with-freetype was given.
43339if test "${with_freetype+set}" = set; then :
43340  withval=$with_freetype;
43341fi
43342
43343
43344# Check whether --with-freetype-include was given.
43345if test "${with_freetype_include+set}" = set; then :
43346  withval=$with_freetype_include;
43347fi
43348
43349
43350# Check whether --with-freetype-lib was given.
43351if test "${with_freetype_lib+set}" = set; then :
43352  withval=$with_freetype_lib;
43353fi
43354
43355  # Check whether --enable-freetype-bundling was given.
43356if test "${enable_freetype_bundling+set}" = set; then :
43357  enableval=$enable_freetype_bundling;
43358fi
43359
43360
43361  FREETYPE_CFLAGS=
43362  FREETYPE_LIBS=
43363  FREETYPE_BUNDLE_LIB_PATH=
43364
43365  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43366    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43367      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43368$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43369    fi
43370    if test "x$enable_freetype_bundling" != x; then
43371      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43372$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43373    fi
43374  else
43375    # freetype is needed to build; go get it!
43376
43377    BUNDLE_FREETYPE="$enable_freetype_bundling"
43378
43379    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43380      # User has specified settings
43381
43382      if test "x$BUNDLE_FREETYPE" = x; then
43383        # If not specified, default is to bundle freetype
43384        BUNDLE_FREETYPE=yes
43385      fi
43386
43387      if test "x$with_freetype" != x; then
43388        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43389        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43390      fi
43391
43392      # Allow --with-freetype-lib and --with-freetype-include to override
43393      if test "x$with_freetype_include" != x; then
43394        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43395      fi
43396      if test "x$with_freetype_lib" != x; then
43397        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43398      fi
43399
43400      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43401        # Okay, we got it. Check that it works.
43402
43403  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43404  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43405  METHOD="--with-freetype"
43406
43407  # First check if the files exists.
43408  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43409    # We found an arbitrary include file. That's a good sign.
43410    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43411$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43412    FOUND_FREETYPE=yes
43413
43414    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43415    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43416      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43417$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43418      FOUND_FREETYPE=no
43419    else
43420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43421        # On Windows, we will need both .lib and .dll file.
43422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43425          FOUND_FREETYPE=no
43426        fi
43427      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
43428        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43429        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43430      fi
43431    fi
43432  fi
43433
43434  if test "x$FOUND_FREETYPE" = xyes; then
43435
43436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43437
43438  # Input might be given as Windows format, start by converting to
43439  # unix format.
43440  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43441  new_path=`$CYGPATH -u "$path"`
43442
43443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43446  # "foo.exe" is OK but "foo" is an error.
43447  #
43448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43449  # It is also a way to make sure we got the proper file name for the real test later on.
43450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43451  if test "x$test_shortpath" = x; then
43452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43455  fi
43456
43457  # Call helper function which possibly converts this using DOS-style short mode.
43458  # If so, the updated path is stored in $new_path.
43459
43460  input_path="$new_path"
43461  # Check if we need to convert this using DOS-style short mode. If the path
43462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43463  # take no chances and rewrite it.
43464  # Note: m4 eats our [], so we need to use [ and ] instead.
43465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43466  if test "x$has_forbidden_chars" != x; then
43467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43471      # Going to short mode and back again did indeed matter. Since short mode is
43472      # case insensitive, let's make it lowercase to improve readability.
43473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43474      # Now convert it back to Unix-stile (cygpath)
43475      input_path=`$CYGPATH -u "$shortmode_path"`
43476      new_path="$input_path"
43477    fi
43478  fi
43479
43480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43481  if test "x$test_cygdrive_prefix" = x; then
43482    # As a simple fix, exclude /usr/bin since it's not a real path.
43483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43485      # a path prefixed by /cygdrive for fixpath to work.
43486      new_path="$CYGWIN_ROOT_PATH$input_path"
43487    fi
43488  fi
43489
43490
43491  if test "x$path" != "x$new_path"; then
43492    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43495  fi
43496
43497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43498
43499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43500  has_colon=`$ECHO $path | $GREP ^.:`
43501  new_path="$path"
43502  if test "x$has_colon" = x; then
43503    # Not in mixed or Windows style, start by that.
43504    new_path=`cmd //c echo $path`
43505  fi
43506
43507
43508  input_path="$new_path"
43509  # Check if we need to convert this using DOS-style short mode. If the path
43510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43511  # take no chances and rewrite it.
43512  # Note: m4 eats our [], so we need to use [ and ] instead.
43513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43514  if test "x$has_forbidden_chars" != x; then
43515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43517  fi
43518
43519
43520  windows_path="$new_path"
43521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43522    unix_path=`$CYGPATH -u "$windows_path"`
43523    new_path="$unix_path"
43524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43526    new_path="$unix_path"
43527  fi
43528
43529  if test "x$path" != "x$new_path"; then
43530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43533  fi
43534
43535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43537
43538  else
43539    # We're on a posix platform. Hooray! :)
43540    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43541    has_space=`$ECHO "$path" | $GREP " "`
43542    if test "x$has_space" != x; then
43543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43546    fi
43547
43548    # Use eval to expand a potential ~
43549    eval path="$path"
43550    if test ! -f "$path" && test ! -d "$path"; then
43551      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43552    fi
43553
43554    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43555  fi
43556
43557
43558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43559
43560  # Input might be given as Windows format, start by converting to
43561  # unix format.
43562  path="$POTENTIAL_FREETYPE_LIB_PATH"
43563  new_path=`$CYGPATH -u "$path"`
43564
43565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43568  # "foo.exe" is OK but "foo" is an error.
43569  #
43570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43571  # It is also a way to make sure we got the proper file name for the real test later on.
43572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43573  if test "x$test_shortpath" = x; then
43574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43576    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43577  fi
43578
43579  # Call helper function which possibly converts this using DOS-style short mode.
43580  # If so, the updated path is stored in $new_path.
43581
43582  input_path="$new_path"
43583  # Check if we need to convert this using DOS-style short mode. If the path
43584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43585  # take no chances and rewrite it.
43586  # Note: m4 eats our [], so we need to use [ and ] instead.
43587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43588  if test "x$has_forbidden_chars" != x; then
43589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43593      # Going to short mode and back again did indeed matter. Since short mode is
43594      # case insensitive, let's make it lowercase to improve readability.
43595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43596      # Now convert it back to Unix-stile (cygpath)
43597      input_path=`$CYGPATH -u "$shortmode_path"`
43598      new_path="$input_path"
43599    fi
43600  fi
43601
43602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43603  if test "x$test_cygdrive_prefix" = x; then
43604    # As a simple fix, exclude /usr/bin since it's not a real path.
43605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43607      # a path prefixed by /cygdrive for fixpath to work.
43608      new_path="$CYGWIN_ROOT_PATH$input_path"
43609    fi
43610  fi
43611
43612
43613  if test "x$path" != "x$new_path"; then
43614    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43617  fi
43618
43619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43620
43621  path="$POTENTIAL_FREETYPE_LIB_PATH"
43622  has_colon=`$ECHO $path | $GREP ^.:`
43623  new_path="$path"
43624  if test "x$has_colon" = x; then
43625    # Not in mixed or Windows style, start by that.
43626    new_path=`cmd //c echo $path`
43627  fi
43628
43629
43630  input_path="$new_path"
43631  # Check if we need to convert this using DOS-style short mode. If the path
43632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43633  # take no chances and rewrite it.
43634  # Note: m4 eats our [], so we need to use [ and ] instead.
43635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43636  if test "x$has_forbidden_chars" != x; then
43637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43639  fi
43640
43641
43642  windows_path="$new_path"
43643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43644    unix_path=`$CYGPATH -u "$windows_path"`
43645    new_path="$unix_path"
43646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43648    new_path="$unix_path"
43649  fi
43650
43651  if test "x$path" != "x$new_path"; then
43652    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43655  fi
43656
43657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43659
43660  else
43661    # We're on a posix platform. Hooray! :)
43662    path="$POTENTIAL_FREETYPE_LIB_PATH"
43663    has_space=`$ECHO "$path" | $GREP " "`
43664    if test "x$has_space" != x; then
43665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43667      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43668    fi
43669
43670    # Use eval to expand a potential ~
43671    eval path="$path"
43672    if test ! -f "$path" && test ! -d "$path"; then
43673      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43674    fi
43675
43676    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43677  fi
43678
43679
43680    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43682$as_echo_n "checking for freetype includes... " >&6; }
43683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43684$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43685    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43687$as_echo_n "checking for freetype libraries... " >&6; }
43688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43689$as_echo "$FREETYPE_LIB_PATH" >&6; }
43690  fi
43691
43692        if test "x$FOUND_FREETYPE" != xyes; then
43693          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43694        fi
43695      else
43696        # User specified only one of lib or include. This is an error.
43697        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43698          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43699$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43700          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43701        else
43702          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43703$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43704          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43705        fi
43706      fi
43707    else
43708      # User did not specify settings, but we need freetype. Try to locate it.
43709
43710      if test "x$BUNDLE_FREETYPE" = x; then
43711        # If not specified, default is to bundle freetype only on windows
43712        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43713          BUNDLE_FREETYPE=yes
43714        else
43715          BUNDLE_FREETYPE=no
43716        fi
43717      fi
43718
43719      if test "x$FOUND_FREETYPE" != xyes; then
43720        # Check builddeps
43721
43722
43723  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43724    # Source the builddeps file again, to make sure it uses the latest variables!
43725    . $builddepsfile
43726    # Look for a target and build machine specific resource!
43727    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43728    if test "x$resource" = x; then
43729      # Ok, lets instead look for a target specific resource
43730      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43731    fi
43732    if test "x$resource" = x; then
43733      # Ok, lets instead look for a build specific resource
43734      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43735    fi
43736    if test "x$resource" = x; then
43737      # Ok, lets instead look for a generic resource
43738      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43739      resource=${builddep_freetype2}
43740    fi
43741    if test "x$resource" != x; then
43742      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43743$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43744      # If the resource in the builddeps.conf file is an existing directory,
43745      # for example /java/linux/cups
43746      if test -d ${resource}; then
43747        depdir=${resource}
43748      else
43749
43750  # freetype2 is for example mymodule
43751  # $resource is for example libs/general/libmymod_1_2_3.zip
43752  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43753  # $with_builddeps_dir is for example /localhome/builddeps
43754  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43755  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43756  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43757  filename=`basename $resource`
43758  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43759  filebase=${filename%%.*}
43760  extension=${filename#*.}
43761  installdir=$with_builddeps_dir/$filebase
43762  if test ! -f $installdir/$filename.unpacked; then
43763    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43764$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43765    if test ! -d $installdir; then
43766      mkdir -p $installdir
43767    fi
43768    if test ! -d $installdir; then
43769      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43770    fi
43771    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43772    touch $tmpfile
43773    if test ! -f $tmpfile; then
43774      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43775    fi
43776
43777  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43778  # $tmpfile is the local file name for the downloaded file.
43779  VALID_TOOL=no
43780  if test "x$BDEPS_FTP" = xwget; then
43781    VALID_TOOL=yes
43782    wget -O $tmpfile $with_builddeps_server/$resource
43783  fi
43784  if test "x$BDEPS_FTP" = xlftp; then
43785    VALID_TOOL=yes
43786    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43787  fi
43788  if test "x$BDEPS_FTP" = xftp; then
43789    VALID_TOOL=yes
43790    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43791    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43792    FTPUSERPWD=${FTPSERVER%%@*}
43793    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43794      FTPUSER=${userpwd%%:*}
43795      FTPPWD=${userpwd#*@}
43796      FTPSERVER=${FTPSERVER#*@}
43797    else
43798      FTPUSER=ftp
43799      FTPPWD=ftp
43800    fi
43801    # the "pass" command does not work on some
43802    # ftp clients (read ftp.exe) but if it works,
43803    # passive mode is better!
43804    ( \
43805        echo "user $FTPUSER $FTPPWD"        ; \
43806        echo "pass"                         ; \
43807        echo "bin"                          ; \
43808        echo "get $FTPPATH $tmpfile"              ; \
43809    ) | ftp -in $FTPSERVER
43810  fi
43811  if test "x$VALID_TOOL" != xyes; then
43812    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43813  fi
43814
43815    mv $tmpfile $installdir/$filename
43816    if test ! -s $installdir/$filename; then
43817      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43818    fi
43819    case "$extension" in
43820      zip)  echo "Unzipping $installdir/$filename..."
43821        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43822        ;;
43823      tar.gz) echo "Untaring $installdir/$filename..."
43824        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43825        ;;
43826      tgz) echo "Untaring $installdir/$filename..."
43827        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43828        ;;
43829      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43830        ;;
43831    esac
43832  fi
43833  if test -f $installdir/$filename.unpacked; then
43834    depdir=$installdir
43835  fi
43836
43837      fi
43838      # Source the builddeps file again, because in the previous command, the depdir
43839      # was updated to point at the current build dependency install directory.
43840      . $builddepsfile
43841      # Now extract variables from the builddeps.conf files.
43842      theroot=${builddep_freetype2_ROOT}
43843      thecflags=${builddep_freetype2_CFLAGS}
43844      thelibs=${builddep_freetype2_LIBS}
43845      if test "x$depdir" = x; then
43846        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43847      fi
43848      FREETYPE=$depdir
43849      if test "x$theroot" != x; then
43850        FREETYPE="$theroot"
43851      fi
43852      if test "x$thecflags" != x; then
43853        FREETYPE_CFLAGS="$thecflags"
43854      fi
43855      if test "x$thelibs" != x; then
43856        FREETYPE_LIBS="$thelibs"
43857      fi
43858      FOUND_FREETYPE=yes
43859      else FOUND_FREETYPE=no
43860
43861    fi
43862    else FOUND_FREETYPE=no
43863
43864  fi
43865
43866        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43867        if test "x$FOUND_FREETYPE" = xyes; then
43868          if test "x$BUNDLE_FREETYPE" = xyes; then
43869            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43870$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43871            FOUND_FREETYPE=no
43872          else
43873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43874$as_echo_n "checking for freetype... " >&6; }
43875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43876$as_echo "yes (using builddeps)" >&6; }
43877          fi
43878        fi
43879      fi
43880
43881      if test "x$FOUND_FREETYPE" != xyes; then
43882        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43883        if test "x$PKG_CONFIG" != x; then
43884
43885pkg_failed=no
43886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43887$as_echo_n "checking for FREETYPE... " >&6; }
43888
43889if test -n "$FREETYPE_CFLAGS"; then
43890    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43891 elif test -n "$PKG_CONFIG"; then
43892    if test -n "$PKG_CONFIG" && \
43893    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43894  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43895  ac_status=$?
43896  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43897  test $ac_status = 0; }; then
43898  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43899else
43900  pkg_failed=yes
43901fi
43902 else
43903    pkg_failed=untried
43904fi
43905if test -n "$FREETYPE_LIBS"; then
43906    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43907 elif test -n "$PKG_CONFIG"; then
43908    if test -n "$PKG_CONFIG" && \
43909    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43910  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43911  ac_status=$?
43912  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43913  test $ac_status = 0; }; then
43914  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43915else
43916  pkg_failed=yes
43917fi
43918 else
43919    pkg_failed=untried
43920fi
43921
43922
43923
43924if test $pkg_failed = yes; then
43925
43926if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43927        _pkg_short_errors_supported=yes
43928else
43929        _pkg_short_errors_supported=no
43930fi
43931        if test $_pkg_short_errors_supported = yes; then
43932	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43933        else
43934	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43935        fi
43936	# Put the nasty error message in config.log where it belongs
43937	echo "$FREETYPE_PKG_ERRORS" >&5
43938
43939	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43940$as_echo "no" >&6; }
43941                FOUND_FREETYPE=no
43942elif test $pkg_failed = untried; then
43943	FOUND_FREETYPE=no
43944else
43945	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43946	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43948$as_echo "yes" >&6; }
43949	FOUND_FREETYPE=yes
43950fi
43951          if test "x$FOUND_FREETYPE" = xyes; then
43952            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43953            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43954            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43955            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43956              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43957            fi
43958            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43959            if test "x$BUNDLE_FREETYPE" = xyes; then
43960              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43961$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43962              FOUND_FREETYPE=no
43963            else
43964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43965$as_echo_n "checking for freetype... " >&6; }
43966              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43967$as_echo "yes (using pkg-config)" >&6; }
43968            fi
43969          fi
43970        fi
43971      fi
43972
43973      if test "x$FOUND_FREETYPE" != xyes; then
43974        # Check in well-known locations
43975        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43976          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43977
43978  windows_path="$FREETYPE_BASE_DIR"
43979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43980    unix_path=`$CYGPATH -u "$windows_path"`
43981    FREETYPE_BASE_DIR="$unix_path"
43982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43984    FREETYPE_BASE_DIR="$unix_path"
43985  fi
43986
43987
43988  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43989  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43990  METHOD="well-known location"
43991
43992  # First check if the files exists.
43993  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43994    # We found an arbitrary include file. That's a good sign.
43995    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43996$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43997    FOUND_FREETYPE=yes
43998
43999    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44000    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44001      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44002$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44003      FOUND_FREETYPE=no
44004    else
44005      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44006        # On Windows, we will need both .lib and .dll file.
44007        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44008          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44009$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44010          FOUND_FREETYPE=no
44011        fi
44012      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
44013        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44014        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44015      fi
44016    fi
44017  fi
44018
44019  if test "x$FOUND_FREETYPE" = xyes; then
44020
44021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44022
44023  # Input might be given as Windows format, start by converting to
44024  # unix format.
44025  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44026  new_path=`$CYGPATH -u "$path"`
44027
44028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44031  # "foo.exe" is OK but "foo" is an error.
44032  #
44033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44034  # It is also a way to make sure we got the proper file name for the real test later on.
44035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44036  if test "x$test_shortpath" = x; then
44037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44039    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44040  fi
44041
44042  # Call helper function which possibly converts this using DOS-style short mode.
44043  # If so, the updated path is stored in $new_path.
44044
44045  input_path="$new_path"
44046  # Check if we need to convert this using DOS-style short mode. If the path
44047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44048  # take no chances and rewrite it.
44049  # Note: m4 eats our [], so we need to use [ and ] instead.
44050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44051  if test "x$has_forbidden_chars" != x; then
44052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44056      # Going to short mode and back again did indeed matter. Since short mode is
44057      # case insensitive, let's make it lowercase to improve readability.
44058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44059      # Now convert it back to Unix-stile (cygpath)
44060      input_path=`$CYGPATH -u "$shortmode_path"`
44061      new_path="$input_path"
44062    fi
44063  fi
44064
44065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44066  if test "x$test_cygdrive_prefix" = x; then
44067    # As a simple fix, exclude /usr/bin since it's not a real path.
44068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44070      # a path prefixed by /cygdrive for fixpath to work.
44071      new_path="$CYGWIN_ROOT_PATH$input_path"
44072    fi
44073  fi
44074
44075
44076  if test "x$path" != "x$new_path"; then
44077    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44080  fi
44081
44082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44083
44084  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44085  has_colon=`$ECHO $path | $GREP ^.:`
44086  new_path="$path"
44087  if test "x$has_colon" = x; then
44088    # Not in mixed or Windows style, start by that.
44089    new_path=`cmd //c echo $path`
44090  fi
44091
44092
44093  input_path="$new_path"
44094  # Check if we need to convert this using DOS-style short mode. If the path
44095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44096  # take no chances and rewrite it.
44097  # Note: m4 eats our [], so we need to use [ and ] instead.
44098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44099  if test "x$has_forbidden_chars" != x; then
44100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44102  fi
44103
44104
44105  windows_path="$new_path"
44106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44107    unix_path=`$CYGPATH -u "$windows_path"`
44108    new_path="$unix_path"
44109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44111    new_path="$unix_path"
44112  fi
44113
44114  if test "x$path" != "x$new_path"; then
44115    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44117$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44118  fi
44119
44120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44122
44123  else
44124    # We're on a posix platform. Hooray! :)
44125    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44126    has_space=`$ECHO "$path" | $GREP " "`
44127    if test "x$has_space" != x; then
44128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44129$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44130      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44131    fi
44132
44133    # Use eval to expand a potential ~
44134    eval path="$path"
44135    if test ! -f "$path" && test ! -d "$path"; then
44136      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44137    fi
44138
44139    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44140  fi
44141
44142
44143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44144
44145  # Input might be given as Windows format, start by converting to
44146  # unix format.
44147  path="$POTENTIAL_FREETYPE_LIB_PATH"
44148  new_path=`$CYGPATH -u "$path"`
44149
44150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44153  # "foo.exe" is OK but "foo" is an error.
44154  #
44155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44156  # It is also a way to make sure we got the proper file name for the real test later on.
44157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44158  if test "x$test_shortpath" = x; then
44159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44161    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44162  fi
44163
44164  # Call helper function which possibly converts this using DOS-style short mode.
44165  # If so, the updated path is stored in $new_path.
44166
44167  input_path="$new_path"
44168  # Check if we need to convert this using DOS-style short mode. If the path
44169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44170  # take no chances and rewrite it.
44171  # Note: m4 eats our [], so we need to use [ and ] instead.
44172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44173  if test "x$has_forbidden_chars" != x; then
44174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44178      # Going to short mode and back again did indeed matter. Since short mode is
44179      # case insensitive, let's make it lowercase to improve readability.
44180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44181      # Now convert it back to Unix-stile (cygpath)
44182      input_path=`$CYGPATH -u "$shortmode_path"`
44183      new_path="$input_path"
44184    fi
44185  fi
44186
44187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44188  if test "x$test_cygdrive_prefix" = x; then
44189    # As a simple fix, exclude /usr/bin since it's not a real path.
44190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44192      # a path prefixed by /cygdrive for fixpath to work.
44193      new_path="$CYGWIN_ROOT_PATH$input_path"
44194    fi
44195  fi
44196
44197
44198  if test "x$path" != "x$new_path"; then
44199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44202  fi
44203
44204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44205
44206  path="$POTENTIAL_FREETYPE_LIB_PATH"
44207  has_colon=`$ECHO $path | $GREP ^.:`
44208  new_path="$path"
44209  if test "x$has_colon" = x; then
44210    # Not in mixed or Windows style, start by that.
44211    new_path=`cmd //c echo $path`
44212  fi
44213
44214
44215  input_path="$new_path"
44216  # Check if we need to convert this using DOS-style short mode. If the path
44217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44218  # take no chances and rewrite it.
44219  # Note: m4 eats our [], so we need to use [ and ] instead.
44220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44221  if test "x$has_forbidden_chars" != x; then
44222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44224  fi
44225
44226
44227  windows_path="$new_path"
44228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44229    unix_path=`$CYGPATH -u "$windows_path"`
44230    new_path="$unix_path"
44231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44233    new_path="$unix_path"
44234  fi
44235
44236  if test "x$path" != "x$new_path"; then
44237    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44240  fi
44241
44242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44244
44245  else
44246    # We're on a posix platform. Hooray! :)
44247    path="$POTENTIAL_FREETYPE_LIB_PATH"
44248    has_space=`$ECHO "$path" | $GREP " "`
44249    if test "x$has_space" != x; then
44250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44252      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44253    fi
44254
44255    # Use eval to expand a potential ~
44256    eval path="$path"
44257    if test ! -f "$path" && test ! -d "$path"; then
44258      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44259    fi
44260
44261    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44262  fi
44263
44264
44265    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44267$as_echo_n "checking for freetype includes... " >&6; }
44268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44269$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44270    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44272$as_echo_n "checking for freetype libraries... " >&6; }
44273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44274$as_echo "$FREETYPE_LIB_PATH" >&6; }
44275  fi
44276
44277          if test "x$FOUND_FREETYPE" != xyes; then
44278            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44279
44280  windows_path="$FREETYPE_BASE_DIR"
44281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44282    unix_path=`$CYGPATH -u "$windows_path"`
44283    FREETYPE_BASE_DIR="$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    FREETYPE_BASE_DIR="$unix_path"
44287  fi
44288
44289
44290  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44291  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44292  METHOD="well-known location"
44293
44294  # First check if the files exists.
44295  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44296    # We found an arbitrary include file. That's a good sign.
44297    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44298$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44299    FOUND_FREETYPE=yes
44300
44301    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44302    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44303      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44305      FOUND_FREETYPE=no
44306    else
44307      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44308        # On Windows, we will need both .lib and .dll file.
44309        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44310          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44311$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44312          FOUND_FREETYPE=no
44313        fi
44314      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
44315        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44316        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44317      fi
44318    fi
44319  fi
44320
44321  if test "x$FOUND_FREETYPE" = xyes; then
44322
44323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44324
44325  # Input might be given as Windows format, start by converting to
44326  # unix format.
44327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44328  new_path=`$CYGPATH -u "$path"`
44329
44330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44333  # "foo.exe" is OK but "foo" is an error.
44334  #
44335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44336  # It is also a way to make sure we got the proper file name for the real test later on.
44337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44338  if test "x$test_shortpath" = x; then
44339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44341    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44342  fi
44343
44344  # Call helper function which possibly converts this using DOS-style short mode.
44345  # If so, the updated path is stored in $new_path.
44346
44347  input_path="$new_path"
44348  # Check if we need to convert this using DOS-style short mode. If the path
44349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44350  # take no chances and rewrite it.
44351  # Note: m4 eats our [], so we need to use [ and ] instead.
44352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44353  if test "x$has_forbidden_chars" != x; then
44354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44358      # Going to short mode and back again did indeed matter. Since short mode is
44359      # case insensitive, let's make it lowercase to improve readability.
44360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44361      # Now convert it back to Unix-stile (cygpath)
44362      input_path=`$CYGPATH -u "$shortmode_path"`
44363      new_path="$input_path"
44364    fi
44365  fi
44366
44367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44368  if test "x$test_cygdrive_prefix" = x; then
44369    # As a simple fix, exclude /usr/bin since it's not a real path.
44370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44372      # a path prefixed by /cygdrive for fixpath to work.
44373      new_path="$CYGWIN_ROOT_PATH$input_path"
44374    fi
44375  fi
44376
44377
44378  if test "x$path" != "x$new_path"; then
44379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44382  fi
44383
44384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44385
44386  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44387  has_colon=`$ECHO $path | $GREP ^.:`
44388  new_path="$path"
44389  if test "x$has_colon" = x; then
44390    # Not in mixed or Windows style, start by that.
44391    new_path=`cmd //c echo $path`
44392  fi
44393
44394
44395  input_path="$new_path"
44396  # Check if we need to convert this using DOS-style short mode. If the path
44397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44398  # take no chances and rewrite it.
44399  # Note: m4 eats our [], so we need to use [ and ] instead.
44400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44401  if test "x$has_forbidden_chars" != x; then
44402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44404  fi
44405
44406
44407  windows_path="$new_path"
44408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44409    unix_path=`$CYGPATH -u "$windows_path"`
44410    new_path="$unix_path"
44411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44413    new_path="$unix_path"
44414  fi
44415
44416  if test "x$path" != "x$new_path"; then
44417    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44420  fi
44421
44422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44424
44425  else
44426    # We're on a posix platform. Hooray! :)
44427    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44428    has_space=`$ECHO "$path" | $GREP " "`
44429    if test "x$has_space" != x; then
44430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44432      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44433    fi
44434
44435    # Use eval to expand a potential ~
44436    eval path="$path"
44437    if test ! -f "$path" && test ! -d "$path"; then
44438      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44439    fi
44440
44441    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44442  fi
44443
44444
44445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44446
44447  # Input might be given as Windows format, start by converting to
44448  # unix format.
44449  path="$POTENTIAL_FREETYPE_LIB_PATH"
44450  new_path=`$CYGPATH -u "$path"`
44451
44452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44455  # "foo.exe" is OK but "foo" is an error.
44456  #
44457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44458  # It is also a way to make sure we got the proper file name for the real test later on.
44459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44460  if test "x$test_shortpath" = x; then
44461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44463    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44464  fi
44465
44466  # Call helper function which possibly converts this using DOS-style short mode.
44467  # If so, the updated path is stored in $new_path.
44468
44469  input_path="$new_path"
44470  # Check if we need to convert this using DOS-style short mode. If the path
44471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44472  # take no chances and rewrite it.
44473  # Note: m4 eats our [], so we need to use [ and ] instead.
44474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44475  if test "x$has_forbidden_chars" != x; then
44476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44480      # Going to short mode and back again did indeed matter. Since short mode is
44481      # case insensitive, let's make it lowercase to improve readability.
44482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44483      # Now convert it back to Unix-stile (cygpath)
44484      input_path=`$CYGPATH -u "$shortmode_path"`
44485      new_path="$input_path"
44486    fi
44487  fi
44488
44489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44490  if test "x$test_cygdrive_prefix" = x; then
44491    # As a simple fix, exclude /usr/bin since it's not a real path.
44492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44494      # a path prefixed by /cygdrive for fixpath to work.
44495      new_path="$CYGWIN_ROOT_PATH$input_path"
44496    fi
44497  fi
44498
44499
44500  if test "x$path" != "x$new_path"; then
44501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44504  fi
44505
44506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44507
44508  path="$POTENTIAL_FREETYPE_LIB_PATH"
44509  has_colon=`$ECHO $path | $GREP ^.:`
44510  new_path="$path"
44511  if test "x$has_colon" = x; then
44512    # Not in mixed or Windows style, start by that.
44513    new_path=`cmd //c echo $path`
44514  fi
44515
44516
44517  input_path="$new_path"
44518  # Check if we need to convert this using DOS-style short mode. If the path
44519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44520  # take no chances and rewrite it.
44521  # Note: m4 eats our [], so we need to use [ and ] instead.
44522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44523  if test "x$has_forbidden_chars" != x; then
44524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44526  fi
44527
44528
44529  windows_path="$new_path"
44530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44531    unix_path=`$CYGPATH -u "$windows_path"`
44532    new_path="$unix_path"
44533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44535    new_path="$unix_path"
44536  fi
44537
44538  if test "x$path" != "x$new_path"; then
44539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44542  fi
44543
44544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44546
44547  else
44548    # We're on a posix platform. Hooray! :)
44549    path="$POTENTIAL_FREETYPE_LIB_PATH"
44550    has_space=`$ECHO "$path" | $GREP " "`
44551    if test "x$has_space" != x; then
44552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44554      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44555    fi
44556
44557    # Use eval to expand a potential ~
44558    eval path="$path"
44559    if test ! -f "$path" && test ! -d "$path"; then
44560      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44561    fi
44562
44563    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44564  fi
44565
44566
44567    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44569$as_echo_n "checking for freetype includes... " >&6; }
44570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44571$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44572    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44574$as_echo_n "checking for freetype libraries... " >&6; }
44575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44576$as_echo "$FREETYPE_LIB_PATH" >&6; }
44577  fi
44578
44579          fi
44580        else
44581          if test "x$SYS_ROOT" = "x/"; then
44582            FREETYPE_ROOT=
44583          else
44584            FREETYPE_ROOT="$SYS_ROOT"
44585          fi
44586          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44587
44588  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44589  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44590  METHOD="well-known location"
44591
44592  # First check if the files exists.
44593  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44594    # We found an arbitrary include file. That's a good sign.
44595    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44596$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44597    FOUND_FREETYPE=yes
44598
44599    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44600    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44601      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44602$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44603      FOUND_FREETYPE=no
44604    else
44605      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44606        # On Windows, we will need both .lib and .dll file.
44607        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44608          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44609$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44610          FOUND_FREETYPE=no
44611        fi
44612      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
44613        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44614        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44615      fi
44616    fi
44617  fi
44618
44619  if test "x$FOUND_FREETYPE" = xyes; then
44620
44621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44622
44623  # Input might be given as Windows format, start by converting to
44624  # unix format.
44625  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44626  new_path=`$CYGPATH -u "$path"`
44627
44628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44631  # "foo.exe" is OK but "foo" is an error.
44632  #
44633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44634  # It is also a way to make sure we got the proper file name for the real test later on.
44635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44636  if test "x$test_shortpath" = x; then
44637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44638$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44639    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44640  fi
44641
44642  # Call helper function which possibly converts this using DOS-style short mode.
44643  # If so, the updated path is stored in $new_path.
44644
44645  input_path="$new_path"
44646  # Check if we need to convert this using DOS-style short mode. If the path
44647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44648  # take no chances and rewrite it.
44649  # Note: m4 eats our [], so we need to use [ and ] instead.
44650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44651  if test "x$has_forbidden_chars" != x; then
44652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44656      # Going to short mode and back again did indeed matter. Since short mode is
44657      # case insensitive, let's make it lowercase to improve readability.
44658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44659      # Now convert it back to Unix-stile (cygpath)
44660      input_path=`$CYGPATH -u "$shortmode_path"`
44661      new_path="$input_path"
44662    fi
44663  fi
44664
44665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44666  if test "x$test_cygdrive_prefix" = x; then
44667    # As a simple fix, exclude /usr/bin since it's not a real path.
44668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44670      # a path prefixed by /cygdrive for fixpath to work.
44671      new_path="$CYGWIN_ROOT_PATH$input_path"
44672    fi
44673  fi
44674
44675
44676  if test "x$path" != "x$new_path"; then
44677    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44680  fi
44681
44682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44683
44684  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44685  has_colon=`$ECHO $path | $GREP ^.:`
44686  new_path="$path"
44687  if test "x$has_colon" = x; then
44688    # Not in mixed or Windows style, start by that.
44689    new_path=`cmd //c echo $path`
44690  fi
44691
44692
44693  input_path="$new_path"
44694  # Check if we need to convert this using DOS-style short mode. If the path
44695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44696  # take no chances and rewrite it.
44697  # Note: m4 eats our [], so we need to use [ and ] instead.
44698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44699  if test "x$has_forbidden_chars" != x; then
44700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44702  fi
44703
44704
44705  windows_path="$new_path"
44706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44707    unix_path=`$CYGPATH -u "$windows_path"`
44708    new_path="$unix_path"
44709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44711    new_path="$unix_path"
44712  fi
44713
44714  if test "x$path" != "x$new_path"; then
44715    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44718  fi
44719
44720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44722
44723  else
44724    # We're on a posix platform. Hooray! :)
44725    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44726    has_space=`$ECHO "$path" | $GREP " "`
44727    if test "x$has_space" != x; then
44728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44730      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44731    fi
44732
44733    # Use eval to expand a potential ~
44734    eval path="$path"
44735    if test ! -f "$path" && test ! -d "$path"; then
44736      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44737    fi
44738
44739    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44740  fi
44741
44742
44743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44744
44745  # Input might be given as Windows format, start by converting to
44746  # unix format.
44747  path="$POTENTIAL_FREETYPE_LIB_PATH"
44748  new_path=`$CYGPATH -u "$path"`
44749
44750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44753  # "foo.exe" is OK but "foo" is an error.
44754  #
44755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44756  # It is also a way to make sure we got the proper file name for the real test later on.
44757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44758  if test "x$test_shortpath" = x; then
44759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44761    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44762  fi
44763
44764  # Call helper function which possibly converts this using DOS-style short mode.
44765  # If so, the updated path is stored in $new_path.
44766
44767  input_path="$new_path"
44768  # Check if we need to convert this using DOS-style short mode. If the path
44769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44770  # take no chances and rewrite it.
44771  # Note: m4 eats our [], so we need to use [ and ] instead.
44772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44773  if test "x$has_forbidden_chars" != x; then
44774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44778      # Going to short mode and back again did indeed matter. Since short mode is
44779      # case insensitive, let's make it lowercase to improve readability.
44780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44781      # Now convert it back to Unix-stile (cygpath)
44782      input_path=`$CYGPATH -u "$shortmode_path"`
44783      new_path="$input_path"
44784    fi
44785  fi
44786
44787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44788  if test "x$test_cygdrive_prefix" = x; then
44789    # As a simple fix, exclude /usr/bin since it's not a real path.
44790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44792      # a path prefixed by /cygdrive for fixpath to work.
44793      new_path="$CYGWIN_ROOT_PATH$input_path"
44794    fi
44795  fi
44796
44797
44798  if test "x$path" != "x$new_path"; then
44799    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44802  fi
44803
44804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44805
44806  path="$POTENTIAL_FREETYPE_LIB_PATH"
44807  has_colon=`$ECHO $path | $GREP ^.:`
44808  new_path="$path"
44809  if test "x$has_colon" = x; then
44810    # Not in mixed or Windows style, start by that.
44811    new_path=`cmd //c echo $path`
44812  fi
44813
44814
44815  input_path="$new_path"
44816  # Check if we need to convert this using DOS-style short mode. If the path
44817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44818  # take no chances and rewrite it.
44819  # Note: m4 eats our [], so we need to use [ and ] instead.
44820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44821  if test "x$has_forbidden_chars" != x; then
44822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44824  fi
44825
44826
44827  windows_path="$new_path"
44828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44829    unix_path=`$CYGPATH -u "$windows_path"`
44830    new_path="$unix_path"
44831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44833    new_path="$unix_path"
44834  fi
44835
44836  if test "x$path" != "x$new_path"; then
44837    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44840  fi
44841
44842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44844
44845  else
44846    # We're on a posix platform. Hooray! :)
44847    path="$POTENTIAL_FREETYPE_LIB_PATH"
44848    has_space=`$ECHO "$path" | $GREP " "`
44849    if test "x$has_space" != x; then
44850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44853    fi
44854
44855    # Use eval to expand a potential ~
44856    eval path="$path"
44857    if test ! -f "$path" && test ! -d "$path"; then
44858      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44859    fi
44860
44861    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44862  fi
44863
44864
44865    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44867$as_echo_n "checking for freetype includes... " >&6; }
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44869$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44870    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44872$as_echo_n "checking for freetype libraries... " >&6; }
44873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44874$as_echo "$FREETYPE_LIB_PATH" >&6; }
44875  fi
44876
44877
44878          if test "x$FOUND_FREETYPE" != xyes; then
44879            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44880
44881  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44882  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44883  METHOD="well-known location"
44884
44885  # First check if the files exists.
44886  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44887    # We found an arbitrary include file. That's a good sign.
44888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44889$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44890    FOUND_FREETYPE=yes
44891
44892    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44893    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44894      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44895$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44896      FOUND_FREETYPE=no
44897    else
44898      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44899        # On Windows, we will need both .lib and .dll file.
44900        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44901          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44902$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44903          FOUND_FREETYPE=no
44904        fi
44905      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
44906        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44907        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44908      fi
44909    fi
44910  fi
44911
44912  if test "x$FOUND_FREETYPE" = xyes; then
44913
44914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44915
44916  # Input might be given as Windows format, start by converting to
44917  # unix format.
44918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44919  new_path=`$CYGPATH -u "$path"`
44920
44921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44924  # "foo.exe" is OK but "foo" is an error.
44925  #
44926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44927  # It is also a way to make sure we got the proper file name for the real test later on.
44928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44929  if test "x$test_shortpath" = x; then
44930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44933  fi
44934
44935  # Call helper function which possibly converts this using DOS-style short mode.
44936  # If so, the updated path is stored in $new_path.
44937
44938  input_path="$new_path"
44939  # Check if we need to convert this using DOS-style short mode. If the path
44940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44941  # take no chances and rewrite it.
44942  # Note: m4 eats our [], so we need to use [ and ] instead.
44943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44944  if test "x$has_forbidden_chars" != x; then
44945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44949      # Going to short mode and back again did indeed matter. Since short mode is
44950      # case insensitive, let's make it lowercase to improve readability.
44951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952      # Now convert it back to Unix-stile (cygpath)
44953      input_path=`$CYGPATH -u "$shortmode_path"`
44954      new_path="$input_path"
44955    fi
44956  fi
44957
44958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44959  if test "x$test_cygdrive_prefix" = x; then
44960    # As a simple fix, exclude /usr/bin since it's not a real path.
44961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44963      # a path prefixed by /cygdrive for fixpath to work.
44964      new_path="$CYGWIN_ROOT_PATH$input_path"
44965    fi
44966  fi
44967
44968
44969  if test "x$path" != "x$new_path"; then
44970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44973  fi
44974
44975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44976
44977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44978  has_colon=`$ECHO $path | $GREP ^.:`
44979  new_path="$path"
44980  if test "x$has_colon" = x; then
44981    # Not in mixed or Windows style, start by that.
44982    new_path=`cmd //c echo $path`
44983  fi
44984
44985
44986  input_path="$new_path"
44987  # Check if we need to convert this using DOS-style short mode. If the path
44988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44989  # take no chances and rewrite it.
44990  # Note: m4 eats our [], so we need to use [ and ] instead.
44991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44992  if test "x$has_forbidden_chars" != x; then
44993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44995  fi
44996
44997
44998  windows_path="$new_path"
44999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45000    unix_path=`$CYGPATH -u "$windows_path"`
45001    new_path="$unix_path"
45002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45004    new_path="$unix_path"
45005  fi
45006
45007  if test "x$path" != "x$new_path"; then
45008    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45011  fi
45012
45013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45015
45016  else
45017    # We're on a posix platform. Hooray! :)
45018    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45019    has_space=`$ECHO "$path" | $GREP " "`
45020    if test "x$has_space" != x; then
45021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45024    fi
45025
45026    # Use eval to expand a potential ~
45027    eval path="$path"
45028    if test ! -f "$path" && test ! -d "$path"; then
45029      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45030    fi
45031
45032    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45033  fi
45034
45035
45036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45037
45038  # Input might be given as Windows format, start by converting to
45039  # unix format.
45040  path="$POTENTIAL_FREETYPE_LIB_PATH"
45041  new_path=`$CYGPATH -u "$path"`
45042
45043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45046  # "foo.exe" is OK but "foo" is an error.
45047  #
45048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45049  # It is also a way to make sure we got the proper file name for the real test later on.
45050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45051  if test "x$test_shortpath" = x; then
45052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45053$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45054    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45055  fi
45056
45057  # Call helper function which possibly converts this using DOS-style short mode.
45058  # If so, the updated path is stored in $new_path.
45059
45060  input_path="$new_path"
45061  # Check if we need to convert this using DOS-style short mode. If the path
45062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45063  # take no chances and rewrite it.
45064  # Note: m4 eats our [], so we need to use [ and ] instead.
45065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45066  if test "x$has_forbidden_chars" != x; then
45067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45071      # Going to short mode and back again did indeed matter. Since short mode is
45072      # case insensitive, let's make it lowercase to improve readability.
45073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45074      # Now convert it back to Unix-stile (cygpath)
45075      input_path=`$CYGPATH -u "$shortmode_path"`
45076      new_path="$input_path"
45077    fi
45078  fi
45079
45080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45081  if test "x$test_cygdrive_prefix" = x; then
45082    # As a simple fix, exclude /usr/bin since it's not a real path.
45083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45085      # a path prefixed by /cygdrive for fixpath to work.
45086      new_path="$CYGWIN_ROOT_PATH$input_path"
45087    fi
45088  fi
45089
45090
45091  if test "x$path" != "x$new_path"; then
45092    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45095  fi
45096
45097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45098
45099  path="$POTENTIAL_FREETYPE_LIB_PATH"
45100  has_colon=`$ECHO $path | $GREP ^.:`
45101  new_path="$path"
45102  if test "x$has_colon" = x; then
45103    # Not in mixed or Windows style, start by that.
45104    new_path=`cmd //c echo $path`
45105  fi
45106
45107
45108  input_path="$new_path"
45109  # Check if we need to convert this using DOS-style short mode. If the path
45110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45111  # take no chances and rewrite it.
45112  # Note: m4 eats our [], so we need to use [ and ] instead.
45113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45114  if test "x$has_forbidden_chars" != x; then
45115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45117  fi
45118
45119
45120  windows_path="$new_path"
45121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45122    unix_path=`$CYGPATH -u "$windows_path"`
45123    new_path="$unix_path"
45124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45126    new_path="$unix_path"
45127  fi
45128
45129  if test "x$path" != "x$new_path"; then
45130    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45133  fi
45134
45135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45137
45138  else
45139    # We're on a posix platform. Hooray! :)
45140    path="$POTENTIAL_FREETYPE_LIB_PATH"
45141    has_space=`$ECHO "$path" | $GREP " "`
45142    if test "x$has_space" != x; then
45143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45144$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45145      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45146    fi
45147
45148    # Use eval to expand a potential ~
45149    eval path="$path"
45150    if test ! -f "$path" && test ! -d "$path"; then
45151      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45152    fi
45153
45154    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45155  fi
45156
45157
45158    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45160$as_echo_n "checking for freetype includes... " >&6; }
45161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45162$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45163    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45165$as_echo_n "checking for freetype libraries... " >&6; }
45166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45167$as_echo "$FREETYPE_LIB_PATH" >&6; }
45168  fi
45169
45170          fi
45171
45172          if test "x$FOUND_FREETYPE" != xyes; then
45173            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45174            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45175
45176  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45177  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45178  METHOD="well-known location"
45179
45180  # First check if the files exists.
45181  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45182    # We found an arbitrary include file. That's a good sign.
45183    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45184$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45185    FOUND_FREETYPE=yes
45186
45187    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45188    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45189      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45190$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45191      FOUND_FREETYPE=no
45192    else
45193      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45194        # On Windows, we will need both .lib and .dll file.
45195        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45196          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45197$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45198          FOUND_FREETYPE=no
45199        fi
45200      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
45201        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45202        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45203      fi
45204    fi
45205  fi
45206
45207  if test "x$FOUND_FREETYPE" = xyes; then
45208
45209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45210
45211  # Input might be given as Windows format, start by converting to
45212  # unix format.
45213  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45214  new_path=`$CYGPATH -u "$path"`
45215
45216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45219  # "foo.exe" is OK but "foo" is an error.
45220  #
45221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45222  # It is also a way to make sure we got the proper file name for the real test later on.
45223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45224  if test "x$test_shortpath" = x; then
45225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45227    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45228  fi
45229
45230  # Call helper function which possibly converts this using DOS-style short mode.
45231  # If so, the updated path is stored in $new_path.
45232
45233  input_path="$new_path"
45234  # Check if we need to convert this using DOS-style short mode. If the path
45235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45236  # take no chances and rewrite it.
45237  # Note: m4 eats our [], so we need to use [ and ] instead.
45238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45239  if test "x$has_forbidden_chars" != x; then
45240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45244      # Going to short mode and back again did indeed matter. Since short mode is
45245      # case insensitive, let's make it lowercase to improve readability.
45246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45247      # Now convert it back to Unix-stile (cygpath)
45248      input_path=`$CYGPATH -u "$shortmode_path"`
45249      new_path="$input_path"
45250    fi
45251  fi
45252
45253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45254  if test "x$test_cygdrive_prefix" = x; then
45255    # As a simple fix, exclude /usr/bin since it's not a real path.
45256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45258      # a path prefixed by /cygdrive for fixpath to work.
45259      new_path="$CYGWIN_ROOT_PATH$input_path"
45260    fi
45261  fi
45262
45263
45264  if test "x$path" != "x$new_path"; then
45265    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45268  fi
45269
45270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45271
45272  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45273  has_colon=`$ECHO $path | $GREP ^.:`
45274  new_path="$path"
45275  if test "x$has_colon" = x; then
45276    # Not in mixed or Windows style, start by that.
45277    new_path=`cmd //c echo $path`
45278  fi
45279
45280
45281  input_path="$new_path"
45282  # Check if we need to convert this using DOS-style short mode. If the path
45283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45284  # take no chances and rewrite it.
45285  # Note: m4 eats our [], so we need to use [ and ] instead.
45286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45287  if test "x$has_forbidden_chars" != x; then
45288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45290  fi
45291
45292
45293  windows_path="$new_path"
45294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45295    unix_path=`$CYGPATH -u "$windows_path"`
45296    new_path="$unix_path"
45297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45299    new_path="$unix_path"
45300  fi
45301
45302  if test "x$path" != "x$new_path"; then
45303    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45306  fi
45307
45308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45310
45311  else
45312    # We're on a posix platform. Hooray! :)
45313    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45314    has_space=`$ECHO "$path" | $GREP " "`
45315    if test "x$has_space" != x; then
45316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45318      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45319    fi
45320
45321    # Use eval to expand a potential ~
45322    eval path="$path"
45323    if test ! -f "$path" && test ! -d "$path"; then
45324      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45325    fi
45326
45327    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45328  fi
45329
45330
45331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45332
45333  # Input might be given as Windows format, start by converting to
45334  # unix format.
45335  path="$POTENTIAL_FREETYPE_LIB_PATH"
45336  new_path=`$CYGPATH -u "$path"`
45337
45338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45341  # "foo.exe" is OK but "foo" is an error.
45342  #
45343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45344  # It is also a way to make sure we got the proper file name for the real test later on.
45345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45346  if test "x$test_shortpath" = x; then
45347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45348$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45349    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45350  fi
45351
45352  # Call helper function which possibly converts this using DOS-style short mode.
45353  # If so, the updated path is stored in $new_path.
45354
45355  input_path="$new_path"
45356  # Check if we need to convert this using DOS-style short mode. If the path
45357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45358  # take no chances and rewrite it.
45359  # Note: m4 eats our [], so we need to use [ and ] instead.
45360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45361  if test "x$has_forbidden_chars" != x; then
45362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45366      # Going to short mode and back again did indeed matter. Since short mode is
45367      # case insensitive, let's make it lowercase to improve readability.
45368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45369      # Now convert it back to Unix-stile (cygpath)
45370      input_path=`$CYGPATH -u "$shortmode_path"`
45371      new_path="$input_path"
45372    fi
45373  fi
45374
45375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45376  if test "x$test_cygdrive_prefix" = x; then
45377    # As a simple fix, exclude /usr/bin since it's not a real path.
45378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45380      # a path prefixed by /cygdrive for fixpath to work.
45381      new_path="$CYGWIN_ROOT_PATH$input_path"
45382    fi
45383  fi
45384
45385
45386  if test "x$path" != "x$new_path"; then
45387    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45390  fi
45391
45392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45393
45394  path="$POTENTIAL_FREETYPE_LIB_PATH"
45395  has_colon=`$ECHO $path | $GREP ^.:`
45396  new_path="$path"
45397  if test "x$has_colon" = x; then
45398    # Not in mixed or Windows style, start by that.
45399    new_path=`cmd //c echo $path`
45400  fi
45401
45402
45403  input_path="$new_path"
45404  # Check if we need to convert this using DOS-style short mode. If the path
45405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45406  # take no chances and rewrite it.
45407  # Note: m4 eats our [], so we need to use [ and ] instead.
45408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45409  if test "x$has_forbidden_chars" != x; then
45410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45412  fi
45413
45414
45415  windows_path="$new_path"
45416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45417    unix_path=`$CYGPATH -u "$windows_path"`
45418    new_path="$unix_path"
45419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45421    new_path="$unix_path"
45422  fi
45423
45424  if test "x$path" != "x$new_path"; then
45425    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45428  fi
45429
45430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45432
45433  else
45434    # We're on a posix platform. Hooray! :)
45435    path="$POTENTIAL_FREETYPE_LIB_PATH"
45436    has_space=`$ECHO "$path" | $GREP " "`
45437    if test "x$has_space" != x; then
45438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45439$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45440      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45441    fi
45442
45443    # Use eval to expand a potential ~
45444    eval path="$path"
45445    if test ! -f "$path" && test ! -d "$path"; then
45446      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45447    fi
45448
45449    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45450  fi
45451
45452
45453    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45455$as_echo_n "checking for freetype includes... " >&6; }
45456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45457$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45458    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45460$as_echo_n "checking for freetype libraries... " >&6; }
45461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45462$as_echo "$FREETYPE_LIB_PATH" >&6; }
45463  fi
45464
45465            else
45466
45467  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45468  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45469  METHOD="well-known location"
45470
45471  # First check if the files exists.
45472  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45473    # We found an arbitrary include file. That's a good sign.
45474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45476    FOUND_FREETYPE=yes
45477
45478    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45479    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45480      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45481$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45482      FOUND_FREETYPE=no
45483    else
45484      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45485        # On Windows, we will need both .lib and .dll file.
45486        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45487          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45489          FOUND_FREETYPE=no
45490        fi
45491      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
45492        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45493        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45494      fi
45495    fi
45496  fi
45497
45498  if test "x$FOUND_FREETYPE" = xyes; then
45499
45500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45501
45502  # Input might be given as Windows format, start by converting to
45503  # unix format.
45504  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45505  new_path=`$CYGPATH -u "$path"`
45506
45507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45510  # "foo.exe" is OK but "foo" is an error.
45511  #
45512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45513  # It is also a way to make sure we got the proper file name for the real test later on.
45514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45515  if test "x$test_shortpath" = x; then
45516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45518    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45519  fi
45520
45521  # Call helper function which possibly converts this using DOS-style short mode.
45522  # If so, the updated path is stored in $new_path.
45523
45524  input_path="$new_path"
45525  # Check if we need to convert this using DOS-style short mode. If the path
45526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45527  # take no chances and rewrite it.
45528  # Note: m4 eats our [], so we need to use [ and ] instead.
45529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45530  if test "x$has_forbidden_chars" != x; then
45531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45535      # Going to short mode and back again did indeed matter. Since short mode is
45536      # case insensitive, let's make it lowercase to improve readability.
45537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45538      # Now convert it back to Unix-stile (cygpath)
45539      input_path=`$CYGPATH -u "$shortmode_path"`
45540      new_path="$input_path"
45541    fi
45542  fi
45543
45544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45545  if test "x$test_cygdrive_prefix" = x; then
45546    # As a simple fix, exclude /usr/bin since it's not a real path.
45547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45549      # a path prefixed by /cygdrive for fixpath to work.
45550      new_path="$CYGWIN_ROOT_PATH$input_path"
45551    fi
45552  fi
45553
45554
45555  if test "x$path" != "x$new_path"; then
45556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45559  fi
45560
45561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45562
45563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45564  has_colon=`$ECHO $path | $GREP ^.:`
45565  new_path="$path"
45566  if test "x$has_colon" = x; then
45567    # Not in mixed or Windows style, start by that.
45568    new_path=`cmd //c echo $path`
45569  fi
45570
45571
45572  input_path="$new_path"
45573  # Check if we need to convert this using DOS-style short mode. If the path
45574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45575  # take no chances and rewrite it.
45576  # Note: m4 eats our [], so we need to use [ and ] instead.
45577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45578  if test "x$has_forbidden_chars" != x; then
45579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45581  fi
45582
45583
45584  windows_path="$new_path"
45585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45586    unix_path=`$CYGPATH -u "$windows_path"`
45587    new_path="$unix_path"
45588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45590    new_path="$unix_path"
45591  fi
45592
45593  if test "x$path" != "x$new_path"; then
45594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45597  fi
45598
45599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45601
45602  else
45603    # We're on a posix platform. Hooray! :)
45604    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45605    has_space=`$ECHO "$path" | $GREP " "`
45606    if test "x$has_space" != x; then
45607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45609      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45610    fi
45611
45612    # Use eval to expand a potential ~
45613    eval path="$path"
45614    if test ! -f "$path" && test ! -d "$path"; then
45615      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45616    fi
45617
45618    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45619  fi
45620
45621
45622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45623
45624  # Input might be given as Windows format, start by converting to
45625  # unix format.
45626  path="$POTENTIAL_FREETYPE_LIB_PATH"
45627  new_path=`$CYGPATH -u "$path"`
45628
45629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45632  # "foo.exe" is OK but "foo" is an error.
45633  #
45634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45635  # It is also a way to make sure we got the proper file name for the real test later on.
45636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45637  if test "x$test_shortpath" = x; then
45638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45639$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45640    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45641  fi
45642
45643  # Call helper function which possibly converts this using DOS-style short mode.
45644  # If so, the updated path is stored in $new_path.
45645
45646  input_path="$new_path"
45647  # Check if we need to convert this using DOS-style short mode. If the path
45648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45649  # take no chances and rewrite it.
45650  # Note: m4 eats our [], so we need to use [ and ] instead.
45651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45652  if test "x$has_forbidden_chars" != x; then
45653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45657      # Going to short mode and back again did indeed matter. Since short mode is
45658      # case insensitive, let's make it lowercase to improve readability.
45659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45660      # Now convert it back to Unix-stile (cygpath)
45661      input_path=`$CYGPATH -u "$shortmode_path"`
45662      new_path="$input_path"
45663    fi
45664  fi
45665
45666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45667  if test "x$test_cygdrive_prefix" = x; then
45668    # As a simple fix, exclude /usr/bin since it's not a real path.
45669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45671      # a path prefixed by /cygdrive for fixpath to work.
45672      new_path="$CYGWIN_ROOT_PATH$input_path"
45673    fi
45674  fi
45675
45676
45677  if test "x$path" != "x$new_path"; then
45678    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45680$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45681  fi
45682
45683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45684
45685  path="$POTENTIAL_FREETYPE_LIB_PATH"
45686  has_colon=`$ECHO $path | $GREP ^.:`
45687  new_path="$path"
45688  if test "x$has_colon" = x; then
45689    # Not in mixed or Windows style, start by that.
45690    new_path=`cmd //c echo $path`
45691  fi
45692
45693
45694  input_path="$new_path"
45695  # Check if we need to convert this using DOS-style short mode. If the path
45696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45697  # take no chances and rewrite it.
45698  # Note: m4 eats our [], so we need to use [ and ] instead.
45699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45700  if test "x$has_forbidden_chars" != x; then
45701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45703  fi
45704
45705
45706  windows_path="$new_path"
45707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45708    unix_path=`$CYGPATH -u "$windows_path"`
45709    new_path="$unix_path"
45710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45712    new_path="$unix_path"
45713  fi
45714
45715  if test "x$path" != "x$new_path"; then
45716    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45719  fi
45720
45721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45723
45724  else
45725    # We're on a posix platform. Hooray! :)
45726    path="$POTENTIAL_FREETYPE_LIB_PATH"
45727    has_space=`$ECHO "$path" | $GREP " "`
45728    if test "x$has_space" != x; then
45729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45731      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45732    fi
45733
45734    # Use eval to expand a potential ~
45735    eval path="$path"
45736    if test ! -f "$path" && test ! -d "$path"; then
45737      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45738    fi
45739
45740    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45741  fi
45742
45743
45744    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45746$as_echo_n "checking for freetype includes... " >&6; }
45747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45748$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45749    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45751$as_echo_n "checking for freetype libraries... " >&6; }
45752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45753$as_echo "$FREETYPE_LIB_PATH" >&6; }
45754  fi
45755
45756              if test "x$FOUND_FREETYPE" != xyes; then
45757
45758  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45759  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45760  METHOD="well-known location"
45761
45762  # First check if the files exists.
45763  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45764    # We found an arbitrary include file. That's a good sign.
45765    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45766$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45767    FOUND_FREETYPE=yes
45768
45769    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45770    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45771      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45772$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45773      FOUND_FREETYPE=no
45774    else
45775      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45776        # On Windows, we will need both .lib and .dll file.
45777        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45778          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45779$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45780          FOUND_FREETYPE=no
45781        fi
45782      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
45783        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45784        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45785      fi
45786    fi
45787  fi
45788
45789  if test "x$FOUND_FREETYPE" = xyes; then
45790
45791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45792
45793  # Input might be given as Windows format, start by converting to
45794  # unix format.
45795  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45796  new_path=`$CYGPATH -u "$path"`
45797
45798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45801  # "foo.exe" is OK but "foo" is an error.
45802  #
45803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45804  # It is also a way to make sure we got the proper file name for the real test later on.
45805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45806  if test "x$test_shortpath" = x; then
45807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45809    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45810  fi
45811
45812  # Call helper function which possibly converts this using DOS-style short mode.
45813  # If so, the updated path is stored in $new_path.
45814
45815  input_path="$new_path"
45816  # Check if we need to convert this using DOS-style short mode. If the path
45817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45818  # take no chances and rewrite it.
45819  # Note: m4 eats our [], so we need to use [ and ] instead.
45820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45821  if test "x$has_forbidden_chars" != x; then
45822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45826      # Going to short mode and back again did indeed matter. Since short mode is
45827      # case insensitive, let's make it lowercase to improve readability.
45828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45829      # Now convert it back to Unix-stile (cygpath)
45830      input_path=`$CYGPATH -u "$shortmode_path"`
45831      new_path="$input_path"
45832    fi
45833  fi
45834
45835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45836  if test "x$test_cygdrive_prefix" = x; then
45837    # As a simple fix, exclude /usr/bin since it's not a real path.
45838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45840      # a path prefixed by /cygdrive for fixpath to work.
45841      new_path="$CYGWIN_ROOT_PATH$input_path"
45842    fi
45843  fi
45844
45845
45846  if test "x$path" != "x$new_path"; then
45847    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45850  fi
45851
45852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45853
45854  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45855  has_colon=`$ECHO $path | $GREP ^.:`
45856  new_path="$path"
45857  if test "x$has_colon" = x; then
45858    # Not in mixed or Windows style, start by that.
45859    new_path=`cmd //c echo $path`
45860  fi
45861
45862
45863  input_path="$new_path"
45864  # Check if we need to convert this using DOS-style short mode. If the path
45865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45866  # take no chances and rewrite it.
45867  # Note: m4 eats our [], so we need to use [ and ] instead.
45868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45869  if test "x$has_forbidden_chars" != x; then
45870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45872  fi
45873
45874
45875  windows_path="$new_path"
45876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45877    unix_path=`$CYGPATH -u "$windows_path"`
45878    new_path="$unix_path"
45879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45881    new_path="$unix_path"
45882  fi
45883
45884  if test "x$path" != "x$new_path"; then
45885    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45888  fi
45889
45890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45892
45893  else
45894    # We're on a posix platform. Hooray! :)
45895    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45896    has_space=`$ECHO "$path" | $GREP " "`
45897    if test "x$has_space" != x; then
45898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45900      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45901    fi
45902
45903    # Use eval to expand a potential ~
45904    eval path="$path"
45905    if test ! -f "$path" && test ! -d "$path"; then
45906      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45907    fi
45908
45909    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45910  fi
45911
45912
45913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45914
45915  # Input might be given as Windows format, start by converting to
45916  # unix format.
45917  path="$POTENTIAL_FREETYPE_LIB_PATH"
45918  new_path=`$CYGPATH -u "$path"`
45919
45920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45923  # "foo.exe" is OK but "foo" is an error.
45924  #
45925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45926  # It is also a way to make sure we got the proper file name for the real test later on.
45927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45928  if test "x$test_shortpath" = x; then
45929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45931    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45932  fi
45933
45934  # Call helper function which possibly converts this using DOS-style short mode.
45935  # If so, the updated path is stored in $new_path.
45936
45937  input_path="$new_path"
45938  # Check if we need to convert this using DOS-style short mode. If the path
45939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45940  # take no chances and rewrite it.
45941  # Note: m4 eats our [], so we need to use [ and ] instead.
45942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45943  if test "x$has_forbidden_chars" != x; then
45944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45948      # Going to short mode and back again did indeed matter. Since short mode is
45949      # case insensitive, let's make it lowercase to improve readability.
45950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45951      # Now convert it back to Unix-stile (cygpath)
45952      input_path=`$CYGPATH -u "$shortmode_path"`
45953      new_path="$input_path"
45954    fi
45955  fi
45956
45957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45958  if test "x$test_cygdrive_prefix" = x; then
45959    # As a simple fix, exclude /usr/bin since it's not a real path.
45960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45962      # a path prefixed by /cygdrive for fixpath to work.
45963      new_path="$CYGWIN_ROOT_PATH$input_path"
45964    fi
45965  fi
45966
45967
45968  if test "x$path" != "x$new_path"; then
45969    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45972  fi
45973
45974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45975
45976  path="$POTENTIAL_FREETYPE_LIB_PATH"
45977  has_colon=`$ECHO $path | $GREP ^.:`
45978  new_path="$path"
45979  if test "x$has_colon" = x; then
45980    # Not in mixed or Windows style, start by that.
45981    new_path=`cmd //c echo $path`
45982  fi
45983
45984
45985  input_path="$new_path"
45986  # Check if we need to convert this using DOS-style short mode. If the path
45987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45988  # take no chances and rewrite it.
45989  # Note: m4 eats our [], so we need to use [ and ] instead.
45990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45991  if test "x$has_forbidden_chars" != x; then
45992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45994  fi
45995
45996
45997  windows_path="$new_path"
45998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45999    unix_path=`$CYGPATH -u "$windows_path"`
46000    new_path="$unix_path"
46001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46003    new_path="$unix_path"
46004  fi
46005
46006  if test "x$path" != "x$new_path"; then
46007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46010  fi
46011
46012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46014
46015  else
46016    # We're on a posix platform. Hooray! :)
46017    path="$POTENTIAL_FREETYPE_LIB_PATH"
46018    has_space=`$ECHO "$path" | $GREP " "`
46019    if test "x$has_space" != x; then
46020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46022      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46023    fi
46024
46025    # Use eval to expand a potential ~
46026    eval path="$path"
46027    if test ! -f "$path" && test ! -d "$path"; then
46028      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46029    fi
46030
46031    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46032  fi
46033
46034
46035    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46037$as_echo_n "checking for freetype includes... " >&6; }
46038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46039$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46040    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46042$as_echo_n "checking for freetype libraries... " >&6; }
46043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46044$as_echo "$FREETYPE_LIB_PATH" >&6; }
46045  fi
46046
46047              fi
46048            fi
46049          fi
46050        fi
46051      fi # end check in well-known locations
46052
46053      if test "x$FOUND_FREETYPE" != xyes; then
46054
46055  # Print a helpful message on how to acquire the necessary build dependency.
46056  # freetype is the help tag: freetype, cups, pulse, alsa etc
46057  MISSING_DEPENDENCY=freetype
46058
46059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46060    cygwin_help $MISSING_DEPENDENCY
46061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46062    msys_help $MISSING_DEPENDENCY
46063  else
46064    PKGHANDLER_COMMAND=
46065
46066    case $PKGHANDLER in
46067      apt-get)
46068        apt_help     $MISSING_DEPENDENCY ;;
46069      yum)
46070        yum_help     $MISSING_DEPENDENCY ;;
46071      port)
46072        port_help    $MISSING_DEPENDENCY ;;
46073      pkgutil)
46074        pkgutil_help $MISSING_DEPENDENCY ;;
46075      pkgadd)
46076        pkgadd_help  $MISSING_DEPENDENCY ;;
46077    esac
46078
46079    if test "x$PKGHANDLER_COMMAND" != x; then
46080      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46081    fi
46082  fi
46083
46084        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46085      fi
46086    fi # end user specified settings
46087
46088    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46089    if test "x$FREETYPE_CFLAGS" = x; then
46090
46091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46092
46093  # Input might be given as Windows format, start by converting to
46094  # unix format.
46095  path="$FREETYPE_INCLUDE_PATH"
46096  new_path=`$CYGPATH -u "$path"`
46097
46098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46101  # "foo.exe" is OK but "foo" is an error.
46102  #
46103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46104  # It is also a way to make sure we got the proper file name for the real test later on.
46105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46106  if test "x$test_shortpath" = x; then
46107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46108$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46109    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46110  fi
46111
46112  # Call helper function which possibly converts this using DOS-style short mode.
46113  # If so, the updated path is stored in $new_path.
46114
46115  input_path="$new_path"
46116  # Check if we need to convert this using DOS-style short mode. If the path
46117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46118  # take no chances and rewrite it.
46119  # Note: m4 eats our [], so we need to use [ and ] instead.
46120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46121  if test "x$has_forbidden_chars" != x; then
46122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46126      # Going to short mode and back again did indeed matter. Since short mode is
46127      # case insensitive, let's make it lowercase to improve readability.
46128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46129      # Now convert it back to Unix-stile (cygpath)
46130      input_path=`$CYGPATH -u "$shortmode_path"`
46131      new_path="$input_path"
46132    fi
46133  fi
46134
46135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46136  if test "x$test_cygdrive_prefix" = x; then
46137    # As a simple fix, exclude /usr/bin since it's not a real path.
46138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46140      # a path prefixed by /cygdrive for fixpath to work.
46141      new_path="$CYGWIN_ROOT_PATH$input_path"
46142    fi
46143  fi
46144
46145
46146  if test "x$path" != "x$new_path"; then
46147    FREETYPE_INCLUDE_PATH="$new_path"
46148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46149$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46150  fi
46151
46152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46153
46154  path="$FREETYPE_INCLUDE_PATH"
46155  has_colon=`$ECHO $path | $GREP ^.:`
46156  new_path="$path"
46157  if test "x$has_colon" = x; then
46158    # Not in mixed or Windows style, start by that.
46159    new_path=`cmd //c echo $path`
46160  fi
46161
46162
46163  input_path="$new_path"
46164  # Check if we need to convert this using DOS-style short mode. If the path
46165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46166  # take no chances and rewrite it.
46167  # Note: m4 eats our [], so we need to use [ and ] instead.
46168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46169  if test "x$has_forbidden_chars" != x; then
46170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46172  fi
46173
46174
46175  windows_path="$new_path"
46176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46177    unix_path=`$CYGPATH -u "$windows_path"`
46178    new_path="$unix_path"
46179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46181    new_path="$unix_path"
46182  fi
46183
46184  if test "x$path" != "x$new_path"; then
46185    FREETYPE_INCLUDE_PATH="$new_path"
46186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46187$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46188  fi
46189
46190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46192
46193  else
46194    # We're on a posix platform. Hooray! :)
46195    path="$FREETYPE_INCLUDE_PATH"
46196    has_space=`$ECHO "$path" | $GREP " "`
46197    if test "x$has_space" != x; then
46198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46199$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46200      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46201    fi
46202
46203    # Use eval to expand a potential ~
46204    eval path="$path"
46205    if test ! -f "$path" && test ! -d "$path"; then
46206      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46207    fi
46208
46209    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46210  fi
46211
46212      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46213        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46214      else
46215        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46216      fi
46217    fi
46218
46219    if test "x$FREETYPE_LIBS" = x; then
46220
46221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46222
46223  # Input might be given as Windows format, start by converting to
46224  # unix format.
46225  path="$FREETYPE_LIB_PATH"
46226  new_path=`$CYGPATH -u "$path"`
46227
46228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46231  # "foo.exe" is OK but "foo" is an error.
46232  #
46233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46234  # It is also a way to make sure we got the proper file name for the real test later on.
46235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46236  if test "x$test_shortpath" = x; then
46237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46238$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46239    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46240  fi
46241
46242  # Call helper function which possibly converts this using DOS-style short mode.
46243  # If so, the updated path is stored in $new_path.
46244
46245  input_path="$new_path"
46246  # Check if we need to convert this using DOS-style short mode. If the path
46247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46248  # take no chances and rewrite it.
46249  # Note: m4 eats our [], so we need to use [ and ] instead.
46250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46251  if test "x$has_forbidden_chars" != x; then
46252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46256      # Going to short mode and back again did indeed matter. Since short mode is
46257      # case insensitive, let's make it lowercase to improve readability.
46258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46259      # Now convert it back to Unix-stile (cygpath)
46260      input_path=`$CYGPATH -u "$shortmode_path"`
46261      new_path="$input_path"
46262    fi
46263  fi
46264
46265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46266  if test "x$test_cygdrive_prefix" = x; then
46267    # As a simple fix, exclude /usr/bin since it's not a real path.
46268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46270      # a path prefixed by /cygdrive for fixpath to work.
46271      new_path="$CYGWIN_ROOT_PATH$input_path"
46272    fi
46273  fi
46274
46275
46276  if test "x$path" != "x$new_path"; then
46277    FREETYPE_LIB_PATH="$new_path"
46278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46279$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46280  fi
46281
46282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46283
46284  path="$FREETYPE_LIB_PATH"
46285  has_colon=`$ECHO $path | $GREP ^.:`
46286  new_path="$path"
46287  if test "x$has_colon" = x; then
46288    # Not in mixed or Windows style, start by that.
46289    new_path=`cmd //c echo $path`
46290  fi
46291
46292
46293  input_path="$new_path"
46294  # Check if we need to convert this using DOS-style short mode. If the path
46295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46296  # take no chances and rewrite it.
46297  # Note: m4 eats our [], so we need to use [ and ] instead.
46298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46299  if test "x$has_forbidden_chars" != x; then
46300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46302  fi
46303
46304
46305  windows_path="$new_path"
46306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46307    unix_path=`$CYGPATH -u "$windows_path"`
46308    new_path="$unix_path"
46309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46311    new_path="$unix_path"
46312  fi
46313
46314  if test "x$path" != "x$new_path"; then
46315    FREETYPE_LIB_PATH="$new_path"
46316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46317$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46318  fi
46319
46320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46322
46323  else
46324    # We're on a posix platform. Hooray! :)
46325    path="$FREETYPE_LIB_PATH"
46326    has_space=`$ECHO "$path" | $GREP " "`
46327    if test "x$has_space" != x; then
46328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46329$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46330      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46331    fi
46332
46333    # Use eval to expand a potential ~
46334    eval path="$path"
46335    if test ! -f "$path" && test ! -d "$path"; then
46336      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46337    fi
46338
46339    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46340  fi
46341
46342      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46343        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46344      else
46345        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46346      fi
46347    fi
46348
46349    # Try to compile it
46350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46351$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46352    ac_ext=cpp
46353ac_cpp='$CXXCPP $CPPFLAGS'
46354ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46355ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46356ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46357
46358    PREV_CXXCFLAGS="$CXXFLAGS"
46359    PREV_LIBS="$LIBS"
46360    PREV_CXX="$CXX"
46361    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46362    LIBS="$LIBS $FREETYPE_LIBS"
46363    CXX="$FIXPATH $CXX"
46364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46365/* end confdefs.h.  */
46366
46367          #include<ft2build.h>
46368          #include FT_FREETYPE_H
46369          int main () {
46370            FT_Init_FreeType(NULL);
46371            return 0;
46372          }
46373
46374_ACEOF
46375if ac_fn_cxx_try_link "$LINENO"; then :
46376
46377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46378$as_echo "yes" >&6; }
46379
46380else
46381
46382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46383$as_echo "no" >&6; }
46384          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46385$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46386          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46387$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46388
46389
46390  # Print a helpful message on how to acquire the necessary build dependency.
46391  # freetype is the help tag: freetype, cups, pulse, alsa etc
46392  MISSING_DEPENDENCY=freetype
46393
46394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46395    cygwin_help $MISSING_DEPENDENCY
46396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397    msys_help $MISSING_DEPENDENCY
46398  else
46399    PKGHANDLER_COMMAND=
46400
46401    case $PKGHANDLER in
46402      apt-get)
46403        apt_help     $MISSING_DEPENDENCY ;;
46404      yum)
46405        yum_help     $MISSING_DEPENDENCY ;;
46406      port)
46407        port_help    $MISSING_DEPENDENCY ;;
46408      pkgutil)
46409        pkgutil_help $MISSING_DEPENDENCY ;;
46410      pkgadd)
46411        pkgadd_help  $MISSING_DEPENDENCY ;;
46412    esac
46413
46414    if test "x$PKGHANDLER_COMMAND" != x; then
46415      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46416    fi
46417  fi
46418
46419
46420          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46421
46422
46423fi
46424rm -f core conftest.err conftest.$ac_objext \
46425    conftest$ac_exeext conftest.$ac_ext
46426    CXXCFLAGS="$PREV_CXXFLAGS"
46427    LIBS="$PREV_LIBS"
46428    CXX="$PREV_CXX"
46429    ac_ext=cpp
46430ac_cpp='$CXXCPP $CPPFLAGS'
46431ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46432ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46433ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46434
46435
46436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46437$as_echo_n "checking if we should bundle freetype... " >&6; }
46438    if test "x$BUNDLE_FREETYPE" = xyes; then
46439      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46440    fi
46441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46442$as_echo "$BUNDLE_FREETYPE" >&6; }
46443
46444  fi # end freetype needed
46445
46446
46447
46448
46449
46450
46451
46452  ###############################################################################
46453  #
46454  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46455  #
46456
46457# Check whether --with-alsa was given.
46458if test "${with_alsa+set}" = set; then :
46459  withval=$with_alsa;
46460fi
46461
46462
46463# Check whether --with-alsa-include was given.
46464if test "${with_alsa_include+set}" = set; then :
46465  withval=$with_alsa_include;
46466fi
46467
46468
46469# Check whether --with-alsa-lib was given.
46470if test "${with_alsa_lib+set}" = set; then :
46471  withval=$with_alsa_lib;
46472fi
46473
46474
46475  if test "x$ALSA_NOT_NEEDED" = xyes; then
46476    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46477      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46478$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46479    fi
46480    ALSA_CFLAGS=
46481    ALSA_LIBS=
46482  else
46483    ALSA_FOUND=no
46484
46485    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46486      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46487    fi
46488
46489    if test "x${with_alsa}" != x; then
46490      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46491      ALSA_CFLAGS="-I${with_alsa}/include"
46492      ALSA_FOUND=yes
46493    fi
46494    if test "x${with_alsa_include}" != x; then
46495      ALSA_CFLAGS="-I${with_alsa_include}"
46496      ALSA_FOUND=yes
46497    fi
46498    if test "x${with_alsa_lib}" != x; then
46499      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46500      ALSA_FOUND=yes
46501    fi
46502    if test "x$ALSA_FOUND" = xno; then
46503
46504
46505  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46506    # Source the builddeps file again, to make sure it uses the latest variables!
46507    . $builddepsfile
46508    # Look for a target and build machine specific resource!
46509    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46510    if test "x$resource" = x; then
46511      # Ok, lets instead look for a target specific resource
46512      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46513    fi
46514    if test "x$resource" = x; then
46515      # Ok, lets instead look for a build specific resource
46516      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46517    fi
46518    if test "x$resource" = x; then
46519      # Ok, lets instead look for a generic resource
46520      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46521      resource=${builddep_alsa}
46522    fi
46523    if test "x$resource" != x; then
46524      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46525$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46526      # If the resource in the builddeps.conf file is an existing directory,
46527      # for example /java/linux/cups
46528      if test -d ${resource}; then
46529        depdir=${resource}
46530      else
46531
46532  # alsa is for example mymodule
46533  # $resource is for example libs/general/libmymod_1_2_3.zip
46534  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46535  # $with_builddeps_dir is for example /localhome/builddeps
46536  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46537  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46538  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46539  filename=`basename $resource`
46540  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46541  filebase=${filename%%.*}
46542  extension=${filename#*.}
46543  installdir=$with_builddeps_dir/$filebase
46544  if test ! -f $installdir/$filename.unpacked; then
46545    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46546$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46547    if test ! -d $installdir; then
46548      mkdir -p $installdir
46549    fi
46550    if test ! -d $installdir; then
46551      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46552    fi
46553    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46554    touch $tmpfile
46555    if test ! -f $tmpfile; then
46556      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46557    fi
46558
46559  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46560  # $tmpfile is the local file name for the downloaded file.
46561  VALID_TOOL=no
46562  if test "x$BDEPS_FTP" = xwget; then
46563    VALID_TOOL=yes
46564    wget -O $tmpfile $with_builddeps_server/$resource
46565  fi
46566  if test "x$BDEPS_FTP" = xlftp; then
46567    VALID_TOOL=yes
46568    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46569  fi
46570  if test "x$BDEPS_FTP" = xftp; then
46571    VALID_TOOL=yes
46572    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46573    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46574    FTPUSERPWD=${FTPSERVER%%@*}
46575    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46576      FTPUSER=${userpwd%%:*}
46577      FTPPWD=${userpwd#*@}
46578      FTPSERVER=${FTPSERVER#*@}
46579    else
46580      FTPUSER=ftp
46581      FTPPWD=ftp
46582    fi
46583    # the "pass" command does not work on some
46584    # ftp clients (read ftp.exe) but if it works,
46585    # passive mode is better!
46586    ( \
46587        echo "user $FTPUSER $FTPPWD"        ; \
46588        echo "pass"                         ; \
46589        echo "bin"                          ; \
46590        echo "get $FTPPATH $tmpfile"              ; \
46591    ) | ftp -in $FTPSERVER
46592  fi
46593  if test "x$VALID_TOOL" != xyes; then
46594    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46595  fi
46596
46597    mv $tmpfile $installdir/$filename
46598    if test ! -s $installdir/$filename; then
46599      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46600    fi
46601    case "$extension" in
46602      zip)  echo "Unzipping $installdir/$filename..."
46603        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46604        ;;
46605      tar.gz) echo "Untaring $installdir/$filename..."
46606        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46607        ;;
46608      tgz) echo "Untaring $installdir/$filename..."
46609        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46610        ;;
46611      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46612        ;;
46613    esac
46614  fi
46615  if test -f $installdir/$filename.unpacked; then
46616    depdir=$installdir
46617  fi
46618
46619      fi
46620      # Source the builddeps file again, because in the previous command, the depdir
46621      # was updated to point at the current build dependency install directory.
46622      . $builddepsfile
46623      # Now extract variables from the builddeps.conf files.
46624      theroot=${builddep_alsa_ROOT}
46625      thecflags=${builddep_alsa_CFLAGS}
46626      thelibs=${builddep_alsa_LIBS}
46627      if test "x$depdir" = x; then
46628        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46629      fi
46630      ALSA=$depdir
46631      if test "x$theroot" != x; then
46632        ALSA="$theroot"
46633      fi
46634      if test "x$thecflags" != x; then
46635        ALSA_CFLAGS="$thecflags"
46636      fi
46637      if test "x$thelibs" != x; then
46638        ALSA_LIBS="$thelibs"
46639      fi
46640      ALSA_FOUND=yes
46641      else ALSA_FOUND=no
46642
46643    fi
46644    else ALSA_FOUND=no
46645
46646  fi
46647
46648    fi
46649    if test "x$ALSA_FOUND" = xno; then
46650
46651pkg_failed=no
46652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46653$as_echo_n "checking for ALSA... " >&6; }
46654
46655if test -n "$ALSA_CFLAGS"; then
46656    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46657 elif test -n "$PKG_CONFIG"; then
46658    if test -n "$PKG_CONFIG" && \
46659    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46660  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46661  ac_status=$?
46662  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46663  test $ac_status = 0; }; then
46664  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46665else
46666  pkg_failed=yes
46667fi
46668 else
46669    pkg_failed=untried
46670fi
46671if test -n "$ALSA_LIBS"; then
46672    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46673 elif test -n "$PKG_CONFIG"; then
46674    if test -n "$PKG_CONFIG" && \
46675    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46676  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46677  ac_status=$?
46678  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46679  test $ac_status = 0; }; then
46680  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46681else
46682  pkg_failed=yes
46683fi
46684 else
46685    pkg_failed=untried
46686fi
46687
46688
46689
46690if test $pkg_failed = yes; then
46691
46692if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46693        _pkg_short_errors_supported=yes
46694else
46695        _pkg_short_errors_supported=no
46696fi
46697        if test $_pkg_short_errors_supported = yes; then
46698	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46699        else
46700	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46701        fi
46702	# Put the nasty error message in config.log where it belongs
46703	echo "$ALSA_PKG_ERRORS" >&5
46704
46705	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46706$as_echo "no" >&6; }
46707                ALSA_FOUND=no
46708elif test $pkg_failed = untried; then
46709	ALSA_FOUND=no
46710else
46711	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46712	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46714$as_echo "yes" >&6; }
46715	ALSA_FOUND=yes
46716fi
46717    fi
46718    if test "x$ALSA_FOUND" = xno; then
46719      for ac_header in alsa/asoundlib.h
46720do :
46721  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46722if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46723  cat >>confdefs.h <<_ACEOF
46724#define HAVE_ALSA_ASOUNDLIB_H 1
46725_ACEOF
46726
46727            ALSA_FOUND=yes
46728            ALSA_CFLAGS=-Iignoreme
46729            ALSA_LIBS=-lasound
46730            DEFAULT_ALSA=yes
46731
46732else
46733  ALSA_FOUND=no
46734fi
46735
46736done
46737
46738    fi
46739    if test "x$ALSA_FOUND" = xno; then
46740
46741  # Print a helpful message on how to acquire the necessary build dependency.
46742  # alsa is the help tag: freetype, cups, pulse, alsa etc
46743  MISSING_DEPENDENCY=alsa
46744
46745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46746    cygwin_help $MISSING_DEPENDENCY
46747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46748    msys_help $MISSING_DEPENDENCY
46749  else
46750    PKGHANDLER_COMMAND=
46751
46752    case $PKGHANDLER in
46753      apt-get)
46754        apt_help     $MISSING_DEPENDENCY ;;
46755      yum)
46756        yum_help     $MISSING_DEPENDENCY ;;
46757      port)
46758        port_help    $MISSING_DEPENDENCY ;;
46759      pkgutil)
46760        pkgutil_help $MISSING_DEPENDENCY ;;
46761      pkgadd)
46762        pkgadd_help  $MISSING_DEPENDENCY ;;
46763    esac
46764
46765    if test "x$PKGHANDLER_COMMAND" != x; then
46766      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46767    fi
46768  fi
46769
46770      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46771    fi
46772  fi
46773
46774
46775
46776
46777
46778
46779  ###############################################################################
46780  #
46781  # Check for the jpeg library
46782  #
46783
46784  USE_EXTERNAL_LIBJPEG=true
46785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46786$as_echo_n "checking for main in -ljpeg... " >&6; }
46787if ${ac_cv_lib_jpeg_main+:} false; then :
46788  $as_echo_n "(cached) " >&6
46789else
46790  ac_check_lib_save_LIBS=$LIBS
46791LIBS="-ljpeg  $LIBS"
46792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46793/* end confdefs.h.  */
46794
46795
46796int
46797main ()
46798{
46799return main ();
46800  ;
46801  return 0;
46802}
46803_ACEOF
46804if ac_fn_cxx_try_link "$LINENO"; then :
46805  ac_cv_lib_jpeg_main=yes
46806else
46807  ac_cv_lib_jpeg_main=no
46808fi
46809rm -f core conftest.err conftest.$ac_objext \
46810    conftest$ac_exeext conftest.$ac_ext
46811LIBS=$ac_check_lib_save_LIBS
46812fi
46813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46814$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46815if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46816  cat >>confdefs.h <<_ACEOF
46817#define HAVE_LIBJPEG 1
46818_ACEOF
46819
46820  LIBS="-ljpeg $LIBS"
46821
46822else
46823   USE_EXTERNAL_LIBJPEG=false
46824      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46825$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46826
46827fi
46828
46829
46830
46831  ###############################################################################
46832  #
46833  # Check for the gif library
46834  #
46835
46836
46837# Check whether --with-giflib was given.
46838if test "${with_giflib+set}" = set; then :
46839  withval=$with_giflib;
46840fi
46841
46842
46843
46844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46845$as_echo_n "checking for which giflib to use... " >&6; }
46846
46847  # default is bundled
46848  DEFAULT_GIFLIB=bundled
46849
46850  #
46851  # if user didn't specify, use DEFAULT_GIFLIB
46852  #
46853  if test "x${with_giflib}" = "x"; then
46854    with_giflib=${DEFAULT_GIFLIB}
46855  fi
46856
46857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46858$as_echo "${with_giflib}" >&6; }
46859
46860  if test "x${with_giflib}" = "xbundled"; then
46861    USE_EXTERNAL_LIBGIF=false
46862  elif test "x${with_giflib}" = "xsystem"; then
46863    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46864if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46865
46866else
46867   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46868fi
46869
46870
46871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46872$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46873if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46874  $as_echo_n "(cached) " >&6
46875else
46876  ac_check_lib_save_LIBS=$LIBS
46877LIBS="-lgif  $LIBS"
46878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46879/* end confdefs.h.  */
46880
46881/* Override any GCC internal prototype to avoid an error.
46882   Use char because int might match the return type of a GCC
46883   builtin and then its argument prototype would still apply.  */
46884#ifdef __cplusplus
46885extern "C"
46886#endif
46887char DGifGetCode ();
46888int
46889main ()
46890{
46891return DGifGetCode ();
46892  ;
46893  return 0;
46894}
46895_ACEOF
46896if ac_fn_cxx_try_link "$LINENO"; then :
46897  ac_cv_lib_gif_DGifGetCode=yes
46898else
46899  ac_cv_lib_gif_DGifGetCode=no
46900fi
46901rm -f core conftest.err conftest.$ac_objext \
46902    conftest$ac_exeext conftest.$ac_ext
46903LIBS=$ac_check_lib_save_LIBS
46904fi
46905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46906$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46907if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46908  cat >>confdefs.h <<_ACEOF
46909#define HAVE_LIBGIF 1
46910_ACEOF
46911
46912  LIBS="-lgif $LIBS"
46913
46914else
46915   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46916fi
46917
46918
46919    USE_EXTERNAL_LIBGIF=true
46920  else
46921    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46922  fi
46923
46924
46925  ###############################################################################
46926  #
46927  # Check for the png library
46928  #
46929
46930
46931# Check whether --with-libpng was given.
46932if test "${with_libpng+set}" = set; then :
46933  withval=$with_libpng;
46934fi
46935
46936
46937
46938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
46939$as_echo_n "checking for which libpng to use... " >&6; }
46940
46941  # default is bundled
46942  DEFAULT_LIBPNG=bundled
46943
46944  #
46945  # if user didn't specify, use DEFAULT_LIBPNG
46946  #
46947  if test "x${with_libpng}" = "x"; then
46948      with_libpng=${DEFAULT_LIBPNG}
46949  fi
46950
46951  if test "x${with_libpng}" = "xbundled"; then
46952      USE_EXTERNAL_LIBPNG=false
46953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46954$as_echo "bundled" >&6; }
46955  elif test "x${with_libpng}" = "xsystem"; then
46956
46957pkg_failed=no
46958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
46959$as_echo_n "checking for PNG... " >&6; }
46960
46961if test -n "$PNG_CFLAGS"; then
46962    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
46963 elif test -n "$PKG_CONFIG"; then
46964    if test -n "$PKG_CONFIG" && \
46965    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
46966  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
46967  ac_status=$?
46968  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46969  test $ac_status = 0; }; then
46970  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
46971else
46972  pkg_failed=yes
46973fi
46974 else
46975    pkg_failed=untried
46976fi
46977if test -n "$PNG_LIBS"; then
46978    pkg_cv_PNG_LIBS="$PNG_LIBS"
46979 elif test -n "$PKG_CONFIG"; then
46980    if test -n "$PKG_CONFIG" && \
46981    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
46982  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
46983  ac_status=$?
46984  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46985  test $ac_status = 0; }; then
46986  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
46987else
46988  pkg_failed=yes
46989fi
46990 else
46991    pkg_failed=untried
46992fi
46993
46994
46995
46996if test $pkg_failed = yes; then
46997
46998if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46999        _pkg_short_errors_supported=yes
47000else
47001        _pkg_short_errors_supported=no
47002fi
47003        if test $_pkg_short_errors_supported = yes; then
47004	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47005        else
47006	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47007        fi
47008	# Put the nasty error message in config.log where it belongs
47009	echo "$PNG_PKG_ERRORS" >&5
47010
47011	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47012$as_echo "no" >&6; }
47013                 LIBPNG_FOUND=no
47014elif test $pkg_failed = untried; then
47015	 LIBPNG_FOUND=no
47016else
47017	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47018	PNG_LIBS=$pkg_cv_PNG_LIBS
47019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47020$as_echo "yes" >&6; }
47021	 LIBPNG_FOUND=yes
47022fi
47023      if test "x${LIBPNG_FOUND}" = "xyes"; then
47024          USE_EXTERNAL_LIBPNG=true
47025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47026$as_echo "system" >&6; }
47027      else
47028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47029$as_echo "system not found" >&6; }
47030          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47031      fi
47032  else
47033      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47034  fi
47035
47036
47037  ###############################################################################
47038  #
47039  # Check for the zlib library
47040  #
47041
47042
47043# Check whether --with-zlib was given.
47044if test "${with_zlib+set}" = set; then :
47045  withval=$with_zlib;
47046fi
47047
47048
47049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47050$as_echo_n "checking for compress in -lz... " >&6; }
47051if ${ac_cv_lib_z_compress+:} false; then :
47052  $as_echo_n "(cached) " >&6
47053else
47054  ac_check_lib_save_LIBS=$LIBS
47055LIBS="-lz  $LIBS"
47056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47057/* end confdefs.h.  */
47058
47059/* Override any GCC internal prototype to avoid an error.
47060   Use char because int might match the return type of a GCC
47061   builtin and then its argument prototype would still apply.  */
47062#ifdef __cplusplus
47063extern "C"
47064#endif
47065char compress ();
47066int
47067main ()
47068{
47069return compress ();
47070  ;
47071  return 0;
47072}
47073_ACEOF
47074if ac_fn_cxx_try_link "$LINENO"; then :
47075  ac_cv_lib_z_compress=yes
47076else
47077  ac_cv_lib_z_compress=no
47078fi
47079rm -f core conftest.err conftest.$ac_objext \
47080    conftest$ac_exeext conftest.$ac_ext
47081LIBS=$ac_check_lib_save_LIBS
47082fi
47083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47084$as_echo "$ac_cv_lib_z_compress" >&6; }
47085if test "x$ac_cv_lib_z_compress" = xyes; then :
47086   ZLIB_FOUND=yes
47087else
47088   ZLIB_FOUND=no
47089fi
47090
47091
47092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47093$as_echo_n "checking for which zlib to use... " >&6; }
47094
47095  DEFAULT_ZLIB=bundled
47096  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47097    #
47098    # On macosx default is system...on others default is
47099    #
47100    DEFAULT_ZLIB=system
47101  fi
47102
47103  if test "x${ZLIB_FOUND}" != "xyes"; then
47104    #
47105    # If we don't find any system...set default to bundled
47106    #
47107    DEFAULT_ZLIB=bundled
47108  fi
47109
47110  #
47111  # If user didn't specify, use DEFAULT_ZLIB
47112  #
47113  if test "x${with_zlib}" = "x"; then
47114    with_zlib=${DEFAULT_ZLIB}
47115  fi
47116
47117  if test "x${with_zlib}" = "xbundled"; then
47118    USE_EXTERNAL_LIBZ=false
47119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47120$as_echo "bundled" >&6; }
47121  elif test "x${with_zlib}" = "xsystem"; then
47122    if test "x${ZLIB_FOUND}" = "xyes"; then
47123      USE_EXTERNAL_LIBZ=true
47124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47125$as_echo "system" >&6; }
47126    else
47127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47128$as_echo "system not found" >&6; }
47129      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47130    fi
47131  else
47132    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47133  fi
47134
47135
47136
47137  ###############################################################################
47138  LIBZIP_CAN_USE_MMAP=true
47139
47140
47141
47142  ###############################################################################
47143  #
47144  # Check if altzone exists in time.h
47145  #
47146
47147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47148/* end confdefs.h.  */
47149#include <time.h>
47150int
47151main ()
47152{
47153return (int)altzone;
47154  ;
47155  return 0;
47156}
47157_ACEOF
47158if ac_fn_cxx_try_link "$LINENO"; then :
47159  has_altzone=yes
47160else
47161  has_altzone=no
47162fi
47163rm -f core conftest.err conftest.$ac_objext \
47164    conftest$ac_exeext conftest.$ac_ext
47165  if test "x$has_altzone" = xyes; then
47166
47167$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47168
47169  fi
47170
47171  ###############################################################################
47172  #
47173  # Check the maths library
47174  #
47175
47176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47177$as_echo_n "checking for cos in -lm... " >&6; }
47178if ${ac_cv_lib_m_cos+:} false; then :
47179  $as_echo_n "(cached) " >&6
47180else
47181  ac_check_lib_save_LIBS=$LIBS
47182LIBS="-lm  $LIBS"
47183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47184/* end confdefs.h.  */
47185
47186/* Override any GCC internal prototype to avoid an error.
47187   Use char because int might match the return type of a GCC
47188   builtin and then its argument prototype would still apply.  */
47189#ifdef __cplusplus
47190extern "C"
47191#endif
47192char cos ();
47193int
47194main ()
47195{
47196return cos ();
47197  ;
47198  return 0;
47199}
47200_ACEOF
47201if ac_fn_cxx_try_link "$LINENO"; then :
47202  ac_cv_lib_m_cos=yes
47203else
47204  ac_cv_lib_m_cos=no
47205fi
47206rm -f core conftest.err conftest.$ac_objext \
47207    conftest$ac_exeext conftest.$ac_ext
47208LIBS=$ac_check_lib_save_LIBS
47209fi
47210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47211$as_echo "$ac_cv_lib_m_cos" >&6; }
47212if test "x$ac_cv_lib_m_cos" = xyes; then :
47213  cat >>confdefs.h <<_ACEOF
47214#define HAVE_LIBM 1
47215_ACEOF
47216
47217  LIBS="-lm $LIBS"
47218
47219else
47220
47221        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47222$as_echo "$as_me: Maths library was not found" >&6;}
47223
47224
47225fi
47226
47227
47228
47229  ###############################################################################
47230  #
47231  # Check for libdl.so
47232
47233  save_LIBS="$LIBS"
47234  LIBS=""
47235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47236$as_echo_n "checking for dlopen in -ldl... " >&6; }
47237if ${ac_cv_lib_dl_dlopen+:} false; then :
47238  $as_echo_n "(cached) " >&6
47239else
47240  ac_check_lib_save_LIBS=$LIBS
47241LIBS="-ldl  $LIBS"
47242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47243/* end confdefs.h.  */
47244
47245/* Override any GCC internal prototype to avoid an error.
47246   Use char because int might match the return type of a GCC
47247   builtin and then its argument prototype would still apply.  */
47248#ifdef __cplusplus
47249extern "C"
47250#endif
47251char dlopen ();
47252int
47253main ()
47254{
47255return dlopen ();
47256  ;
47257  return 0;
47258}
47259_ACEOF
47260if ac_fn_cxx_try_link "$LINENO"; then :
47261  ac_cv_lib_dl_dlopen=yes
47262else
47263  ac_cv_lib_dl_dlopen=no
47264fi
47265rm -f core conftest.err conftest.$ac_objext \
47266    conftest$ac_exeext conftest.$ac_ext
47267LIBS=$ac_check_lib_save_LIBS
47268fi
47269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47270$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47271if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47272  cat >>confdefs.h <<_ACEOF
47273#define HAVE_LIBDL 1
47274_ACEOF
47275
47276  LIBS="-ldl $LIBS"
47277
47278fi
47279
47280  LIBDL="$LIBS"
47281
47282  LIBS="$save_LIBS"
47283
47284
47285  ###############################################################################
47286  #
47287  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47288  # dynamic build is configured on command line.
47289  #
47290
47291# Check whether --with-stdc++lib was given.
47292if test "${with_stdc__lib+set}" = set; then :
47293  withval=$with_stdc__lib;
47294        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47295                && test "x$with_stdc__lib" != xdefault; then
47296          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47297        fi
47298
47299else
47300  with_stdc__lib=default
47301
47302fi
47303
47304
47305  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47306    # Test if -lstdc++ works.
47307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47308$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47309    ac_ext=cpp
47310ac_cpp='$CXXCPP $CPPFLAGS'
47311ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47312ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47313ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47314
47315    OLD_CXXFLAGS="$CXXFLAGS"
47316    CXXFLAGS="$CXXFLAGS -lstdc++"
47317    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47318/* end confdefs.h.  */
47319
47320int
47321main ()
47322{
47323return 0;
47324  ;
47325  return 0;
47326}
47327_ACEOF
47328if ac_fn_cxx_try_link "$LINENO"; then :
47329  has_dynamic_libstdcxx=yes
47330else
47331  has_dynamic_libstdcxx=no
47332fi
47333rm -f core conftest.err conftest.$ac_objext \
47334    conftest$ac_exeext conftest.$ac_ext
47335    CXXFLAGS="$OLD_CXXFLAGS"
47336    ac_ext=cpp
47337ac_cpp='$CXXCPP $CPPFLAGS'
47338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47341
47342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47343$as_echo "$has_dynamic_libstdcxx" >&6; }
47344
47345    # Test if stdc++ can be linked statically.
47346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47347$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47348    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47349    ac_ext=cpp
47350ac_cpp='$CXXCPP $CPPFLAGS'
47351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47354
47355    OLD_LIBS="$LIBS"
47356    OLD_CXX="$CXX"
47357    LIBS="$STATIC_STDCXX_FLAGS"
47358    CXX="$CC"
47359    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47360/* end confdefs.h.  */
47361
47362int
47363main ()
47364{
47365return 0;
47366  ;
47367  return 0;
47368}
47369_ACEOF
47370if ac_fn_cxx_try_link "$LINENO"; then :
47371  has_static_libstdcxx=yes
47372else
47373  has_static_libstdcxx=no
47374fi
47375rm -f core conftest.err conftest.$ac_objext \
47376    conftest$ac_exeext conftest.$ac_ext
47377    LIBS="$OLD_LIBS"
47378    CXX="$OLD_CXX"
47379    ac_ext=cpp
47380ac_cpp='$CXXCPP $CPPFLAGS'
47381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47384
47385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47386$as_echo "$has_static_libstdcxx" >&6; }
47387
47388    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47389      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47390    fi
47391
47392    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47393      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47394    fi
47395
47396    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47397      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47398    fi
47399
47400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47401$as_echo_n "checking how to link with libstdc++... " >&6; }
47402    # If dynamic was requested, it's available since it would fail above otherwise.
47403    # If dynamic wasn't requested, go with static unless it isn't available.
47404    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47405      LIBCXX="$LIBCXX -lstdc++"
47406      LDCXX="$CXX"
47407      STATIC_CXX_SETTING="STATIC_CXX=false"
47408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47409$as_echo "dynamic" >&6; }
47410    else
47411      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47412      LDCXX="$CC"
47413      STATIC_CXX_SETTING="STATIC_CXX=true"
47414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47415$as_echo "static" >&6; }
47416    fi
47417  fi
47418
47419
47420  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47421    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47422
47423pkg_failed=no
47424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47425$as_echo_n "checking for LIBFFI... " >&6; }
47426
47427if test -n "$LIBFFI_CFLAGS"; then
47428    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47429 elif test -n "$PKG_CONFIG"; then
47430    if test -n "$PKG_CONFIG" && \
47431    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47432  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47433  ac_status=$?
47434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47435  test $ac_status = 0; }; then
47436  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47437else
47438  pkg_failed=yes
47439fi
47440 else
47441    pkg_failed=untried
47442fi
47443if test -n "$LIBFFI_LIBS"; then
47444    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47445 elif test -n "$PKG_CONFIG"; then
47446    if test -n "$PKG_CONFIG" && \
47447    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47448  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47449  ac_status=$?
47450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47451  test $ac_status = 0; }; then
47452  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47453else
47454  pkg_failed=yes
47455fi
47456 else
47457    pkg_failed=untried
47458fi
47459
47460
47461
47462if test $pkg_failed = yes; then
47463
47464if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47465        _pkg_short_errors_supported=yes
47466else
47467        _pkg_short_errors_supported=no
47468fi
47469        if test $_pkg_short_errors_supported = yes; then
47470	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47471        else
47472	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47473        fi
47474	# Put the nasty error message in config.log where it belongs
47475	echo "$LIBFFI_PKG_ERRORS" >&5
47476
47477	as_fn_error $? "Package requirements (libffi) were not met:
47478
47479$LIBFFI_PKG_ERRORS
47480
47481Consider adjusting the PKG_CONFIG_PATH environment variable if you
47482installed software in a non-standard prefix.
47483
47484Alternatively, you may set the environment variables LIBFFI_CFLAGS
47485and LIBFFI_LIBS to avoid the need to call pkg-config.
47486See the pkg-config man page for more details.
47487" "$LINENO" 5
47488elif test $pkg_failed = untried; then
47489	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47491as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47492is in your PATH or set the PKG_CONFIG environment variable to the full
47493path to pkg-config.
47494
47495Alternatively, you may set the environment variables LIBFFI_CFLAGS
47496and LIBFFI_LIBS to avoid the need to call pkg-config.
47497See the pkg-config man page for more details.
47498
47499To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47500See \`config.log' for more details" "$LINENO" 5; }
47501else
47502	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47503	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47505$as_echo "yes" >&6; }
47506	:
47507fi
47508
47509  fi
47510
47511  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47512    # Extract the first word of "llvm-config", so it can be a program name with args.
47513set dummy llvm-config; ac_word=$2
47514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47515$as_echo_n "checking for $ac_word... " >&6; }
47516if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47517  $as_echo_n "(cached) " >&6
47518else
47519  if test -n "$LLVM_CONFIG"; then
47520  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47521else
47522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47523for as_dir in $PATH
47524do
47525  IFS=$as_save_IFS
47526  test -z "$as_dir" && as_dir=.
47527    for ac_exec_ext in '' $ac_executable_extensions; do
47528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47529    ac_cv_prog_LLVM_CONFIG="llvm-config"
47530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47531    break 2
47532  fi
47533done
47534  done
47535IFS=$as_save_IFS
47536
47537fi
47538fi
47539LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47540if test -n "$LLVM_CONFIG"; then
47541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47542$as_echo "$LLVM_CONFIG" >&6; }
47543else
47544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47545$as_echo "no" >&6; }
47546fi
47547
47548
47549
47550    if test "x$LLVM_CONFIG" != xllvm-config; then
47551      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47552    fi
47553
47554    llvm_components="jit mcjit engine nativecodegen native"
47555    unset LLVM_CFLAGS
47556    for flag in $("$LLVM_CONFIG" --cxxflags); do
47557      if echo "${flag}" | grep -q '^-[ID]'; then
47558        if test "${flag}" != "-D_DEBUG" ; then
47559          if test "${LLVM_CFLAGS}" != "" ; then
47560            LLVM_CFLAGS="${LLVM_CFLAGS} "
47561          fi
47562          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47563        fi
47564      fi
47565    done
47566    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47567    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47568
47569    unset LLVM_LDFLAGS
47570    for flag in $("${LLVM_CONFIG}" --ldflags); do
47571      if echo "${flag}" | grep -q '^-L'; then
47572        if test "${LLVM_LDFLAGS}" != ""; then
47573          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47574        fi
47575        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47576      fi
47577    done
47578
47579    unset LLVM_LIBS
47580    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47581      if echo "${flag}" | grep -q '^-l'; then
47582        if test "${LLVM_LIBS}" != ""; then
47583          LLVM_LIBS="${LLVM_LIBS} "
47584        fi
47585        LLVM_LIBS="${LLVM_LIBS}${flag}"
47586      fi
47587    done
47588
47589
47590
47591
47592  fi
47593
47594  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47595  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47596    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47597  fi
47598
47599  # TODO better (platform agnostic) test
47600  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47601    LIBCXX="-lstdc++"
47602  fi
47603
47604
47605
47606
47607  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47608
47609
47610# Check whether --with-msvcr-dll was given.
47611if test "${with_msvcr_dll+set}" = set; then :
47612  withval=$with_msvcr_dll;
47613fi
47614
47615
47616  if test "x$with_msvcr_dll" != x; then
47617    # If given explicitely by user, do not probe. If not present, fail directly.
47618
47619  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47620  METHOD="--with-msvcr-dll"
47621  if test -e "$POSSIBLE_MSVCR_DLL"; then
47622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47623$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47624
47625    # Need to check if the found msvcr is correct architecture
47626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47627$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47628    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47629    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47630      CORRECT_MSVCR_ARCH=386
47631    else
47632      CORRECT_MSVCR_ARCH=x86-64
47633    fi
47634    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47636$as_echo "ok" >&6; }
47637      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47639$as_echo_n "checking for msvcr100.dll... " >&6; }
47640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47641$as_echo "$MSVCR_DLL" >&6; }
47642    else
47643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47644$as_echo "incorrect, ignoring" >&6; }
47645      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47646$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47647    fi
47648  fi
47649
47650    if test "x$MSVCR_DLL" = x; then
47651      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47652    fi
47653  fi
47654
47655  if test "x$MSVCR_DLL" = x; then
47656    # Probe: Using well-known location from Visual Studio 10.0
47657    if test "x$VCINSTALLDIR" != x; then
47658      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47659
47660  windows_path="$CYGWIN_VC_INSTALL_DIR"
47661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47662    unix_path=`$CYGPATH -u "$windows_path"`
47663    CYGWIN_VC_INSTALL_DIR="$unix_path"
47664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47666    CYGWIN_VC_INSTALL_DIR="$unix_path"
47667  fi
47668
47669      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47670        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47671      else
47672        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47673      fi
47674
47675  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47676  METHOD="well-known location in VCINSTALLDIR"
47677  if test -e "$POSSIBLE_MSVCR_DLL"; then
47678    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47679$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47680
47681    # Need to check if the found msvcr is correct architecture
47682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47683$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47684    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47685    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47686      CORRECT_MSVCR_ARCH=386
47687    else
47688      CORRECT_MSVCR_ARCH=x86-64
47689    fi
47690    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47692$as_echo "ok" >&6; }
47693      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47695$as_echo_n "checking for msvcr100.dll... " >&6; }
47696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47697$as_echo "$MSVCR_DLL" >&6; }
47698    else
47699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47700$as_echo "incorrect, ignoring" >&6; }
47701      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47702$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47703    fi
47704  fi
47705
47706    fi
47707  fi
47708
47709  if test "x$MSVCR_DLL" = x; then
47710    # Probe: Check in the Boot JDK directory.
47711    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47712
47713  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47714  METHOD="well-known location in Boot JDK"
47715  if test -e "$POSSIBLE_MSVCR_DLL"; then
47716    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47717$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47718
47719    # Need to check if the found msvcr is correct architecture
47720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47721$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47722    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47723    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47724      CORRECT_MSVCR_ARCH=386
47725    else
47726      CORRECT_MSVCR_ARCH=x86-64
47727    fi
47728    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47730$as_echo "ok" >&6; }
47731      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47733$as_echo_n "checking for msvcr100.dll... " >&6; }
47734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47735$as_echo "$MSVCR_DLL" >&6; }
47736    else
47737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47738$as_echo "incorrect, ignoring" >&6; }
47739      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47740$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47741    fi
47742  fi
47743
47744  fi
47745
47746  if test "x$MSVCR_DLL" = x; then
47747    # Probe: Look in the Windows system32 directory
47748    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47749
47750  windows_path="$CYGWIN_SYSTEMROOT"
47751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47752    unix_path=`$CYGPATH -u "$windows_path"`
47753    CYGWIN_SYSTEMROOT="$unix_path"
47754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47756    CYGWIN_SYSTEMROOT="$unix_path"
47757  fi
47758
47759    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47760
47761  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47762  METHOD="well-known location in SYSTEMROOT"
47763  if test -e "$POSSIBLE_MSVCR_DLL"; then
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47765$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47766
47767    # Need to check if the found msvcr is correct architecture
47768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47769$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47770    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47771    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47772      CORRECT_MSVCR_ARCH=386
47773    else
47774      CORRECT_MSVCR_ARCH=x86-64
47775    fi
47776    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47778$as_echo "ok" >&6; }
47779      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47781$as_echo_n "checking for msvcr100.dll... " >&6; }
47782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47783$as_echo "$MSVCR_DLL" >&6; }
47784    else
47785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47786$as_echo "incorrect, ignoring" >&6; }
47787      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47788$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47789    fi
47790  fi
47791
47792  fi
47793
47794  if test "x$MSVCR_DLL" = x; then
47795    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47796    if test "x$VS100COMNTOOLS" != x; then
47797      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47798
47799  windows_path="$CYGWIN_VS_TOOLS_DIR"
47800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47801    unix_path=`$CYGPATH -u "$windows_path"`
47802    CYGWIN_VS_TOOLS_DIR="$unix_path"
47803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47805    CYGWIN_VS_TOOLS_DIR="$unix_path"
47806  fi
47807
47808      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47809        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47810      else
47811        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47812      fi
47813
47814  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47815  METHOD="search of VS100COMNTOOLS"
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  fi
47847
47848  if test "x$MSVCR_DLL" = x; then
47849    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47850    # (This was the original behaviour; kept since it might turn up something)
47851    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47852      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47853        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47854      else
47855        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47856        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47857          # We're grasping at straws now...
47858          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47859        fi
47860      fi
47861
47862
47863  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47864  METHOD="search of VCINSTALLDIR"
47865  if test -e "$POSSIBLE_MSVCR_DLL"; then
47866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47867$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47868
47869    # Need to check if the found msvcr is correct architecture
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47871$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47872    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47873    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47874      CORRECT_MSVCR_ARCH=386
47875    else
47876      CORRECT_MSVCR_ARCH=x86-64
47877    fi
47878    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47880$as_echo "ok" >&6; }
47881      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47883$as_echo_n "checking for msvcr100.dll... " >&6; }
47884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47885$as_echo "$MSVCR_DLL" >&6; }
47886    else
47887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47888$as_echo "incorrect, ignoring" >&6; }
47889      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47890$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47891    fi
47892  fi
47893
47894    fi
47895  fi
47896
47897  if test "x$MSVCR_DLL" = x; then
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47899$as_echo_n "checking for msvcr100.dll... " >&6; }
47900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47901$as_echo "no" >&6; }
47902    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47903  fi
47904
47905
47906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47907
47908  # Input might be given as Windows format, start by converting to
47909  # unix format.
47910  path="$MSVCR_DLL"
47911  new_path=`$CYGPATH -u "$path"`
47912
47913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47916  # "foo.exe" is OK but "foo" is an error.
47917  #
47918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47919  # It is also a way to make sure we got the proper file name for the real test later on.
47920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47921  if test "x$test_shortpath" = x; then
47922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47923$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47924    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47925  fi
47926
47927  # Call helper function which possibly converts this using DOS-style short mode.
47928  # If so, the updated path is stored in $new_path.
47929
47930  input_path="$new_path"
47931  # Check if we need to convert this using DOS-style short mode. If the path
47932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47933  # take no chances and rewrite it.
47934  # Note: m4 eats our [], so we need to use [ and ] instead.
47935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47936  if test "x$has_forbidden_chars" != x; then
47937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47941      # Going to short mode and back again did indeed matter. Since short mode is
47942      # case insensitive, let's make it lowercase to improve readability.
47943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47944      # Now convert it back to Unix-stile (cygpath)
47945      input_path=`$CYGPATH -u "$shortmode_path"`
47946      new_path="$input_path"
47947    fi
47948  fi
47949
47950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47951  if test "x$test_cygdrive_prefix" = x; then
47952    # As a simple fix, exclude /usr/bin since it's not a real path.
47953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47955      # a path prefixed by /cygdrive for fixpath to work.
47956      new_path="$CYGWIN_ROOT_PATH$input_path"
47957    fi
47958  fi
47959
47960
47961  if test "x$path" != "x$new_path"; then
47962    MSVCR_DLL="$new_path"
47963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47964$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47965  fi
47966
47967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47968
47969  path="$MSVCR_DLL"
47970  has_colon=`$ECHO $path | $GREP ^.:`
47971  new_path="$path"
47972  if test "x$has_colon" = x; then
47973    # Not in mixed or Windows style, start by that.
47974    new_path=`cmd //c echo $path`
47975  fi
47976
47977
47978  input_path="$new_path"
47979  # Check if we need to convert this using DOS-style short mode. If the path
47980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47981  # take no chances and rewrite it.
47982  # Note: m4 eats our [], so we need to use [ and ] instead.
47983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47984  if test "x$has_forbidden_chars" != x; then
47985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47987  fi
47988
47989
47990  windows_path="$new_path"
47991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47992    unix_path=`$CYGPATH -u "$windows_path"`
47993    new_path="$unix_path"
47994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47996    new_path="$unix_path"
47997  fi
47998
47999  if test "x$path" != "x$new_path"; then
48000    MSVCR_DLL="$new_path"
48001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48002$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48003  fi
48004
48005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48007
48008  else
48009    # We're on a posix platform. Hooray! :)
48010    path="$MSVCR_DLL"
48011    has_space=`$ECHO "$path" | $GREP " "`
48012    if test "x$has_space" != x; then
48013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48014$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48016    fi
48017
48018    # Use eval to expand a potential ~
48019    eval path="$path"
48020    if test ! -f "$path" && test ! -d "$path"; then
48021      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48022    fi
48023
48024    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48025  fi
48026
48027
48028
48029
48030# Check whether --with-dxsdk was given.
48031if test "${with_dxsdk+set}" = set; then :
48032  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48033$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48034fi
48035
48036
48037
48038
48039# Check whether --with-dxsdk-lib was given.
48040if test "${with_dxsdk_lib+set}" = set; then :
48041  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48042$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48043fi
48044
48045
48046
48047
48048# Check whether --with-dxsdk-include was given.
48049if test "${with_dxsdk_include+set}" = set; then :
48050  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48051$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48052fi
48053
48054
48055  fi
48056
48057
48058
48059###############################################################################
48060#
48061# We need to do some final tweaking, when everything else is done.
48062#
48063###############################################################################
48064
48065
48066  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48067
48068
48069  # The name of the Service Agent jar.
48070  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48071  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48072    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48073  fi
48074
48075
48076
48077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48078$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48079
48080    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48081      ENABLE_INTREE_EC=yes
48082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48083$as_echo "yes" >&6; }
48084    else
48085      ENABLE_INTREE_EC=no
48086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48087$as_echo "no" >&6; }
48088    fi
48089
48090
48091
48092
48093###############################################################################
48094#
48095# Configure parts of the build that only affect the build performance,
48096# not the result.
48097#
48098###############################################################################
48099
48100
48101  # How many cores do we have on this build system?
48102
48103# Check whether --with-num-cores was given.
48104if test "${with_num_cores+set}" = set; then :
48105  withval=$with_num_cores;
48106fi
48107
48108  if test "x$with_num_cores" = x; then
48109    # The number of cores were not specified, try to probe them.
48110
48111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48112$as_echo_n "checking for number of cores... " >&6; }
48113  NUM_CORES=1
48114  FOUND_CORES=no
48115
48116  if test -f /proc/cpuinfo; then
48117    # Looks like a Linux (or cygwin) system
48118    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48119    FOUND_CORES=yes
48120  elif test -x /usr/sbin/psrinfo; then
48121    # Looks like a Solaris system
48122    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48123    FOUND_CORES=yes
48124  elif test -x /usr/sbin/system_profiler; then
48125    # Looks like a MacOSX system
48126    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48127    FOUND_CORES=yes
48128  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48129    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48130    FOUND_CORES=yes
48131  elif test -n "$NUMBER_OF_PROCESSORS"; then
48132    # On windows, look in the env
48133    NUM_CORES=$NUMBER_OF_PROCESSORS
48134    FOUND_CORES=yes
48135  fi
48136
48137  if test "x$FOUND_CORES" = xyes; then
48138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48139$as_echo "$NUM_CORES" >&6; }
48140  else
48141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48142$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48144$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48145  fi
48146
48147  else
48148    NUM_CORES=$with_num_cores
48149  fi
48150
48151
48152
48153  # How much memory do we have on this build system?
48154
48155# Check whether --with-memory-size was given.
48156if test "${with_memory_size+set}" = set; then :
48157  withval=$with_memory_size;
48158fi
48159
48160  if test "x$with_memory_size" = x; then
48161    # The memory size was not specified, try to probe it.
48162
48163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48164$as_echo_n "checking for memory size... " >&6; }
48165  # Default to 1024 MB
48166  MEMORY_SIZE=1024
48167  FOUND_MEM=no
48168
48169  if test -f /proc/meminfo; then
48170    # Looks like a Linux (or cygwin) system
48171    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48172    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48173    FOUND_MEM=yes
48174  elif test -x /usr/sbin/prtconf; then
48175    # Looks like a Solaris or AIX system
48176    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48177    FOUND_MEM=yes
48178  elif test -x /usr/sbin/system_profiler; then
48179    # Looks like a MacOSX system
48180    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48181    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48182    FOUND_MEM=yes
48183  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48184    # Windows, but without cygwin
48185    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48186    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48187    FOUND_MEM=yes
48188  fi
48189
48190  if test "x$FOUND_MEM" = xyes; then
48191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48192$as_echo "$MEMORY_SIZE MB" >&6; }
48193  else
48194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48195$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48197$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48198  fi
48199
48200  else
48201    MEMORY_SIZE=$with_memory_size
48202  fi
48203
48204
48205
48206  # Provide a decent default number of parallel jobs for make depending on
48207  # number of cores, amount of memory and machine architecture.
48208
48209# Check whether --with-jobs was given.
48210if test "${with_jobs+set}" = set; then :
48211  withval=$with_jobs;
48212fi
48213
48214  if test "x$with_jobs" = x; then
48215    # Number of jobs was not specified, calculate.
48216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48217$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48218    # Approximate memory in GB, rounding up a bit.
48219    memory_gb=`expr $MEMORY_SIZE / 1100`
48220    # Pick the lowest of memory in gb and number of cores.
48221    if test "$memory_gb" -lt "$NUM_CORES"; then
48222      JOBS="$memory_gb"
48223    else
48224      JOBS="$NUM_CORES"
48225      # On bigger machines, leave some room for other processes to run
48226      if test "$JOBS" -gt "4"; then
48227        JOBS=`expr $JOBS '*' 90 / 100`
48228      fi
48229    fi
48230    # Cap number of jobs to 16
48231    if test "$JOBS" -gt "16"; then
48232      JOBS=16
48233    fi
48234    if test "$JOBS" -eq "0"; then
48235      JOBS=1
48236    fi
48237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48238$as_echo "$JOBS" >&6; }
48239  else
48240    JOBS=$with_jobs
48241  fi
48242
48243
48244
48245# Setup smart javac (after cores and memory have been setup)
48246
48247
48248# Check whether --with-sjavac-server-java was given.
48249if test "${with_sjavac_server_java+set}" = set; then :
48250  withval=$with_sjavac_server_java;
48251fi
48252
48253
48254  if test "x$with_sjavac_server_java" != x; then
48255    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48256    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48257    if test "x$FOUND_VERSION" = x; then
48258      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48259    fi
48260  else
48261    SJAVAC_SERVER_JAVA=""
48262    # Hotspot specific options.
48263
48264  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48265  $ECHO "Command: $JAVA -verbosegc -version" >&5
48266  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48267  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48268  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48269  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48270    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48271    JVM_ARG_OK=true
48272  else
48273    $ECHO "Arg failed:" >&5
48274    $ECHO "$OUTPUT" >&5
48275    JVM_ARG_OK=false
48276  fi
48277
48278    # JRockit specific options.
48279
48280  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48281  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48282  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48283  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48284  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48285  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48286    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48287    JVM_ARG_OK=true
48288  else
48289    $ECHO "Arg failed:" >&5
48290    $ECHO "$OUTPUT" >&5
48291    JVM_ARG_OK=false
48292  fi
48293
48294    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48295  fi
48296
48297
48298  if test "$MEMORY_SIZE" -gt "2500"; then
48299
48300  $ECHO "Check if jvm arg is ok: -d64" >&5
48301  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48302  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48303  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48304  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48305  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48306    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48307    JVM_ARG_OK=true
48308  else
48309    $ECHO "Arg failed:" >&5
48310    $ECHO "$OUTPUT" >&5
48311    JVM_ARG_OK=false
48312  fi
48313
48314    if test "$JVM_ARG_OK" = true; then
48315      JVM_64BIT=true
48316      JVM_ARG_OK=false
48317    fi
48318  fi
48319
48320  if test "$JVM_64BIT" = true; then
48321    if test "$MEMORY_SIZE" -gt "17000"; then
48322
48323  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48324  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48325  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48326  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48327  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48328  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48329    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48330    JVM_ARG_OK=true
48331  else
48332    $ECHO "Arg failed:" >&5
48333    $ECHO "$OUTPUT" >&5
48334    JVM_ARG_OK=false
48335  fi
48336
48337    fi
48338    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48339
48340  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48341  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48342  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48343  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48344  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48345  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48346    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48347    JVM_ARG_OK=true
48348  else
48349    $ECHO "Arg failed:" >&5
48350    $ECHO "$OUTPUT" >&5
48351    JVM_ARG_OK=false
48352  fi
48353
48354    fi
48355    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48356
48357  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48358  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48359  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48360  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48361  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48362  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48363    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48364    JVM_ARG_OK=true
48365  else
48366    $ECHO "Arg failed:" >&5
48367    $ECHO "$OUTPUT" >&5
48368    JVM_ARG_OK=false
48369  fi
48370
48371    fi
48372    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48373
48374  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48375  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48376  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48377  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48378  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48379  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48380    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48381    JVM_ARG_OK=true
48382  else
48383    $ECHO "Arg failed:" >&5
48384    $ECHO "$OUTPUT" >&5
48385    JVM_ARG_OK=false
48386  fi
48387
48388    fi
48389  fi
48390  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48391
48392  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48393  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48394  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48395  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48396  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48397  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48398    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48399    JVM_ARG_OK=true
48400  else
48401    $ECHO "Arg failed:" >&5
48402    $ECHO "$OUTPUT" >&5
48403    JVM_ARG_OK=false
48404  fi
48405
48406  fi
48407  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48408
48409  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48410  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48411  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48412  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48413  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48414  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48415    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48416    JVM_ARG_OK=true
48417  else
48418    $ECHO "Arg failed:" >&5
48419    $ECHO "$OUTPUT" >&5
48420    JVM_ARG_OK=false
48421  fi
48422
48423  fi
48424  if test "$JVM_ARG_OK" = false; then
48425
48426  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48427  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48428  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48429  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48430  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48431  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48432    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48433    JVM_ARG_OK=true
48434  else
48435    $ECHO "Arg failed:" >&5
48436    $ECHO "$OUTPUT" >&5
48437    JVM_ARG_OK=false
48438  fi
48439
48440  fi
48441
48442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48443$as_echo_n "checking whether to use sjavac... " >&6; }
48444  # Check whether --enable-sjavac was given.
48445if test "${enable_sjavac+set}" = set; then :
48446  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48447else
48448  ENABLE_SJAVAC='no'
48449fi
48450
48451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48452$as_echo "$ENABLE_SJAVAC" >&6; }
48453
48454
48455  if test "x$ENABLE_SJAVAC" = xyes; then
48456    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48457  else
48458    SJAVAC_SERVER_DIR=
48459  fi
48460
48461
48462
48463# Can the C/C++ compiler use precompiled headers?
48464
48465
48466  ###############################################################################
48467  #
48468  # Can the C/C++ compiler use precompiled headers?
48469  #
48470  # Check whether --enable-precompiled-headers was given.
48471if test "${enable_precompiled_headers+set}" = set; then :
48472  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48473else
48474  ENABLE_PRECOMPH=yes
48475fi
48476
48477
48478  USE_PRECOMPILED_HEADER=1
48479  if test "x$ENABLE_PRECOMPH" = xno; then
48480    USE_PRECOMPILED_HEADER=0
48481  fi
48482
48483  if test "x$ENABLE_PRECOMPH" = xyes; then
48484    # Check that the compiler actually supports precomp headers.
48485    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48486      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48487$as_echo_n "checking that precompiled headers work... " >&6; }
48488      echo "int alfa();" > conftest.h
48489      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48490      if test ! -f conftest.hpp.gch; then
48491        USE_PRECOMPILED_HEADER=0
48492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48493$as_echo "no" >&6; }
48494      else
48495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48496$as_echo "yes" >&6; }
48497      fi
48498      rm -f conftest.h conftest.hpp.gch
48499    fi
48500  fi
48501
48502
48503
48504
48505# Setup use of ccache, if available
48506
48507  # Check whether --enable-ccache was given.
48508if test "${enable_ccache+set}" = set; then :
48509  enableval=$enable_ccache;
48510fi
48511
48512
48513  CCACHE=
48514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48515$as_echo_n "checking is ccache enabled... " >&6; }
48516  ENABLE_CCACHE=$enable_ccache
48517  if test "x$enable_ccache" = xyes; then
48518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48519$as_echo "yes" >&6; }
48520    OLD_PATH="$PATH"
48521    if test "x$TOOLS_DIR" != x; then
48522      PATH=$TOOLS_DIR:$PATH
48523    fi
48524
48525
48526
48527  # Publish this variable in the help.
48528
48529
48530  if test "x$CCACHE" = x; then
48531    # The variable is not set by user, try to locate tool using the code snippet
48532    for ac_prog in ccache
48533do
48534  # Extract the first word of "$ac_prog", so it can be a program name with args.
48535set dummy $ac_prog; ac_word=$2
48536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48537$as_echo_n "checking for $ac_word... " >&6; }
48538if ${ac_cv_path_CCACHE+:} false; then :
48539  $as_echo_n "(cached) " >&6
48540else
48541  case $CCACHE in
48542  [\\/]* | ?:[\\/]*)
48543  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48544  ;;
48545  *)
48546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48547for as_dir in $PATH
48548do
48549  IFS=$as_save_IFS
48550  test -z "$as_dir" && as_dir=.
48551    for ac_exec_ext in '' $ac_executable_extensions; do
48552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48553    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48555    break 2
48556  fi
48557done
48558  done
48559IFS=$as_save_IFS
48560
48561  ;;
48562esac
48563fi
48564CCACHE=$ac_cv_path_CCACHE
48565if test -n "$CCACHE"; then
48566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48567$as_echo "$CCACHE" >&6; }
48568else
48569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48570$as_echo "no" >&6; }
48571fi
48572
48573
48574  test -n "$CCACHE" && break
48575done
48576
48577  else
48578    # The variable is set, but is it from the command line or the environment?
48579
48580    # Try to remove the string !CCACHE! from our list.
48581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48583      # If it failed, the variable was not from the command line. Ignore it,
48584      # but warn the user (except for BASH, which is always set by the calling BASH).
48585      if test "xCCACHE" != xBASH; then
48586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48587$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48588      fi
48589      # Try to locate tool using the code snippet
48590      for ac_prog in ccache
48591do
48592  # Extract the first word of "$ac_prog", so it can be a program name with args.
48593set dummy $ac_prog; ac_word=$2
48594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48595$as_echo_n "checking for $ac_word... " >&6; }
48596if ${ac_cv_path_CCACHE+:} false; then :
48597  $as_echo_n "(cached) " >&6
48598else
48599  case $CCACHE in
48600  [\\/]* | ?:[\\/]*)
48601  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48602  ;;
48603  *)
48604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48605for as_dir in $PATH
48606do
48607  IFS=$as_save_IFS
48608  test -z "$as_dir" && as_dir=.
48609    for ac_exec_ext in '' $ac_executable_extensions; do
48610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48611    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48613    break 2
48614  fi
48615done
48616  done
48617IFS=$as_save_IFS
48618
48619  ;;
48620esac
48621fi
48622CCACHE=$ac_cv_path_CCACHE
48623if test -n "$CCACHE"; then
48624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48625$as_echo "$CCACHE" >&6; }
48626else
48627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48628$as_echo "no" >&6; }
48629fi
48630
48631
48632  test -n "$CCACHE" && break
48633done
48634
48635    else
48636      # If it succeeded, then it was overridden by the user. We will use it
48637      # for the tool.
48638
48639      # First remove it from the list of overridden variables, so we can test
48640      # for unknown variables in the end.
48641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48642
48643      # Check if the provided tool contains a complete path.
48644      tool_specified="$CCACHE"
48645      tool_basename="${tool_specified##*/}"
48646      if test "x$tool_basename" = "x$tool_specified"; then
48647        # A command without a complete path is provided, search $PATH.
48648        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48649$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48650        # Extract the first word of "$tool_basename", so it can be a program name with args.
48651set dummy $tool_basename; ac_word=$2
48652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48653$as_echo_n "checking for $ac_word... " >&6; }
48654if ${ac_cv_path_CCACHE+:} false; then :
48655  $as_echo_n "(cached) " >&6
48656else
48657  case $CCACHE in
48658  [\\/]* | ?:[\\/]*)
48659  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48660  ;;
48661  *)
48662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48663for as_dir in $PATH
48664do
48665  IFS=$as_save_IFS
48666  test -z "$as_dir" && as_dir=.
48667    for ac_exec_ext in '' $ac_executable_extensions; do
48668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48669    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48671    break 2
48672  fi
48673done
48674  done
48675IFS=$as_save_IFS
48676
48677  ;;
48678esac
48679fi
48680CCACHE=$ac_cv_path_CCACHE
48681if test -n "$CCACHE"; then
48682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48683$as_echo "$CCACHE" >&6; }
48684else
48685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48686$as_echo "no" >&6; }
48687fi
48688
48689
48690        if test "x$CCACHE" = x; then
48691          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48692        fi
48693      else
48694        # Otherwise we believe it is a complete path. Use it as it is.
48695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48696$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48697        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48698$as_echo_n "checking for CCACHE... " >&6; }
48699        if test ! -x "$tool_specified"; then
48700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48701$as_echo "not found" >&6; }
48702          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48703        fi
48704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48705$as_echo "$tool_specified" >&6; }
48706      fi
48707    fi
48708  fi
48709
48710
48711
48712  if test "x$CCACHE" = x; then
48713    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48714  fi
48715
48716
48717    CCACHE_STATUS="enabled"
48718    PATH="$OLD_PATH"
48719  elif test "x$enable_ccache" = xno; then
48720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48721$as_echo "no, explicitly disabled" >&6; }
48722  elif test "x$enable_ccache" = x; then
48723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48724$as_echo "no" >&6; }
48725  else
48726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48727$as_echo "unknown" >&6; }
48728    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48729  fi
48730
48731
48732
48733# Check whether --with-ccache-dir was given.
48734if test "${with_ccache_dir+set}" = set; then :
48735  withval=$with_ccache_dir;
48736fi
48737
48738
48739  if test "x$with_ccache_dir" != x; then
48740    # When using a non home ccache directory, assume the use is to share ccache files
48741    # with other users. Thus change the umask.
48742    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48743    if test "x$CCACHE" = x; then
48744      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48745$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48746    fi
48747  fi
48748
48749  if test "x$CCACHE" != x; then
48750
48751  if test "x$CCACHE" != x; then
48752    # Only use ccache if it is 3.1.4 or later, which supports
48753    # precompiled headers.
48754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48755$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48756    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48757    if test "x$HAS_GOOD_CCACHE" = x; then
48758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48759$as_echo "no, disabling ccache" >&6; }
48760      CCACHE=
48761      CCACHE_STATUS="disabled"
48762    else
48763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48764$as_echo "yes" >&6; }
48765      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48766$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48767      PUSHED_FLAGS="$CXXFLAGS"
48768      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48769      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48770/* end confdefs.h.  */
48771
48772int
48773main ()
48774{
48775
48776  ;
48777  return 0;
48778}
48779_ACEOF
48780if ac_fn_cxx_try_compile "$LINENO"; then :
48781  CC_KNOWS_CCACHE_TRICK=yes
48782else
48783  CC_KNOWS_CCACHE_TRICK=no
48784fi
48785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48786      CXXFLAGS="$PUSHED_FLAGS"
48787      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48789$as_echo "yes" >&6; }
48790      else
48791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48792$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48793        CCACHE=
48794        CCACHE_STATUS="disabled"
48795      fi
48796    fi
48797  fi
48798
48799  if test "x$CCACHE" != x; then
48800    CCACHE_SLOPPINESS=time_macros
48801    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48802    CCACHE_FLAGS=-fpch-preprocess
48803
48804    if test "x$SET_CCACHE_DIR" != x; then
48805      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48806      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48807    fi
48808  fi
48809
48810  fi
48811
48812
48813###############################################################################
48814#
48815# And now the finish...
48816#
48817###############################################################################
48818
48819# Check for some common pitfalls
48820
48821  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48822    file_to_test="$SRC_ROOT/LICENSE"
48823    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48824      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
48825    fi
48826  fi
48827
48828
48829  # Did user specify any unknown variables?
48830
48831  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48832    # Replace the separating ! with spaces before presenting for end user.
48833    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48834    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48835$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48836  fi
48837
48838
48839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48840$as_echo_n "checking if build directory is on local disk... " >&6; }
48841
48842  # df -l lists only local disks; if the given directory is not found then
48843  # a non-zero exit code is given
48844  if test "x$DF" = x; then
48845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48846      # msys does not have df; use Windows "net use" instead.
48847      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48848      if test "x$IS_NETWORK_DISK" = x; then
48849        OUTPUT_DIR_IS_LOCAL="yes"
48850      else
48851        OUTPUT_DIR_IS_LOCAL="no"
48852      fi
48853    else
48854      # No df here, say it's local
48855      OUTPUT_DIR_IS_LOCAL="yes"
48856    fi
48857  else
48858    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48859      OUTPUT_DIR_IS_LOCAL="yes"
48860    else
48861      OUTPUT_DIR_IS_LOCAL="no"
48862    fi
48863  fi
48864
48865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48866$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48867
48868
48869
48870  # Check if the user has any old-style ALT_ variables set.
48871  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48872
48873  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48874  # Since we can't properly handle the dependencies for this, warn the user about the situation
48875  if test -e $OUTPUT_ROOT/spec.gmk; then
48876    IS_RECONFIGURE=yes
48877  else
48878    IS_RECONFIGURE=no
48879  fi
48880
48881
48882# At the end, call the custom hook. (Dummy macro if no custom sources available)
48883
48884
48885# We're messing a bit with internal autoconf variables to put the config.status
48886# in the output directory instead of the current directory.
48887CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48888
48889# Create the actual output files. Now the main work of configure is done.
48890cat >confcache <<\_ACEOF
48891# This file is a shell script that caches the results of configure
48892# tests run on this system so they can be shared between configure
48893# scripts and configure runs, see configure's option --config-cache.
48894# It is not useful on other systems.  If it contains results you don't
48895# want to keep, you may remove or edit it.
48896#
48897# config.status only pays attention to the cache file if you give it
48898# the --recheck option to rerun configure.
48899#
48900# `ac_cv_env_foo' variables (set or unset) will be overridden when
48901# loading this file, other *unset* `ac_cv_foo' will be assigned the
48902# following values.
48903
48904_ACEOF
48905
48906# The following way of writing the cache mishandles newlines in values,
48907# but we know of no workaround that is simple, portable, and efficient.
48908# So, we kill variables containing newlines.
48909# Ultrix sh set writes to stderr and can't be redirected directly,
48910# and sets the high bit in the cache file unless we assign to the vars.
48911(
48912  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48913    eval ac_val=\$$ac_var
48914    case $ac_val in #(
48915    *${as_nl}*)
48916      case $ac_var in #(
48917      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48918$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48919      esac
48920      case $ac_var in #(
48921      _ | IFS | as_nl) ;; #(
48922      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48923      *) { eval $ac_var=; unset $ac_var;} ;;
48924      esac ;;
48925    esac
48926  done
48927
48928  (set) 2>&1 |
48929    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48930    *${as_nl}ac_space=\ *)
48931      # `set' does not quote correctly, so add quotes: double-quote
48932      # substitution turns \\\\ into \\, and sed turns \\ into \.
48933      sed -n \
48934	"s/'/'\\\\''/g;
48935	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48936      ;; #(
48937    *)
48938      # `set' quotes correctly as required by POSIX, so do not add quotes.
48939      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48940      ;;
48941    esac |
48942    sort
48943) |
48944  sed '
48945     /^ac_cv_env_/b end
48946     t clear
48947     :clear
48948     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48949     t end
48950     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48951     :end' >>confcache
48952if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48953  if test -w "$cache_file"; then
48954    if test "x$cache_file" != "x/dev/null"; then
48955      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48956$as_echo "$as_me: updating cache $cache_file" >&6;}
48957      if test ! -f "$cache_file" || test -h "$cache_file"; then
48958	cat confcache >"$cache_file"
48959      else
48960        case $cache_file in #(
48961        */* | ?:*)
48962	  mv -f confcache "$cache_file"$$ &&
48963	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48964        *)
48965	  mv -f confcache "$cache_file" ;;
48966	esac
48967      fi
48968    fi
48969  else
48970    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48971$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48972  fi
48973fi
48974rm -f confcache
48975
48976test "x$prefix" = xNONE && prefix=$ac_default_prefix
48977# Let make expand exec_prefix.
48978test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48979
48980DEFS=-DHAVE_CONFIG_H
48981
48982ac_libobjs=
48983ac_ltlibobjs=
48984U=
48985for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48986  # 1. Remove the extension, and $U if already installed.
48987  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48988  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48989  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48990  #    will be set to the directory where LIBOBJS objects are built.
48991  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48992  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48993done
48994LIBOBJS=$ac_libobjs
48995
48996LTLIBOBJS=$ac_ltlibobjs
48997
48998
48999
49000: "${CONFIG_STATUS=./config.status}"
49001ac_write_fail=0
49002ac_clean_files_save=$ac_clean_files
49003ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49004{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49005$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49006as_write_fail=0
49007cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49008#! $SHELL
49009# Generated by $as_me.
49010# Run this file to recreate the current configuration.
49011# Compiler output produced by configure, useful for debugging
49012# configure, is in config.log if it exists.
49013
49014debug=false
49015ac_cs_recheck=false
49016ac_cs_silent=false
49017
49018SHELL=\${CONFIG_SHELL-$SHELL}
49019export SHELL
49020_ASEOF
49021cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49022## -------------------- ##
49023## M4sh Initialization. ##
49024## -------------------- ##
49025
49026# Be more Bourne compatible
49027DUALCASE=1; export DUALCASE # for MKS sh
49028if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49029  emulate sh
49030  NULLCMD=:
49031  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49032  # is contrary to our usage.  Disable this feature.
49033  alias -g '${1+"$@"}'='"$@"'
49034  setopt NO_GLOB_SUBST
49035else
49036  case `(set -o) 2>/dev/null` in #(
49037  *posix*) :
49038    set -o posix ;; #(
49039  *) :
49040     ;;
49041esac
49042fi
49043
49044
49045as_nl='
49046'
49047export as_nl
49048# Printing a long string crashes Solaris 7 /usr/bin/printf.
49049as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49050as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49051as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49052# Prefer a ksh shell builtin over an external printf program on Solaris,
49053# but without wasting forks for bash or zsh.
49054if test -z "$BASH_VERSION$ZSH_VERSION" \
49055    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49056  as_echo='print -r --'
49057  as_echo_n='print -rn --'
49058elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49059  as_echo='printf %s\n'
49060  as_echo_n='printf %s'
49061else
49062  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49063    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49064    as_echo_n='/usr/ucb/echo -n'
49065  else
49066    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49067    as_echo_n_body='eval
49068      arg=$1;
49069      case $arg in #(
49070      *"$as_nl"*)
49071	expr "X$arg" : "X\\(.*\\)$as_nl";
49072	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49073      esac;
49074      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49075    '
49076    export as_echo_n_body
49077    as_echo_n='sh -c $as_echo_n_body as_echo'
49078  fi
49079  export as_echo_body
49080  as_echo='sh -c $as_echo_body as_echo'
49081fi
49082
49083# The user is always right.
49084if test "${PATH_SEPARATOR+set}" != set; then
49085  PATH_SEPARATOR=:
49086  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49087    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49088      PATH_SEPARATOR=';'
49089  }
49090fi
49091
49092
49093# IFS
49094# We need space, tab and new line, in precisely that order.  Quoting is
49095# there to prevent editors from complaining about space-tab.
49096# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49097# splitting by setting IFS to empty value.)
49098IFS=" ""	$as_nl"
49099
49100# Find who we are.  Look in the path if we contain no directory separator.
49101as_myself=
49102case $0 in #((
49103  *[\\/]* ) as_myself=$0 ;;
49104  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49105for as_dir in $PATH
49106do
49107  IFS=$as_save_IFS
49108  test -z "$as_dir" && as_dir=.
49109    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49110  done
49111IFS=$as_save_IFS
49112
49113     ;;
49114esac
49115# We did not find ourselves, most probably we were run as `sh COMMAND'
49116# in which case we are not to be found in the path.
49117if test "x$as_myself" = x; then
49118  as_myself=$0
49119fi
49120if test ! -f "$as_myself"; then
49121  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49122  exit 1
49123fi
49124
49125# Unset variables that we do not need and which cause bugs (e.g. in
49126# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49127# suppresses any "Segmentation fault" message there.  '((' could
49128# trigger a bug in pdksh 5.2.14.
49129for as_var in BASH_ENV ENV MAIL MAILPATH
49130do eval test x\${$as_var+set} = xset \
49131  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49132done
49133PS1='$ '
49134PS2='> '
49135PS4='+ '
49136
49137# NLS nuisances.
49138LC_ALL=C
49139export LC_ALL
49140LANGUAGE=C
49141export LANGUAGE
49142
49143# CDPATH.
49144(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49145
49146
49147# as_fn_error STATUS ERROR [LINENO LOG_FD]
49148# ----------------------------------------
49149# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49150# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49151# script with STATUS, using 1 if that was 0.
49152as_fn_error ()
49153{
49154  as_status=$1; test $as_status -eq 0 && as_status=1
49155  if test "$4"; then
49156    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49157    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49158  fi
49159  $as_echo "$as_me: error: $2" >&2
49160  as_fn_exit $as_status
49161} # as_fn_error
49162
49163
49164# as_fn_set_status STATUS
49165# -----------------------
49166# Set $? to STATUS, without forking.
49167as_fn_set_status ()
49168{
49169  return $1
49170} # as_fn_set_status
49171
49172# as_fn_exit STATUS
49173# -----------------
49174# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49175as_fn_exit ()
49176{
49177  set +e
49178  as_fn_set_status $1
49179  exit $1
49180} # as_fn_exit
49181
49182# as_fn_unset VAR
49183# ---------------
49184# Portably unset VAR.
49185as_fn_unset ()
49186{
49187  { eval $1=; unset $1;}
49188}
49189as_unset=as_fn_unset
49190# as_fn_append VAR VALUE
49191# ----------------------
49192# Append the text in VALUE to the end of the definition contained in VAR. Take
49193# advantage of any shell optimizations that allow amortized linear growth over
49194# repeated appends, instead of the typical quadratic growth present in naive
49195# implementations.
49196if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49197  eval 'as_fn_append ()
49198  {
49199    eval $1+=\$2
49200  }'
49201else
49202  as_fn_append ()
49203  {
49204    eval $1=\$$1\$2
49205  }
49206fi # as_fn_append
49207
49208# as_fn_arith ARG...
49209# ------------------
49210# Perform arithmetic evaluation on the ARGs, and store the result in the
49211# global $as_val. Take advantage of shells that can avoid forks. The arguments
49212# must be portable across $(()) and expr.
49213if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49214  eval 'as_fn_arith ()
49215  {
49216    as_val=$(( $* ))
49217  }'
49218else
49219  as_fn_arith ()
49220  {
49221    as_val=`expr "$@" || test $? -eq 1`
49222  }
49223fi # as_fn_arith
49224
49225
49226if expr a : '\(a\)' >/dev/null 2>&1 &&
49227   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49228  as_expr=expr
49229else
49230  as_expr=false
49231fi
49232
49233if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49234  as_basename=basename
49235else
49236  as_basename=false
49237fi
49238
49239if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49240  as_dirname=dirname
49241else
49242  as_dirname=false
49243fi
49244
49245as_me=`$as_basename -- "$0" ||
49246$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49247	 X"$0" : 'X\(//\)$' \| \
49248	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49249$as_echo X/"$0" |
49250    sed '/^.*\/\([^/][^/]*\)\/*$/{
49251	    s//\1/
49252	    q
49253	  }
49254	  /^X\/\(\/\/\)$/{
49255	    s//\1/
49256	    q
49257	  }
49258	  /^X\/\(\/\).*/{
49259	    s//\1/
49260	    q
49261	  }
49262	  s/.*/./; q'`
49263
49264# Avoid depending upon Character Ranges.
49265as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49266as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49267as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49268as_cr_digits='0123456789'
49269as_cr_alnum=$as_cr_Letters$as_cr_digits
49270
49271ECHO_C= ECHO_N= ECHO_T=
49272case `echo -n x` in #(((((
49273-n*)
49274  case `echo 'xy\c'` in
49275  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49276  xy)  ECHO_C='\c';;
49277  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49278       ECHO_T='	';;
49279  esac;;
49280*)
49281  ECHO_N='-n';;
49282esac
49283
49284rm -f conf$$ conf$$.exe conf$$.file
49285if test -d conf$$.dir; then
49286  rm -f conf$$.dir/conf$$.file
49287else
49288  rm -f conf$$.dir
49289  mkdir conf$$.dir 2>/dev/null
49290fi
49291if (echo >conf$$.file) 2>/dev/null; then
49292  if ln -s conf$$.file conf$$ 2>/dev/null; then
49293    as_ln_s='ln -s'
49294    # ... but there are two gotchas:
49295    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49296    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49297    # In both cases, we have to default to `cp -pR'.
49298    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49299      as_ln_s='cp -pR'
49300  elif ln conf$$.file conf$$ 2>/dev/null; then
49301    as_ln_s=ln
49302  else
49303    as_ln_s='cp -pR'
49304  fi
49305else
49306  as_ln_s='cp -pR'
49307fi
49308rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49309rmdir conf$$.dir 2>/dev/null
49310
49311
49312# as_fn_mkdir_p
49313# -------------
49314# Create "$as_dir" as a directory, including parents if necessary.
49315as_fn_mkdir_p ()
49316{
49317
49318  case $as_dir in #(
49319  -*) as_dir=./$as_dir;;
49320  esac
49321  test -d "$as_dir" || eval $as_mkdir_p || {
49322    as_dirs=
49323    while :; do
49324      case $as_dir in #(
49325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49326      *) as_qdir=$as_dir;;
49327      esac
49328      as_dirs="'$as_qdir' $as_dirs"
49329      as_dir=`$as_dirname -- "$as_dir" ||
49330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49331	 X"$as_dir" : 'X\(//\)[^/]' \| \
49332	 X"$as_dir" : 'X\(//\)$' \| \
49333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49334$as_echo X"$as_dir" |
49335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49336	    s//\1/
49337	    q
49338	  }
49339	  /^X\(\/\/\)[^/].*/{
49340	    s//\1/
49341	    q
49342	  }
49343	  /^X\(\/\/\)$/{
49344	    s//\1/
49345	    q
49346	  }
49347	  /^X\(\/\).*/{
49348	    s//\1/
49349	    q
49350	  }
49351	  s/.*/./; q'`
49352      test -d "$as_dir" && break
49353    done
49354    test -z "$as_dirs" || eval "mkdir $as_dirs"
49355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49356
49357
49358} # as_fn_mkdir_p
49359if mkdir -p . 2>/dev/null; then
49360  as_mkdir_p='mkdir -p "$as_dir"'
49361else
49362  test -d ./-p && rmdir ./-p
49363  as_mkdir_p=false
49364fi
49365
49366
49367# as_fn_executable_p FILE
49368# -----------------------
49369# Test if FILE is an executable regular file.
49370as_fn_executable_p ()
49371{
49372  test -f "$1" && test -x "$1"
49373} # as_fn_executable_p
49374as_test_x='test -x'
49375as_executable_p=as_fn_executable_p
49376
49377# Sed expression to map a string onto a valid CPP name.
49378as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49379
49380# Sed expression to map a string onto a valid variable name.
49381as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49382
49383
49384exec 6>&1
49385## ----------------------------------- ##
49386## Main body of $CONFIG_STATUS script. ##
49387## ----------------------------------- ##
49388_ASEOF
49389test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49390
49391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49392# Save the log message, to keep $0 and so on meaningful, and to
49393# report actual input values of CONFIG_FILES etc. instead of their
49394# values after options handling.
49395ac_log="
49396This file was extended by OpenJDK $as_me jdk9, which was
49397generated by GNU Autoconf 2.69.  Invocation command line was
49398
49399  CONFIG_FILES    = $CONFIG_FILES
49400  CONFIG_HEADERS  = $CONFIG_HEADERS
49401  CONFIG_LINKS    = $CONFIG_LINKS
49402  CONFIG_COMMANDS = $CONFIG_COMMANDS
49403  $ $0 $@
49404
49405on `(hostname || uname -n) 2>/dev/null | sed 1q`
49406"
49407
49408_ACEOF
49409
49410case $ac_config_files in *"
49411"*) set x $ac_config_files; shift; ac_config_files=$*;;
49412esac
49413
49414case $ac_config_headers in *"
49415"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49416esac
49417
49418
49419cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49420# Files that config.status was made for.
49421config_files="$ac_config_files"
49422config_headers="$ac_config_headers"
49423
49424_ACEOF
49425
49426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49427ac_cs_usage="\
49428\`$as_me' instantiates files and other configuration actions
49429from templates according to the current configuration.  Unless the files
49430and actions are specified as TAGs, all are instantiated by default.
49431
49432Usage: $0 [OPTION]... [TAG]...
49433
49434  -h, --help       print this help, then exit
49435  -V, --version    print version number and configuration settings, then exit
49436      --config     print configuration, then exit
49437  -q, --quiet, --silent
49438                   do not print progress messages
49439  -d, --debug      don't remove temporary files
49440      --recheck    update $as_me by reconfiguring in the same conditions
49441      --file=FILE[:TEMPLATE]
49442                   instantiate the configuration file FILE
49443      --header=FILE[:TEMPLATE]
49444                   instantiate the configuration header FILE
49445
49446Configuration files:
49447$config_files
49448
49449Configuration headers:
49450$config_headers
49451
49452Report bugs to <build-dev@openjdk.java.net>.
49453OpenJDK home page: <http://openjdk.java.net>."
49454
49455_ACEOF
49456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49457ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49458ac_cs_version="\\
49459OpenJDK config.status jdk9
49460configured by $0, generated by GNU Autoconf 2.69,
49461  with options \\"\$ac_cs_config\\"
49462
49463Copyright (C) 2012 Free Software Foundation, Inc.
49464This config.status script is free software; the Free Software Foundation
49465gives unlimited permission to copy, distribute and modify it."
49466
49467ac_pwd='$ac_pwd'
49468srcdir='$srcdir'
49469AWK='$AWK'
49470test -n "\$AWK" || AWK=awk
49471_ACEOF
49472
49473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49474# The default lists apply if the user does not specify any file.
49475ac_need_defaults=:
49476while test $# != 0
49477do
49478  case $1 in
49479  --*=?*)
49480    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49481    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49482    ac_shift=:
49483    ;;
49484  --*=)
49485    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49486    ac_optarg=
49487    ac_shift=:
49488    ;;
49489  *)
49490    ac_option=$1
49491    ac_optarg=$2
49492    ac_shift=shift
49493    ;;
49494  esac
49495
49496  case $ac_option in
49497  # Handling of the options.
49498  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49499    ac_cs_recheck=: ;;
49500  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49501    $as_echo "$ac_cs_version"; exit ;;
49502  --config | --confi | --conf | --con | --co | --c )
49503    $as_echo "$ac_cs_config"; exit ;;
49504  --debug | --debu | --deb | --de | --d | -d )
49505    debug=: ;;
49506  --file | --fil | --fi | --f )
49507    $ac_shift
49508    case $ac_optarg in
49509    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49510    '') as_fn_error $? "missing file argument" ;;
49511    esac
49512    as_fn_append CONFIG_FILES " '$ac_optarg'"
49513    ac_need_defaults=false;;
49514  --header | --heade | --head | --hea )
49515    $ac_shift
49516    case $ac_optarg in
49517    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49518    esac
49519    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49520    ac_need_defaults=false;;
49521  --he | --h)
49522    # Conflict between --help and --header
49523    as_fn_error $? "ambiguous option: \`$1'
49524Try \`$0 --help' for more information.";;
49525  --help | --hel | -h )
49526    $as_echo "$ac_cs_usage"; exit ;;
49527  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49528  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49529    ac_cs_silent=: ;;
49530
49531  # This is an error.
49532  -*) as_fn_error $? "unrecognized option: \`$1'
49533Try \`$0 --help' for more information." ;;
49534
49535  *) as_fn_append ac_config_targets " $1"
49536     ac_need_defaults=false ;;
49537
49538  esac
49539  shift
49540done
49541
49542ac_configure_extra_args=
49543
49544if $ac_cs_silent; then
49545  exec 6>/dev/null
49546  ac_configure_extra_args="$ac_configure_extra_args --silent"
49547fi
49548
49549_ACEOF
49550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49551if \$ac_cs_recheck; then
49552  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49553  shift
49554  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49555  CONFIG_SHELL='$SHELL'
49556  export CONFIG_SHELL
49557  exec "\$@"
49558fi
49559
49560_ACEOF
49561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49562exec 5>>config.log
49563{
49564  echo
49565  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49566## Running $as_me. ##
49567_ASBOX
49568  $as_echo "$ac_log"
49569} >&5
49570
49571_ACEOF
49572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49573_ACEOF
49574
49575cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49576
49577# Handling of arguments.
49578for ac_config_target in $ac_config_targets
49579do
49580  case $ac_config_target in
49581    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49582    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49583    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49584    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49585    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49586    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49587    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49588
49589  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49590  esac
49591done
49592
49593
49594# If the user did not use the arguments to specify the items to instantiate,
49595# then the envvar interface is used.  Set only those that are not.
49596# We use the long form for the default assignment because of an extremely
49597# bizarre bug on SunOS 4.1.3.
49598if $ac_need_defaults; then
49599  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49600  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49601fi
49602
49603# Have a temporary directory for convenience.  Make it in the build tree
49604# simply because there is no reason against having it here, and in addition,
49605# creating and moving files from /tmp can sometimes cause problems.
49606# Hook for its removal unless debugging.
49607# Note that there is a small window in which the directory will not be cleaned:
49608# after its creation but before its name has been assigned to `$tmp'.
49609$debug ||
49610{
49611  tmp= ac_tmp=
49612  trap 'exit_status=$?
49613  : "${ac_tmp:=$tmp}"
49614  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49615' 0
49616  trap 'as_fn_exit 1' 1 2 13 15
49617}
49618# Create a (secure) tmp directory for tmp files.
49619
49620{
49621  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49622  test -d "$tmp"
49623}  ||
49624{
49625  tmp=./conf$$-$RANDOM
49626  (umask 077 && mkdir "$tmp")
49627} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49628ac_tmp=$tmp
49629
49630# Set up the scripts for CONFIG_FILES section.
49631# No need to generate them if there are no CONFIG_FILES.
49632# This happens for instance with `./config.status config.h'.
49633if test -n "$CONFIG_FILES"; then
49634
49635
49636ac_cr=`echo X | tr X '\015'`
49637# On cygwin, bash can eat \r inside `` if the user requested igncr.
49638# But we know of no other shell where ac_cr would be empty at this
49639# point, so we can use a bashism as a fallback.
49640if test "x$ac_cr" = x; then
49641  eval ac_cr=\$\'\\r\'
49642fi
49643ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49644if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49645  ac_cs_awk_cr='\\r'
49646else
49647  ac_cs_awk_cr=$ac_cr
49648fi
49649
49650echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49651_ACEOF
49652
49653
49654{
49655  echo "cat >conf$$subs.awk <<_ACEOF" &&
49656  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49657  echo "_ACEOF"
49658} >conf$$subs.sh ||
49659  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49660ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49661ac_delim='%!_!# '
49662for ac_last_try in false false false false false :; do
49663  . ./conf$$subs.sh ||
49664    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49665
49666  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49667  if test $ac_delim_n = $ac_delim_num; then
49668    break
49669  elif $ac_last_try; then
49670    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49671  else
49672    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49673  fi
49674done
49675rm -f conf$$subs.sh
49676
49677cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49678cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49679_ACEOF
49680sed -n '
49681h
49682s/^/S["/; s/!.*/"]=/
49683p
49684g
49685s/^[^!]*!//
49686:repl
49687t repl
49688s/'"$ac_delim"'$//
49689t delim
49690:nl
49691h
49692s/\(.\{148\}\)..*/\1/
49693t more1
49694s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49695p
49696n
49697b repl
49698:more1
49699s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49700p
49701g
49702s/.\{148\}//
49703t nl
49704:delim
49705h
49706s/\(.\{148\}\)..*/\1/
49707t more2
49708s/["\\]/\\&/g; s/^/"/; s/$/"/
49709p
49710b
49711:more2
49712s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49713p
49714g
49715s/.\{148\}//
49716t delim
49717' <conf$$subs.awk | sed '
49718/^[^""]/{
49719  N
49720  s/\n//
49721}
49722' >>$CONFIG_STATUS || ac_write_fail=1
49723rm -f conf$$subs.awk
49724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49725_ACAWK
49726cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49727  for (key in S) S_is_set[key] = 1
49728  FS = ""
49729
49730}
49731{
49732  line = $ 0
49733  nfields = split(line, field, "@")
49734  substed = 0
49735  len = length(field[1])
49736  for (i = 2; i < nfields; i++) {
49737    key = field[i]
49738    keylen = length(key)
49739    if (S_is_set[key]) {
49740      value = S[key]
49741      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49742      len += length(value) + length(field[++i])
49743      substed = 1
49744    } else
49745      len += 1 + keylen
49746  }
49747
49748  print line
49749}
49750
49751_ACAWK
49752_ACEOF
49753cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49754if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49755  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49756else
49757  cat
49758fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49759  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49760_ACEOF
49761
49762# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49763# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49764# trailing colons and then remove the whole line if VPATH becomes empty
49765# (actually we leave an empty line to preserve line numbers).
49766if test "x$srcdir" = x.; then
49767  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49768h
49769s///
49770s/^/:/
49771s/[	 ]*$/:/
49772s/:\$(srcdir):/:/g
49773s/:\${srcdir}:/:/g
49774s/:@srcdir@:/:/g
49775s/^:*//
49776s/:*$//
49777x
49778s/\(=[	 ]*\).*/\1/
49779G
49780s/\n//
49781s/^[^=]*=[	 ]*$//
49782}'
49783fi
49784
49785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49786fi # test -n "$CONFIG_FILES"
49787
49788# Set up the scripts for CONFIG_HEADERS section.
49789# No need to generate them if there are no CONFIG_HEADERS.
49790# This happens for instance with `./config.status Makefile'.
49791if test -n "$CONFIG_HEADERS"; then
49792cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49793BEGIN {
49794_ACEOF
49795
49796# Transform confdefs.h into an awk script `defines.awk', embedded as
49797# here-document in config.status, that substitutes the proper values into
49798# config.h.in to produce config.h.
49799
49800# Create a delimiter string that does not exist in confdefs.h, to ease
49801# handling of long lines.
49802ac_delim='%!_!# '
49803for ac_last_try in false false :; do
49804  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49805  if test -z "$ac_tt"; then
49806    break
49807  elif $ac_last_try; then
49808    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49809  else
49810    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49811  fi
49812done
49813
49814# For the awk script, D is an array of macro values keyed by name,
49815# likewise P contains macro parameters if any.  Preserve backslash
49816# newline sequences.
49817
49818ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49819sed -n '
49820s/.\{148\}/&'"$ac_delim"'/g
49821t rset
49822:rset
49823s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49824t def
49825d
49826:def
49827s/\\$//
49828t bsnl
49829s/["\\]/\\&/g
49830s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49831D["\1"]=" \3"/p
49832s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49833d
49834:bsnl
49835s/["\\]/\\&/g
49836s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49837D["\1"]=" \3\\\\\\n"\\/p
49838t cont
49839s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49840t cont
49841d
49842:cont
49843n
49844s/.\{148\}/&'"$ac_delim"'/g
49845t clear
49846:clear
49847s/\\$//
49848t bsnlc
49849s/["\\]/\\&/g; s/^/"/; s/$/"/p
49850d
49851:bsnlc
49852s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49853b cont
49854' <confdefs.h | sed '
49855s/'"$ac_delim"'/"\\\
49856"/g' >>$CONFIG_STATUS || ac_write_fail=1
49857
49858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49859  for (key in D) D_is_set[key] = 1
49860  FS = ""
49861}
49862/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49863  line = \$ 0
49864  split(line, arg, " ")
49865  if (arg[1] == "#") {
49866    defundef = arg[2]
49867    mac1 = arg[3]
49868  } else {
49869    defundef = substr(arg[1], 2)
49870    mac1 = arg[2]
49871  }
49872  split(mac1, mac2, "(") #)
49873  macro = mac2[1]
49874  prefix = substr(line, 1, index(line, defundef) - 1)
49875  if (D_is_set[macro]) {
49876    # Preserve the white space surrounding the "#".
49877    print prefix "define", macro P[macro] D[macro]
49878    next
49879  } else {
49880    # Replace #undef with comments.  This is necessary, for example,
49881    # in the case of _POSIX_SOURCE, which is predefined and required
49882    # on some systems where configure will not decide to define it.
49883    if (defundef == "undef") {
49884      print "/*", prefix defundef, macro, "*/"
49885      next
49886    }
49887  }
49888}
49889{ print }
49890_ACAWK
49891_ACEOF
49892cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49893  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49894fi # test -n "$CONFIG_HEADERS"
49895
49896
49897eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49898shift
49899for ac_tag
49900do
49901  case $ac_tag in
49902  :[FHLC]) ac_mode=$ac_tag; continue;;
49903  esac
49904  case $ac_mode$ac_tag in
49905  :[FHL]*:*);;
49906  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49907  :[FH]-) ac_tag=-:-;;
49908  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49909  esac
49910  ac_save_IFS=$IFS
49911  IFS=:
49912  set x $ac_tag
49913  IFS=$ac_save_IFS
49914  shift
49915  ac_file=$1
49916  shift
49917
49918  case $ac_mode in
49919  :L) ac_source=$1;;
49920  :[FH])
49921    ac_file_inputs=
49922    for ac_f
49923    do
49924      case $ac_f in
49925      -) ac_f="$ac_tmp/stdin";;
49926      *) # Look for the file first in the build tree, then in the source tree
49927	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49928	 # because $ac_f cannot contain `:'.
49929	 test -f "$ac_f" ||
49930	   case $ac_f in
49931	   [\\/$]*) false;;
49932	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49933	   esac ||
49934	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49935      esac
49936      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49937      as_fn_append ac_file_inputs " '$ac_f'"
49938    done
49939
49940    # Let's still pretend it is `configure' which instantiates (i.e., don't
49941    # use $as_me), people would be surprised to read:
49942    #    /* config.h.  Generated by config.status.  */
49943    configure_input='Generated from '`
49944	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49945	`' by configure.'
49946    if test x"$ac_file" != x-; then
49947      configure_input="$ac_file.  $configure_input"
49948      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49949$as_echo "$as_me: creating $ac_file" >&6;}
49950    fi
49951    # Neutralize special characters interpreted by sed in replacement strings.
49952    case $configure_input in #(
49953    *\&* | *\|* | *\\* )
49954       ac_sed_conf_input=`$as_echo "$configure_input" |
49955       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49956    *) ac_sed_conf_input=$configure_input;;
49957    esac
49958
49959    case $ac_tag in
49960    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49961      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49962    esac
49963    ;;
49964  esac
49965
49966  ac_dir=`$as_dirname -- "$ac_file" ||
49967$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49968	 X"$ac_file" : 'X\(//\)[^/]' \| \
49969	 X"$ac_file" : 'X\(//\)$' \| \
49970	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49971$as_echo X"$ac_file" |
49972    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49973	    s//\1/
49974	    q
49975	  }
49976	  /^X\(\/\/\)[^/].*/{
49977	    s//\1/
49978	    q
49979	  }
49980	  /^X\(\/\/\)$/{
49981	    s//\1/
49982	    q
49983	  }
49984	  /^X\(\/\).*/{
49985	    s//\1/
49986	    q
49987	  }
49988	  s/.*/./; q'`
49989  as_dir="$ac_dir"; as_fn_mkdir_p
49990  ac_builddir=.
49991
49992case "$ac_dir" in
49993.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49994*)
49995  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49996  # A ".." for each directory in $ac_dir_suffix.
49997  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49998  case $ac_top_builddir_sub in
49999  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50000  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50001  esac ;;
50002esac
50003ac_abs_top_builddir=$ac_pwd
50004ac_abs_builddir=$ac_pwd$ac_dir_suffix
50005# for backward compatibility:
50006ac_top_builddir=$ac_top_build_prefix
50007
50008case $srcdir in
50009  .)  # We are building in place.
50010    ac_srcdir=.
50011    ac_top_srcdir=$ac_top_builddir_sub
50012    ac_abs_top_srcdir=$ac_pwd ;;
50013  [\\/]* | ?:[\\/]* )  # Absolute name.
50014    ac_srcdir=$srcdir$ac_dir_suffix;
50015    ac_top_srcdir=$srcdir
50016    ac_abs_top_srcdir=$srcdir ;;
50017  *) # Relative name.
50018    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50019    ac_top_srcdir=$ac_top_build_prefix$srcdir
50020    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50021esac
50022ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50023
50024
50025  case $ac_mode in
50026  :F)
50027  #
50028  # CONFIG_FILE
50029  #
50030
50031_ACEOF
50032
50033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50034# If the template does not know about datarootdir, expand it.
50035# FIXME: This hack should be removed a few years after 2.60.
50036ac_datarootdir_hack=; ac_datarootdir_seen=
50037ac_sed_dataroot='
50038/datarootdir/ {
50039  p
50040  q
50041}
50042/@datadir@/p
50043/@docdir@/p
50044/@infodir@/p
50045/@localedir@/p
50046/@mandir@/p'
50047case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50048*datarootdir*) ac_datarootdir_seen=yes;;
50049*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50050  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50051$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50052_ACEOF
50053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50054  ac_datarootdir_hack='
50055  s&@datadir@&$datadir&g
50056  s&@docdir@&$docdir&g
50057  s&@infodir@&$infodir&g
50058  s&@localedir@&$localedir&g
50059  s&@mandir@&$mandir&g
50060  s&\\\${datarootdir}&$datarootdir&g' ;;
50061esac
50062_ACEOF
50063
50064# Neutralize VPATH when `$srcdir' = `.'.
50065# Shell code in configure.ac might set extrasub.
50066# FIXME: do we really want to maintain this feature?
50067cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50068ac_sed_extra="$ac_vpsub
50069$extrasub
50070_ACEOF
50071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50072:t
50073/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50074s|@configure_input@|$ac_sed_conf_input|;t t
50075s&@top_builddir@&$ac_top_builddir_sub&;t t
50076s&@top_build_prefix@&$ac_top_build_prefix&;t t
50077s&@srcdir@&$ac_srcdir&;t t
50078s&@abs_srcdir@&$ac_abs_srcdir&;t t
50079s&@top_srcdir@&$ac_top_srcdir&;t t
50080s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50081s&@builddir@&$ac_builddir&;t t
50082s&@abs_builddir@&$ac_abs_builddir&;t t
50083s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50084$ac_datarootdir_hack
50085"
50086eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50087  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50088
50089test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50090  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50091  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50092      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50093  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50094which seems to be undefined.  Please make sure it is defined" >&5
50095$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50096which seems to be undefined.  Please make sure it is defined" >&2;}
50097
50098  rm -f "$ac_tmp/stdin"
50099  case $ac_file in
50100  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50101  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50102  esac \
50103  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50104 ;;
50105  :H)
50106  #
50107  # CONFIG_HEADER
50108  #
50109  if test x"$ac_file" != x-; then
50110    {
50111      $as_echo "/* $configure_input  */" \
50112      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50113    } >"$ac_tmp/config.h" \
50114      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50115    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50116      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50117$as_echo "$as_me: $ac_file is unchanged" >&6;}
50118    else
50119      rm -f "$ac_file"
50120      mv "$ac_tmp/config.h" "$ac_file" \
50121	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50122    fi
50123  else
50124    $as_echo "/* $configure_input  */" \
50125      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50126      || as_fn_error $? "could not create -" "$LINENO" 5
50127  fi
50128 ;;
50129
50130
50131  esac
50132
50133done # for ac_tag
50134
50135
50136as_fn_exit 0
50137_ACEOF
50138ac_clean_files=$ac_clean_files_save
50139
50140test $ac_write_fail = 0 ||
50141  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50142
50143
50144# configure is writing to config.log, and then calls config.status.
50145# config.status does its own redirection, appending to config.log.
50146# Unfortunately, on DOS this fails, as config.log is still kept open
50147# by configure, so config.status won't be able to write to it; its
50148# output is simply discarded.  So we exec the FD to /dev/null,
50149# effectively closing config.log, so it can be properly (re)opened and
50150# appended to by config.status.  When coming back to configure, we
50151# need to make the FD available again.
50152if test "$no_create" != yes; then
50153  ac_cs_success=:
50154  ac_config_status_args=
50155  test "$silent" = yes &&
50156    ac_config_status_args="$ac_config_status_args --quiet"
50157  exec 5>/dev/null
50158  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50159  exec 5>>config.log
50160  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50161  # would make configure fail if this is the last instruction.
50162  $ac_cs_success || as_fn_exit 1
50163fi
50164if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50165  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50166$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50167fi
50168
50169
50170# Try to move the config.log file to the output directory.
50171if test -e ./config.log; then
50172  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50173fi
50174
50175# Make the compare script executable
50176$CHMOD +x $OUTPUT_ROOT/compare.sh
50177
50178# Finally output some useful information to the user
50179
50180  # Finally output some useful information to the user
50181
50182  printf "\n"
50183  printf "====================================================\n"
50184  if test "x$no_create" != "xyes"; then
50185    if test "x$IS_RECONFIGURE" != "xyes"; then
50186      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50187    else
50188      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50189    fi
50190  else
50191    if test "x$IS_RECONFIGURE" != "xyes"; then
50192      printf "A configuration has been successfully checked but not created\n"
50193    else
50194      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50195    fi
50196  fi
50197  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50198    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50199  else
50200    printf "using default settings.\n"
50201  fi
50202
50203  printf "\n"
50204  printf "Configuration summary:\n"
50205  printf "* Debug level:    $DEBUG_LEVEL\n"
50206  printf "* JDK variant:    $JDK_VARIANT\n"
50207  printf "* JVM variants:   $with_jvm_variants\n"
50208  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50209
50210  printf "\n"
50211  printf "Tools summary:\n"
50212  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50213    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50214  fi
50215  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50216  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50217  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50218  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50219
50220  printf "\n"
50221  printf "Build performance summary:\n"
50222  printf "* Cores to use:   $JOBS\n"
50223  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50224  if test "x$CCACHE_STATUS" != "x"; then
50225    printf "* ccache status:  $CCACHE_STATUS\n"
50226  fi
50227  printf "\n"
50228
50229  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50230    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50231    printf "will result in longer build times.\n"
50232    printf "\n"
50233  fi
50234
50235  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50236    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50237    printf "These are not respected, and will be ignored. It is recommended\n"
50238    printf "that you clean your environment. The following variables are set:\n"
50239    printf "$FOUND_ALT_VARIABLES\n"
50240    printf "\n"
50241  fi
50242
50243  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50244    printf "WARNING: Your build output directory is not on a local disk.\n"
50245    printf "This will severely degrade build performance!\n"
50246    printf "It is recommended that you create an output directory on a local disk,\n"
50247    printf "and run the configure script again from that directory.\n"
50248    printf "\n"
50249  fi
50250
50251  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50252    printf "WARNING: The result of this configuration has overridden an older\n"
50253    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50254    printf "proper build. Failure to do so might result in strange build problems.\n"
50255    printf "\n"
50256  fi
50257
50258  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50259    printf "WARNING: The result of this configuration was not saved.\n"
50260    printf "You should run without '--no-create | -n' to create the configuration.\n"
50261    printf "\n"
50262  fi
50263
50264